Question
In UCS, it is possible to assign more than one network interface (in the form of MAC addresses) to a single device. DHCP is configured accordingly so that both MAC addresses of the client receive the same IP address. This setup is intentional and correct, as the devices in question are portable notebooks that sometimes use a wired LAN connection and sometimes a wireless WLAN connection.
However, it has been observed that when switching between WLAN → LAN or LAN → WLAN, the device does not successfully switch to the other network interface. Instead, the new interface does not receive an IP address at all.
As a result, teachers are unable to reliably use Veyon (screen monitoring).
Example:
- The notebook is started and connected via LAN
- The notebook has network connectivity
- The LAN cable is unplugged → WLAN attempts to connect
- No WLAN connection is established because no IP address is assigned
- After a restart without the LAN cable, the notebook connects to WLAN successfully
Is there a recommended solution or configuration to address this behavior?
Answer
The DHCP server maintains a database that binds an IP address to a MAC address, known as a lease. When the notebook is connected via LAN, the IP address is leased to the MAC address of the wired network interface. When the user switches to WLAN, a different and previously unknown MAC address (the WLAN adapter) requests the same IP address. From the DHCP server’s perspective, this request is rejected because the IP address is still leased to the LAN interface. The IP address only becomes available again once the lease time expires.
To ensure a smooth network transition for users, there are two possible approaches:
Recommended Solution: Separate IP Addresses per Network Interface
The most stable and easiest-to-manage solution is to assign a unique IP address to each physical network interface of the device.
For example:
- The MAC address of the LAN interface receives a dedicated IP reservation (e.g. 192.168.1.50)
- The MAC address of the WLAN interface receives a second dedicated IP reservation (e.g. 192.168.1.51)
From the user’s perspective and for internal reachability, nothing changes. The device hostname remains the same, and DNS always resolves the hostname to the currently active IP address. This approach avoids DHCP conflicts entirely and allows seamless switching between LAN and WLAN.
Alternative Solution: Reduce the DHCP Lease Time
As an alternative, but potentially less robust solution, the DHCP lease time can be reduced (typically to 60–120 seconds). By shortening the lease time, the IP address is released more quickly after the first interface disconnects (for example, when unplugging the LAN cable), allowing the other interface to obtain the same IP address sooner.
Instructions on how to configure the lease time for specific networks can be found here:
https://help.univention.com/t/how-to-udm-create-dhcp-shared-network-subnet-pool-leasetime/24057
Drawbacks:
This method increases network overhead, as devices must renew their IP addresses much more frequently. Additionally, a short but noticeable delay during the network switch may still occur. For these reasons, this approach is only recommended if strictly maintaining a single IP address per device is absolutely required.