Bug 73739

Summary: Can't switch networks with laptop running 9.3
Product: [openSUSE] SUSE Linux 10.1 Reporter: Bart Whiteley <bwhiteley>
Component: NetworkAssignee: Michal Zugec <mzugec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: kr, lnussel, mvidner
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: ethernet ifcfg
wlan ifcfg
output of 'ip a', ip r', and /etc/resolv.conf
when my configuration was working
after network switch networking broken

Description Bart Whiteley 2005-03-17 22:15:04 UTC
I've seen this since beta2, but have finally decided it is not  
operator error.  Any time I switch networks with my laptop, I lose 
all network connectivity.  I have a Toshiba tecra 9000 with built-in 
wireless and 802.11b.  I have wireless configured for the Novell wireless 
network.  The wired connection is DHCP, and is configured to come up when 
the cable is plugged in.   
 
If I plug in the cable in my office, both interfaces are up.  If I move 
to a conference room, and plug in a cable, I now have no network connectivity 
at all.  I've tried 'rcnetwork restart'.  It doesn't help.  I've tried  
ifdown'ing and ifup'ing the interfaces.  that doesn't help either.  Only  
a reboot will bring back network connectivity.   
 
It doesn't help to bring down the wireless interface, and only bring up  
the wired interface either.  
 
both interfaces do get IPs from DHCP in all cases, but I can't TCP connect 
to anything, regardless of whether I address the remote host by hostname or  
IP.  I get a "no route to host" error with all attempted connections.
Comment 1 Christian Zoz 2005-03-18 10:41:47 UTC
Please show me the content of all /etc/sysconfig/network/ifcfg-* (except lo).
Comment 2 Bart Whiteley 2005-03-18 17:08:07 UTC
Created attachment 32327 [details]
ethernet ifcfg
Comment 3 Bart Whiteley 2005-03-18 17:08:49 UTC
Created attachment 32328 [details]
wlan ifcfg
Comment 4 Bart Whiteley 2005-03-18 17:10:57 UTC
I've verified this again.  in my office all is well.  I unplug, go 
down the hall to a conference room, and plug in.  'beep'.  my interface 
now has a new IP, on a different network from DHCP, but no network  
activity works.  I return to my office, plug in, 'beep'.  Now all is  
well.  So, changing the ip or network seems to be the problem.  
Comment 5 Bart Whiteley 2005-03-23 04:50:57 UTC
Others have seen this as well, trying to connect to the 
BrainShare wireless network.  Blocker, IMO, as it makes 9.3  
a bit useless on a laptop.  
Comment 6 Andreas Jaeger 2005-03-23 07:53:30 UTC
does it work if you disable the firewall?
Comment 7 Joachim Gleissner 2005-03-23 08:37:05 UTC
You have a LAN device configured with startmode ifplugd and a WLAN device with  
startmode auto. This means that both devices get up when a cable is plugged  
in. This may result in dns resolver and default route settings you don't want 
to have. Use startmode ifplugd with a lower priority for the WLAN device, this 
should give you DNS and default route of the ethernet device whenever a cable 
is plugged in and WLAN connection (if available) with no cable. 
Comment 8 Christian Zoz 2005-03-23 08:40:41 UTC
If the problem is not the firewall:
- Does it work if the wlan interface is always down (STARTMODE=manual)?
  If yes, then try to set the wlan interface to STARTMODE=ifplugd with
  IFPLUGD_PRIORITY=10. (You can do that in YaST as well.)
  [[Oh well, "Mid-Air-Collision": thats, what Joe was about in last comment.]]
- For the ethernet interface you have configured a static address additionally 
  to dhcp. Is that intention?
- What is the content of /etc/sysconfig/network/route?
- Please check the basic network settings when it works and when it does not:
  + ip a
  + ip r
  + cat /etc/resolv.conf
  Attach the output of these commands if you don't know if these settigs are   
  correct.
Comment 9 Joachim Gleissner 2005-03-23 09:09:55 UTC
As YaST does not configure both devices with DHCP during installation, this is 
not a blocker IMHO. 
Comment 10 Christian Zoz 2005-03-23 11:12:53 UTC
I guess this is following problem (still theory, needs to be verified by bug
reporter):

User configured interface with static ip and default route for network A. Later
he reconfigures to dhcp. Now YaST does
- not remove the static ip from the configuration (bug, this is not what the
  user expects, the ip field in YaST is greyed!!!)
- not remove the static default route (maybe a bug, dhco but static default
  route may make sense)

Now ifup starts dhcp and sets up the static ip (feature!). And it sets up the
static default route (feature!)
Now when he is in network A he has no problem, because the static default route
is correct. But in network B the default route is wrong and it does not work
anymore.

Bart, please check if this is your problem.

If the old static ip were deleted, the setting up the wrong default route would
result in an error when ifup is called (in syslog if YaST does it in backround).
This error is harmless in this case. Even more it leads to a functional network
setup, because dhcpcd will now set the default route. And this error message
would show the user that there is something wrong in his configuration.

In every case, YaST should remove previous static ip when switching to dhcp. And
 maybe also the static default route.
Comment 11 Bart Whiteley 2005-03-23 18:03:49 UTC
I have no firewall running, and have reproduced it again, so it's not 
firewall. 
Comment 12 Bart Whiteley 2005-03-23 18:11:07 UTC
Created attachment 32702 [details]
output of 'ip a', ip r', and /etc/resolv.conf
Comment 13 Bart Whiteley 2005-03-23 18:15:55 UTC
Taking down the wireless interface does not improve the situation.  
 
I've reproduce it a dozen times this morning gathering the info.   
Good exercise walking from my office to the conf. room on the  
other side of the building. :) 
Comment 14 Forgotten User ZhJd0F0L3x 2005-03-23 18:18:29 UTC
for debugging: 
 - take down the wireless interface 
 - pull out ethernet cable 
 - wait 15 seconds (after 10 seconds the interface should be taken down) 
 - insert ethernet cable 
Does it work now? 
Comment 15 Bart Whiteley 2005-03-23 18:34:53 UTC
This does not work.  The wireless interface has been down for several 
round trips to the conf. room and back, and it takes 60 seconds to  
walk to the conf. room.  So, what you propose has already been tested 
several times (and I just did it again for completeness).  
 
That's all the feedback I can provide today.  Need to leave for  
BrainShare now.  
Comment 16 Christian Zoz 2005-03-23 19:30:17 UTC
OK, the ip a/r output from attachment 32702 [details] shows that the default route is
wrong. Go and check /etc/sysconfig/network/routes. I guess it contains 
  default 137.65.59.254 - -
Bart, please verify that.

Just remove the file /etc/sysconfig/network/routes.
And in ifcfg-eth-id-00:00:39:f8:d5:e2 remove 
  BROADCAST='137.65.59.255'
  IPADDR='137.65.59.141'
  NETMASK='255.255.252.0'
  NETWORK='137.65.56.0'
Then it will work as expected.
Comment 17 Forgotten User ZhJd0F0L3x 2005-03-23 19:42:20 UTC
the question is: how do those entries get into the configuration? Was this once 
a static setup, changed with "vi" to "dhcp" or did YaST do this? If so, this 
would be a (bad) YaST bug IMO. 
Comment 18 Christian Zoz 2005-03-23 20:19:50 UTC
This was very probably a previous static configuration. Then changed with YaST.
I tried that myself today. 100% reproducible. When calling YaST network again
you can even see the static ip address in a greyed field.

YaST had to remove static ip and default route if user switches to dhcp. It
could perhaps ask before removing the default route, because maybe somebody
wants a static default route with dhcp. But at least the static ip address has
to be removed. Then, if dhcp gets addresses from another network, the static
default route would not hurt.

This is something for a YOUpdate. As soon as Bart verifies this i wil assign it
to Martin.
Comment 19 Bart Whiteley 2005-03-23 22:36:43 UTC
The settings came from YaST.  This is what I did... 
 
- configure wired interface with static IP.  
- enabled SCPM.  
- created Wired static and Wired DHCP profiles.  
- Switched to DHCP profile.  
- Changed wired interface from static to DHCP via YAST.  
 
I can't verify #16 ATM.  
Comment 20 Garrett Richards 2005-03-30 04:45:33 UTC
Created attachment 32904 [details]
when my configuration was working

my working configuration before network switch
Comment 21 Garrett Richards 2005-03-30 04:46:04 UTC
Created attachment 32905 [details]
after network switch networking broken
Comment 22 Garrett Richards 2005-03-30 04:46:22 UTC
 have a similiar problem.  And I always get a 'ip route replace to
169.254.0.0/16 dev ath0' error everytime i switch a network and do an
ifup ath0/eth0 either one but never both at same time.  But i only get
that error once and then you have to reboot to get it.  I also
reinstalled w/ a good network connection at novell and got this for my
routing

(this is working after install)
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
137.65.156.0    *               255.255.252.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         prv-lan-cisco1- 0.0.0.0         UG    0      0        0 eth0

now this is what i get from school 

(this is after a network switch)
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 ath0
10.4.66.0       0.0.0.0         255.255.254.0   U     0      0        0 ath0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         10.4.66.1       0.0.0.0         UG    0      0        0 ath0


I realize these are diferent interfaces but does this routing for the second
look right ??  Does 0.0.0.0 act like *

I also included some more configuration files of before and after 
Comment 23 Garrett Richards 2005-03-30 04:48:14 UTC
my attachments are down at the bottom
Comment 24 Christian Zoz 2005-04-22 13:35:48 UTC
The attachments from Garrett did not help so much. But coment 19 from Bart shows
what i expected: First configured static then switched to dhcp makes the trouble.

Martin please read coment 18. Remove default route and ip address when switching
from static to dhcp.
Comment 25 Martin Vidner 2005-08-15 16:14:42 UTC
*** Bug 104494 has been marked as a duplicate of this bug. ***
Comment 26 Martin Vidner 2005-09-01 16:08:09 UTC
I am not so sure about removing the default route. Can there be cases whre 
there is a DHCP interface and yet a static default route, perhaps for a 
different interface? 
 
I have tested that when I set a default route that does not match the current 
subnet (in general, any of the subnets I guess) it is not set and DHCP will 
set its own. So it works OK except if the old and new gateways are in the same 
subnet. 
Comment 27 Christian Zoz 2005-09-01 18:46:22 UTC
Yes, a static default route that is in another subnet does not harm. But do you
know that before?

If you want individual default route setting for different interfaces you should
use ifroute-*.

You should remove the default route if the user switches to dhcp. If the user
adds a default route later you may add it.
Comment 28 Martin Vidner 2006-08-23 15:25:09 UTC
Originally reported for SL 9.3 Beta4.
Moving to make the bug public.
Comment 30 K.R. Foley 2006-08-23 17:50:10 UTC
This appears to be fixed in 10.1. What about a fix for 9.3?
Comment 31 Martin Vidner 2006-08-24 17:07:10 UTC
No, sorry. If it is not a security bug, the preferred solution is to upgrade to a release where the bug is fixed.

In this case the route bit seems still left to fix.

Comment 32 Martin Vidner 2006-08-28 11:52:19 UTC
Reassigning to the new maintainer of yast2-network.
Comment 33 Michal Zugec 2006-08-30 14:24:31 UTC
fixed