Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Default gateway not always set via DHCP #70

Closed
2 tasks done
bryanward-net opened this issue Feb 9, 2025 · 2 comments
Closed
2 tasks done

[BUG]: Default gateway not always set via DHCP #70

bryanward-net opened this issue Feb 9, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bryanward-net
Copy link

What happened?

dhclient.conf is requesting the rfc3442-classless-static-routes option from the DHCP server.
This causes a default gateway route to not always be installed if the DHCP server is responding with this option

Relevant log output

No logs.

How often does this bug happen?

Sometimes

What version are you using?

3.1.4-rc1 and possibly later

Where is the bug located?

Self Service

  • I would be willing to fix this bug myself.

Guidelines and Policies

  • I have read the contributing guidelines and agree to follow the code of conduct and contribution policies.
@bryanward-net bryanward-net added bug Something isn't working untriaged labels Feb 9, 2025
@bryanward-net
Copy link
Author

Need to patch /etc/dhcp/dhclient.conf to look like:


request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
        netbios-name-servers, netbios-scope, interface-mtu,
        ntp-servers;
#       rfc3442-classless-static-routes, ntp-servers;

to remove the rfc3422-classless-static-routes option

@joshschmelzle
Copy link
Member

joshschmelzle commented Feb 13, 2025

This is addressed as requested. Same code verified in pi-gen-bookworm lite image for the WLAN Pi Go tracked by WLAN-Pi/pi-gen-bookworm#19.

wlanpi@wlanpi-a4c:/etc/dhcp $ head dhclient.conf -n 21
# Configuration file for /sbin/dhclient.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#       man page for more information about the syntax of this file
#       and a more comprehensive list of the parameters understood by
#       dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#       not leave anything out (like the domain name, for example), then
#       few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
        netbios-name-servers, netbios-scope, interface-mtu, ntp-servers;
        # rfc3442-classless-static-routes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants