Bug 431864 - GATEWAY in /etc/sysconfig/network has no effect
GATEWAY in /etc/sysconfig/network has no effect
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: initscripts Maintenance Team
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-07 09:57 EST by Lutz Lange
Modified: 2008-02-08 03:38 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-08 03:38:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lutz Lange 2008-02-07 09:57:41 EST
Description of problem:
Setting GATEWAY=<IP> in /etc/sysconfig/network does nothing

How reproducible:
set it 
$ service network restart
$ ip r s

even rebooting does not help


Expected results:
Default GW is set.

Additional info:
remove Var from /usr/share/doc/initscripts*/sysconfig.txt or fix.
Comment 1 Phil Knirsch 2008-02-07 10:15:06 EST
I just tried it with a default RHEL-5.1 install:

Before:

[root@localhost ~]# route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.122.0   *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         192.168.122.1   0.0.0.0         UG    0      0        0 eth0

Edited /etc/sysconfig/network and added:

GATEWAY=192.168.122.10

[root@localhost sysconfig]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  
Determining IP information for eth0... done.
                                                           [  OK  ]
[root@localhost sysconfig]# route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.122.0   *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         192.168.122.10  0.0.0.0         UG    0      0        0 eth0

Can you provide some more information please? e.g. attach your
/etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 scripts.

Thanks,

Read ya, Phil
Comment 2 Lutz Lange 2008-02-08 03:28:28 EST
i rechecked ... and could not reproduce the problem. 
seams to work as intended.

Note You need to log in before you can comment on or make changes to this bug.