Bug 169526 - lost Gateway when I change static IP by DHCP
lost Gateway when I change static IP by DHCP
Status: CLOSED DUPLICATE of bug 149780
Product: Fedora
Classification: Fedora
Component: system-config-network (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
  Show dependency treegraph
Reported: 2005-09-29 08:25 EDT by claude pirault
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-19 09:51:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description claude pirault 2005-09-29 08:25:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

Description of problem:
I configure the network with system-config-network 1.3.26.
When I change the configuration address IP I have a problem with the gateway.
1) I try DHCP on vlan1 it is OK. I have a good address IP,I can ping Vlan1 and the others vlan and I can go out on internet. I make "netstat -r" I see the gateway 
2) Now I try static IP on vlan2 it is OK. I can ping Vlan2 and the others vlan and I can go out on internet. I make "netstat -r" I see the gateway.
3) I come back on vlan1 with DHCP, it is not good.I have a good address IP and I can ping Vlan1 but I cannot ping the others vlan and I can't go out on internet. I make "netstat -r" I don't see the gateway.

Version-Release number of selected component (if applicable):
system-config-network 1.3.26

How reproducible:

Steps to Reproduce:
You can look the description above

Additional info:

I show you the file cfcfg.eth0 when I configure with DHCP (step 3 in description above).
BOOTPROTO=dhcp (I configure with DHCP in vlan1)
NETMASK= (it is the netmask in vlan2)
IPADDR= (it is the static IP address in vlan2)
GATEWAY= (it is the IP address in vlan2)
Comment 1 Bertho 2006-01-10 08:28:53 EST
The same happened to me.
The problem seems to be in the switch from static IP to dhcp.
System-config-network leaves the GATEWAY, IPADDR and NETMASK parameter untouched
in the updated file /etc/sysconfig/network-scripts/ifcfg-xxx. This in effect
distrurbs the function of /sbin/dhclient-script, which explicitely wants to set
the gateway from ifcfg-xxx. However, when the dhcp address is on a different
subnet, then no default gateway will be set by dhclient-script because the
gateway is unreachable and no communication out if the subnet is possible.

There seems to be an easy route to a fix. A switch from static to dhcp should
lose its memory of the previously set static gateway, netmask and IP altogether.
This should be a trivial workaround until a better way can be found.

Greetings Bertho
Comment 2 Kai Hambrecht 2006-02-03 07:36:24 EST
Same here. It seems there are a lot of other bug reports here which also
addressed this issue some times ago (#167593, #162902, #169113, #149780),
discussing if this is an dhclient or system-config-network problem. Anyway this
is still not fixed. But right now it's very uncomfortable for e.g. laptop users
who often have to switch between static IP and DHCP.

Comment 3 Harald Hoyer 2006-07-19 09:51:51 EDT

*** This bug has been marked as a duplicate of 149780 ***

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