Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd ignoring offer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
brundage
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 151

PostPosted: Wed Oct 16, 2024 8:27 pm    Post subject: dhcpcd ignoring offer Reply with quote

I'm running a multihomed dhcp client. Both interfaces solicit dhcp and the server answers both with an offer. dhcpcd never acknowledges offers on one interface. There is no firewall blocking dhcp.

The NIC not getting DHCP is enp0s31f6.

Debug log:

Code:
0 blaze /root # /etc/init.d/dhcpcd restart
 * Stopping DHCP Client Daemon ...                                        [ ok ]
 * Starting DHCP Client Daemon ...
dhcpcd-10.0.8 starting
spawned manager process on PID 2633
udev: starting
dev: loaded udev
DUID 00:01:00:01:1e:80:0e:4a:ec:08:6b:43:37:3c
enp0s31f6: executing: /lib/dhcpcd/dhcpcd-run-hooks PREINIT
enp0s31f6: executing: /lib/dhcpcd/dhcpcd-run-hooks CARRIER
enp4s0: executing: /lib/dhcpcd/dhcpcd-run-hooks PREINIT
enp4s0: executing: /lib/dhcpcd/dhcpcd-run-hooks CARRIER
enp0s31f6: IAID 3a:81:23:b3
enp0s31f6: delaying IPv6 router solicitation for 0.8 seconds
enp0s31f6: delaying IPv4 for 1.1 seconds
enp4s0: IAID 85:1f:f9:36
enp4s0: delaying IPv6 router solicitation for 0.1 seconds
enp4s0: delaying IPv4 for 1.8 seconds
enp4s0: soliciting an IPv6 router
enp4s0: sending Router Solicitation
enp0s31f6: soliciting an IPv6 router
enp0s31f6: sending Router Solicitation
enp0s31f6: reading lease: /var/lib/dhcpcd/enp0s31f6.lease
enp0s31f6: soliciting a DHCP lease
enp0s31f6: sending DISCOVER (xid 0x3698fdbb), next in 3.4 seconds
enp4s0: reading lease: /var/lib/dhcpcd/enp4s0.lease
enp4s0: rebinding lease of 10.0.0.50
enp4s0: sending REQUEST (xid 0x60759c76), next in 4.8 seconds
enp4s0: acknowledged 10.0.0.50 from 10.0.0.1
enp4s0: leased 10.0.0.50 for 7200 seconds
enp4s0: renew in 3600 seconds, rebind in 6300 seconds
enp4s0: writing lease: /var/lib/dhcpcd/enp4s0.lease
enp4s0: adding IP address 10.0.0.50/24 broadcast 10.0.0.255
enp4s0: adding route to 10.0.0.0/24
enp4s0: adding default route via 10.0.0.1
enp4s0: executing: /lib/dhcpcd/dhcpcd-run-hooks REBOOT
forked to background                                                      [ ok ]


The client solicits addresses on both enp4s0 and enp0s31f6.

dnsmasq server log:

Code:
dnsmasq-dhcp: DHCPDISCOVER(enp2s0) 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPOFFER(enp2s0) 10.0.2.50 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPREQUEST(enp4s0) 10.0.0.50 98:b7:85:1f:f9:36
dnsmasq-dhcp: DHCPACK(enp4s0) 10.0.0.50 98:b7:85:1f:f9:36 blaze
dnsmasq-dhcp: DHCPDISCOVER(enp2s0) 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPOFFER(enp2s0) 10.0.2.50 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPDISCOVER(enp2s0) 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPOFFER(enp2s0) 10.0.2.50 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPDISCOVER(enp2s0) 30:5a:3a:81:23:b3
dnsmasq-dhcp: DHCPOFFER(enp2s0) 10.0.2.50 30:5a:3a:81:23:b3


The server answers each solicitation on the correct interface, but blaze just ignores one of them.

/etc/conf.d/net

Code:
0 blaze /root # cat /etc/conf.d/net
config_enp4s0="dhcp"
mtu_enp4s0="9000"

config_enp0s31f6="dhcp"

config_wlp5s0="dhcp"


/etc/dhcpcd.conf

Code:
0 blaze /root # cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
#hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

# vendorclassid is set to blank to avoid sending the default of
# dhcpcd-<version>:<os>:<machine>:<platform>
vendorclassid

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Request a hostname from the network
option host_name

# Most distributions have NTP support.
option ntp_servers

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# 2024-07-24 Don't run wpa_supplicant
nohook wpa_supplicant

# 2024-07-30 Speed up DHCP by disabling ARP probing
noarp

# 2024-07-30
allowinterfaces enp4* enp0*


ip addr

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host proto kernel_lo
       valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 30:5a:3a:81:23:b3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::91ce:23ce:4cd9:c1a7/64 scope link
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether 98:b7:85:1f:f9:36 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.50/24 brd 10.0.0.255 scope global dynamic noprefixroute enp4s0
       valid_lft 7057sec preferred_lft 6157sec
    inet6 fe80::9d40:5302:9099:3c0e/64 scope link
       valid_lft forever preferred_lft forever
4: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether ec:08:6b:43:37:3c brd ff:ff:ff:ff:ff:ff
5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
6: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0

_________________
Unscrambler of Eggs
he/him


Last edited by brundage on Wed Oct 16, 2024 10:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 425
Location: Naarm/Melbourne, Australia

PostPosted: Wed Oct 16, 2024 9:47 pm    Post subject: Reply with quote

Your /etc/conf.d/net doesn't show any configuration for the interface enp2s0 (i.e. the interface not accepting the offer). And have you created a net.enp2s0 symlink and enabled that service?
_________________
https://wiki.gentoo.org/wiki/User:Flexibeast
Back to top
View user's profile Send private message
brundage
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 151

PostPosted: Wed Oct 16, 2024 10:07 pm    Post subject: Reply with quote

flexibeast wrote:
Your /etc/conf.d/net doesn't show any configuration for the interface enp2s0 (i.e. the interface not accepting the offer). And have you created a net.enp2s0 symlink and enabled that service?


That's the server interface. It is correctly offering DHCP on that NIC. Edited the post to be more clear.
_________________
Unscrambler of Eggs
he/him
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum