1829535 Members
1644 Online
109992 Solutions
New Discussion

Re: Default Gateway

 
SOLVED
Go to solution
Harstad
Advisor

Default Gateway

Hi

I´ve configured my DG in : /etc/sysconfig/network...
GATEWAY=x.x.x.x

We have rebooted the system and doing a netstat -rn the DG is not in the routes tables,,

Do you know something about it??

Thanks
5 REPLIES 5
Alexander Chuzhoy
Honored Contributor

Re: Default Gateway

see if have GATEWAY line
in /etc/sysconfig/network-scripts/ifcfg-eth?



adding default route would be

route add 0.0.0.0 netmask 0.0.0.0 gw x.x.x.x
Harstad
Advisor

Re: Default Gateway

Hi

Adding the route is as follows:

route add default gw x.x.x.x

About the ifcfg-ethX,,,,are configured for each network interface
Sergejs Svitnevs
Honored Contributor

Re: Default Gateway

try to add new string in the /etc/sysconfig/network:
GATEWAYDEV=eth0

then execute "service network restart".

Regards,
Sergejs
Alexander Chuzhoy
Honored Contributor

Re: Default Gateway

oops -the line foe adding the default gateway
should be
route add -net 0.0.0.0 netmask 0.0.0.0 gw x.x.x.x


where default gateway is the default gateway of the nic that you wish to acees the whole world through
Jerome Henry
Honored Contributor
Solution

Re: Default Gateway

Yes,
route add default gw x.x.x.x dev eth0
if you have several eths
In this case in /etc/sysconfig/network
GATEWAY=x.x.x.x
GATEWAYDEV=eth0
Of course you're not on dhcp, where dhcp server sets gw on restarting network services.


J

hth

You can lean only on what resists you...