DHCP L2 Relay Agent Commands
Use these commands to configure the switch as a DHCP Layer 2 relay agent.
You can enable the switch to operate as a DHCP Layer 2 relay agent to relay DHCP requests from clients to a Layer 3 relay agent or server. The Circuit ID and Remote ID can be added to DHCP requests relayed from clients to a DHCP server. This information is included in DHCP Option 82, as specified in sections 3.1 and 3.2 of RFC3046.
dhcp l2relay
M4250
M4350
This command enables the DHCP Layer 2 Relay agent for an interface, a range of interfaces, or all interfaces. The subsequent commands mentioned in this section can only be used when the DHCP L2 relay is enabled.
| Format | dhcp l2relay |
| Mode |
Global Config Interface Config |
no dhcp l2relay
This command disables DHCP Layer 2 relay agent for an interface or range of interfaces.
| Format | no dhcp l2relay |
| Mode |
Global Config Interface Config |
dhcp l2relay circuit-id vlan
M4250
M4350
This command sets the DHCP Option-82 Circuit ID for a VLAN. If enabled, the interface number is added as the Circuit ID in DHCP option 82.
| Format | dhcp l2relay circuit-id vlan vlan-list |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| vlan-list | The VLAN ID. The range is 1–4093. Separate nonconsecutive IDs with a comma (,) no spaces and no zeros in between the range. Use a dash (–) for the range. |
no dhcp l2relay circuit-id vlan
This command removes the DHCP Option-82 Circuit ID for a VLAN.
| Format | no dhcp l2relay circuit-id vlan vlan-list |
| Mode | Global Config |
dhcp l2relay remote-id
M4250
M4350
This command sets the DHCP Option-82 Remote ID for a VLAN. The remote-id is a character string.
| Format | dhcp l2relay remote-id remote-id vlan vlan-list |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| vlan-list | The VLAN ID. The range is 1–4093. Separate nonconsecutive IDs with a comma (,) no spaces and no zeros in between the range. Use a dash (–) for the range. |
no dhcp l2relay remote-id vlan
This command clears the DHCP Option-82 Remote ID for a VLAN.
| Format | no dhcp l2relay remote-id vlan vlan-list |
| Mode | Global Config |
dhcp l2relay vlan
M4250
M4350
Use this command to enable the DHCP L2 Relay agent for a set of VLANs. All DHCP packets which arrive on interfaces in the configured VLAN are subject to L2 Relay processing.
| Default | Disabled |
| Format | dhcp l2relay vlan vlan-list |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| vlan-list | The VLAN ID. The range is 1–4093. Separate nonconsecutive IDs with a comma (,) no spaces and no zeros in between the range. Use a dash (–) for the range. |
no dhcp l2relay vlan
Use this command to disable the DHCP L2 Relay agent for a set of VLANs.
| Format | no dhcp l2relay vlan vlan-list |
| Mode | Global Config |
dhcp l2relay circuit-id
M4250
M4350
This command sets the DHCP Option-82 Circuit ID for an interface.
| Format | dhcp l2relay circuit-id circuitid-string |
| Mode | Interface Config |
| Parameter | Description |
|---|---|
| circuitid-string | The circuit ID suboption string of up to 64 characters. |
no dhcp l2relay circuit-id
This command removes the DHCP Option-82 Circuit ID for an interface.
| Format | no dhcp l2relay circuit-id |
| Mode | Interface Config |
dhcp l2relay trust
M4250
M4350
Use this command to configure an interface or range of interfaces as trusted for Option-82 reception.
The no-option-82 update keywords enable the addition of Option-82 to packets received on the trusted interface without Option-82.
| Default | Untrusted |
| Format | dhcp l2relay trust [no-option-82 update] |
| Mode | Interface Config |
no dhcp l2relay trust
Use this command to configure an interface to the default untrusted for Option-82 reception.
| Format | no dhcp l2relay trust [no-option-82 update] |
| Mode | Interface Config |
show dhcp l2relay all
M4250
M4350
This command displays the summary of DHCP L2 Relay configuration.
| Format | show dhcp l2relay all |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show dhcp l2relay all
DHCP L2 Relay is Enabled.
Interface L2RelayMode TrustMode
---------- ----------- --------------
0/2 Enabled untrusted
0/4 Disabled trusted
VLAN Id L2 Relay CircuitId RemoteId
--------- ---------- ----------- ------------
3 Disabled Enabled --NULL--
5 Enabled Enabled --NULL--
6 Enabled Enabled NETGEAR
7 Enabled Disabled --NULL--
8 Enabled Disabled --NULL--
9 Enabled Disabled --NULL--
10 Enabled Disabled --NULL--
show dhcp l2relay circuit-id vlan
M4250
M4350
This command displays the DHCP circuit ID VLAN configuration.
| Format | show dhcp l2relay circuit-id vlan vlan-list |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| vlan-list | Enter VLAN IDs in the range 1–4093. Use a dash (–) to specify a range or a comma (,) to separate VLAN IDs in a list. Spaces and zeros are not permitted. |
show dhcp l2relay interface
M4250
M4350
This command displays DHCP L2 relay configuration that is specific to interfaces.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | show dhcp l2relay interface {all | unit/slot/port} |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show dhcp l2relay interface all
DHCP L2 Relay is Enabled.
Interface L2RelayMode TrustMode
---------- ----------- --------------
0/2 Enabled untrusted
0/4 Disabled trusted
show dhcp l2relay remote-id vlan
M4250
M4350
This command displays the DHCP remote ID VLAN configuration.
| Format | show dhcp l2relay remote-id vlan vlan-list |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| vlan-list | Enter VLAN IDs in the range 1–4093. Use a dash (–) to specify a range or a comma (,) to separate VLAN IDs in a list. Spaces and zeros are not permitted. |
show dhcp l2relay stats interface
M4250
M4350
This command displays statistics specific to DHCP L2 Relay configured interface. To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
| Format | show dhcp l2relay stats interface {all | unit/slot/port} |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show dhcp l2relay stats interface all
DHCP L2 Relay is Enabled.
Interface UntrustedServer UntrustedClient TrustedServer TrustedClient
MsgsWithOpt82 MsgsWithOpt82 MsgsWithoutOpt82 MsgsWithoutOpt82
--------- --------------- --------------- ---------------- --------------
0/1 0 0 0 0
0/2 0 0 3 7
0/3 0 0 0 0
0/4 0 12 0 0
0/5 0 0 0 0
0/6 3 0 0 0
0/7 0 0 0 0
0/8 0 0 0 0
0/9 0 0 0 0
show dhcp l2relay agent-option vlan
M4250
M4350
This command displays the DHCP L2 Relay Option-82 configuration specific to VLAN.
| Format | show dhcp l2relay agent-option vlan vlan-range |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show dhcp l2relay agent-option vlan 5-10
DHCP L2 Relay is Enabled.
VLAN Id L2 Relay CircuitId RemoteId
--------- ---------- ----------- ------------
5 Enabled Enabled --NULL--
6 Enabled Enabled NETGEAR
7 Enabled Disabled --NULL--
8 Enabled Disabled --NULL--
9 Enabled Disabled --NULL--
10 Enabled Disabled --NULL--
show dhcp l2relay vlan
M4250
M4350
This command displays the DHCP VLAN configuration.
| Format | show dhcp l2relay vlan vlan-list |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| vlan-list | Enter VLAN IDs in the range 1–4093. Use a dash (–) to specify a range or a comma (,) to separate VLAN IDs in a list. Spaces and zeros are not permitted. |
clear dhcp l2relay statistics interface
M4250
M4350
Use this command to reset the DHCP L2 relay counters to zero. Specify the port with the counters to clear, or use the all keyword to clear the counters on all ports. To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | clear dhcp l2relay statistics interface {unit/slot/port | all} |
| Mode | Privileged EXEC |