DHCP Relay Agent Configuration for IPv6

This section shows how to configure the DHCPv6 relay agent.

DHCPv6 Relay Agent

OcNOS#configure terminal

Enter configure mode.

OcNOS(config)#ipv6 dhcp relay server-group dhcpv6-relay-gp

Configure relay server-group group name in global mode.

OcNOS(dhcp6-relay-group)#server 2001::2

Configure server address 2001::2.

OcNOS(dhcp6-relay-group)#commit

Commit the candidate configuration to the running configuration.

OcNOS(dhcp6-relay-group)#exit

Exit DHCPv6 relay group.

OcNOS(config)#interface xe8

Enter interface mode xe8.

OcNOS(config-if)#ipv6 address 2001::3/64

Configure IPv6 address 2001::3/64 on the interface xe8.

OcNOS(config-if)#ipv6 dhcp relay uplink

Configure relay uplink on the device connecting the server.

OcNOS(config-if)#ipv6 dhcp relay server-select dhcpv6-relay-gp

Configure relay server-select group name on the device connected to the server.

OcNOS(config-if)#commit

Commit the candidate configuration to the running configuration.

OcNOS(config-if)#exit

Exit interface mode.

OcNOS(config)#interface xe15

Enter interface mode.

OcNOS(config-if)#ipv6 address 3001::2/64

Configure IPv6 address on the interface xe15.

OcNOS(config-if)#ipv6 dhcp relay

By default, this will be enabled. This command starts the IPv6 dhcp relay service.

OcNOS(config-if)#commit

Commit the candidate configuration to the running configuration.

OcNOS(config-if)#exit

Exit interface mode.

OcNOS(config)#ipv6 dhcp relay server-group dhcpv6-relay-gp

Configure relay server-group group name in global mode.

OcNOS(dhcp6-relay-group)#server 4001::2

Configure server address 4001::2.

OcNOS(dhcp6-relay-group)#commit

Commit the candidate configuration to the running configuration.

OcNOS(dhcp6-relay-group)#exit

Exit DHCPv6 relay group.

OcNOS(config)#interface xe11

Enter interface mode.

OcNOS(config-if)#ipv6 address 4001::3/64

Configure IPv6 4001::3/64 address on the interface xe11.

OcNOS(config-if)#ipv6 dhcp relay uplink

Configure relay uplink on the device connecting the server.

OcNOS(config-if)#ipv6 dhcp relay server-select dhcpv6-relay-gp

Configure relay server-select group name on the device connected to the server.

OcNOS(config-if)#commit

Commit the candidate configuration to the running configuration.

OcNOS(config-if)#exit

Exit interface mode.

Validation

The below shows the running configuration of the DHCPv6 relay agent node:

Copy
OcNOS#show running-config dhcp
interface eth0
 ip address dhcp
!
!
 
ipv6 dhcp relay server-group dhcpv6-relay-gp
 server 2001::2
 server 4001::2
interface xe8
 ipv6 dhcp relay uplink
 ipv6 dhcp relay server-select dhcpv6-relay-gp
!
interface xe11
 ipv6 dhcp relay uplink
 ipv6 dhcp relay server-select dhcpv6-relay-gp
!
interface xe15
 ipv6 dhcp relay
OcNOS#show ipv6 dhcp relay
IPv6 DHCP relay service is Enabled.
VRF Name: default
  DHCPv6 IA_PD Route injection: Disabled
  Interface                Uplink/Downlink
  ---------                -------------
  xe8                      Uplink
  xe11                     Uplink
  xe15                     Downlink
  Interface                Group-Name              Server
  ---------                -------------           ------
  xe11                     dhcpv6-relay-gp     2001::2,4001::2
OcNOS#