LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Specifying gateway IP under RH 7.2 (https://www.linuxquestions.org/questions/linux-software-2/specifying-gateway-ip-under-rh-7-2-a-9353/)

pjrestrepo 11-28-2001 06:58 PM

Specifying gateway IP under RH 7.2
 
I have been trying to setup a gateway for my network. The gateway computer is using RedHat 7.0. There are two more computers: one using RedHat 7.0 and a new one using RedHat 7.2.

RH 7.0 comes with netcfg, which allows to specify the IP address of the gateway (192.168.0.1). RH 7.2 has a different network configuration program that does not allow the user to enter that information. The RH 7.0 client computer can see the internet through the gateway without any problem. The RH 7.2 computer insists that the gateway IP is 192.168.0.254. How do I tell the RH 7.2 computer that the gateway IP address is 192.168.0.1?

Thanks for any suggestions.

DMR 11-28-2001 07:41 PM

At the command line:
Code:

route add default gw xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is the gateway IP.

pjrestrepo 11-28-2001 07:58 PM

Thanks a lot. That was simple enough!

I read the man page for route, and could not find a simple example.

Pedro

trickykid 11-28-2001 11:28 PM

you can always use setup as well now in redhat, which gives a list of many different configs for many things like network, mouse, X... etc...

acid_kewpie 11-29-2001 05:48 AM

the route program will not normally be permanent i think, to do it permanently, just edit the GATEWAY= line in /etc/sysconfig/network

pjrestrepo 11-29-2001 11:35 AM

Follow up
 
I tried all suggestions. For RedHat 7.2, this is the final case:

1) route works for the current session, but does not make a permanent change to the gateway setting
2) Editing the /etc/sysconfig/network and changing the value of GATEWAY= does not make a permanent change either.
3) running /usr/sbin/setup brings up a text-based interface that does make a permanent change to the gateway IP address.

Again, thanks a lot to all who responded.

Pedro

DMR 11-30-2001 02:37 AM

Quote:

Originally posted by acid_kewpie
the route program will not normally be permanent i think, to do it permanently, just edit the GATEWAY= line in /etc/sysconfig/network
Weird. That definitely should have worked, although I haven't mucked around with RH 7.2 yet.

:confused:

wdingus 12-01-2001 10:35 AM

Editing /etc/sysconfig/network and adding a GATEWAY=x.x.x.x line IS permanent too... Change it and restart networking by doing /etc/rc.d/init.d/network restart and then do a "netstat -rn" to see your route tables. Reboot and check again. That file is parsed on bootup. If yours is not, something is broken on yours.


All times are GMT -5. The time now is 06:46 PM.