2

I have to transition between different networks quite often using a laptop and various docking stations. If I remove my laptop from a certain network and place it again on the same network then no issues arise. It is when I move to a different network that I have problems.

Although not in any way a dire issue, I just find it moderately annoying.

The problem: When I migrate to a different network I must bring down my Ethernet interface and then immediately bring it back up in order for Network Manager to properly perform DHCP transactions.

Can anything be done to configure Network Manager in such a way that it does this automatically, or must I resort to a script that is run upon connecting to a new network? If the latter, how can this event be captured?

EDIT Further details:

The docking station is this one. The Ethernet port is on the dock itself and I think the interface is a PCI bus. I am not sure if the Ethernet interface in the dock is independent of the one on the laptop (i.e. an independent NIC -- how can I verify this?; Dmesg seems to indicate this), but this may be the source of the problem.

If this is true, perhaps the independent NIC connection and removal is not handled in the same way as connecting and disconnecting of just the Ethernet cable? I imagine this can be handled with a simple udev rule per the comments below, but any details of Network Manager's handling of this event is helpful.

Dmesg dump of an ejection and reconnection to the docking station:

[28240.030058] pci_bus 0000:03: Allocating resources
[28240.030232] pci_bus 0000:04: Allocating resources
[28240.030403] pci_bus 0000:05: Allocating resources
[28240.030488] pci_bus 0000:06: Allocating resources
[28240.030577] pci_bus 0000:0e: Allocating resources
[28240.030721] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.031797] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.032764] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.033674] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.035654] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.036365] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.037290] acpi device:41: Cannot transition to power state D3cold for parent in (unknown)
[28240.037931] pci_bus 0000:01: Allocating resources
[28240.038001] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.039031] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28240.040743] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28242.258694] iwlwifi 0000:03:00.0: RF_KILL bit toggled to enable radio.
[28243.951117] usb 3-13: new high-speed USB device number 35 using xhci_hcd
[28244.041718] atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying to access hardware directly.
[28244.111432] usb 3-13: New USB device found, idVendor=413c, idProduct=2513
[28244.111442] usb 3-13: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[28244.112626] hub 3-13:1.0: USB hub found
[28244.112707] hub 3-13:1.0: 3 ports detected
[28244.351559] usb 3-4: new high-speed USB device number 36 using xhci_hcd
[28244.479863] usb 3-4: New USB device found, idVendor=413c, idProduct=2513
[28244.479871] usb 3-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[28244.481083] hub 3-4:1.0: USB hub found
[28244.481346] hub 3-4:1.0: 3 ports detected
[28244.752072] usb 3-4.1: new low-speed USB device number 37 using xhci_hcd
[28244.843741] usb 3-4.1: New USB device found, idVendor=0461, idProduct=4d81
[28244.843753] usb 3-4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[28244.843782] usb 3-4.1: Product: USB Optical Mouse
[28244.844395] usb 3-4.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[28244.848841] input: USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4.1/3-4.1:1.0/0003:0461:4D81.000C/input/input31
[28244.849518] hid-generic 0003:0461:4D81.000C: input,hidraw3: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:14.0-4.1/input0
[28244.936269] usb 3-4.2: new low-speed USB device number 38 using xhci_hcd
[28245.047569] usb 3-4.2: New USB device found, idVendor=413c, idProduct=2003
[28245.047583] usb 3-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[28245.047588] usb 3-4.2: Product: Dell USB Keyboard
[28245.047613] usb 3-4.2: Manufacturer: Dell
[28245.048142] usb 3-4.2: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes
[28245.054933] input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4.2/3-4.2:1.0/0003:413C:2003.000D/input/input32
[28245.055824] hid-generic 0003:413C:2003.000D: input,hidraw4: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-4.2/input0
[28247.729209] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx
[28249.870893] acpi PNP0401:00: Already enumerated
[28250.807344] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.807904] pci_bus 0000:02: Allocating resources
[28250.807917] pci_bus 0000:03: Allocating resources
[28250.807962] pci_bus 0000:04: Allocating resources
[28250.807972] pci_bus 0000:05: Allocating resources
[28250.807982] pci_bus 0000:06: Allocating resources
[28250.807993] pci_bus 0000:0e: Allocating resources
[28250.808003] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.808210] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.808378] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.808547] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.808851] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.808988] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.809166] acpi device:41: Cannot transition to power state D3cold for parent in (unknown)
[28250.809259] pci_bus 0000:01: Allocating resources
[28250.809295] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.809423] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.809660] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.851406] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.851931] pci_bus 0000:02: Allocating resources
[28250.851945] pci_bus 0000:03: Allocating resources
[28250.851983] pci_bus 0000:04: Allocating resources
[28250.851992] pci_bus 0000:05: Allocating resources
[28250.852002] pci_bus 0000:06: Allocating resources
[28250.852011] pci_bus 0000:0e: Allocating resources
[28250.852021] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.852209] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.852374] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.852532] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.852809] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.852943] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.853077] acpi device:41: Cannot transition to power state D3cold for parent in (unknown)
[28250.853158] pci_bus 0000:01: Allocating resources
[28250.853195] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.853315] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.853530] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.895446] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.895962] pci_bus 0000:02: Allocating resources
[28250.895974] pci_bus 0000:03: Allocating resources
[28250.896011] pci_bus 0000:04: Allocating resources
[28250.896021] pci_bus 0000:05: Allocating resources
[28250.896030] pci_bus 0000:06: Allocating resources
[28250.896039] pci_bus 0000:0e: Allocating resources
[28250.896049] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.896229] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.896384] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.896533] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.896807] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.896935] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.897067] acpi device:41: Cannot transition to power state D3cold for parent in (unknown)
[28250.897143] pci_bus 0000:01: Allocating resources
[28250.897177] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.897295] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28250.897506] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[28252.727010] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio.
5
  • So you disconnect the cable, connect a new one and this doesn't happen automatically? That's very strange. Disconnecing from a wired network should bring everything down and then up again when you reconnect automatically. Is the ethernet port on the docking station or on your computer? Is there also a wireless network that might be confusing things? Could your laptop be connecting to a WiFi network while you're moving it? Commented Jan 14, 2016 at 14:45
  • @terdon, Most of the time I have my wireless NIC disabled. And yes, the Ethernet port is on the Docking station. I am not aware of the working details, but I think the docking station's interface to the laptop is over a PCI bus. The docking station is this one, so it may provide a separate NIC alongside the laptop's integrated one. Commented Jan 14, 2016 at 14:48
  • @terdon, The connection to the Ethernet cable is done by removing the laptop from the docking station that already has the Ethernet cable plugged in. It might be that the docking station provides an independent NIC, so Network Manager does not handle the removal of this NIC in the same as as it would if I had been using one NIC and just removed the Ethernet cable? Commented Jan 14, 2016 at 14:50
  • 1
    OK. Please include these details in your question. I am guessing the solution will probably involve writing a udev rule that brings the ethernet or even the DHCP daemon down/up when the dock is disconnected. I am far from a udev expert but I assume the details of the dock will be helpful to anyone trying to solve this. Commented Jan 14, 2016 at 14:51
  • Could you also show the output of ip addr i) when the dock is connected and ii) when it isn't? Commented Jan 14, 2016 at 16:01

1 Answer 1

2

Appearantly ifpugd doesn't really look for the interface hardware being removed.

I noticed the device in enumerated as eth0 when you plug the dock in. New udev policies should prevent different devices from showing up as the same name. http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

I would guess that if Predictable Network Interface names are enabled, the network manager would see you are on a different network and take appropriate action.

The alternative is to dump udev / uevents and set up a custom rules based on the new ethernet iterface coming up.

4
  • LinuxMint does not currently use systemd by default; the current event system in mint is Upstart. Commented Jan 15, 2016 at 18:50
  • Persistent Network Interface Names a distinct from systemd. If you have udev greater than 197, you should be able to re-enable the default of persistent names. Commented Jan 15, 2016 at 19:09
  • The link you provide states that this feature may be enabled by passing the kernel net.ifnames=1, but such a change in /etc/default/grub did not work for me; my interface names are still being assigned generic names such as eth0 and wlan0. My udev version is 204 per the output from udevadm --version. Commented Jan 19, 2016 at 18:11
  • In that case I'd double check the udev rules in /etc/ Commented Jan 20, 2016 at 2:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.