Configuring an Interface as Trusted or Untrusted
You can configure whether an interface is a trusted or untrusted source of DHCP messages. By default, all
interfaces are untrusted. You can configure DHCP trust on the following types of interfaces:
• Layer 2 Ethernet interfaces
• Layer 2 port-channel interfaces
Before you begin
Make sure that the DHCP feature is enabled.
Make sure that the interface is configured as a Layer 2 interface.
SUMMARY STEPS
1.
configure terminal
2.
Do one of the following options:
•
interface ethernet slot
/
port
•
interface port-channel channel-number
3.
[
no
]
ip dhcp snooping trust
4.
(Optional)
show running-config dhcp
5.
(Optional)
copy running-config startup-config
DETAILED STEPS
Purpose
Command or Action
Enters global configuration mode.
configure terminal
Example:
Step 1
switch# configure terminal
switch(config)#
Do one of the following options:
Step 2
• Enters interface configuration mode, where
slot
/
port
is the Layer 2 Ethernet interface that you want to
configure as trusted or untrusted for DHCP snooping.
•
interface ethernet slot
/
port
•
interface port-channel channel-number
• Enters interface configuration mode, where
slot
/
port
is the Layer 2 port-channel interface that you want to
configure as trusted or untrusted for DHCP snooping.
Example:
switch(config)# interface ethernet 2/1
switch(config-if)#
Configures the interface as a trusted interface for DHCP
snooping. The
no
form of this command configures the port
as an untrusted interface.
[
no
]
ip dhcp snooping trust
Example:
switch(config-if)# ip dhcp snooping trust
Step 3
Displays the DHCP configuration.
(Optional)
show running-config dhcp
Example:
Step 4
switch(config-if)# show running-config dhcp
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
344
Configuring DHCP
Configuring an Interface as Trusted or Untrusted