Monday, August 24, 2009

EtherChannel

EtherChannel provides fault-tolerant, high-speed links between switches, routers, and servers. An EtherChannel consists of individual Fast Ethernet or Gigabit Ethernet links bundled into a single logical link. If a link within an EtherChannel fails, traffic previously carried over that failed link changes to the remaining links within the EtherChannel.


Interface Modes in EtherChannel



Guidelines for Configuring EtherChannel

  • PAgP is Cisco proprietary.
  • LACP is defined in 802.3ad.
  • You can combine from two to eight parallel links.
  • All ports must be identical:
  • — Same speed and duplex
    — Cannot mix Fast Ethernet and Gigabit Ethernet
    — Cannot mix PAgP and LACP
    — Must all be VLAN trunk or nontrunk operational status
  • All links must be either Layer 2 or Layer 3 in a single channel group.
  • To create a channel in PAgP, sides must be set to
  • — Auto-Desirable
    — Desirable-Desirable
  • To create a channel in LACP, sides must be set to
  • — Active-Active
    — Active-Passive
  • To create a channel without using PAgP or LACP, sides must be set to On-On. Donot configure a GigaStack gigabit interface converter (GBIC) as part of an EtherChannel.
  • An interface that is already configured to be a Switched Port Analyzer (SPAN) destination port will not join an EtherChannel group until SPAN is disabled.
  • Donot configure a secure port as part of an EtherChannel.
  • Interfaces with different native VLANs cannot form an EtherChannel.
  • When using trunk links, ensure all trunks are in the same mode—Inter-Switch Link (ISL) or dot1q.

Configuring Layer 2 EtherChannel



Verifying EtherChannel


Sunday, August 16, 2009

Spanning Tree Protocol (STP)

Enabling Spanning Tree Protocol


NOTE: If more VLANs are defined in the VLAN Trunking Protocol (VTP) than there are spanning-tree instances, you can only have STP on 64 VLANs. If you have more than 128 VLANs, it is recommended that you use Multiple STP.


Configuring the Root Switch



Configuring a Secondary Root Switch


Configuring Port Priority


Configuring the Path Cost


Configuring the Switch Priority of a VLAN


NOTE: With the priority keyword, the range is 0 to 61440 in increments of 4096. The default is 32768. The lower the priority, the more likely the switch will be chosen as the root switch.

Only the following numbers can be used as a priority value:


CAUTION: Cisco recommends caution when using this command. Cisco further recommends that the spanning-tree vlan x root primary or the spanning-tree vlan x root secondary command be used instead to modify the switch priority.

Configuring STP Timers


NOTE: For the hello-time command, the range is 1 to 10 seconds. The default is 2 seconds.
For the forward-time command, the range is 4 to 30 seconds. The default is 15 seconds.
For the max-age command, the range is 6 to 40 seconds. The default is 20 seconds.

CAUTION: Cisco recommends caution when using this command. Cisco further recommends that the spanning-tree vlan x root primary or the spanning-tree vlan x root secondary command be used instead to modify the switch timers.


Verifying STP



Optional STP Configurations

Although the following commands are not mandatory for STP to work, you might find these helpful to fine-tune your network.

PortFast


BPDU Guard




Changing the Spanning-Tree Mode

Different types of spanning tree can be configured on a Cisco switch. The options vary according to the platform:
  • Per-VLAN Spanning Tree (PVST)—There is one instance of spanning tree for each VLAN. This is a Cisco proprietary protocol.
  • Per-VLAN Spanning Tree Plus (PVST+)—Also Cisco proprietary. Has added extensions to the PVST protocol.
  • Rapid PVST+—This mode is the same as PVST+ except that it uses a rapid convergence based on the 802.1w standard.
  • Multiple Spanning Tree Protocol (MSTP)—IEEE 802.1s. Extends the 802.1w Rapid Spanning Tree (RST) algorithm to multiple spanning trees. Multiple VLANs can map to a single instance of RST. You cannot run MSTP and PVST at the same time.


Extended System ID


Enabling Rapid Spanning Tree


Troubleshooting Spanning Tree

Sunday, August 9, 2009

VLAN Trunking Protocol and Inter-VLAN Routing

Dynamic Trunking Protocol (DTP)



TIP: The default mode is dependent on the platform. For the 2960, the default mode is dynamic auto.

TIP: On a 2960 switch, the default for all ports is to be an access port. However, with the default DTP mode being dynamic auto, an access port can be converted into a trunk port if that port receives DTP information from the other side of the link if that side is set to trunk or desirable. It is therefore recommended to hardcode all access ports as access ports with the switchport mode access command. This way, DTP information will not inadvertently change an access port to a trunk port. Any port set with the switchport mode access command ignores any DTP requests to convert the link.


Setting the Encapsulation Type

Depending on the series of switch that you are using, you might have a choice as to what type of VLAN encapsulation you want to use: the Cisco proprietary Inter-Switch Link (ISL) or the IEEE Standard 802.1q (dot1q). The 2960 switch supports only dot1q trunking.



TIP: With the switchport trunk encapsulation negotiate command set, the preferred trunking method is ISL.

CAUTION: The 2960 series switch supports only dot1q trunking.


VLAN Trunking Protocol (VTP)

VTP is a Cisco proprietary protocol that allows for VLAN configuration (addition, deletion,
or renaming of VLANs) to be consistently maintained across a common administrative domain.

Using Global Configuration Mode



NOTE: Only VLANs included in the pruning-eligible list can be pruned. VLANs 2 through 1001 are pruning eligible by default on trunk ports. Reserved VLANs and extended-range VLANs cannot be pruned. To change which eligible VLANs can be pruned, use the interface-specific switchport trunk pruning vlan command:

Switch(config-if)#switchport trunk pruning vlan remove 4, 20-30
! Removes VLANs 4 and 20-30
Switch(config-if)#switchport trunk pruning vlan except 40-50
! All VLANs are added to the pruning list except for 40-50


Verifying VTP


NOTE: If trunking has been established before VTP is set up, VTP information is propagated throughout the switch fabric almost immediately. However, because VTP information is advertised only every 300 seconds (5 minutes), unless a change has been made to force an update, it can take several minutes for VTP information to be propagated.


Inter-VLAN Communication Using an External Router: Router-on-a-Stick




NOTE: The subnets of the VLANs are directly connected to the router. Routing between these subnets does not require a dynamic routing protocol. In a more complex topology, these routes need to either be advertised with whatever dynamic routing protocol is being used or be redistributed into whatever dynamic routing protocol is being used.

NOTE: Routes to the subnets associated with these VLANs appear in the routing table as directly connected networks.

Inter-VLAN Communication Tips
  • Although most routers support both ISL and dot1q encapsulation, some switch models only support dot1q (the 2950 and 2960 series, for example).
  • If you need to use ISL as your trunking protocol, use the command encapsulation isl x, where x is the number of the VLAN to be assigned to that subinterface.
  • Recommended best practice is to use the same number of the VLAN number for the subinterface number. It is easier to troubleshoot VLAN 10 on subinterface fa0/0.10 than on fa0/0.2.
  • The native VLAN (usually VLAN 1) cannot be configured on a subinterface for Cisco IOS Software releases that are earlier than 12.1(3)T. Native VLAN IP addresses therefore need to be configured on the physical interface. Other VLAN traffic is configured on subinterfaces:
Router(config)#interface fastethernet 0/0
Router(config-if)#encapsulation dot1q 1 native
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#interface fastethernet 0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.10.1 255.255.255.0


Configuration Example: Inter-VLAN Communication

Figure 13-1 illustrates the network topology for the configuration that follows, which shows
how to configure inter-VLAN communication using commands.


ISP Router

CORP Router



L2Switch1 (Catalyst 2960)