Professional Documents
Culture Documents
Network Direction - Virtual Port Channels
Network Direction - Virtual Port Channels
Virtual Port-Channels(vPC's)
Want to jump straight to the cong? See the conguration video below.
Introduction
A traditional data centre uses spanning-tree to prevent layer-2 loops. This has been in
use for years but does have limitations. To prevent loops, spanning-tree blocks some
linksand keeps others active, as shown below. The blocked links are ready to use in case
the active links fail. If a link does fail, spanning-tree runs the SPF algorithm to decide
which link to unblock. The link is then transitioned through several states before it is
active.
In classic spanning-tree, blocked links are a waste of bandwidth. Modern spanning-tree has improved on this.
Link A may be blocking for VLAN A, but it may be active for VLAN B. This is spanning tree's attemptat load
balancing. Unfortunately, this still has problems. For instance, what if there is a lot of trac on VLAN-A, and
VLAN-B is hardly used? In this case, trac is not load balanced evenly.
Spanning-tree also results in sub-optimal paths. Have a look at the diagram below. If trac needs to ow
between the two bottom switches, it must pass through the top switch rst.
One way to improve this situation is EtherChannels. This allows for many active uplinks from a device to a
switch, or between two switches. This still has limitations, as the EtherChannel (or LAG) is only between two
devices. The failure of a single switch will still cause an outage for the bundle of links.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 1/17
24/03/2017 NetworkDirection|VirtualPortChannels
Virtual Port Channels, or vPC's, are an extension to EtherChannels. They are one method of addressing the
limitations of spanning-tree and EtherChannel.As shown below, they do this by enablinga device to create an
EtherChannel totwoNexus switches at one time. From the connected device's perspective, it is still connected
to a single switch.
All links in the vPC actively forward trac. vPC's are a Multi-Chassis Ethernet Technology (or MCEC), but are
not astack. VSS (Virtual Switching System) on the Catalyst platform is another multi-chassis technology.
vPC's also providehigh-availability. As both sets of links are active,vPC's havea fast convergence time. If a link
or a group of links fail, the other links are already forwarding trac. This is much faster than spanning-tree. It
needs to work out a new path, and transition one or more links to the forwarding state.
Any device that supports layer-2 port-channels can connect by a vPC. The device does not need to be vPC
aware. Devices include physical servers, rewalls, other switches, and load balancers.
One method of deploying an ASA cluster is by connecting it to a pair of Nexus switches with vPC. As shown
below, Fabric Extenders (FEX) can also connect to parent switches with a vPC. In a variation to this topology,
the network devices could connect to both FEX's with vPC.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 2/17
24/03/2017 NetworkDirection|VirtualPortChannels
vPC's are a Cisco proprietary technology. Other vendors have similar technologies, such as Force 10's VLT
(now Dell). Other technologies which take a dierent approach include TRILL, FabricPath, and VxLAN.
vPC Deployment
Topology
The vPC topology consists of two Nexus switches, and one or more connected
devices. The two switches are peers. The peer switches connect together by two
links. These are the peer-link and the keep-alive link. These links make up the
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 3/17
24/03/2017 NetworkDirection|VirtualPortChannels
backplane of the vPC peer switches. This backplane allows the connected device to
see the switch pair as a single device. The connected device can be anything that
supports port-channels or LAGs. This includes servers, switches, rewalls, and soon.
There can only be two switches in a vPC topology, which does lead to some scalability
issues. Some ways to enhance the data centre network would be to deploy afabric,
with vPC connectivity at the edge. Some fabric examples are Cisco's FabricPath, or the industry standard
VxLAN. Fabrics are beyond the scope of this article.
While vPC eliminates the eects of spanning-tree, spanning-tree itself is not eliminated completely. The
network should still use Spanning-Tree.Why? Not all network devices and designs will use vPC. The access
layer may use vPC to connect hosts. But the access layer may use traditional connections to the aggregation
layer. This needs spanning-tree for loop control.
So what happens if a non-vPC switch connects to a vPC pair? The good news is that vPC peer switches still
support spanning-tree. They behave a little dierent to the traditional model, though. A switch connected by
vPC to a Nexus pair will see the pair as a single switch. This means that thepair will appear as a single switch
to the rest of the spanning-tree domain. This is possible as both switches synchronise theBridge ID's, and the
bridge priorities match.
But wait... How can the pair appear to be a single switch to a connected device? Won't the connected device
see spanning-tree BPDU's coming from both switches?
vPC has two roles; Primary and Secondary. An election, based on a priority value, decides the roles each
switch will assume. Both switches forward trac in the data plane. But, there are some control
planefunctions that only the primary switch will handle.One of these is sending BPDU frames. As you look
deeper into vPC, you will nd other functions that the only the primary switch will handle.
To start using vPC there are two features to enable;vpcandlacp. vPC is an extension to EtherChannels.LACP
is still used to exchange control messages with the connected device.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 4/17
24/03/2017 NetworkDirection|VirtualPortChannels
Keep AliveLink
The keep-alive link sends heartbeats from one peer to another. A peer will use these heartbeats to determine
if the other switch is up.
This link is a layer-3 link and is in a separate VRF to keep it isolated from other trac. This is important, as
some failures may lead to either switch thinking that its peer is down, when in fact, it is not. This is asplit-
brainordual-activescenario, where both switches think they are primary. Theheartbeats over the keepalive
link prevent this problem. Both peers can still see each other, even when there's a failure.
There are two possible ways to deploy this link. The rst option is a point-to-point routed connected between
the two switches. The second is to use a separate layer-3 network. This may be the distribution, core or
management networks.
As this link only carries small heartbeat packets, it does not need a lot of bandwidth. It also does not need a
group oflinks in a port-channel. This means that the keepalive could be a single link between normal ports
over a custom VRF. Or, it could be a single point-to-point link between themgmt0interfaces.
The following example shows how to congure the keep-alive link using a dedicated port. This is the
recommendation for any chassis-based switch with a pair of supervisors.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 5/17
24/03/2017 NetworkDirection|VirtualPortChannels
A dedicated VRF calledvpc-keepalivekeeps the trac out-of-band. A dedicated layer-3 (routed) port is added
to the VRF and given an IP address.
NO TABS
SWITCH-1 SWITCH-2
The next example is another method, which uses the mgmt0 interface as the keepalive link. This is the
recommended method for any xed-switch (not a chassis). This could be a point-to-point link, to run through
an OOB management network.
The management port is already routed, and already in its own dedicated VRF.
NO TABS
SWITCH-1 SWITCH-2
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 6/17
24/03/2017 NetworkDirection|VirtualPortChannels
To verify the keep-alive link, ping the peer-switch from the keep-alive VRF.
vPC Domain
The vPC domain is the logical collection of vPC components. These include the two switches, the links
between them, and the vPC member ports. There can only be one domain per switch. Every pair of vPC
enabled switches should use a dierent domain ID.
The domain is where most of the global vPC conguration takes place. This includes assigning the keep-alive
link, and the role priority. The switch with the lowest role priority will become the primary.
All conguration relating to the vPC must match on both switches. Conguration is not replicated between the
switches by default but is possible.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 7/17
24/03/2017 NetworkDirection|VirtualPortChannels
The example below uses vPC domain ID 10 and uses the keepalive link from earlier.
NO TABS
SWITCH-1 SWITCH-2
Verify the domain ID and keepalive linkwithshowvpcbrief. In the example below, the vPC is in afailedstate,
as the peer-link has not yet been congured.
Verication
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 8/17
24/03/2017 NetworkDirection|VirtualPortChannels
vPC domain id : 10
Peer status : peer link not configured
vPC keep-alive status : peer is alive
Configuration consistency status : failed
Per-vlan consistency status : failed
Configuration inconsistency reason: vPC peer-link does not exist
Type-2 consistency status : failed
Type-2 inconsistency reason : vPC peer-link does not exist
vPC role : none established
Number of vPCs configured : 0
Peer Gateway : Disabled
Dual-active excluded VLANs : -
Graceful Consistency Check : Disabled (due to peer configuration)
Auto-recovery status : Disabled
Delay-restore status : Timer is off.(timeout = 30s)
Delay-restore SVI status : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router : Disabled
Peer Link
The peer-linkexchanges state information and carries control trac between peer switches. The peer-link is
also known as theMultichassis EtherChannel Trunk. It is this link that forms a virtualControl Planeacross
the two switches, making them appear as one.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 9/17
24/03/2017 NetworkDirection|VirtualPortChannels
Peer switches use the peer-link for sharing MAC addresses.If one switch adds a MAC to its forwarding table,
it sends the MAC to its peer, which adds it to its own forwarding table. This assists in fast convergence if there
is a switch failure. For example, if Switch-A fails, Switch-B can continue to forward trac without disruption. It
has already learned all the available MAC addresses.
The peer-link is also responsible for carrying broadcast and multicast trac. If the network uses multicast, the
peer-link needs to be large enough to carry it. Unicast trac shouldn't travel across the peer-link unless there
is a failure. In this case, the peer switch may needto deliver the trac.
The peer-link should have at least two 10G interfaces in a port-channel. Depending on the amount of trac,
the link may need to be larger. The peer-link needs to carry all the VLANs that appear on vPC member ports. If
it doesn't, there will beconsistencyerrors on those ports.
During conguration, the keep-alive link should be up and in operation before peer-link conguration.
In the example below, the peer-link is a two-interface port channel. The conguration is the same on both
switches.
Peer Link
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 10/17
24/03/2017 NetworkDirection|VirtualPortChannels
vPC domain id : 10
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status : success
Per-vlan consistency status : success
Type-2 consistency status : success
vPC role : primary
Number of vPCs configured : 0
Peer Gateway : Disabled
Dual-active excluded VLANs : -
Graceful Consistency Check : Enabled
Auto-recovery status : Disabled
Delay-restore status : Timer is off.(timeout = 30s)
Delay-restore SVI status : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router : Disabled
Ports
Member Ports
Member ports are vPC ports that hosts or other devices connect to. The connected device has to congure its
own port-channelfor this to be eective.
The conguration is the same on both switches. Dierent ports numbers are allowed, as long as they match in
speed, duplex and so on. The vPC number does not have to match theportchannelnumber, but it is easier for
the administrator if they do.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 11/17
24/03/2017 NetworkDirection|VirtualPortChannels
The output below shows the new member port. It is currently marked as down, as nothing has been
connected yet.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 12/17
24/03/2017 NetworkDirection|VirtualPortChannels
vPC domain id : 10
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status : success
Per-vlan consistency status : success
Type-2 consistency status : success
vPC role : primary
Number of vPCs configured : 1
Peer Gateway : Disabled
Dual-active excluded VLANs : -
Graceful Consistency Check : Enabled
Auto-recovery status : Disabled
Delay-restore status : Timer is off.(timeout = 30s)
Delay-restore SVI status : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router : Disabled
vPC status
----------------------------------------------------------------------------
Id Port Status Consistency Reason Active vlans
-- ------------ ------ ----------- ------ ---------------
20 Po15 down* success success -
Orphan Ports
An orphan port is a non-vPC port that is on a vPC enabled switch. This is any device that connects to only one
of the switches, not both. An example of this is a server's management port.
An orphan port may carry any VLAN, even if it is present on a vPC member port or on the peer-link.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 13/17
24/03/2017 NetworkDirection|VirtualPortChannels
Compatibility Conditions
There are several conditions which must match on all ports in the vPC:
Port modes
Port speeds (whether manual or negotiated)
MTU
Duplex
Ethernet layer (switchportorno switchport)
Storm control
Flow control
Native VLAN
Allowed VLAN list
Peer switches use the peer-link to check for compatibility and miscongurations. Type-1 miscongurations
are quite serious. They result in the suspension of the port channel on one or both peers. Type-
2 miscongurations are at little more forgiving. If there is a Type-2 error, the administrator will receive a
syslog message.
See the global consistency parameters with the show vpc consistency-parameters global command.
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 14/17
24/03/2017 NetworkDirection|VirtualPortChannels
Legend:
Type 1 : vPC will be suspended in case of mismatch
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 15/17
24/03/2017 NetworkDirection|VirtualPortChannels
See consistency problems on a specic interface with the show vpc consistency-parameters interface
interface command.
Legend:
Type 1 : vPC will be suspended in case of mismatch
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 16/17
24/03/2017 NetworkDirection|VirtualPortChannels
Twitter: @NetwrkDirection
Suggested Articles
For more advanced vPC topics, see the Advanced vPC article.
References
Cisco - Virtual PortChannel Quick Conguration Guide
https://networkdirection.net/tikiprint.php?page=Virtual+Port+Channels 17/17