Bug 169526

Summary: lost Gateway when I change static IP by DHCP
Product: [Fedora] Fedora Reporter: claude pirault <claude.pirault>
Component: system-config-networkAssignee: Harald Hoyer <harald>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 4CC: bertho, kai
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-19 13:51:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description claude pirault 2005-09-29 12:25:54 UTC
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:
Always

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).
DEVICE=eth0
BOOTPROTO=dhcp (I configure with DHCP in vlan1)
HWADDR=00:0D:56:03:F7:HD
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0 (it is the netmask in vlan2)
IPADDR=193.235.100.25 (it is the static IP address in vlan2)
USERCTL=no
PEERDNS=yes
GATEWAY= 193.235.100.150 (it is the IP address in vlan2)
IPV6INIT=no

Comment 1 Bertho 2006-01-10 13:28:53 UTC
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 12:36:24 UTC
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.

Regards,
 Kai.


Comment 3 Harald Hoyer 2006-07-19 13:51:51 UTC

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