Operating System - Linux
1827854 Members
1416 Online
109969 Solutions
New Discussion

Re: linux 7.2 gateway configuration

 
David_550
Advisor

linux 7.2 gateway configuration

Hi
I have a problem with the gateway configuration,I edit the /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ifcfg-eth0 file but the gateway is not set when i reboot the server.
why the gateway is missing when i reboot the system???
Please help
9 REPLIES 9
Martin P.J. Zinser
Honored Contributor

Re: linux 7.2 gateway configuration

Hello,

That should be the correct place. How do you
determine the route is not set?

On SuSE the follwoing command will show you all routes:

# /sbin/ip route list
10.0.0.0/8 dev eth0 scope link
default via 10.0.0.253 dev eth0

In case this works on Redhat too, what do you get there?

Greetings, Martin
K.C. Chan
Trusted Contributor

Re: linux 7.2 gateway configuration

I believe netconf is still available with rh7.2; why don't you try setting your network via netconf.
Reputation of a thousand years can be determined by the conduct of an hour
Stuart Browne
Honored Contributor

Re: linux 7.2 gateway configuration

I beleive it's 'neat' by RH7.2.

In any case, a singular 'GATEWAY' entry in '/etc/sysconfig/network' should suffice (remove any other 'GATEWAY' entries from '/etc/sysconfig/network-scripts/ifcfg-*').

If you have a PPP interface of which isn't supposed to be a default gateway, then make sure you have 'DEFROUTE=no' in the 'ifcfg-ppp*' file.

Failing these, check your other start up routines for references to 'route delete' or 'ip route del' commands.
One long-haired git at your service...
David_550
Advisor

Re: linux 7.2 gateway configuration

In the /etc/sysconfig/network file, is this the format??
GATEWAY=130.2.0.254
or
GATEWAY="130.2.0.254"

Thanks
Alexander Chuzhoy
Honored Contributor

Re: linux 7.2 gateway configuration

Works fine without the quotation marks on my machines..
Steven E. Protter
Exalted Contributor

Re: linux 7.2 gateway configuration

Its not quotes.

After boot, is the gateway pingable?

ping ip_of_gateway

If you can't ping the gateway, you can't use the gateway.

If you upload the actual ifcfg-eth0 file, i can look for inconsistencies.

As far as quotes go, you have to be consistent.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Martin P.J. Zinser
Honored Contributor

Re: linux 7.2 gateway configuration

All the examples I've found are with quotes ;-)
Can't access my Redhat system at home right now
to check.

Did you check if the route gets set as suggested earlier? No being able to get out might have different reasons (like missing network connectivity to the gateway or a firewall on the gateway blocking you).

Greetings, Martin
David_550
Advisor

Re: linux 7.2 gateway configuration

What is the right way for configure this files????:
the /etc/sysconfig/network file and /etc/sysconfig/network-scripts/ifcfg-eth0 file.

The /etc/sysconfig/network-scripts/ifcfg-eth0
file exist after installation of linux??

I can pinging the gateway, but not pinging my another net.

Somebody can referme information.
Please
Bill Thorsteinson
Honored Contributor

Re: linux 7.2 gateway configuration

Try ifconfig -a to see the configuration of
your nic.

Try netstat -rn to see your routing table.
Your default route should point to the gateway.

There should be no entry for the other net.

Check to see if you can ping or connect to anything on the other side of the gateway.

Since sobig some routers won't pass pings. Try web servers and other such services.