Skip to content

Conversation

@natali-rs1985
Copy link
Contributor

@natali-rs1985 natali-rs1985 commented Jan 12, 2026

DHCP address cannot be assigned on VPP interfaces without enabling the 'ip4-dhcp-client-detect' feature

NOTE: When switching from DPDK to XDP (for vmxnet3), the 'ip4-dhcp-client-detect' feature does not work and the DHCP address is not assigned on the interface. Configuring XDP initially works correctly.

Change summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

How to test / Smoketest result

set interfaces ethernet eth1 address 'dhcp'
set vpp settings interface eth1 driver 'dpdk'

Before the fix

vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address          MAC                VRF        MTU  S/L    Description
-----------  ------------------  -----------------  -------  -----  -----  -------------
eth0         -                   0c:58:8e:4c:00:00  default   1500  u/D
eth1         -                   0c:58:8e:4c:00:01  default   1500  u/u
eth2         10.20.40.141/24     0c:58:8e:4c:00:02  default   1500  u/u
eth3         10.217.32.131/24    0c:58:8e:4c:00:03  default   1500  u/u
lo           127.0.0.1/8         00:00:00:00:00:00  default  65536  u/u
             ::1/128
[edit]
vyos@vyos# sudo vppctl show interface address
eth1 (up):
local0 (dn):
tap4096 (up):
[edit]

After the fix address is assigned

vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address          MAC                VRF        MTU  S/L    Description
-----------  ------------------  -----------------  -------  -----  -----  -------------
eth0         -                   0c:58:8e:4c:00:00  default   1500  u/D
eth1         192.168.111.100/24  0c:58:8e:4c:00:01  default   1500  u/u
eth2         10.20.40.141/24     0c:58:8e:4c:00:02  default   1500  u/u
eth3         10.217.32.131/24    0c:58:8e:4c:00:03  default   1500  u/u
lo           127.0.0.1/8         00:00:00:00:00:00  default  65536  u/u
             ::1/128
vyos@vyos# sudo vppctl show interface address
eth1 (up):
  L3 192.168.111.100/24
local0 (dn):
tap4096 (up):
vyos@vyos# /usr/libexec/vyos/tests/smoke/cli/test_vpp.py -k test_01_vpp_basic
test_01_vpp_basic (__main__.TestVPP.test_01_vpp_basic) ... ok

----------------------------------------------------------------------
Ran 1 test in 118.370s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions
Copy link

github-actions bot commented Jan 12, 2026

👍
No issues in PR Title / Commit Title

@natali-rs1985 natali-rs1985 requested a review from zdc January 12, 2026 15:06
@natali-rs1985 natali-rs1985 added the bp/circinus Create automatic backport for circinus label Jan 12, 2026
Copy link
Member

@sever-sever sever-sever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my internal tests it works fine:

set interfaces ethernet eth1 address 'dhcp'
set interfaces ethernet eth1 address 'dhcpv6'
set interfaces ethernet eth1 dhcp-options default-route-distance '123'
set vpp settings interface eth1 driver 'dpdk'
set vpp settings unix poll-sleep-usec '2222'

Logs:

Jan 12 16:34:20 r14 dhclient[14890]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Jan 12 16:34:20 r14 dhclient[14890]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
Jan 12 16:34:21 r14 dhclient[14890]: DHCPOFFER of 192.168.100.200 from 192.168.100.1
Jan 12 16:34:21 r14 dhclient[14890]: DHCPOFFER of 192.168.100.200 from 192.168.100.1
Jan 12 16:34:21 r14 dhclient[14890]: DHCPREQUEST for 192.168.100.200 on eth1 to 255.255.255.255 port 67
Jan 12 16:34:21 r14 dhclient[14890]: DHCPREQUEST for 192.168.100.200 on eth1 to 255.255.255.255 port 67
Jan 12 16:34:21 r14 dhclient[14890]: DHCPACK of 192.168.100.200 from 192.168.100.1
Jan 12 16:34:21 r14 dhclient[14890]: DHCPACK of 192.168.100.200 from 192.168.100.1

Logs IPv6:

Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recv: receive advertise from fe80::5054:ff:fe18:685b%eth1 on eth1
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option client ID, len 18
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:04:ec:97:68:09:bb:5a:47:69:86:30:72:65:2c:43:c1:01
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option server ID, len 14
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:01:00:01:30:f7:a5:90:a0:ad:9f:7d:b2:73
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option identity association, len 40
Jan 12 16:34:21 r14 dhcp6c[14946]:   IA_NA: ID=0, T1=43200, T2=75600
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option: get DHCP option IA address, len 24
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option:   IA_NA address: fd10:abcd:1234:5678::145 pltime=86400 vltime=86400
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option status code, len 9
Jan 12 16:34:21 r14 dhcp6c[14946]:   status code: success
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option preference, len 1
Jan 12 16:34:21 r14 dhcp6c[14946]:   preference: 255
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option DNS, len 16
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recvadvert: server ID: 00:01:00:01:30:f7:a5:90:a0:ad:9f:7d:b2:73, pref=255
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_send: a new XID (23e28a) is generated
Jan 12 16:34:21 r14 dhcp6c[14946]: copy_option: set client ID (len 18)
Jan 12 16:34:21 r14 dhcp6c[14946]: copy_option: set server ID (len 14)
Jan 12 16:34:21 r14 dhcp6c[14946]: copyout_option: set IA address
Jan 12 16:34:21 r14 dhcp6c[14946]: copyout_option: set identity association
Jan 12 16:34:21 r14 dhcp6c[14946]: copy_option: set elapsed time (len 2)
Jan 12 16:34:21 r14 dhcp6c[14946]: copy_option: set option request (len 4)
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_send: send request to ff02::1:2%eth1
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_reset_timer: reset a timer on eth1, state=REQUEST, timeo=0, retrans=991
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recv: receive advertise from fe80::5054:ff:fe18:685b%eth1 on eth1
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option client ID, len 18
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:04:ec:97:68:09:bb:5a:47:69:86:30:72:65:2c:43:c1:01
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option server ID, len 14
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:01:00:01:30:f7:a5:90:a0:ad:9f:7d:b2:73
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option identity association, len 40
Jan 12 16:34:21 r14 dhcp6c[14946]:   IA_NA: ID=0, T1=43200, T2=75600
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option: get DHCP option IA address, len 24
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option:   IA_NA address: fd10:abcd:1234:5678::145 pltime=86400 vltime=86400
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option status code, len 9
Jan 12 16:34:21 r14 dhcp6c[14946]:   status code: success
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option preference, len 1
Jan 12 16:34:21 r14 dhcp6c[14946]:   preference: 255
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option DNS, len 16
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recvadvert: XID mismatch
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recv: receive reply from fe80::5054:ff:fe18:685b%eth1 on eth1
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option client ID, len 18
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:04:ec:97:68:09:bb:5a:47:69:86:30:72:65:2c:43:c1:01
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option server ID, len 14
Jan 12 16:34:21 r14 dhcp6c[14946]:   DUID: 00:01:00:01:30:f7:a5:90:a0:ad:9f:7d:b2:73
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option identity association, len 40
Jan 12 16:34:21 r14 dhcp6c[14946]:   IA_NA: ID=0, T1=43200, T2=75600
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option: get DHCP option IA address, len 24
Jan 12 16:34:21 r14 dhcp6c[14946]: copyin_option:   IA_NA address: fd10:abcd:1234:5678::145 pltime=86400 vltime=86400
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option status code, len 9
Jan 12 16:34:21 r14 dhcp6c[14946]:   status code: success
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_get_options: get DHCP option DNS, len 16
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recvreply: status code: success
Jan 12 16:34:21 r14 dhcp6c[14946]: info_printf: nameserver[0] fd10:abcd:1234:5678::1
Jan 12 16:34:21 r14 dhcp6c[14946]: get_ia: make an IA: NA-0
Jan 12 16:34:21 r14 dhcp6c[14946]: update_address: create an address fd10:abcd:1234:5678::145 pltime=86400, vltime=94051193934208
Jan 12 16:34:21 r14 dhcp6c[14946]: ifaddrconf: add an address fd10:abcd:1234:5678::145/128 on eth1
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_remove_event: removing an event on eth1, state=REQUEST
Jan 12 16:34:21 r14 dhcp6c[14946]: dhcp6_remove_event: removing server (ID: 00:01:00:01:30:f7:a5:90:a0:ad:9f:7d:b2:73)
Jan 12 16:34:21 r14 dhcp6c[14946]: client6_recvreply: executes /etc/wide-dhcpv6/dhcp6c.eth1.script
Jan 12 16:34:21 r14 charon[9252]: 14[KNL] fd10:abcd:1234:5678::145 appeared on eth1
Jan 12 16:34:21 r14 dhclient-script-vyos[15016]: Current dhclient PID: 14890, Parent PID: 1, IP version: 4, All dhclients for interface eth1: 14890
Jan 12 16:34:21 r14 vyos-hostsd[805]: Request data: {"type": "name_servers", "op": "delete", "data": ["dhcpv6-eth1"]}
Jan 12 16:34:21 r14 vyos-hostsd[805]: Saving state to /run/vyos-hostsd/vyos-hostsd.state
Jan 12 16:34:21 r14 vyos-hostsd[805]: Sent response: {'data': None}
Jan 12 16:34:21 r14 vyos-hostsd[805]: Request data: {"type": "name_servers", "op": "add", "data": {"dhcpv6-eth1": ["fd10:abcd:1234:5678::1"]}}
Jan 12 16:34:21 r14 vyos-hostsd[805]: Saving state to /run/vyos-hostsd/vyos-hostsd.state

Check:

vyos@r14# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address                    MAC                VRF        MTU  S/L    Description
-----------  ----------------------------  -----------------  -------  -----  -----  -------------
dum0         192.0.2.1/32                  9e:a7:c9:85:fb:1d  default   1500  u/u
eth0         192.168.122.14/24             52:54:00:8d:67:6e  default   1500  u/u
eth1         192.168.100.200/24            52:54:00:f4:d5:cd  default   1500  u/u
             fd10:abcd:1234:5678::145/128

Show IP route, expected distance 123:

vyos@r14# run show ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
  Known via "static", distance 123, metric 0, tag 210
  Last update 00:12:24 ago
    192.168.100.1, via eth1, weight 1

@alexk37
Copy link
Contributor

alexk37 commented Jan 13, 2026

@natali-rs1985 @sever-sever This worked for DPDK but not for XDP driver, could you check on your side as well?

@natali-rs1985 natali-rs1985 marked this pull request as draft January 13, 2026 13:47
@natali-rs1985
Copy link
Contributor Author

@natali-rs1985 @sever-sever This worked for DPDK but not for XDP driver, could you check on your side as well?

@alexk37 Yes, for now this feature does not work for XDP driver

@sever-sever sever-sever marked this pull request as ready for review January 20, 2026 12:01
Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel uneasy about the fact that the user can create a non-working configuration without an error or a warning, but we can always add a check later, and there's an idea to disallow manual selection of XDP which may make the issue moot.

…s is configured as DHCP

DHCP address cannot be assigned on VPP interfaces without enabling the 'ip4-dhcp-client-detect' feature
@natali-rs1985
Copy link
Contributor Author

@alexk37 Please check XDP driver now.
NOTE: When switching from DPDK to XDP (for vmxnet3), the 'ip4-dhcp-client-detect' feature does not work and the DHCP address is not assigned on the interface. Configuring XDP initially works correctly.

@github-actions
Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • CLI Smoketests VPP 👍 passed
  • Config tests VPP 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bp/circinus Create automatic backport for circinus current

Development

Successfully merging this pull request may close these issues.

5 participants