[Enterprise SONiC] DHCPv6 Relay Follow
Generally, the DHCPv6 clients get IP by multicasting DHCP packets in the LAN, and the server will respond to the requests of the clients. In this case, it would be necessary to keep the DHCPv6 server and clients in the same LAN. DHCPv6 relay agent is used to transmit DHCPv6 packets in different subnets so that all subnets can share DHCPv6 server, and DHCPv6 server is not required on every LAN.
A DHCPv6 client sends most messages using a reserved, link-scoped multicast destination address so that the client need not be configured with the address or addresses of DHCP servers.
In a Relay-forward message, the received message is relayed to the next relay agent or server; in a Relay-reply message, the message is to be copied and relayed to the relay agent or client whose address is in the peer-address field of the Relay-reply message.
DHCPv6 relay between VLANs
Tested model & firmware version
- Switch model name:
AS7326-56X(DCS203)
- Edgecore SONiC version:
202111.0
202111.3
202111.8
Restriction:
Known issues:
- [202111.3] The sub port interface does not support use with DHCP relay service.
- [ SONIC-4288 ] The "DHCP_Relay" feature is disabled by default in 202111.0. (This issue is fixed on 202111.1)
In version 202111.0, if you want to use DHCPv6 RELAY, it needs to enable DHCP_relay feature.
admin@sonic:~$ sudo config feature state dhcp_relay enabled
admin@sonic:~$ show feature status dhcp_relay
Feature State AutoRestart SystemState UpdateTime ContainerId Version SetOwner CurrentOwner RemoteState
---------- ------- ------------- ------------- ------------------- ------------- ------------------------------------------- ---------- -------------- -------------
dhcp_relay enabled enabled up 2022-06-24 13:01:19 dhcp_relay Edgecore-SONiC_20220520_095905_ec202111_111 local local none
-
[ SONIC-4289 ] Since "frr_mgmt_framework_config_mode" is true, it will create a interface called "pimreg", when "pimreg" exist, the "DHCPv6_Relay" feature can not work properly. Please removes "frr_mgmt_framework_config_mode" from default configuration. (This issue is fixed on 202111.1)
admin@sonic:~$ sudo vi /etc/sonic/config_db.json
{
"DEVICE_METADATA": {
"localhost": {
"hostname": "sonic",
"hwsku": "Accton-AS7326-56X",
"platform": "x86_64-accton_as7326_56x-r0",
"mac": "80:a2:35:4f:4f:40",
"type": "LeafRouter",
"docker_routing_config_mode": "split",
"frr_mgmt_framework_config": "true"
}
},
...
} -
[SONIC-4389] DHCPv6 Relay setting cannot save to startup configuration. (This issue is fixed on 202111.1)
In version 202111.0, after setting, it needs to add DHCP relay configuration in /etc/sonic/config_db.json.admin@sonic:~$ sudo vi /etc/sonic/config_db.json
{
...
"DHCP_RELAY": {
"Vlan20": {
"dhcpv6_servers": [
"2001::1"
]
}
}
} -
[SONIC-7819] Fix DHCPv6 Relay malfunction with specific VRF name. (This issue is fixed on 202111.8)
Topology:
Expectation:
DHCPv6 server could assign the IPv6 address and DNS to the DHCP client successfully.
Pre-configuration:
-
Configure the VLAN and IP binding as topology. (refer to VLAN & Inter-VLAN Routing and Management and front port IPv4/IPv6 Address)
admin@sonic:~$ show vlan brief
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
| VLAN ID | IP Address | Ports | Port | Proxy | DHCP Helper | DHCP Relay Configuration |
| | | | Tagging | ARP | Address | |
+===========+==============+===========+===========+==========+===============+============================+
| 10 | 2001::254/64 | Ethernet0 | untagged | disabled | | Source Interface: |
| | | | | | | Link Selection: |
| | | | | | | Server Vrf: |
| | | | | | | Server ID Override: |
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
| 20 | 2002::254/64 | Ethernet1 | untagged | disabled | | Source Interface: |
| | | | | | | Link Selection: |
| | | | | | | Server Vrf: |
| | | | | | | Server ID Override: |
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
Procedure:
Step 1. Assigning the IP address of the DHCPv6 server on the VLAN which requests the DHCPv6 relay.
admin@sonic:~$ sudo config vlan dhcp_relay add 20 2001::1
Added DHCP relay destination addresses ['2001::1'] to Vlan20
Restarting DHCP relay service...
admin@sonic:~$ show vlan brief
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
| VLAN ID | IP Address | Ports | Port | Proxy | DHCP Helper | DHCP Relay Configuration |
| | | | Tagging | ARP | Address | |
+===========+==============+===========+===========+==========+===============+============================+
| 10 | 2001::254/64 | Ethernet0 | untagged | disabled | | Source Interface: |
| | | | | | | Link Selection: |
| | | | | | | Server Vrf: |
| | | | | | | Server ID Override: |
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
| 20 | 2002::254/64 | Ethernet1 | untagged | disabled | 2001::1 | Source Interface: |
| | | | | | | Link Selection: |
| | | | | | | Server Vrf: |
| | | | | | | Server ID Override: |
+-----------+--------------+-----------+-----------+----------+---------------+----------------------------+
Step 2. Save to startup configuration.
admin@sonic:~$ sudo config save -y
Result:
-
Client's IPv6 address
root@IB01:~# ip -6 add show ens11f3
5: ens11f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2002::10/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::8eea:1bff:fe30:da52/64 scope link
valid_lft forever preferred_lft forever -
Client's IPv6 DNS
root@IB01:~# systemd-resolve --status | grep Servers
DNS Servers: 2001::254
Comments
0 comments
Please sign in to leave a comment.