- New and Changed Information for the Interfaces NX-OS Configuration Guide
- Preface
- Overview
- Configuring Basic Interface Parameters
- Configuring Layer 2 Interfaces
- Configuring Layer 3 Interfaces
- Configuring Bidirectional Forwarding Detection
- Configuring Port Channels
- Configuring vPCs
- Configuring IP Tunnels
- Configuring Q-in-Q VLAN Tunnels
- IETF RFCs Supported by Cisco NX-OS Interfaces
- Configuration Limits for Cisco NX-OS Interfaces
- Information About Layer 3 Interfaces
- Licensing Requirements for Layer 3 Interfaces
- Prerequisites for Layer 3 Interfaces
- Guidelines and Limitations
- Default Settings
- Configuring Layer 3 Interfaces
- Verifying the Layer 3 Interfaces Configuration
- Monitoring Layer 3 Interfaces
- Configuration Examples for Layer 3 Interfaces
- Related Topics
- Additional References
- Feature History for Configuring Layer 3 Interfaces
Configuring Layer 3 Interfaces
This chapter describes how to configure Layer 3 interfaces for Cisco NX-OS devices
This chapter includes the following sections:
- Information About Layer 3 Interfaces
- Licensing Requirements for Layer 3 Interfaces
- Guidelines and Limitations
- Default Settings
- Prerequisites for Layer 3 Interfaces
- Configuring Layer 3 Interfaces
- Verifying the Layer 3 Interfaces Configuration
- Monitoring Layer 3 Interfaces
- Configuration Examples for Layer 3 Interfaces
- Related Topics
- Additional References
- Feature History for Configuring Layer 3 Interfaces
Information About Layer 3 Interfaces
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 cannot configure a shared interface as a Layer 3 interface. See the Cisco NX-OS FCoE Configuration Guide for Cisco Nexus 7000 and Cisco MDS 9500 for information on shared interfaces.
Beginning with Cisco Release 5.2(1), you can configure a Fabric Extender (FEX) port as a Layer 3 interface for host connectivity, but not for routing. See the Configuring the Cisco Nexus 2000 Series Fabric Extender for more information on fabric extenders.
This section includes the following topics:
- Routed Interfaces
- Subinterfaces
- VLAN Interfaces
- Loopback Interfaces
- Tunnel Interfaces
- High Availability
- Virtualization Support
Routed Interfaces
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 or through the system default switchport command.
You can assign an IP address to the port, enable routing, and assign routing protocol characteristics to this routed interface.
Beginning with Cisco Release 4.2(1), you can assign a static MAC address to a Layer 3 interface. By default, the MAC address for the Layer 3 interfaces is the MAC address of the VDC it is assigned to. For information on configuring MAC addresses, see the Cisco Nexus 7000 Series NX-OS Layer 2 Switching Configuration Guide, Release 5.x.
You can also create a Layer 3 port channel from routed interfaces. For more information on port channels, see Chapter6, “Configuring Port Channels”
Routed interfaces and subinterfaces support exponentially decayed rate counters. Cisco NX-OS tracks the following statistics with these averaging counters:
Subinterfaces
You can create virtual subinterfaces on a parent interface configured as a Layer 3 interface. A parent interface can be a physical port or a port channel.
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.
Figure 4-1 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.
Figure 4-1 Subinterfaces for VLANs

For more information on VLANs, see the Cisco Nexus 7000 Series NX-OS Layer 2 Switching Configuration Guide, Release 5.x.
VLAN Interfaces
A VLAN interface or switch virtual interfaces (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. Beginning in Cisco NX-OS Release 4.2, the system automatically takes a checkpoint prior to disabling the feature, and you can rollback to this checkpoint. See Cisco Nexus 7000 Series NX-OS System Management Configuration Guide, Release 5.x, for information on rollbacks and checkpoints.
You must configure the VLAN network interface in the same VDC as the VLAN.

Note 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 on IP addresses and IP routing, see the Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 5.x.
Figure 4-2 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 1and VLAN 10 communicates at Layer 3 over VLAN interface 10.
Figure 4-2 Connecting Two VLANs with VLAN interfaces


Note You can configure VLAN interface for inband management in the Cisco Nexus 7000 Series switches with the F1 Series modules in the chassis.
Loopback Interfaces
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 per VDC, 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.
Tunnel Interfaces
Cisco NX-OS supports tunnel interfaces as IP tunnels. IP tunnels can encapsulate a same-layer or higher layer protocol and transport the result over IP through a tunnel created between two routers. See “Configuring IP Tunnels,” for more information on IP tunnels.
High Availability
Layer 3 interfaces support stateful and stateless restarts. After the switchover, Cisco NX-OS applies the runtime configuration after the switchover.
See the Cisco Nexus 7000 Series NX-OS High Availability and Redundancy Guide, Release 5.x, for complete information on high availability.
Virtualization Support
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 unless you specifically configure another VDC and VRF. A Layer 3 logical interface (VLAN interface, loopback) configured in one VDC is isolated from a Layer 3 logical interface with the same number configured in another VDC. For example, loopback 0 in VDC 1 is independent of loopback 0 in VDC 2.
You can configure up to 1024 loopback interfaces per VDC.
You can associate the interface with a VRF. For VLAN interfaces, you must configure the VLAN interface in the same VDC as the VLAN.
See the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x, for information about VDCs and see the Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 5.x, for information about configuring an interface in a VRF.

Note You must assign an interface to a VRF before you configure the IP address for that interface.
Licensing Requirements for Layer 3 Interfaces
The following table shows the licensing requirements for this feature:
Prerequisites for Layer 3 Interfaces
Layer 3 interfaces have the following prerequisites:
- You have installed the Advanced Services license and entered the desired VDC (see the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x, if you are configuring VDCs.
- You are familiar with IP addressing and basic configuration. See the Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 5.x, for more information on IP addressing.
Guidelines and Limitations
Layer 3 interfaces have the following configuration guidelines and limitations:
- If you change a Layer 3 interface to a Layer 2 interface, Cisco NX-OS shuts down the interface, reenables the interface, and removes all configuration specific to Layer 3.
- If you change a Layer 2 interface to a Layer 3 interface, Cisco NX-OS shuts down the interface, reenables the interface, and deletes all configuration specific to Layer 2.
- The Cisco Nexus 2000 Fabric Extender can not participate in a routing protocol adjacency with a device attached to its port. Only direct route is supported. This applies to both of the supported connectivity cases:
– SVI with Fabric Extender single port or port-channel in Layer 2 mode.
– Fabric Extender port or port-channel in Layer 3 mode.
- Layer 3 router interfaces and sub-interfaces can not be configured on an F1 I/O module.
- F2-series I/O modules do not support per-VLAN statistics. Therefore, the show interface command will not display per-VLAN Rx/Tx counters or statistics for switch virtual interfaces (SVIs).

Note 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.
Default Settings
Table 4-1 lists the default settings for Layer 3 interface parameters.
|
|
---|---|
Configuring Layer 3 Interfaces
This section includes the following topics:
- Configuring a Routed Interface
- Configuring a Subinterface
- Configuring the Bandwidth on an Interface
- Configuring a VLAN interface
- Configuring Inband Management in the Nexus Chassis
- Configuring a Loopback Interface
- Assigning an Interface to a VRF
Configuring a Routed Interface
BEFORE YOU BEGIN
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
2. interface ethernet slot/port
4. ip address ip-address/length
or
ipv6 address ipv6-address/length
DETAILED STEPS
Use the medium command to set the interface medium to either point to point or broadcast.
|
|
---|---|
Configures the interface medium as either point to point or broadcast. |

Note 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.
Use the switchport command to convert a Layer 3 interface into a Layer 2 interface.
|
|
---|---|
Configures the interface as a Layer 2 interface and deletes any configuration specific to Layer 3 on this interface. |
This example shows how to configure a routed interface:
switch(config)# i nterface 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
The default setting for interfaces is routed. If you want to configure an interface for Layer 2, enter the switchport command. Then, if you change a Layer 2 interface to a routed interface, enter the no switchport command.
Configuring a Subinterface
You can configure one or more subinterfaces on a routed interface or on a port channel made from routed interfaces.
BEFORE YOU BEGIN
Configure the parent interface as a routed interface.
See the “Configuring a Routed Interface” section.
Create the port-channel interface if you want to create a subinterface on that port channel.
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
2. interface ethernet slot/port.number
3. ip address ip-address/length
or
ipv6 address ipv6-address/length
DETAILED STEPS
This example shows how to create a subinterface:
switch(config)# i nterface ethernet 2/1.1
switch(config-if)# ip address 192.0.2.1/8
Configuring the Bandwidth on an Interface
You can configure the bandwidth for a routed interface, port channel, or subinterface. Higher layer protocols use bandwidth parameter to calculate path costs. You can configure the bandwidth on a subinterface with one of the following methods:
- Explicit—Set the bandwidth value for the subinterface directly.
- Inherit—Set the bandwidth that all subinterfaces inherit from the parent interface as either a specific value or as the bandwidth of the parent interface.
If you do not set the subinterface bandwidth or configure it to inherit the bandwidth from the parent interface, Cisco NX-OS determines the subinterface bandwidth as follows:
- If the parent interface is up, then the bandwidth of the subinterface is the same as the operational speed of the parent interface. For ports, the subinterface bandwidth is the configured or negotiated link speed. For port channels, the subinterface bandwidth is the aggregate of the link speeds of individual members of the port channel.
- If the parent interface is down, then the bandwidth of the subinterface depends on the type of parent interface:
– Port-channel subinterfaces have 100-Mb/s bandwidth for subinterfaces.
– 1-Gb/s Ethernet ports have 1-Gb/s bandwidth for subinterfaces.
– 10-Gb/s Ethernet ports have 10-Gb/s bandwidth for subinterfaces.
To configure the bandwidth of an interface, use the following command in interface mode:
|
|
---|---|
Configures the bandwidth parameter for a routed interface, port channel, or subinterface. |
To configure subinterfaces to inherit the bandwidth from the parent interface, use the following command in interface mode:
Configuring a VLAN interface
You can create VLAN interfaces to provide inter-VLAN routing.
BEFORE YOU BEGIN
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
4. ip address ip-address/length
or
ipv6 address ipv6-address/length
DETAILED STEPS
This example shows how to create a VLAN interface:
switch(config)# feature interface-vlan
switch(config)# in terface vlan 10
switch(config-if)# ip address 192.0.2.1/8
switch(config-if)# copy running-config startup-config
Configuring Inband Management in the Nexus Chassis
You can a create VLAN interface for inband management in the Cisco Nexus 7000 Series switches when there are only F1 Series modules in the chassis.


BEFORE YOU BEGIN
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
6. ip address ip-address/length
DETAILED STEPS
This example shows how to create an inband management in the Cisco Nexus 7000 chassis:
switch(config)# feature interface-vlan
switch(config)# in terface vlan 5
Configuring a Loopback Interface
You can configure a loopback interface to create a virtual interface that is always up.
BEFORE YOU BEGIN
Ensure that the IP address of the loopback interface is unique across all routers on the network.
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
2. interface loopback instance
3. ipv4 address ip-address
or
ipv6 address ip-address
DETAILED STEPS
This example shows how to create a loopback interface:
switch(config)# in terface loopback 0
switch(config-if)# ip address 192.0.2.100/8
switch(config-if)# copy running-config startup-config
Assigning an Interface to a VRF
BEFORE YOU BEGIN
Ensure that you are in the correct VDC (or use the switchto vdc command).
Assign the IP address for a tunnel interface after you have configured the interface for a VRF.
SUMMARY STEPS
2. interface interface-type number
4. ip-address ip-prefix/length
5. (Optional) show vrf [ vrf-name ] interface interface-type number
DETAILED STEPS
This example shows how to add a Layer 3 interface to the VRF:
switch(config)# interface loopback 0
switch(config-if)# vrf member RemoteOfficeVRF
Verifying the Layer 3 Interfaces Configuration
To display the Layer 3 configuration, perform one of the following tasks:
Monitoring Layer 3 Interfaces
Use the following commands to display Layer 3 statistics:
See the Cisco Nexus 7000 Series NX-OS Interfaces Command Reference, Release 5.x, for information on these commands.
Configuration Examples for Layer 3 Interfaces
This example shows how to configure Ethernet subinterfaces:
description Layer 3 for VLAN 10
This example shows how to configure a VLAN interface:
This example shows how to configure a loopback interface:
Related Topics
The following topics can give more information on Layer 3 interfaces:
- Chapter 6, “Configuring Port Channels”
- Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 5.x
Additional References
For additional information related to implementing Layer 3 interfaces, see the following sections:
Related Documents
MIBs
|
|
---|---|
To locate and download MIBs, go to the following URL: http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml |
Standards
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
Feature History for Configuring Layer 3 Interfaces
Table 4-2 lists the release history for this feature.
|
|
|
---|---|---|
Three configurable sampling intervals for interface statistics |
||