Hi all, I am trying to assign v6 address to clients using DHCP PD. I have ISC Bind configured to provide v6 prefixes and configured dhcpv6 proxy using the following command.
vppctl set dhcpv6 proxy server 2001:xxx:yyyy:10d::1 src-address 2001:xxx:yyyy:10d::700 It is working for clients from non VLAN interface but fails for clients in VLAN interface. It took some time to figure out but ultimately the fix looked trivial. diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c index 7d157ad35..40dc220d6 100644 --- a/src/vnet/dhcp/dhcp6_proxy_node.c +++ b/src/vnet/dhcp/dhcp6_proxy_node.c @@ -775,7 +775,7 @@ dhcpv6_proxy_to_client_input (vlib_main_t * vm, { u32 *vlan_tag = (u32 *) (mac0 + 1); u32 tmp; - tmp = (si0->sub.id << 16) | 0x0800; + tmp = (si0->sub.id << 16) | 0x86dd; *vlan_tag = clib_host_to_net_u32 (tmp); } With this patch applied, DHCPv6 proxy is working correctly over VLANs. I have couple of observations as I was testing the this feature. 1. Trace of proxy to client packets does not show any output interface nodes and stops abruptly at dhcpv6-proxy-to-client node 14:49:51:731269: ip6-local UDP: 2001:xxx:yyyy:10d::1 -> 2001:xxx:yyyy:10d::700 tos 0x00, flow label 0x0, hop limit 64, payload length 219 UDP: 547 -> 547 length 219, checksum 0xa3ef 14:49:51:731271: ip6-udp-lookup UDP: src-port 547 dst-port 547 14:49:51:731274: dhcpv6-proxy-to-client DHCPV6 proxy: sent to client from 2001:xxx:zzzz:700::1 original_sw_if_index: 10, sw_if_index: 10 While the proxy to server packet trace shows next node as ip6-lookup and it goes till TenGigabitEthernet85/0/1-tx 14:49:51:730918: dhcpv6-proxy-to-server DHCPV6 proxy: sent to server 2001:xxx:yyyy:10d::1 original_sw_if_index: 10, sw_if_index: 10 14:49:51:730922: ip6-lookup fib 0 dpo-idx 4 flow hash: 0x00000000 UDP: 2001:xxx:yyyy:10d::700 -> 2001:xxx:yyyy:10d::1 tos 0x00, flow label 0x0, hop limit 32, payload length 163 UDP: 546 -> 547 2. There is a comment in the code which shows a TODO item is pending in the code: /* $$$ consider adding a dynamic next to the graph node, for performance */ I could not figure out what the OP meant by this comment, but I can attempt to do it if some one here can explain what needs to be done. Is the abrupt ending of the trace and the above TODO related? Thanks and Regards, Raj
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12615): https://lists.fd.io/g/vpp-dev/message/12615 Mute This Topic: https://lists.fd.io/mt/30706811/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-