Cấu hình VPC cho Switch Nexus

Tác giả: 30/08/2022

Cách cấu hình VPC cho 2 switch cisco nexus.

Bước1. Cấu hình cơ bản

  • Cấu hình hostname
Switch# configure terminal
switch(config)# hostname switch-ceph-com-1-40GB

Switch# configure terminal
switch(config)# hostname switch-ceph-com-2-40GB
  • Cấu hình LLDP (không sử dụng DCBX), VPC và interface vlan

switch-ceph-com-1-40GB(config) feature lldp
switch-ceph-com-1-40GB(config) feature vpc
switch-ceph-com-1-40GB(config) feature interface-vlan
switch-ceph-com-1-40GB(config) no lldp tlv-select dcbxp

switch-ceph-com-2-40GB(config) feature lldp
switch-ceph-com-2-40GB(config) feature vpc
switch-ceph-com-2-40GB(config) feature interface-vlan
switch-ceph-com-2-40GB(config) no lldp tlv-select dcbxp

Bước 2. Cấu hình peer-keepalive giữa 2 switch

Cấu hình tạo vrf tại 2 switch

switch(config)# vrf context peer-keepalive-10g

Cấu hình PO cho đường peer-keepalive

  • Tại SW1:  Cấu hình port-etherchannel cho đường keepalive

switch-ceph-com-1-40GB(config) interface port-channel 1
switch-ceph-com-1-40GB(config-if)# no switchport
switch-ceph-com-1-40GB(config-if)# vrf member peer-keepalive-10g
switch-ceph-com-1-40GB(config-if)# ip address 192.168.100.11 255.255.255.0
switch-ceph-com-1-40GB(config-if)# no shut

switch-ceph-com-1-40GB(config)# interface e1/1/1
switch-ceph-com-1-40GB(config-if)# no switchport
switch-ceph-com-1-40GB(config-if)# channel-group 1 mode active
switch-ceph-com-1-40GB(config-if)# no shutdown

switch-ceph-com-1-40GB(config)# interface e1/1/2
switch-ceph-com-1-40GB(config-if)# no switchport
switch-ceph-com-1-40GB(config-if)# channel-group 1 mode active
switch-ceph-com-1-40GB(config-if)# no shutdown

  • Tại SW2:  Cấu hình port-etherchannel cho đường keepalive

switch-ceph-com-2-40GB(config) interface port-channel 1
switch-ceph-com-2-40GB(config-if)# no switchport
switch-ceph-com-2-40GB(config-if)# vrf member peer-keepalive-10g
switch-ceph-com-2-40GB(config-if)# ip address 192.168.100.12 255.255.255.0
switch-ceph-com-2-40GB(config-if)# no shut

switch-ceph-com-2-40GB(config)# interface e1/1/1
switch-ceph-com-2-40GB(config-if)# no switchport
switch-ceph-com-2-40GB(config-if)# channel-group 1 mode active
switch-ceph-com-2-40GB(config-if)# no shutdown

switch-ceph-com-2-40GB(config)# interface e1/1/2
switch-ceph-com-2-40GB(config-if)# no switchport
switch-ceph-com-2-40GB(config-if)# channel-group 1 mode active
switch-ceph-com-2-40GB(config-if)# no shutdown

Cấu hình ip route trên vrf

  • Tại SW1

switch-ceph-com-1-40GB(config)# vrf context peer-keepalive-10g
switch-ceph-com-1-40GB(config-vrf)# ip route 0.0.0.0/0 192.168.100.12

  • Tại SW2

switch-ceph-com-2-40GB(config)# vrf context peer-keepalive-10g
switch-ceph-com-2-40GB(config-vrf)# ip route 0.0.0.0/0 192.168.100.11

Tạo vpc domain

  • Tại SW1

switch-ceph-com-1-40GB(config)# vpc domain 1
switch-ceph-com-1-40GB(config-vpc-domain)# peer-keepalive destination 192.168.100.12 source 192.168.100.11 vrf peer-keepalive-10g
switch-ceph-com-1-40GB(config-vpc-domain)# auto-recovery

  • Tại SW2

switch-ceph-com-2-40GB(config)# vpc domain 1
switch-ceph-com-2-40GB(config-vpc-domain)# peer-keepalive destination 192.168.100.11 source 192.168.100.12 vrf peer-keepalive-10g
switch-ceph-com-2-40GB(config-vpc-domain)# auto-recovery

  • Lưu cấu hình :

switch-ceph-com-1-40GB# copy running-config startup-config

switch-ceph-com-2-40GB# copy running-config startup-config

  • Kiểm tra trạng thái của đường peer keepalive trên cả 2 switch

show vpc peer-keepalive

  • Cấu hình Port-channel cho đường Peer-Link
  • Tại SW1

switch-ceph-com-1-40GB# conf t
switch-ceph-com-1-40GB(config)# interface port-channel10
switch-ceph-com-1-40GB(config-if)# switchport mode trunk
switch-ceph-com-1-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-1-40GB(config-if)# spanning-tree port type network
switch-ceph-com-1-40GB(config-if)# vpc peer-link

switch-ceph-com-1-40GB(config)# interface ethernet1/30
switch-ceph-com-1-40GB(config-if)# switchport mode trunk
switch-ceph-com-1-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-1-40GB(config-if)# channel-group 10 mode active

switch-ceph-com-1-40GB(config)# interface ethernet1/32
switch-ceph-com-1-40GB(config-if)# switchport mode trunk
switch-ceph-com-1-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-1-40GB(config-if)# channel-group 10 mode active

  • Tại SW2

switch-ceph-com-2-40GB# conf t
switch-ceph-com-2-40GB(config)# interface port-channel10
switch-ceph-com-2-40GB(config-if)# switchport mode trunk
switch-ceph-com-2-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-2-40GB(config-if)# spanning-tree port type network
switch-ceph-com-2-40GB(config-if)# vpc peer-link
               2
switch-ceph-com-2-40GB(config)# interface ethernet1/30
switch-ceph-com-2-40GB(config-if)# switchport mode trunk
switch-ceph-com-2-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-2-40GB(config-if)# channel-group 10 mode active
               2
switch-ceph-com-2-40GB(config)# interface ethernet1/32
switch-ceph-com-2-40GB(config-if)# switchport mode trunk
switch-ceph-com-2-40GB(config-if)# switchport trunk allowed vlan 92
switch-ceph-com-2-40GB(config-if)# channel-group 10 mode active

Bước 4. Cấu hình PO trên sw , đấu nối với bond trên server

  • Cấu hình Port-channel cho đường Peer-Link
  • Tại SW1

switch-ceph-com-1-40GB# conf t
switch-ceph-com-1-40GB(config)# interface port-channel2
switch-ceph-com-1-40GB(config-if)# negotiate auto
switch-ceph-com-1-40GB(config-if)# switchport access vlan 92
switch-ceph-com-1-40GB(config-if)# vpc 2

switch-ceph-com-1-40GB(config)# interface ethernet1/2
switch-ceph-com-1-40GB(config-if)# switchport access vlan 92
switch-ceph-com-1-40GB(config-if)# channel-group 2 mode active

  • Tại SW2

switch-ceph-com-2-40GB# conf t
switch-ceph-com-2-40GB(config)# interface port-channel2
switch-ceph-com-2-40GB(config-if)# negotiate auto
switch-ceph-com-2-40GB(config-if)# switchport access vlan 92
switch-ceph-com-2-40GB(config-if)# vpc 2

switch-ceph-com-2-40GB(config)# interface ethernet1/2
switch-ceph-com-2-40GB(config-if)# switchport access vlan 92
switch-ceph-com-2-40GB(config-if)# channel-group 2 mode active

Bước 5. Setup MTU 9000 trên SW Ceph-COM

  • Tại SW1

switch-ceph-com-1-40GB# conf t
switch-ceph-com-1-40GB(config)# policy-map type network-qos jumbo
switch-ceph-com-1-40GB(config)# class type network-qos class-default
switch-ceph-com-1-40GB(config)# mtu 9000
switch-ceph-com-1-40GB(config)# system qos
switch-ceph-com-1-40GB(config)# service-policy type network-qos jumbo

  • Tại SW2

switch-ceph-com-2-40GB# conf t
switch-ceph-com-2-40GB(config)# policy-map type network-qos jumbo
switch-ceph-com-2-40GB(config)# class type network-qos class-default
switch-ceph-com-2-40GB(config)# mtu 9000
switch-ceph-com-2-40GB(config)# system qos
switch-ceph-com-2-40GB(config)# service-policy type network-qos jumbo

Khi cần hỗ trợ xin liên hệ với chúng tôi:
Công ty phần mềm Nhân Hòa
Trụ sở Hà Nội: Tầng 4 – Toà nhà 97 – 99 Láng Hạ, Đống Đa, Hà Nội
Chi nhánh HCM: 270 Cao Thắng (nối dài), Phường 12, Quận 10, TP HCM
Chi nhánh Vinh – Nghệ An: Tầng 2 Tòa nhà Sài Gòn Sky, ngõ 26 Nguyễn Thái Học, phường Đội Cung, TP. Vinh, Nghệ An
Hotline: 19006680

Trả lời