Configuring IPv4
S e n d d o c u m e n t c o m m e n t s t o n e x u s 3 k - d o c f e e d b a c k @ c i s c o . c o m
Command
Step 4
ip address ip-address/length
[secondary]
Example:
switch(config-if)# ip address 192.2.1.1
255.0.0.0
Step 5
show ip interface
Example:
switch(config-if)# show ip interface
Step 6
copy running-config startup-config
Example:
switch(config-if)# copy running-config
startup-config
This example shows how to assign an IPv4 address:
switch# configure terminal
switch(config)# interface ethernet 2/3
switch(config-if)# no switchport
switch(config-if)# ip address 192.2.1.1 255.0.0.0
switch(config-if)# copy running-config startup-config
Configuring Multiple IP Addresses
You can only add secondary IP addresses after you configure primary IP addresses.
SUMMARY STEPS
1.
2.
3.
4.
5.
6.
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, NX-OS Release 5.0(3)U1(1)
2-8
configure terminal
interface ethernet number
no switchport
ip address ip-address/length [secondary]
(Optional) show ip interface
(Optional) copy running-config startup-config
Purpose
Specifies a primary or secondary IPv4 address for an
interface.
The network mask can be a four-part dotted
•
decimal address. For example, 255.0.0.0 indicates
that each bit equal to 1 means the corresponding
address bit belongs to the network address.
The network mask can be indicated as a slash (/)
•
and a number - a prefix length. The prefix length
is a decimal value that indicates how many of the
high-order contiguous bits of the address
comprise the prefix (the network portion of the
address). A slash must precede the decimal value
and there is no space between the IP address and
the slash.
(Optional) Displays interfaces configured for IPv4.
(Optional) Saves this configuration change.
Chapter 2
Configuring IPv4