1
0
I have the following topology:
I have a laptop with a WiFi NIC and a docking station with an Ethernet NIC. Both network connections are connected to the same LAN. What I want to do is to use the Ethernet port as much as possible, and, when I decouple the laptop from the docking station, I want it to switch to the wireless NIC. I want all this without my services being affected/going down => I must have the same layer 3 address running all time and the WiFi NIC must always be connected to the wireless network, although no bandwidth is used.
I have thought of a solution (I'm using Linux):
- Disable DHCP on wlan0 and eth0.
- Add these interfaces in a bridge.
- Activate a DHCP client on the bridge interface.
- Make sure the bridge interface has the mac address of wlan0 so it can communicate properly on a secure WiFi network as well.
Some restrictions and concerns:
- Both physical networks are connected to a switch on ports which are set as vlan access port type. And I do not have any control over that switch.
- I do not know the DHCP protocol by heart. Do I risk wlan0 interpreting the DHCP response instead of the br0 interface?
- How do I prioritize br0 to use eth0 when it is active and consider wlan0 in a sort of a logical down status, without braking the wlan0 wifi connectivity?
Further research of DHCP protocol suggests that concern number 2 should not be a problem. DHCP uses UDP. So if no other DHCP userspace client is blocked on a recv() on that UDP port, there should be no problem with this, as only the DHCP client specific to br0 can interpret it. – Catalin Vasile – 2016-12-03T19:22:36.077