一、背景需求
Cisco 两台交换机需要虚拟成一台交换机使用(类似 交换机堆叠),去链接二层接入交换机,提供网络链路高可用。如下图:
对于二层交换 2960x 需要看到 上层的两台 N3k 交换为一台设备,中间连接链路做链路聚合。
二、配置详解
N3K_1和 N3K2 配置保持一致
1、全局下开启 VPC + HSRP+ospf
feature vpc feature hsrp feature ospf
2、VPC peer-link 接口配置
interface Ethernet1/49 switchport mode trunk channel-group 49 mode active interface Ethernet1/50 switchport mode trunk channel-group 49 mode active interface port-channel49 speed 40000 description vPc peer-link switchport mode trunk spanning-tree port type network vpc peer-link
3、下联接口配置
interface Ethernet1/51/1 speed 10000 switchport mode trunk channel-group 50 mode active no shutdown interface port-channel50 speed 10000 switchport mode trunk vpc 50 #两台N3K 的VPC ID 必须一致
2960X交换机配置
1:、接口配置(和普通链路聚合配置一样)
interface TenGigabitEthernet1/0/1 switchport mode trunk channel-group 24 mode active interface TenGigabitEthernet1/0/2 switchport mode trunk channel-group 24 mode active interface Port-channel24 switchport mode trunk
三、hsrp+ospf 配置
N3k_1: interface Vlan10 no shutdown ip address 192.168.0.2/24 ip router ospf 10 area 0.0.0.20 #ospf 路由发布 hsrp version 2 hsrp 10 preempt priority 105 ip 192.168.0.1 track 1 track 1 interface Ethernet1/48 line-protocol N3k_2: interface Vlan10 no shutdown ip address 192.168.0.3/24 ip router ospf 10 area 0.0.0.20 hsrp version 2 hsrp 10 ip 192.168.0.1 track 1 track 1 interface Ethernet1/48 line-protocol
四、查看配置
N3k-core-01# show vpc Legend: (*) - local vPC is down, forwarding via vPC peer-link vPC domain id : 30 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, operational secondary Number of vPCs configured : 6 Peer Gateway : Enabled Peer gateway excluded VLANs : - Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Auto-recovery status : Enabled (timeout = 240 seconds) vPC Peer-link status --------------------------------------------------------------------- id Port Status Active vlans -- ---- ------ -------------------------------------------------- 1 Po49 up all vPC status ---------------------------------------------------------------------------- id Port Status Consistency Reason Active vlans ------ ----------- ------ ----------- -------------------------- ----------- 50 Po50 up success success all 51 Po51 up success success all 52 Po52 up success success all 53 Po53 up success success all
N3k-core-01# show vpc statistics peer-link port-channel49 is up Hardware: Port-Channel, address: 0062.ecef.8e5c (bia 0062.ecef.8e5c) Description: vPc peer-link MTU 9216 bytes, BW 80000000 Kbit, DLY 10 usec reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA Port mode is trunk full-duplex, 40 Gb/s Input flow-control is off, output flow-control is off Switchport monitor is off EtherType is 0x8100 Members in this channel: Eth1/49, Eth1/50 Last clearing of "show interface" counters never 1 interface resets Load-Interval #1: 30 seconds 30 seconds input rate 13194296 bits/sec, 5755 packets/sec 30 seconds output rate 1558864 bits/sec, 802 packets/sec Load-Interval #2: 5 minute (300 seconds) input rate 11.66 Mbps, 5.24 Kpps; output rate 1.49 Mbps, 625 pps RX 53092855268 unicast packets 943847523 multicast packets 37779519 broadcast packets 54074482310 input packets 12067581932262 bytes 3615421391 jumbo packets 0 storm suppression packets 0 runts 0 giants 0 CRC 0 no buffer 0 input error 0 short frame 0 overrun 0 underrun 0 ignored 0 watchdog 0 bad etype drop 0 bad proto drop 0 if down drop 0 input with dribble 0 input discard 0 Rx pause TX 27613649710 unicast packets 1107185465 multicast packets 48743817 broadcast packets 28769578992 output packets 4953197509995 bytes 1283510513 jumbo packets 0 output errors 0 collision 0 deferred 0 late collision 0 lost carrier 0 no carrier 0 babble 0 output discard 0 Tx pause
N3k-core-01# show hsrp brief P indicates configured to preempt. | Interface Grp Prio P State Active addr Standby addr Group addr Vlan10 10 105 P Active local 192.168.0.3 192.168.0.1 (conf) Vlan11 11 105 P Active local 1921.68.1.3 192.168.1.1 (conf) 。。。。。。
此篇博客为本人个人工作总结,仅供参看。谢谢
时间: 2024-12-23 16:12:40