VPC概念

  • VPC:vpc是指vpc对等体设备和下游设备之间的组合PortChannel。

  • vpc对等交换:就是组成vpc功能的两个nexus系列交换机,一个设备为主,一个为备。

  • vpc对等连接:用于同步vpc对等设备之间状态的连接。vpc对等链路在两个vpc交换机之间携带控制通信量,还有组播、广播数据通信量。在某些链路故障场景中,还携带单播通信量。对等链路至少是两个10GE接口。

  • vpc域:该域包括vpc对等设备、vpc对等保持活动连接和连接到下游设备的vpc中的所有PortChannels。同时,所有关于vpc的全局配置都关联到vpc域下。

  • vpc对等保持活动连接(心跳线):对等保持活动连接监视vpc对等交换机的生命力。在vpc对等设备之间发送周期性的保持活动连接。vpc对等活动连接可以是管理接口(MGMT)或交换机虚拟接口(SVI),但不可以使用物理接口。没有数据或同步流量在vpc登对保持活动连接上移动;该连接上的唯一通信量是表明交换机正在操作和运行vpc的消息。

一、背景需求

Cisco 两台交换机需要虚拟成一台交换机使用(类似 交换机堆叠),去链接二层接入交换机,提供网络链路高可用。如下图:

  Cisco N3K  VPC+HSRP+ospf 配置-LMLPHP

  对于二层交换 2960x  需要看到 上层的两台 N3k 交换为一台设备,中间连接链路做链路聚合。

 二、配置详解

   N3K_1和 N3K2  配置保持一致

    1、全局下开启 VPC + HSRP+ospf  

feature vpc
feature hsrp
feature ospf

  2、配置 VPC 域ID

vpc domain 30
role priority 8192 # N3K_1:8192 N3K_2:16384 设置角色优先级

peer-keepalive destination 10.8.240.21 source 10.8.240.20 #IP 为MGMT地址
peer-gateway
auto-recovery

   

   3、VPC peer-link 接口配置    

interface Ethernet1/
switchport mode trunk
channel-group mode active interface Ethernet1/
switchport mode trunk
channel-group mode active interface port-channel49
speed
description vPc peer-link
switchport mode trunk
spanning-tree port type network
vpc peer-link

    4、下联接口配置

interface Ethernet1//
speed
switchport mode trunk
channel-group mode active
no shutdown interface port-channel50
speed
switchport mode trunk
vpc #两台N3K 的VPC ID 必须一致

  

  2960X交换机配置

 1:、接口配置(和普通链路聚合配置一样)

interface TenGigabitEthernet1//
switchport mode trunk
channel-group mode active interface TenGigabitEthernet1//
switchport mode trunk
channel-group mode active interface Port-channel24
switchport mode trunk

三、hsrp+ospf 配置 

N3k_1:
interface Vlan10
no shutdown
ip address 192.168.0.2/
ip router ospf area 0.0.0.20 #ospf 路由发布
hsrp version
hsrp
preempt
priority
ip 192.168.0.1
track track interface Ethernet1/ line-protocol N3k_2:
interface Vlan10
no shutdown
ip address 192.168.0.3/
ip router ospf area 0.0.0.20
hsrp version
hsrp
ip 192.168.0.1
track track interface Ethernet1/ line-protocol

四、查看配置

  

N3k-core-# show vpc
Legend:
(*) - local vPC is down, forwarding via vPC peer-link vPC domain id :
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status : success
Per-vlan consistency status : success
Type- consistency status : success
vPC role : primary, operational secondary
Number of vPCs configured :
Peer Gateway : Enabled
Peer gateway excluded VLANs : -
Dual-active excluded VLANs : -
Graceful Consistency Check : Enabled
Auto-recovery status : Enabled (timeout = seconds) vPC Peer-link status
---------------------------------------------------------------------
id Port Status Active vlans
-- ---- ------ --------------------------------------------------
Po49 up all vPC status
----------------------------------------------------------------------------
id Port Status Consistency Reason Active vlans
------ ----------- ------ ----------- -------------------------- -----------
Po50 up success success all
Po51 up success success all
Po52 up success success all
Po53 up success success all
N3k-core-# show vpc statistics peer-link
port-channel49 is up
Hardware: Port-Channel, address: .ecef.8e5c (bia .ecef.8e5c)
Description: vPc peer-link
MTU bytes, BW Kbit, DLY usec
reliability /, txload /, rxload /
Encapsulation ARPA
Port mode is trunk
full-duplex, Gb/s
Input flow-control is off, output flow-control is off
Switchport monitor is off
EtherType is 0x8100
Members in this channel: Eth1/, Eth1/
Last clearing of "show interface" counters never
interface resets
Load-Interval #: seconds
seconds input rate bits/sec, packets/sec
seconds output rate bits/sec, packets/sec
Load-Interval #: minute ( seconds)
input rate 11.66 Mbps, 5.24 Kpps; output rate 1.49 Mbps, pps
RX
unicast packets multicast packets broadcast packets
input packets bytes
jumbo packets storm suppression packets
runts giants CRC no buffer
input error short frame overrun underrun ignored
watchdog bad etype drop bad proto drop if down drop
input with dribble input discard
Rx pause
TX
unicast packets multicast packets broadcast packets
output packets bytes
jumbo packets
output errors collision deferred late collision
lost carrier no carrier babble output discard
Tx pause
N3k-core-# show hsrp brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active addr Standby addr Group addr
Vlan10 P Active local 192.168.0.3 192.168.0.1 (conf)
Vlan11 P Active local 1921.68.1.3 192.168.1.1 (conf)
。。。。。。

此篇博客为本人个人工作总结,仅供参看。谢谢

05-11 15:41