Drag and drop the following steps into the correct order to configure a Cisco switch as a DHCP relay agent with DHCP snooping, where the DHCP server is located on a remote router.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
- A
Configure a DHCP pool with network, default gateway, and lease parameters on the router acting as the DHCP server.
The router acting as the DHCP server must have a DHCP pool defined using the `ip dhcp pool` command, followed by the `network` statement to specify the client subnet, the `default-router` command to supply the gateway address, and the `lease` command to control lease duration. Without these parameters, clients will not receive an IP address, subnet mask, or default gateway, leaving them without network connectivity.
- B
Enable DHCP snooping globally on the switch with the ip dhcp snooping command.
Executing `ip dhcp snooping` in global configuration mode enables DHCP snooping on the switch. This is a required first step before DHCP snooping can be applied to any specific VLAN, and it allows the switch to inspect DHCP messages, build an IP-to-MAC binding database, and filter untrusted DHCP responses. Without this global command, the switch will not enforce DHCP security policies, leaving the network vulnerable to rogue DHCP servers.
- C
Enable DHCP snooping on the client VLAN(s) using ip dhcp snooping vlan <vlan-id>.
The `ip dhcp snooping vlan <vlan-id>` command activates DHCP snooping on the client VLAN, which is necessary for the switch to monitor and validate DHCP traffic in that VLAN. Although DHCP snooping is enabled globally, it has no effect unless at least one VLAN is specified. This per-VLAN step ensures that DHCP packets from clients are inspected, and the switch begins building a DHCP snooping binding table for that VLAN, providing security and IP tracking.
- D
Configure the switch port connecting toward the DHCP server as a trusted port using ip dhcp snooping trust.
The switch port that connects toward the legitimate DHCP server must be explicitly configured as trusted with `ip dhcp snooping trust`. By default, all ports are untrusted, meaning any DHCPOFFER or DHCPACK message arriving on them will be discarded. Designating the server-facing port as trusted permits the server's replies to reach clients, while preventing rogue DHCP offers from untrusted ports, an essential step to avoid DHCP spoofing attacks.
- E
On the SVI for the client VLAN, assign an IP address and add the ip helper-address <dhcp-server-ip> command.
The SVI for the client VLAN must first be assigned an IP address to function as the client gateway and to ensure Layer 3 connectivity. Adding the `ip helper-address <dhcp-server-ip>` command on that SVI enables DHCP relay, so broadcast DHCPDISCOVER messages from clients are forwarded as unicast to the DHCP server located on a different subnet. Without this helper-address, clients would never receive a response from the remote server, causing DHCP timeouts and no IP assignment.