Configuring DHCP Relay for an interface

Configure the DHCP relay behavior on the interface.

About this task

You can configure only one relay for a VLAN, regardless of how many addresses are configured on that VLAN. The default address is the smallest address configured. If the relay is a VRRP address, the default value is the first VRRP address configured.

Procedure

  1. Enter Interface Configuration mode:

    enable

    configure terminal

    interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...]} or interface vlan <1–4059>

    Note

    Note

    If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

  2. Enable DHCP on the interface:

    ipv6 dhcp-relay

  3. Configure the maximum hop count:

    ipv6 dhcp-relay max-hop <1–32>

  4. Enable the remote ID:

    ipv6 dhcp-relay remote-id

Example

Configure the maximum hop count:

Switch:1(config-if)#ipv6 dhcp-relay max-hop 30

Disable the remote ID:

Switch:1(config-if)#no ipv6 dhcp-relay remote-id

Variable Definitions

Use the data in the following table to use the ipv6 dhcp-relay command.

Variable

Value

max-hop <1–32>

Specifies the maximum number of hops a DHCP packet can take from the DHCP client to the DHCP server. The default is 32.

remote-id

Enables the relay agent to add information about the relay to DHCPv6 messages before relaying the messages to the DHCP server. The default is disabled

Use the data in the following table to use the interface command.

Variable

Value

<1-4059>

Specifies the VLAN ID in the range of 1 to 4059. By default, VLAN IDs 1 to 4059 are configurable and the system reserves VLAN IDs 4060 to 4094 for internal use. On switches that support the vrf-scaling and spbm-config-mode boot configuration flags, if you enable these flags, the system also reserves VLAN IDs 3500 to 3998. VLAN ID 1 is the default VLAN and you cannot create or delete VLAN ID 1.

{slot/port[/sub-port][-slot/port[/sub-port]][,...]}

Identifies the slot and port in one of the following formats: a single slot and port (slot/port), a range of slots and ports (slot/port-slot/port), or a series of slots and ports (slot/port,slot/port,slot/port). If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.