1834488 Members
3554 Online
110067 Solutions
New Discussion

Default Gateway

 
SOLVED
Go to solution
Inderpreet Singh
New Member

Default Gateway

Which file in linux (RH 7.2) needs to be edited to configure default gateway ? What is the syntax ?
2 REPLIES 2
Ted Ellis_2
Honored Contributor
Solution

Re: Default Gateway

here you go...

/etc/sysconfig/network has the default gateway and some other entries... here are the contents of mine:

NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=devlx0.triu.com
DOMAINNAME=domain.com
GATEWAY=xxx.xxx.32.1
GATEWAYDEV=eth0

the file that contains config details for the cards are in /etc/sysconfig/network-scripts

example for eth0 is ifcfg-eth0 in that directory... here are my contents for that:

DEVICE=eth0
BROADCAST=xxx.xxx.32.255
IPADDR=xxx.xxx.32.47
NETMASK=255.255.255.0
NETWORK=xxx.xxx.32.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

hope that helps

Ted
Inderpreet Singh
New Member

Re: Default Gateway

Hi Ted,

Thanks a lot.
Inder