Open sliddjur opened 5 years ago
I don't know enough about DHCP to know off the top of my head, but if nobody else chimes in, I can dig in later and find out.
This works as expected on my workstation, which is a Ubuntu 19.04. It looks like there is something in the IP script that doesnt handle both options properly.
Same issue here since buster update. If Options 121 is set, Option 3 is ignored entirely. I haven't confirmed yet if this only affects wireless.
Just to confirm. I'm running Ubiquiti Dream Machine Pro and have configured the DHCP option 121. Noticed that when installing a Raspberry Pi 4 and Zero W with same Raspberry Pi OS released 2020-08-20 I got no default route. This works fine on my Ubuntu 20.04 Laptop.
That said did get around this by extending my DHCP 121 option to include the default route. Assuming that 192.168.0.1 is my gateway I ran this script to generate the option:
$ ./rfc3442.route-4-dhcp.pl 0.0.0.0/0 192.168.0.1 192.168.20.0/24 192.168.10.1
option_121_route_0.0.0.0/0_via_192.168.0.1 : 0x00c0a80001
option_249_route_0.0.0.0/0_via_192.168.0.1 : 0x00c0a80001
option_121_route_192.168.20.0/24_via_192.168.10.1 : 0x18c0a814c0a80a01
option_249_route_192.168.20.0/24_via_192.168.10.1 : 0x18c0a814c0a80a01
aggregate_opt_121 : 0x00c0a8000118c0a814c0a80a01
aggregate_opt_249 : 0x00c0a8000118c0a814c0a80a01
When I only had option 0x18c0a814c0a80a01
it worked find with my Ubuntu laptop. But now I changed it to 0x00c0a8000118c0a814c0a80a01
which resulted in my Pi getting a default route.
I don't think it is a userland issue either. On many linux systems (possibly specifically raspbian), dhcpcd, or the demon (network manager? Netplan?) that's responsible for configuring the network interfaces based on media sense (i.e. plugging in a live ethernet cable), the detection of a live ethernet cable would automatically assign default route / gateway through it, since a cable connection is very much lively to be better than a wifi one, when both are available. If you want to use both, and manually configure them, you might have to do your ethernet first and/or find out what other processes are trying to configure your network interfaces and shut them all down.
Describe the bug On my Windows server 2012 DHCP server I run both
option 3 - default gateway
andoption 121 classless route
When I have both of them running, the wifi script only got the option 121 route. The ethernet script got the default route.To reproduce Configure raspberry pi 4 to connect to wifi via the raspi-config. If I removed the option 121 route, the raspberry pi got the default gateway as expected over wifi.
Expected behaviour I expected raspbian to handle both routes given by DHCP server
Actual behaviour It only gave me one of the routes
System Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
raspberry pi 4
cat /etc/rpi-issue
)?vcgencmd version
)?uname -a
)?Logs Cannot find any wireless logs in dmesg
Additional context No more