LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2017, 02:27 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,409

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Network oddity after suspend


/begin recent history
I recently tried to upgrade to slackware-current, started sinking in brown smelly stuff, and did an "Upgrade" back to 14.2. Then after tidying installed packages not in /var/log/packages, packages in /var/log/packages whose files were missing, and some other stuff that inevitably takes the hump when you get at this sort of mess, I sorted myself out. The lesson was 'careful with slackpkg.'
/end recent history

I am left with a weird network problem on resume from a suspend. The network vanishes, but a restart of /etc/rc.d/rc.inet1 sorts it. Tonight I went hunting for it. My home network is on 192.168.178.0/24 with a (Fritzbox) router on 192.168.178.1. Everything is secured wifi, and no wires are used. Nothing stupid or over specific is in the config (hosts, host.conf, resolv.conf

On closer examination, I had been transferred to 192.168.223.<something>. 192.168.178.1 was inaccessible, but 192.168.178.42 (My printer) was reachable, although the internet was not. The router presented itself on 192.168.223.1. A reboot of dhcpcd landed me on 192.168.223.x again. Restarting rc.inet1 fixed it. I am back on 192.168.178.x. Here's the ifconfig 2 minutes apart
Code:
bash-4.3$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.223.100  netmask 255.255.255.0  broadcast 192.168.223.255
        inet6 fe80::52b7:c3ff:fe50:d6b5  prefixlen 64  scopeid 0x20<link>
        ether 50:b7:c3:50:d6:b5  txqueuelen 1000  (Ethernet)
        RX packets 511642  bytes 619346168 (590.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 303553  bytes 41759498 (39.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bash-4.3$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.26  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 fe80::52b7:c3ff:fe50:d6b5  prefixlen 64  scopeid 0x20<link>
        ether 50:b7:c3:50:d6:b5  txqueuelen 1000  (Ethernet)
        RX packets 512562  bytes 619662331 (590.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 304303  bytes 41907487 (39.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
It seems to be something in my box, as it only started after the messing. AFAIK, dhcpcd is restarted on a resume. If anyone has a clue what's going on, I'd love to know.
 
Old 10-03-2017, 05:19 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,827
Blog Entries: 10

Rep: Reputation: Disabled
Hi:

Sounds like the module that serves your network control may not be aware that it needs to reload from resume--

Maybe try telling the system that you want a specific module/driver to explicitly "unload on suspend" and "reload on resume".

https://ubuntuforums.org/showthread.php?t=2004690
 
1 members found this post helpful.
Old 10-03-2017, 06:15 PM   #3
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware 14.2 64-bit
Posts: 386

Rep: Reputation: 102Reputation: 102
These links might give some input, ref. udev:

https://www.centos.org/forums/viewtopic.php?t=42758
http://askubuntu.com/questions/68907...0-udev-changes
https://www.linuxquestions.org/quest...re-4175601629/
https://www.linuxquestions.org/quest...y-wicd-891977/
 
Old 10-04-2017, 03:36 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,409

Original Poster
Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
Originally Posted by Ztcoracat View Post
Hi:

Sounds like the module that serves your network control may not be aware that it needs to reload from resume--

Maybe try telling the system that you want a specific module/driver to explicitly "unload on suspend" and "reload on resume".

https://ubuntuforums.org/showthread.php?t=2004690
ath9k controls wifi, ath3k does bluetooth; The only unknowns are mac80211 and cfg80211. @This box is strictly client with the Fritzbox being the server/router. Fritzbox is a fairly sophisticated system actually.
 
Old 10-04-2017, 10:10 AM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,827
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
It seems to be something in my box, as it only started after the messing.
That could of maybe somehow changed the way that the module loads and unloads.

Since current has a lot more pks, lib's etc.... than Slackware stable; perhaps current handles the wifi somewhat differently and thats the reason for the network problem? Configuration could be set differently:-

Are you using Network Manager or wicd?

FWIW my wifi will sometimes disappear or drop out. I've also seen the wifi fluctuate erratically. However I don't use suspend. Over the years I've seen many threads where suspend creates problems with the wifi. Other Guru's I have spoken to addressing network issues say wicd is the way to go.

https://wireless.wiki.kernel.org/en/...ation/mac80211

https://unix.stackexchange.com/quest...r-is-installed
 
Old 10-04-2017, 01:14 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,409

Original Poster
Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I definitely, definitely DO NOT use NetworkManager. I don't have Wicd installed either.

I connect via /etc/rc.d/rc.inet1 with an appropriate setup in /etc/rc.d/rc.inet1.conf, and /etc/wpa_supplicant.conf. I know what I'm doing, and don't need to learn any other stuff to hold my hand. They inevitably get it wrong anyhow.

I've just done an upgrade-all in slackpkg, so I'll have to get the problem to show itself again before I can go hunting. I realised I should have checked routes and iwconfig. If it fails to show, it's cured. It's a 'sun-behind-a-cloud' type of problem, or, more likely with Irish weather, 'sun-not-behind-a-cloud.' When/if it shows, I'll post more info.

@jostber: Thanks for the reply, but the network remains up. I can ping my printer on 192.168.178.42. ifconfig looks clean. That seems to clear udev.
 
Old 10-04-2017, 01:33 PM   #7
bamunds
Member
 
Registered: Sep 2013
Location: Mounds View MN
Distribution: Slackware64-14.2 Multilib WMaker
Posts: 350

Rep: Reputation: 79
I had a similiar problem, until about three weeks back. Then mysteriously the problem disappeared. I too had loaded current, then gone back to stable, with the same messy clean-up. I believe the problem was cleared right after the latest kernel upgrades that volkerdi announced for stabl and I did replace (-c) my initrd rather than adding to it (you leave -c off the mkinitrd generator). I suspect that either something was messed up in the initrd, or some module was left behind in the /boot sector. Do you use initrd? If you do I suggest moving the current one out of the way (cp to a new name like initrd.old) and make a new fresh initrd with /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.88, correct the proposed output with any cryptvg partitions and then run. Don't forget to update lilo.conf and run lilo after that. Hope this helps.
 
Old 10-04-2017, 02:58 PM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,827
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by bamunds View Post
I had a similiar problem, until about three weeks back. Then mysteriously the problem disappeared. I too had loaded current, then gone back to stable, with the same messy clean-up. I believe the problem was cleared right after the latest kernel upgrades that volkerdi announced for stabl and I did replace (-c) my initrd rather than adding to it (you leave -c off the mkinitrd generator). I suspect that either something was messed up in the initrd, or some module was left behind in the /boot sector. Do you use initrd? If you do I suggest moving the current one out of the way (cp to a new name like initrd.old) and make a new fresh initrd with /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.88, correct the proposed output with any cryptvg partitions and then run. Don't forget to update lilo.conf and run lilo after that. Hope this helps.
Do you think this is or was a bug?
 
Old 10-04-2017, 06:19 PM   #9
bamunds
Member
 
Registered: Sep 2013
Location: Mounds View MN
Distribution: Slackware64-14.2 Multilib WMaker
Posts: 350

Rep: Reputation: 79
I think it was a problem with my initrd and creating a new clean out cleared the bad link/module reference or something else.
 
Old 10-04-2017, 06:35 PM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,827
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by bamunds View Post
I think it was a problem with my initrd and creating a new clean out cleared the bad link/module reference or something else.
Got it:-

Thanks for the details.
 
Old 10-06-2017, 12:07 AM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,221

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
I'm not convinced it's anything wrong with the client side. It looks more like your dhcp server handed out an address in the wrong netblock, or perhaps you have/had another dhcp server on your network. I've seen that happen a lot at various sites, usually when someone plugs a consumer-grade router into a network port incorrectly and it starts handing out IP addresses to clients.
 
Old 10-06-2017, 01:01 PM   #12
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware 14.2 64-bit
Posts: 386

Rep: Reputation: 102Reputation: 102
Some debugging methods here for those who want to go serious on this:

https://01.org/blogs/rzhang/2015/bes...bernate-issues
 
1 members found this post helpful.
Old 10-06-2017, 09:17 PM   #13
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,827
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by jostber View Post
Some debugging methods here for those who want to go serious on this:

https://01.org/blogs/rzhang/2015/bes...bernate-issues
That's a good read and very helpful:-
Thanks jostber-
 
Old 10-10-2017, 04:29 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,409

Original Poster
Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Following up from post #6:

I said I'd post again when this happened again. That was this morning. After, suspend, I got a 192.168.223.x address instead of the usual 192.168.178.x. A check of essentials revealed
Code:
bash-4.3$ ifconfig
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.223.100  netmask 255.255.255.0  broadcast 192.168.223.255
        inet6 fe80::52b7:c3ff:fe50:d6b5  prefixlen 64  scopeid 0x20<link>
        ether 50:b7:c3:50:d6:b5  txqueuelen 1000  (Ethernet)
        RX packets 85996  bytes 91441667 (87.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 52643  bytes 6808871 (6.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bash-4.3$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
^C
route just sat there, and I thought it was hung. But it wasn't; There was a 15 second delay and when it finally finished it looked ok.
Code:
bash-4.3$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.223.1   0.0.0.0         UG    304    0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
192.168.223.0   *               255.255.255.0   U     304    0        0 wlan0
bash-4.3$ iwconfig wlan0
wlan0     IEEE 802.11  ESSID:"HP-Print-E2-LaserJet 1102"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: C0:18:85:8C:EC:E2   
          Bit Rate=9 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-40 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
The iwconfig output gave me a good laugh - my printer(IP 192.168.178.42) is handing out dhcp adresses! And on a subnet (192.168.223.x), and is making itself available on 192.168.223.1. What's even funnier is that as they're both on wifi, they're only connected through the fritzbox router(192.168.178.1). If the printer was doing IP forwarding, I'd hardly notice :-).

In the logs, the association of wlan0 to my printer is not logged - at all! In their place is a string of "opcode UNKNOWN" type errors from a usb drive (sdb). The thing provides a bit of log spam but works away flawlessly. It's on the usb bus anyhow, and my wifi chip (Qualcomm Atheros AR9485) shows on the pci bus. I don't think it's connected to the usb Bluetooth adapter (Atheros Communications, Inc. AR3012). But <# grep -e '192.168.223' /var/log/*> produces nothing. I'm left here 'gobsmacked' with my mouth wide open and highly amused. Why??

Needless to say, a complete network restart seems like a very good way out of that mess. The next time it happens, I'll turn off the printer and restart dhcpcd to see if that clears it.

EDIT: Interestingly, any activity on the usb bus (e.g mouse) seems to trigger a spate of log spam from the offending usb drive. I'm changing the usb drive to see if that cures it (I have a spare here)

EDIT2
: What's even funnier, the printer and my box are connecting through my router 192.168.178.1, but I can't ping 192.168.178.1. Everything I learned asbout dhcp in College is thrown out the window :-o & :-)).

Last edited by business_kid; 10-10-2017 at 05:46 AM.
 
Old 10-11-2017, 06:20 AM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,409

Original Poster
Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I Changed the usb drive, the log spam has gone, and unless this repeats, I'm calling this solved.

On mature reflection, this is a laptop; so the Atheros AR9485 pci based wifi controller and the usb bus based Atheros AR3012 Bluetooth controller are probably in the same lump of silicon.

/Begin theory
The old usb drive seemed pretty promiscuous, and took anything that was said on usb personally - hence the log spam. Every once in a while it seemed to get through to the wifi chip and upset that, even though they were not physically connected.
/End theory

Where it went from there is anybody's guess. The printer might introduce itself to a recently resumed box, dhcpcd would sort out default routes silently (=192.168.223.1), and a totally bogus wifi connection could be made. This is stretching credulity, I know.

Alternatively, the printer may have some dhcp server in there for reasons I don't get. It certainly doesn't do IP forwarding. I can't effectively test the 'server' theory, but theorize that all network traffic is visible to everything on that network, not what I would expect; Why the fritzbox router doesn't pick my box up or why 192.168.178.1 is unavailable (Can't ping it) from my box I really don't get. Maybe the Atheros chip or routing does something funny? Why the kernel routing table takes 15 seconds to come up is a mystery. Why a network restart restores sanity to this insane condition is also outside my understanding.

I never get the easy problems to solve :-/. But I've learned that you don't have to understand something to fix it - that's the classic failing of hardware Engineers, and it's why they like to have a technician about.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Wired network doesn't reconnect after suspend mattca Slackware 10 09-11-2013 08:45 AM
[SOLVED] After Resuming from suspend, my network is down and must be restarted bret381 Linux - Networking 3 04-06-2012 07:30 PM
Network Lost on Suspend _Ronnie_ Linux - Wireless Networking 1 01-27-2006 12:05 PM
Suspend when no network traffic myth|384 Linux - Networking 0 08-23-2004 08:44 AM
PCMCIA/Network Issues after Suspend organgtool Linux - Networking 0 03-29-2003 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration