The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Book Contents Book ContentsCisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 7.x
Layer 3 interfaces forward IPv4 and IPv6 packets to another device using static or dynamic routing protocols. You can use Layer 3 interfaces for IP routing and inter-VLAN routing of Layer 2 traffic.
You can configure a port as a Layer 2 interface or a Layer 3 interface. A routed interface is a physical port that can route IP traffic to another device. A routed interface is a Layer 3 interface only and does not support Layer 2 protocols, such as the Spanning Tree Protocol (STP).
All Ethernet ports are routed interfaces by default. You can change this default behavior with the CLI setup script.
The default behavior varies based on the type of switch (Cisco Nexus 9300, Cisco Nexus 9500, or Cisco Nexus 3164).
Cisco Nexus 9300 Series switches (except Cisco Nexus 9332 switch) have a Layer 2 default mode.
You can assign an IP address to the port, enable routing, and assign routing protocol characteristics to this routed interface.
You can also create a Layer 3 port channel from routed interfaces. For more information about port channels, see the “Configuring Port Channels” section.
Routed interfaces support exponentially decayed rate counters. Cisco NX-OS tracks the following statistics with these averaging counters:
You can create virtual subinterfaces on a parent interface configured as a Layer 3 interface. A parent interface can be a physical port.
Subinterfaces divide the parent interface into two or more virtual interfaces on which you can assign unique Layer 3 parameters such as IP addresses and dynamic routing protocols. The IP address for each subinterface should be in a different subnet from any other subinterface on the parent interface.
You create a subinterface with a name that consists of the parent interface name (for example, Ethernet 2/1) followed by a period and then by a number that is unique for that subinterface. For example, you could create a subinterface for Ethernet interface 2/1 named Ethernet 2/1.1 where .1 indicates the subinterface.
Cisco NX-OS enables subinterfaces when the parent interface is enabled. You can shut down a subinterface independent of shutting down the parent interface. If you shut down the parent interface, Cisco NX-OS shuts down all associated subinterfaces as well.
One use of subinterfaces is to provide unique Layer 3 interfaces to each virtual local area network (VLAN) supported by the parent interface. In this scenario, the parent interface connects to a Layer 2 trunking port on another device. You configure a subinterface and associate the subinterface to a VLAN ID using 802.1Q trunking.
The following figure shows a trunking port from a switch that connects to router B on interface E 2/1. This interface contains three subinterfaces that are associated with each of the three VLANs carried by the trunking port.
The following are the limitations for subinterfaces:
A VLAN interface, or switch virtual interface (SVI), is a virtual routed interface that connects a VLAN on the device to the Layer 3 router engine on the same device. Only one VLAN interface can be associated with a VLAN, but you need to configure a VLAN interface for a VLAN only when you want to route between VLANs or to provide IP host connectivity to the device through a virtual routing and forwarding (VRF) instance that is not the management VRF. When you enable VLAN interface creation, Cisco NX-OS creates a VLAN interface for the default VLAN (VLAN 1) to permit remote switch administration.
You must enable the VLAN network interface feature before you can see configure it. The system automatically takes a checkpoint prior to disabling the feature, and you can roll back to this checkpoint. See the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide for information on rollbacks and checkpoints.
You cannot delete the VLAN interface for VLAN 1.
You can route across VLAN interfaces to provide Layer 3 inter-VLAN routing by configuring a VLAN interface for each VLAN that you want to route traffic to and assigning an IP address on the VLAN interface. For more information about IP addresses and IP routing, see the Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide.
The following figure shows two hosts connected to two VLANs on a device. You can configure VLAN interfaces for each VLAN that allows Host 1 to communicate with Host 2 using IP routing between the VLANs. VLAN 1 communicates at Layer 3 over VLAN interface 1 and VLAN 10 communicates at Layer 3 over VLAN interface 10.
When you enter the vrf member command under an interface, you receive an alert regarding the deletion of interface configurations and to notify the clients/listeners (such as CLI-Server) to delete configurations with respect to the interface.
Entering the system vrf-member-change retain-l3-config command (7.0(3)I4(1) and later) enables the retention of the Layer 3 configuration when the VRF member changes on the interface. It does this by sending notification to the clients/listeners to store (buffer) the existing configurations, delete the configurations from the old vrf context, and reapply the stored configurations under the new VRF context.
When the system vrf-member-change retain-l3-config command is enabled, the Layer 3 configuration is not deleted and remains stored (buffered). When this command is not enabled (default mode), the Layer 3 configuration is not retained when the VRF member changes.
You can disable the retention of the Layer 3 configuration with the no system vrf-member-change retain-l3-config command. In this mode, the Layer 3 configuration is not retained when the VRF member changes.
A loopback interface is a virtual interface with a single endpoint that is always up. Any packet transmitted over a loopback interface is immediately received by this interface. Loopback interfaces emulate a physical interface. You can configure up to 1024 loopback interfaces, numbered 0 to 1023.
You can use loopback interfaces for performance analysis, testing, and local communications. Loopback interfaces can act as a termination address for routing protocol sessions. This loopback configuration allows routing protocol sessions to stay up even if some of the outbound interfaces are down.
The IP unnumbered feature enables the processing of IP packets on a point to point (p2p) interface without explicitly configuring a unique IP address on it. This approach borrows an IP address from another interface and conserves address space on point to point links.
Any interface which conforms to the point to point mode can be used as an IP unnumbered interface. For 7.0(3)I3(1) and later, the IP unnumbered feature is supported only on Ethernet interfaces and sub-interfaces. The borrowed interface can only be a loopback interface and is known as the numbered interface.
A loopback interface is ideal as a numbered interface in that it is always functionally up. However, because loopback interfaces are local to a switch/router, the reachability of unnumbered interfaces first needs to be established through static routes or by using an interior gateway protocol, such as OSPF or ISIS.
Beginning with Cisco NX-OS Release 7.0(3)I6(1), configuring IP unnumbered interfaces for port channels is supported on all Cisco Nexus 9000 Series switches.
BGP allows an IPv4 prefix to be carried over an IPv6 next hop. The IPv6 next hop is leveraged to remove neighbor discovery (ND)-related traffic from the network. To do this (7.0(3)I2(1) and later) , the MAC address is embedded in the IPv6 address. Such an address is called a MAC-embedded IPv6 (MEv6) address. The router extracts the MAC address directly from the MEv6 address instead of going through ND. Local interface and next-hop MAC addresses are extracted from the IPv6 addresses.
On MEv6-enabled IPv6 interfaces, the same MEv6-extracted MAC address is used for IPv4 traffic as well. MEv6 is supported on all Layer 3-capable interfaces except switch virtual interfaces (SVIs).
When MEv6 is enabled on an interface, ping6 to the IPv6 link local address, OSPFv3, and BFDv6 are not supported on that interface.
Layer 3 interfaces support stateful and stateless restarts. After the switchover, Cisco NX-OS applies the runtime configuration after the switchover.
Layer 3 interfaces support Virtual Routing and Forwarding instances (VRFs). VRFs exist within virtual device contexts (VDCs). By default, Cisco NX-OS places you in the default VDC and default VRF .
You must assign an interface to a VRF before you configure the IP address for that interface.
Beginning with 7.0(3)I2(1), Cisco NX-OS supports DHCP client for IPv4 and IPv6 addresses on SVIs, physical Ethernet, and management interfaces. You can configure the IP address of a DHCP client by using the ip address dhcp or ipv6 address dhcp command. These commands send a request from the DHCP client to the DHCP server soliciting an IPv4 or IPv6 address from the DHCP server. The DHCP client on the Cisco Nexus switch identifies itself to the DHCP server. The DHCP server uses this identifier to send the IP address back to the DHCP client.
When a DHCP client is configured on the SVI with the DHCP server sending router and DNS options, the ip route 0.0.0.0/0 router-ip and ip name-server dns-ip commands are configured on the switch automatically.
The following are the limitations for using DHCP client on interfaces:
You can configure a static MAC address for the following Layer 3 interfaces:
You cannot configure static MAC address on tunnel interfaces.
Layer 3 interfaces have the following prerequisites:
Layer 3 interfaces have the following configuration guidelines and limitations:
Note | The IP unnumbered interface through which the route is resolved needs to be specified. |
If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use.
The following table lists the default settings for Layer 3 interface parameters.
You can configure any Ethernet port as a routed interface.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface ethernet slot/port
switch(config)# interface ethernet 2/1 switch(config-if)#
Enters interface configuration mode.
switch(config-if)# no switchport
Configures the interface as a Layer 3 interface.
[ ip address ip-address/length | ipv6 address ipv6-address/length ]
switch(config-if)# ip address 192.0.2.1/8
switch(config-if)# ipv6 address 2001:0DB8::1/8
switch(config-if)# show interfaces ethernet 2/1
(Optional) Displays the Layer 3 interface statistics.
switch# switch(config-if)# int e2/1 switch(config-if)# no shutdown
(Optional) Clears the errors on the interfaces where policies correspond with hardware policies. This command allows policy programming to continue and the port to come up. If policies do not correspond, the errors are placed in an error-disabled policy state.
copy running-config startup-config
switch(config)# copy running-config startup-config
(Optional) Saves the configuration change.
switch(config-if)# medium p2p medium p2p
Configures the interface medium as either point to point or broadcast.
The default setting is broadcast , and this setting does not appear in any of the show commands. However, if you do change the setting to p2p , you will see this setting when you enter the show running config command.
switch(config-if)# switchportswitchport
Configures the interface as a Layer 2 interface and deletes any configuration specific to Layer 3 on this interface.
switch# configure terminal switch(config)# interface ethernet 2/1 switch(config-if)# no switchport switch(config-if)# ip address 192.0.2.1/8 switch(config-if)# copy running-config startup-config
You can configure one or more subinterfaces on a routed interface made from routed interfaces.
Configure the parent interface as a routed interface.
See the “Configuring a Routed Interface” section.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface ethernet slot/port.number
switch(config)# interface ethernet 2/1.1 switch(config-subif)#
Creates a subinterface and enters subinterface configuration mode. The number range is from 1 to 4094.
[ ip address ip-address/length | ipv6 address ipv6-address/length ]
switch(config-subif)# ip address 192.0.2.1/8
switch(config-subif)# ipv6 address 2001:0DB8::1/8
encapsulation dot1Q vlan-id
switch(config-subif)# encapsulation dot1Q 33
Configures IEEE 802.1Q VLAN encapsulation on the subinterface. The range is from 2 to 4093.
switch(config-subif)# show interfaces ethernet 2/1.1
(Optional) Displays the Layer 3 interface statistics.
copy running-config startup-config
switch(config)# copy running-config startup-config
(Optional) Saves the configuration change.
switch# configure terminal switch(config)# interface ethernet 2/1.1 switch(config-if)# ip address 192.0.2.1/8 switch(config-if)# encapsulation dot1Q 33 switch(config-if)# copy running-config startup-config
switch# show interface ethernet 1/2.1 Ethernet1/2.1 is down (Parent Interface Admin down) admin state is down, Dedicated Interface, [parent interface is Ethernet1/2] Hardware: 40000 Ethernet, address: 0023.ac67.9bc1 (bia 4055.3926.61d4) Internet Address is 10.10.10.1/24 MTU 1500 bytes, BW 40000000 Kbit, DLY 10 usec reliability 255/255, txload 1/255, rxload 1/255 Auto-mdix is turned off EtherType is 0x8100 L3 in Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes L3 out Switched: ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
You can configure one or more subinterfaces on a port-channel interface.
Subinterfaces on a port-channel interface do not support multicast routing, router ACLs, QoS, policy-based routing (PBR), SPAN, or ERSPAN.
Configure the parent interface as a port-channel interface. (7.0(3)I1(2) and later)
See the “Configuring Port Channels” chapter.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface port-channel channel-id.number
switch(config)# interface port-channel 100.1 switch(config-subif)#
Creates a subinterface and enters subinterface configuration mode.
[ ip address ip-address/length | ipv6 address ipv6-address/length ]
switch(config-subif)# ip address 192.0.2.1/8
switch(config-subif)# ipv6 address 2001:0DB8::1/8
encapsulation dot1Q vlan-id
switch(config-subif)# encapsulation dot1Q 33
Configures IEEE 802.1Q VLAN encapsulation on the subinterface. The range is from 2 to 4093.
switch(config-subif)# show interfaces ethernet 2/1.1
(Optional) Displays the Layer 3 interface statistics.
copy running-config startup-config
switch(config)# copy running-config startup-config
(Optional) Saves the configuration change.
This example shows how to create a subinterface:
switch# configure terminal switch(config)# interface port-channel 115.3 switch(config-subif)# ip address 141.143.101.2/24 switch(config-subif)# encapsulation dot1q 3 switch(config-subif)# copy running-config startup-config
You can create VLAN interfaces to provide inter-VLAN routing.
switch# configure terminal switch(config)#
Enters configuration mode.
switch(config)# feature interface-vlan
Enables VLAN interface mode.
interface vlan number
switch(config)# interface vlan 10 switch(config-if)#
Creates a VLAN interface. The number range is from 1 to 4094.
[ ip address ip-address/length | ipv6 address ipv6-address/length ]
switch(config-if)# ip address 192.0.2.1/8
switch(config-if)# ipv6 address 2001:0DB8::1/8
show interface vlan number
switch(config-if)# show interface vlan 10
(Optional) Displays the Layer 3 interface statistics.
switch(config)# int e3/1 switch(config)# no shutdown
(Optional) Clears the errors on the interfaces where policies correspond with hardware policies. This command allows policy programming to continue and the port to come up. If policies do not correspond, the errors are placed in an error-disabled policy state.
copy running-config startup-config
switch(config-if)# copy running-config startup-config
(Optional) Saves the configuration change.
This example shows how to create a VLAN interface:
switch# configure terminal switch(config)# feature interface-vlan switch(config)# interface vlan 10 switch(config-if)# ip address 192.0.2.1/8 switch(config-if)# copy running-config startup-config
The following steps enable the retention of the Layer 3 configuration when changing the VRF membership on the interface.
switch# configure terminal switch(config)#
Enters configuration mode.
system vrf-member-change retain-l3-config
switch(config)# system vrf-member-change retain-l3-config Warning: Will retain L3 configuration when vrf member change on interface.
Enables Layer 3 configuration retention during VRF membership change.
You can configure static MAC addresses on Layer 3 interfaces. You cannot configure broadcast or multicast addresses as static MAC addresses.
You cannot configure static MAC addresses on tunnel interfaces.
This configuration is limited to 16 VLAN interfaces. Applying the configuration to additional VLAN interfaces results in a down state for the interface with a Hardware prog failed. status.
switch# config t switch(config)#
Enters configuration mode.
interface [ ethernet slot/port | ethernet slot/port.number | port-channel number | vlan vlan-id ]
switch(config)# interface ethernet 7/3
Specifies the Layer 3 interface and enters the interface configuration mode.
You must create the Layer 3 interface before you can assign the static MAC address.
switch(config-if)# mac-address 22ab.47dd.ff89 switch(config-if)#
Specified a static MAC address to add to the Layer 3 interface.
switch(config-if)# exit switch(config)#
Exits the interface mode.
(Optional) show interface [ ethernet slot/port | ethernet slot/port.number | port-channel number | vlan vlan-id ]
switch# show interface ethernet 7/3
Displays information about the Layer 3 interface.
(Optional) copy running-config startup-config
switch# copy running-config startup-config
Copies the running configuration to the startup configuration.
This example shows how to configure the Layer 3 interface on slot 7, port 3 with a static MAC address:
switch# config t switch(config)# interface ethernet 7/3 switch(config-if)# mac-address 22ab.47dd.ff89 switch(config-if)#
You can configure a loopback interface to create a virtual interface that is always up.
Ensure that the IP address of the loopback interface is unique across all routers on the network.
switch# configure terminal switch(config)#
Enters configuration mode.
interface loopback instance
switch(config)# interface loopback 0 switch(config-if)#
Creates a loopback interface. The range is from 0 to 1023.
[ ip address ip-address/length | ipv6 address ipv6-address/length ]
switch(config-if)# ip address 192.0.2.1/8
switch(config-if)# ipv6 address 2001:0DB8::1/8
show interface loopback instance
switch(config-if)# show interface loopback 0
(Optional) Displays the loopback interface statistics.
copy running-config startup-config
switch(config-if)# copy running-config startup-config
(Optional) Saves the configuration change.
This example shows how to create a loopback interface:
switch# configure terminal switch(config)# interface loopback 0 switch(config-if)# ip address 192.0.2.1/8 switch(config-if)# copy running-config startup-config
You can configure the IP unnumbered feature on an ethernet interface.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface ethernet slot/port
switch(config)# interface ethernet 1/1 switch(config-if)#
Enters interface configuration mode.
switch(config-if)# medium p2p
Configures the interface medium as point to point.
ip unnumbered type number
switch(config-if)# ip unnumbered loopback 100
Enables IP processing on an interface without assigning an explicit IP address to the interface.
type and number specify another interface on which the router has an assigned IP address. The interface specified cannot be another unnumbered interface.
type is limited to loopback . (7.0(3)I3(1) and later)
You can configure OSPF for an IP unnumbered loopback interface.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface ethernet slot/port
switch(config)# interface ethernet 1/20.1 switch(config-if)#
Enters interface configuration mode.
encapsulation dot1Q vlan-id
switch(config-if)# encapsulation dot1Q 100
Configures IEEE 802.1Q VLAN encapsulation on the subinterface. The range is from 2 to 4093.
switch(config-if)# medium p2p
Configures the interface medium as point to point.
ip unnumbered type number
switch(config-if)# ip unnumbered loopback 101
Enables IP processing on an interface without assigning an explicit IP address to the interface.
type and number specify another interface on which the router has an assigned IP address. The interface specified cannot be another unnumbered interface.
type is limited to loopback . (7.0(3)I3(1) and later)
(Optional) ip ospf authentication
switch(config-if)# ip ospf authentication
Specifies the authentication type for interface.
(Optional) ip ospf authentication-key password
switch(config-if)# ip ospf authentication 3 b7bdf15f62bbd250
Specifies the authentication password for OSPF authentication.
ip router ospf instance area area-number
switch(config-if)# ip router ospf 100 area 0.0.0.1
Configures routing process for IP on an interface and specifies an area.
The ip router ospf command is required for both the unnumbered and the numbered interface.
switch(config-if)# no shutdown
Brings up the interface (administratively).
interface loopback instance
switch(config)# interface loopback 101
Creates a loopback interface. The range is from 0 to 1023.
ip address ip-address/length
switch(config-if)# 192.168.101.1/32
Configures an IP address for the interface.
ip router ospf instance area area-number
switch(config-if)# ip router ospf 100 area 0.0.0.1
Configures routing process for IP on an interface and specifies an area.
The ip router ospf command is required for both the unnumbered and the numbered interface.
You can configure ISIS for an IP unnumbered loopback interface.
switch# configure terminal switch(config)#
Enters global configuration mode.
Switch(config)# feature isis
router isis area-tag
Switch(config)# router isis 100
Assigns a tag to an IS-IS process and enters router configuration mode.
Switch(config-router)# net 49.0001.0100.0100.1001.00
Configures the network entity title (NET) on the device.
Switch(config-router)# end
Exit router configuration mode.
interface ethernet slot/port
switch(config)# interface ethernet 1/20.1
Enters interface configuration mode.
encapsulation dot1Q vlan-id
switch(config-subif)# encapsulation dot1Q 100
Configures IEEE 802.1Q VLAN encapsulation on the subinterface. The range is from 2 to 4093.
switch(config-subif)# medium p2p
Configures the interface medium as point to point.
ip unnumbered type number
switch(config-if)# ip unnumbered loopback 101
Enables IP processing on an interface without assigning an explicit IP address to the interface.
type and number specify another interface on which the router has an assigned IP address. The interface specified cannot be another unnumbered interface.
type is limited to loopback . (7.0(3)I3(1) and later)
ip router isis area-tag
switch(config-subif)# ip router isis 100
Enables ISIS on the unnumbered interface.
switch(config-subif)# no shutdown
Brings up the interface (administratively).
This procedure configures PBR on the primary SVI interface in the gateway.
Steps 2 through 6 are needed if you want to configure a PBR policy on the unnumbered Primary/Secondary VLAN interfaces. This is not mandatory for IP unnumbered on the SVI feature.
switch# configure terminal
Enter global configuration mode.
ip access-list list-name
switch(config)# ip access-list pbr-sample
Configure access list.
permit tcp host ipaddr host ipaddr eq port-number
switch(config-acl)# permit tcp host 10.1.1.1 host 192.168.2.1 eq 80
Specify the packets to forward on a specific port.
switch(config-acl)# exit
Exit configuration mode.
switch(config)# route-map pbr-sample
Create a route-map or enter route-map command mode.
match ip address access-list-name
switch(config-route-map)# match ip address pbr-sample
Match values from the routing table.
set ip next-hop addr1
switch(config-route-map)# set ip next-hop 192.168.1.1
Set IP address of the next hop.
switch(config-route-map)# exit
Exit command mode.
interface vlan vlan-id
switch(config)# interface vlan 2003
Creates a VLAN interface and enters interface configuration mode. The range is from 1 and 4094.This is the primary VLAN.
ip address ip-addr
switch(config-if)# ip address 10.0.0.1/8
Configures an IP address for the interface.
no ip redirects
switch(config-if)# no ip redirects
Needs to be configured on all unnumbered primary and secondary VLAN interfaces.
(Optional) ip policy route-map pbr-sample
switch(config-if)# ip policy route-map pbr-sample
Enter this command if you want to apply a PBR policy on the unnumbered Primary/Secondary VLAN interface.
switch(config-if)# exit
Exit command mode.
switch(config-if)# hsrp version 2
Set the HSRP version.
switch(config-if)# hsrp 200
Set the HSRP group number.
switch(config-if-hsrp)# name primary
Configure the redundancy name string.
switch(config-if-hsrp)# ip 10.0.0.100
Configures an IP address.
switch(config-if-hsrp)# no shutdown
This procedure configures IP unnumbered on the secondary SVI in the gateway.
Beginning with Cisco NX-OS Release 7.0(3)I7(1), this feature is supported on Cisco Nexus 93108TC-EX, 93180LC-EX and 93180YC-EX switches; and Cisco Nexus 9500 series switches with X9736C-EX, X97160YC-EX and X9732C-EX line cards.
switch# configure terminal
Enter configuration mode.
interface vlan vlan-list
switch(config)# interface vlan 2001
Creates a VLAN interface and enters interface configuration mode. The range is from 1 to 4094. This is the secondary VLAN.
ip unnumbered vlan primary-vlan-id
switch(config-if)# ip unnumbered vlan 2003
Enables IP processing on an interface without assigning an explicit IP address to an interface.
(Optional) ip policy route-map pbr-sample
switch(config-if)# ip policy route-map pbr-sample
Enter this command if you want to apply a PBR policy on the unnumbered Primary/Secondary VLAN interface.
no ip redirects
switch(config-if)# no ip redirects
Needs to be configured on all unnumbered primary and secondary VLAN interfaces.
switch(config-if)# hsrp version 2
Set the HSRP version.
switch(config-if)# hsrp 200
Set the HSRP group number.
switch(config-if-hsrp)# follow primary
Configure the group to be followed.
switch(config-if-hsrp)# ip 10.0.0.100
Enters HRSP IPv4 and sets the virtual IP address.
switch(config-if-hsrp)# no shutdown
You can add a Layer 3 interface to a VRF.
switch# configure terminal switch(config)#
Enters configuration mode.
interface interface-type number
switch(config)# interface loopback 0 switch(config-if)#
Enters interface configuration mode.
vrf member vrf-name
switch(config-if)# vrf member RemoteOfficeVRF
Adds this interface to a VRF.
ip address ip-prefix/length
switch(config-if)# ip address 192.0.2.1/16
Configures an IP address for this interface. You must do this step after you assign this interface to a VRF.
show vrf [ vrf-name ] interface interface-type number
switch(config-vrf)# show vrf Enterprise interface loopback 0
(Optional) Displays VRF information.
copy running-config startup-config
switch(config-if)# copy running-config startup-config
(Optional) Saves the configuration change.
This example shows how to add a Layer 3 interface to the VRF:
switch# configure terminal switch(config)# interface loopback 0 switch(config-if)# vrf member RemoteOfficeVRF switch(config-if)# ip address 209.0.2.1/16 switch(config-if)# copy running-config startup-config
Beginning with 7.0(3)I2(1), you can configure a MAC-embedded IPv6 (MEv6) address.
switch# configure terminal switch(config)#
Enters global configuration mode.
interface type slot/port
switch(config)# interface ethernet 1/3 switch(config-if)#
Enters the interface configuration mode for the specified interface.
switch(config-if)# no switchport
Configures the interface as a Layer 3 interface and deletes any configuration specific to Layer 2 on this interface.
To convert a Layer 3 interface back into a Layer 2 interface, use the switchport command.
switch(config-if)# mac-address ipv6-extract
Extracts the MAC address embedded in the IPv6 address configured on the interface.
The MEv6 configuration is currently not supported with the EUI-64 format of IPv6 address.
ipv6 address ip-address/length
switch(config-if)# ipv6 address 2002:1::10/64
Configures an IPv6 address for this interface.
ipv6 nd mac-extract [ exclude nud-phase ]
switch(config-if)# ipv6 nd mac-extract
Extracts the next-hop MAC address embedded in a next-hop IPv6 address.
The exclude nud-phase option blocks packets during the ND phase only. When the exclude nud-phase option is not specified, packets are blocked during both ND and neighbor unreachability detection (NUD) phases.
(Optional) show ipv6 icmp interface type slot/port
switch(config-if)# show ipv6 icmp interface ethernet 1/3
Displays IPv6 Internet Control Message Protocol version 6 (ICMPv6) interface information.
(Optional) copy running-config startup-config
switch(config-if)# copy running-config startup-config
Copies the running configuration to the startup configuration.
This example shows how to configure a MAC-embedded IPv6 address with ND mac-extract enabled:
switch# configure terminal switch(config)# interface ethernet 1/3 switch(config-if)# no switchport switch(config-if)# mac-address ipv6-extract switch(config-if)# ipv6 address 2002:1::10/64 switch(config-if)# ipv6 nd mac-extract switch(config-if)# show ipv6 icmp interface ethernet 1/3 ICMPv6 Interfaces for VRF "default" Ethernet1/3, Interface status: protocol-up/link-up/admin-up IPv6 address: 2002:1::10 IPv6 subnet: 2002:1::/64 IPv6 interface DAD state: VALID ND mac-extract : Enabled ICMPv6 active timers: Last Neighbor-Solicitation sent: 00:01:39 Last Neighbor-Advertisement sent: 00:01:40 Last Router-Advertisement sent: 00:01:41 Next Router-Advertisement sent in: 00:03:34 Router-Advertisement parameters: Periodic interval: 200 to 600 seconds Send "Managed Address Configuration" flag: false Send "Other Stateful Configuration" flag: false Send "Current Hop Limit" field: 64 Send "MTU" option value: 1500 Send "Router Lifetime" field: 1800 secs Send "Reachable Time" field: 0 ms Send "Retrans Timer" field: 0 ms Suppress RA: Disabled Suppress MTU in RA: Disabled Neighbor-Solicitation parameters: NS retransmit interval: 1000 ms ICMPv6 error message parameters: Send redirects: true Send unreachables: false ICMPv6-nd Statisitcs (sent/received): RAs: 3/0, RSs: 0/0, NAs: 2/0, NSs: 7/0, RDs: 0/0 Interface statistics last reset: never
This example shows how to configure a MAC-embedded IPv6 address with ND mac-extract (excluding NUD phase) enabled:
switch# configure terminal switch(config)# interface ethernet 1/5 switch(config-if)# no switchport switch(config-if)# mac-address ipv6-extract switch(config-if)# ipv6 address 2002:2::10/64 switch(config-if)# ipv6 nd mac-extract exclude nud-phase switch(config-if)# show ipv6 icmp interface ethernet 1/5 ICMPv6 Interfaces for VRF "default" Ethernet1/5, Interface status: protocol-up/link-up/admin-up IPv6 address: 2002:2::10 IPv6 subnet: 2002:2::/64 IPv6 interface DAD state: VALID ND mac-extract : Enabled (Excluding NUD Phase) ICMPv6 active timers: Last Neighbor-Solicitation sent: 00:06:45 Last Neighbor-Advertisement sent: 00:06:46 Last Router-Advertisement sent: 00:02:18 Next Router-Advertisement sent in: 00:02:24 Router-Advertisement parameters: Periodic interval: 200 to 600 seconds Send "Managed Address Configuration" flag: false Send "Other Stateful Configuration" flag: false Send "Current Hop Limit" field: 64 Send "MTU" option value: 1500 Send "Router Lifetime" field: 1800 secs Send "Reachable Time" field: 0 ms Send "Retrans Timer" field: 0 ms Suppress RA: Disabled Suppress MTU in RA: Disabled Neighbor-Solicitation parameters: NS retransmit interval: 1000 ms ICMPv6 error message parameters: Send redirects: true Send unreachables: false ICMPv6-nd Statisitcs (sent/received): RAs: 6/0, RSs: 0/0, NAs: 2/0, NSs: 7/0, RDs: 0/0 Interface statistics last reset: never
You can configure the DHCP client on an SVI, a management interface, or a physical Ethernet interface for IPv4 or IPv6 address
switch# configure terminal