DHCP Snooping
Last updated
Was this helpful?
Last updated
Was this helpful?
DHCP snooping inspects DHCP packets and makes sure, that no rogues DHCP server, can hand out malicious or errornous DHCP Settings.
DHCP Server must sit behind trusted ports:
DHCP OFFER and ACK packets are only allowed on trusted ports.
DHCP snooping is a per-vlan setting.
DHCP Server should either be behind a trusted port, or defined in the Trusted DHCP Server access list.
Trusted Port can be assigned via the GUI:
When an untrusted DHCP server is detected or when OFFER or ACK DHCP packets are detected on an untrusted port, following Log message will be created and the packet will be blocked:
Optionally, it's also possible to not forward any DHCP DISCOVER and REQUEST packets to untrusted ports. This is to prevent information leakage to non dhcp-servers. This is a FortiSwitch only setting. By default it is configured as 'forwarded-untrusted.
To display the DHCP snooping status:
To view the DHCP snooping database:
DHCP Broadcast mode is the status of the previously described dhcp-snoop-client-req setting. Max Client Database differs per switch model. If this limit is reached, no additional DHCP leases are allowed!
DHCP Option 82 also known as DHCP Relay Agent Information, is used to provide additional information about the client's physical connection to the network. The Switch adds information such as switch mac address, Port ID and VLAN ID to the DHCP request. Now the DHCP server knowns exactly where the request is coming from. This allows network administrator to apply policies and control IP address allocation based on the location of the DHCP client in the network.
It protects the DHCP server from DHCP exhaustion attacks and spoofed DHCP requests. This feauture can be enabled on top of the default DHCP Snooping.
Following information is included in DHCP Option 82:
Circuit ID
Client port ID
Client VLAN ID
DHCP mode: dhcp-s (snooping) / dhcp-r (relay)
Remote ID
FortiSwitch MAC Address (internal interface)
Packet flow:
A client device connects to a switch and sends out a DHCP request.
The switch, acting as a relay agent, adds Option 82 to the request, including details about which port the client is connected to (Circuit ID) and the switch's identifier (Remote ID).
The relay agent forwards this DHCP request to the DHCP server.
The DHCP server, seeing the Option 82 information, can decide to assign an IP address based on the specific switch and port the client is connected to.
The DHCP server sends back the offer, which the relay agent then forwards to the client.
Because FortiSwitch is adding this details, a dhcp exhaustion attack is not possible anymore.
Option 82 is enabled per VLAN on top of dhcp-snooping setting.
By default packets with option 82 are dropped on the FortiSwitch if they are not coming through a FortiLink-ISL.
So in case a downstream switch outside of the FortiLink fabric is adding port 82, the switch port on the root switch must be explictly allowed to accept port82 packets with following options:
Instructs FortiSwitch to verify that the source MAC address in the Ethernet Header and the client hardware address in the DHCP header match.