Before you begin
Ensure that the DHCP feature is enabled.
Ensure that the DHCP server is correctly configured.
Determine the IP address for each DHCP server that you want to configure on the interface.
If the DHCP server is in a different VRF than the interface, ensure that you have enabled VRF support.
If an ingress router ACL is configured on an interface that you are configuring with a DHCP server address,
ensure that the router ACL permits DHCP traffic between DHCP servers and DHCP hosts.
Note
SUMMARY STEPS
1.
configure terminal
2.
Do one of the following options:
•
interface ethernet slot
/
port
[
.number
]
•
interface vlan vlan-id
•
interface port-channel channel-id
[.
subchannel-id
]
3.
ip dhcp relay address IP-address
[
use-vrf vrf-name
]
4.
(Optional)
show ip dhcp relay address
5.
(Optional)
show running-config dhcp
6.
(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 physical Ethernet interface that you want to
•
interface ethernet slot
/
port
[
.number
]
configure with a DHCP server IP address. If you want
•
interface vlan vlan-id
to configure a subinterface, include the
number
argument to specify the subinterface number.
•
interface port-channel channel-id
[.
subchannel-id
]
Example:
Port-channel subinterfaces are supported
only in Cisco NX-OS Releases 6.1(2)I3(3)
and 6.1(2)I3(3a). They are not supported in
Cisco NX-OS Release 9.2(1).
Note
switch(config)# interface ethernet 2/3
switch(config-if)#
• Enters interface configuration mode, where
vlan-id
is
the ID of the VLAN that you want to configure with
a DHCP server IP address.
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
352
Configuring DHCP
Configuring DHCP Server Addresses on an Interface