1834741 Members
3027 Online
110070 Solutions
New Discussion

Re: 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