|
|
This chapter describes how to use the command-line interface (CLI) to configure Ethernet, Fast Ethernet, and Gigabit Ethernet interfaces for Layer 2 switching on the Catalyst 6000 family switches. The configuration tasks in this chapter apply to Ethernet, Fast Ethernet, and Gigabit Ethernet interfaces on any module, including the uplink ports on the supervisor engine.
This chapter consists of these sections:
These sections describe how Layer 2 switching works on the Catalyst 6000 family switches:
The Catalyst 6000 family switches support simultaneous, parallel connections between Layer 2 Ethernet segments. Switched connections between Ethernet segments last only for the duration of the packet. New connections can be made between different segments for the next packet.
The Catalyst 6000 family switches solve congestion problems caused by high-bandwidth devices and a large number of users by assigning each device (for example, a server) to its own 10-, 100-, or 1000-Mbps segment. Because each Ethernet interface on the switch represents a separate Ethernet segment, servers in a properly configured switched environment achieve full access to the bandwidth.
Because collisions are a major bottleneck in Ethernet networks, an effective solution is full-duplex communication. Normally, Ethernet operates in half-duplex mode, which means that stations can either receive or transmit. In full-duplex mode, two stations can transmit and receive at the same time. When packets can flow in both directions simultaneously, effective Ethernet bandwidth doubles to 20 Mbps for 10-Mbps interfaces and to 200 Mbps for Fast Ethernet interfaces. Gigabit Ethernet interfaces on Catalyst 6000 family switches are full duplex only, providing 2-Gbps effective bandwidth.
Each Ethernet interface on a Catalyst 6000 family switch can connect to a single workstation or server, or to a hub through which workstations or servers connect to the network.
On a typical Ethernet hub, all ports connect to a common backplane within the hub, and the bandwidth of the network is shared by all devices attached to the hub. If two stations establish a session that uses a significant level of bandwidth, the network performance of all other stations attached to the hub is degraded.
To reduce degradation, the switch treats each interface as an individual segment. When stations on different interfaces need to communicate, the switch forwards frames from one interface to the other at wire speed to ensure that each session receives full bandwidth.
To switch frames between interfaces efficiently, the switch maintains an address table. When a frame enters the switch, it associates the MAC address of the sending station with the interface on which it was received.
Catalyst 6000 family switches build the address table by using the source address of the frames received. When the switch receives a frame for a destination address not listed in its address table, it floods the frame to all interfaces of the same VLAN except the interface that received the frame. When the destination station replies, the switch adds its relevant source address and interface ID to the address table. The switch then forwards subsequent frames to a single interface without flooding to all interfaces.
The address table can store at least 16,000 address entries without flooding any entries. The switch uses an aging mechanism, defined by a configurable aging timer, so if an address remains inactive for a specified number of seconds, it is removed from the address table.
These sections describe how VLAN trunks work on the Catalyst 6000 family switches:
A trunk is a point-to-point link between one or more Ethernet switch interfaces and another networking device such as a router or a switch. Trunks carry the traffic of multiple VLANs over a single link and allow you to extend VLANs across an entire network.
Two trunking encapsulations are available on all Ethernet interfaces:
You can configure a trunk on a single Ethernet interface or on an EtherChannel bundle. For more information about EtherChannel, see "Configuring EtherChannel."
Ethernet trunk interfaces support different trunking modes (see Table 5-2). You can specify whether the trunk uses ISL encapsulation, 802.1Q encapsulation, or if the encapsulation type is autonegotiated.
To autonegotiate trunking, the interfaces must be in the same VTP domain. Use the trunk or nonegotiate keywords to force interfaces in different domains to trunk. For more information on VTP domains, see "Configuring VTP."
Trunk negotiation is managed by the Dynamic Trunking Protocol (DTP). DTP supports autonegotiation of both ISL and 802.1Q trunks.
802.1Q trunks impose some limitations on the trunking strategy for a network. The following restrictions apply when using 802.1Q trunks:
Table 5-1 lists the Ethernet trunk encapsulation types.
| Encapsulation | Function |
|---|---|
Specifies ISL encapsulation on the trunk link. | |
Specifies 802.1Q encapsulation on the trunk link. | |
Specifies that the interface negotiate with the neighboring interface to become an ISL (preferred) or 802.1Q trunk, depending on the configuration and capabilities of the neighboring interface. |
The trunking mode, the trunk encapsulation type, and the hardware capabilities of the two connected interfaces determine whether a link becomes an ISL or 802.1Q trunk.
Table 5-2 lists the Layer 2 interface modes and describes how they function on Ethernet interfaces.
| Mode | Function |
|---|---|
Puts the interface into permanent nontrunking mode and negotiates to convert the link into a nontrunk link. The interface becomes a nontrunk interface even if the neighboring interface does not agree to the change. | |
Makes the interface actively attempt to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk, desirable, or auto mode. This is the default mode for all Ethernet interfaces. | |
Makes the interface willing to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode. | |
Puts the interface into permanent trunking mode and negotiates to convert the link into a trunk link. The interface becomes a trunk interface even if the neighboring interface does not agree to the change. | |
Puts the interface into permanent trunking mode but prevents the interface from generating DTP frames. You must configure the neighboring interface manually as a trunk interface to establish a trunk link. |
Table 5-3 shows the Layer 2 Ethernet interface default configuration.
| Feature | Default Value |
|---|---|
Interface mode | |
Trunk encapsulation | |
Allowed VLAN range | VLANs 1-1005 |
VLAN range eligible for pruning | VLANs 2-1001 |
Default VLAN (for access ports) | VLAN 1 |
Native VLAN (for 802.1Q trunks) | VLAN 1 |
Spanning Tree Protocol (STP) | Enabled for all VLANs |
STP port priority | 128 |
STP port cost |
|
These sections describe how to configure Layer 2 switching on the Catalyst 6000 family switches:
To configure an interface as a Layer 2 trunk, perform this task:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Router(config)# interface {ethernet | fastethernet | gigabitethernet} slot/port
| Select the interface to configure. | ||
| Router(config-if)# shutdown | (Optional) Shut down the interface to prevent traffic flow until configuration is complete. | ||
| Router(config-if)# switchport | Configure the interface for Layer 2 switching.
| ||
| Router(config-if)# switchport trunk encapsulation {isl | dot1q | negotiate} | (Optional) Specify the encapsulation. Note You must enter this command with either the isl or dot1q keyword to support the switchport mode trunk command, which is not supported by the default mode (negotiate). | ||
| Router(config-if)# switchport mode {dynamic {auto | desirable} | trunk}
| Configure the interface as a Layer 2 trunk. (Required only if the interface is a Layer 2 access port or to specify the trunking mode.) | ||
| Router(config-if)# switchport access vlan vlan_num | (Optional) Specify the default VLAN, which is used if the interface stops trunking. | ||
| Router(config-if)# switchport trunk native vlan vlan_num | For 802.1Q trunks, specify the native VLAN. Note The default VLAN is not automatically used as the native VLAN. | ||
| Router(config-if)# switchport trunk allowed vlan {add | except | none | remove} vlan1[,vlan[,vlan[,...]] | (Optional) Configure the list of VLANs allowed on the trunk. All VLANs are allowed by default. You cannot remove any of the default VLANs from a trunk. | ||
| Router(config-if)# switchport trunk pruning vlan {add | except | none | remove} vlan1[,vlan[,vlan[,...]] | (Optional) Configure the list of VLANs allowed to be pruned from trunk (see the "Understanding VTP Pruning" section). The default list of VLANs allowed to be pruned contains all VLANs. | ||
| Router(config-if)# no shutdown | Activate the interface. (Required only if you shut down the interface.) | ||
| Router(config-if)# exit | Exit the interface configuration mode. | ||
| Router(config)# exit | Exit the configuration mode. | ||
| Router# show running-config interface {ethernet | fastethernet | gigabitethernet} slot/port
| Display the running configuration of the interface. | ||
| Router# show interfaces [ethernet | fastethernet | gigabitethernet] slot/port switchport | Display the switchport configuration of the interface. | ||
| Router# show interfaces [{ethernet | fastethernet | gigabitethernet} slot/port] trunk
| Display the trunk configuration of the interface. |
This example shows how to configure the Fast Ethernet interface 5/8 as an 802.1Q trunk. This example assumes that the neighbor interface is configured to support 802.1Q trunking:
Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# interface fastethernet 5/8 Router(config-if)# shutdown Router(config-if)# switchport Router(config-if)# switchport mode dynamic desirable Router(config-if)# switchport trunk encapsulation dot1q Router(config-if)# no shutdown Router(config-if)# exit Router(config)# exit Router# exit
This example shows how to verify the configuration:
Router# show running-config interface fastethernet 5/8 Building configuration... Current configuration: ! interface FastEthernet5/8 no ip address switchport switchport trunk encapsulation dot1q end Router# show interfaces fastethernet 5/8 switchport Name: Fa5/8 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: negotiate Operational Trunking Encapsulation: dot1q Negotiation of Trunking: Enabled Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Pruning VLANs Enabled: ALL Router# show interfaces fastethernet 5/8 trunk Port Mode Encapsulation Status Native vlan Fa5/8 desirable n-802.1q trunking 1 Port Vlans allowed on trunk Fa5/8 1-1005 Port Vlans allowed and active in management domain Fa5/8 1-6,10,20,50,100,152,200,300,303-305,349-351,400,500,521,524,570,801-8 02,850,917,999,1002-1005 Port Vlans in spanning tree forwarding state and not pruned Fa5/8 1-6,10,20,50,100,152,200,300,303-305,349-351,400,500,521,524,570,801-8 02,850,917,999,1002-1005 Router#
To configure an interface as a Layer 2 access port, perform this task:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Router(config)# interface {ethernet | fastethernet | gigabitethernet} slot/port
| Select the interface to configure. | ||
| Router(config-if)# shutdown | (Optional) Shut down the interface to prevent traffic flow until configuration is complete. | ||
| Router(config-if)# switchport | Configure the interface for Layer 2 switching.
| ||
| Router(config-if)# switchport mode access | Configure the interface as a Layer 2 access port. | ||
| Router(config-if)# switchport access vlan vlan_num | Place the interface in a VLAN. | ||
| Router(config-if)# no shutdown | Activate the interface. (Required only if you shut down the interface.) | ||
| Router(config-if)# exit | Exit the interface configuration mode. | ||
| Router(config)# exit | Exit the configuration mode. | ||
| Router# show running-config interface {ethernet | fastethernet | gigabitethernet} slot/port
| Display the running configuration of the interface. | ||
| Router# show interfaces [{ethernet | fastethernet | gigabitethernet} slot/port] switchport
| Display the switchport configuration of the interface. |
This example shows how to configure the Fast Ethernet interface 5/6 as an access port in VLAN 200:
Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# interface fastethernet 5/6 Router(config-if)# shutdown Router(config-if)# switchport Router(config-if)# switchport mode access Router(config-if)# switchport access vlan 200 Router(config-if)# no shutdown Router(config-if)# exit Router(config)# exit Router# exit
This example shows how to verify the configuration:
Router# show running-config interface fastethernet 5/6 Building configuration... ! Current configuration: interface FastEthernet5/6 no ip address switchport access vlan 200 switchport mode access end Router# show interfaces fastethernet 5/6 switchport Name: Fa5/6 Switchport: Enabled Administrative Mode: static access Operational Mode: static access Administrative Trunking Encapsulation: negotiate Operational Trunking Encapsulation: native Negotiation of Trunking: Enabled Access Mode VLAN: 200 (VLAN0200) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Pruning VLANs Enabled: ALL Router#
To disable Layer 2 configuration on an interface, perform this task:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Router(config)# interface {ethernet | fastethernet | gigabitethernet} slot/port
| Select the interface to configure. | ||
| Router(config-if)# no switchport | Clear Layer 2 configuration from the interface. | ||
| Router(config-if)# exit | Exit the interface configuration mode. | ||
| Router(config)# exit | Exit the configuration mode. | ||
| Router# show running-config interface {ethernet | fastethernet | gigabitethernet} slot/port
| Display the running configuration of the interface. | ||
| Router# show interfaces [{ethernet | fastethernet | gigabitethernet} slot/port] switchport
| Display the switchport configuration of the interface. |
This example shows how to disable Layer 2 configuration on the Fast Ethernet interface 5/6:
Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# interface fastethernet 5/6 Router(config-if)# no switchport Router(config-if)# exit Router(config)# exit Router# exit
This example shows how to verify the configuration:
Router# show running-config interface fastethernet 5/6 Building configuration... Current configuration: ! interface FastEthernet5/6 no ip address no ip directed-broadcast end Router# show interfaces fastethernet 5/6 switchport Name: Fa5/6 Switchport: Disabled Router#
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Jan 3 14:12:03 PST 2000
Copyright 1989-1999©Cisco Systems Inc.