•
show running-config interface vlan vlan-id
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 for which you want
to enable the DHCP client feature.
•
interface ethernet slot
/
port
•
interface mgmt 0
• Enters interface configuration mode and specifies the
management interface as the interface for which you
want to enable the DHCP client feature.
•
interface vlan vlan-id
Example:
switch(config)# interface vlan 3
switch(config-if)#
• Enters interface configuration mode, where
vlan-id
is
the ID of the VLAN for which you want to enable the
DHCP client feature.
You must enter this command before assigning an IPv6
address to the interface in the next step. This command is
ipv6 address use-link-local-only
Example:
Step 3
not required if you will assign an IPv4 address to the
interface.
switch(config-if)# ipv6 address use-link-local-only
Assigns an IPv4 or IPv6 address to the interface.
[
no
] {
ip
|
ipv6
}
address dhcp
Step 4
Example:
The
no
form of this command releases the IP address.
switch(config-if)# ip address dhcp
Displays the IPv4 or IPv6 address assigned to the interface
in the running configuration.
(Optional) Do one of the following options:
Step 5
•
show running-config interface ethernet slot
/
port
•
show running-config interface mgmt 0
•
show running-config interface vlan vlan-id
Example:
switch(config-if)# show running-config interface
vlan 3
Copies the running configuration to the startup
configuration.
(Optional)
copy running-config startup-config
Example:
Step 6
Only the {
ip
|
ipv6
}
address dhcp
command is saved. The
assigned IP address is not saved even though it shows in
the running configuration.
switch(config-if)# copy running-config
startup-config
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
363
Configuring DHCP
Enabling DHCP Client