2010年3月17日 星期三

Understanding Layer 2 Trunk Failover

Layer 2 trunk failover, also known as link-state tracking, is a feature that provides Layer 2 redundancy in the network when used with server NIC adapter teaming. When the server network adapters are configured in a primary or secondary relationship known as teaming, if the link is lost on the primary interface, connectivity is transparently switched to the secondary interface.

When you enable Layer 2 trunk failover on the switch, the link state of the internal downstream ports are bound to the link state of one or more of the external upstream ports. An internal downstream port is an interface that is connected to the server. An external upstream port is an interface that is connected to the external network. When you associate a set of downstream ports to a set of upstream ports, if all of the upstream ports become unavailable, trunk failover automatically puts all of the associated downstream ports in an error-disabled state. This causes the server primary interface to failover to the secondary interface.

When Layer 2 trunk failover is not enabled, if the upstream interfaces lose connectivity, (the external switch or router goes down, the cables are disconnected, or link is lost), the link state of the downstream interfaces remain unchanged. The server is not aware that external connectivity has been lost and does not failover to the secondary interface.

An interface can be an aggregation of ports (an EtherChannel), or a single physical port in access or trunk mode. Each downstream interface can be associated with one or more upstream interfaces. Upstream interfaces can be bundled together, and each downstream interface can be associated with a single group consisting of multiple upstream interfaces. These groups are referred to as link-state groups.

In a link-state group, the link states of the downstream interfaces are dependent on the link states of the upstream interfaces. If all of the upstream interfaces in a link-state group are in the link-down state, the associated downstream interfaces are forced into the link-down state. If any one of the upstream interfaces in the link-state group is in a link-up state, the associated downstream interfaces can change to or remain in the link-up state.

Figure 28-4 Typical Layer 2 Trunk Failover Configuration

image

In Figure 28-4, downstream interfaces 1, 3, and 5 are defined in link-state group 1 with upstream interfaces 19 and 20. Similarly, downstream interfaces 2, 4, and 6 are defined in link-state group 2 with upstream interfaces 21 and 22.

If link is lost on upstream interface 19, the link states of downstream interfaces 1, 3, and 5 do not change. If upstream interface 20 also loses link, downstream interfaces 1, 3 and 5 go into a link-down state. Downstream interfaces 2, 4, and 6 do not change states.

You can recover a downstream interface link-down condition by removing the failed downstream port from the link-state group. To recover multiple downstream interfaces, disable the link-state group.

Configuring Layer 2 Trunk Failover

These sections describe how to configure trunk failover ports:

Default Layer 2 Trunk Failover Configuration

Layer 2 Trunk Failover Configuration Guidelines

Configuring Layer 2 Trunk Failover

Default Layer 2 Trunk Failover Configuration

There are no link-state groups defined, and trunk failover is not enabled for any group.

Layer 2 Trunk Failover Configuration Guidelines

Follow these guidelines to avoid configuration problems:

Do not configure a cross-connect interface (gi0/23 or gi0/24) as a member of a link-state
group.

Do not configure an EtherChannel as a downstream interface.

Only interfaces gi0/1 through gi0/16 can be configured as downstream ports in a specific link-state group.

Only interfaces gi0/17 through gi0/24 can be configured as upstream ports in a specific link-state group.

An interface that is defined as an upstream interface cannot also be defined as a downstream interface in the same or a different link-state group. The reverse is also true.

An interface cannot be a member of more than one link-state group.

You can configure only two link-state groups per switch.

Configuring Layer 2 Trunk Failover

Beginning in privileged EXEC mode, follow these steps to configure a link-state group and to assign an interface to a group:

This example shows how to create a link-state group and configure the interfaces:

Switch# configure terminal 




Switch(config)# link state track 1




Switch(config)# interface range gigabitethernet0/21 - 22




Switch(config-if)# link state group 1 upstream




Switch(config-if)# interface gigabitethernet0/1 




Switch(config-if)# link state group 1 downstream




Switch(config-if)# interface gigabitethernet0/3 




Switch(config-if)# link state group 1 downstream




Switch(config-if)# interface gigabitethernet0/5 




Switch(config-if)# link state group 1 downstream




Switch(config-if)# end












Note If the interfaces are part of an EtherChannel, you must specify the port channel name as part of the link-state group, not the individual port members.






This example shows how to create a link-state group using ports in an EtherChannel:





Switch# configure terminal 




Switch(config)# link state track 1




Switch(config)# interface P01




Switch(config-if)# link state group 1 upstream




Switch(config-if-range)# interface range gigabitethernet0/1, gigabitethernet0/3, 
gigabitethernet0/5




Switch(config-if)# link state group 1 downstream




Switch(config-if)# end







To disable a link-state group, use the no link state track number global configuration command.





Displaying Layer 2 Trunk Failover Status



Use the show link state group command to display the link-state group information. Enter this command without keywords to display information about all link-state groups. Enter the group number to display information specific to the group. Enter the detail keyword to display detailed information about the group.





This is an example of output from the show link state group 1 command:





Switch> show link state group 1







Link State Group: 1      Status: Enabled, Up







This is an example of output from the show link state group detail command:





Switch> show link state group detail




Link State Group: 1      Status: Enabled, Up




Upstream Interfaces   : Po1(Up)




Downstream Interfaces : Gi0/3(Up) Gi0/4(Up)







Link State Group: 2      Status: Disabled, Down




Upstream Interfaces   :




Downstream Interfaces :







(Up):Interface up   (Dwn):Interface Down   (Dis):Interface disabled








 



這個功能可以用在 loop-free 的 topology 來避免因為 access-layer lost up-link 時所造成的 traffic black-holing。



Reference:



http://www.cisco.com/en/US/docs/switches/blades/3020/software/release/12.2_25_sef1/configuration/guide/swethchl.html#wp1346176

沒有留言: