-
Notifications
You must be signed in to change notification settings - Fork 405
vpp: T8125: Enable ip4-dhcp-client-detect feature if interface address is configured as DHCP #4942
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
base: current
Are you sure you want to change the base?
Conversation
|
👍 |
There was a problem hiding this 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
|
@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 |
dmbaturin
left a comment
There was a problem hiding this 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
|
@alexk37 Please check XDP driver now. |
|
CI integration 👍 passed! Details
|
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
Related Task(s)
Related PR(s)
How to test / Smoketest result
Before the fix
After the fix address is assigned
Checklist: