Friday, July 5, 2024

[Nexus] Quy trình thay thế thiết bị chạy vPC bị hỏng

-

Như bạn đã biết, trong quá trình vận hành sử dụng thiết bị sẽ có lúc dẫn đến hư hỏng thiết bị và trong những trường hợp như vậy bắt buộc chúng ta phải thay thế thiết bị. Và để thay thế thiết bị thì nó phải có quy trình đàng hoàng, nhất là với các thiết bị chạy Nexus vì dòng Nexus thường chạy Datacenter ứng dụng cho storage nên lượng traffic trao đổi rất cao. Nếu bạn không cẩn thận có thể làm hỏng storage của bạn dẫn đến mất mát dữ liệu không cứu lại được. Vì vậy hôm nay mình sẽ hướng dẫn cho các bạn quy trình thay thế thiết bị Nexus đang trong cụm vPC bị hỏng như sau.

Sơ đồ.

Sơ đồ giả sử thiết bị 2 bị hỏng

1. Khảo sát thiết bị và tình trạng vPC của thiết bị cũ.

Đầu tiên hãy kiểm tra version của thiết bị cũ, sau khi có thông tin version của thiết bị cũ, bạn hãy chuẩn bị 1 thiết bị tương tự để thay thế.

StorageCA-SW01# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2018, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided "as is," and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or
Lesser General Public License (LGPL) Version 2.0.
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.

Software
  BIOS: version 4.5.0
  NXOS: version 7.0(3)I7(3)
  BIOS compile time:  11/09/2017
  NXOS image file is: bootflash:///nxos.7.0.3.I7.3.bin
  NXOS compile time:  2/12/2018 13:00:00 [02/12/2018 19:13:48]


Hardware
  cisco Nexus3064 Chassis
  Intel(R) Celeron(R) CPU        P4505  @ 1.87GHz with 3902884 kB of memory.
  Processor Board ID FOC160149H2

  Device name: StorageCA-SW01
  bootflash:    1635720 kB
  usb1:               0 kB (expansion flash)

Kernel uptime is 0 day(s), 3 hour(s), 3 minute(s), 59 second(s)

Last reset at 558089 usecs after Wed Nov 16 10:30:24 2022
  Reason: Reset Requested by CLI command reload
  System version: 7.0(3)I7(3)
  Service:

plugin
  Core Plugin, Ethernet Plugin

Active Package(s):

Bạn hãy show vpc brief, như các bạn đã thấy khi 1 thiết bị trong cụm vPC bị hỏng, các trạng thái để đảm bảo hoạt động của vPC đã chuyển qua trạng thái down, failed hay Suspended.

StorageCA-SW01# show vpc brief
Legend:
                (*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                     : 1
Peer status                       : peer link is down
vPC keep-alive status             : Suspended (Destination IP not reachable)
Configuration consistency status  : failed
Per-vlan consistency status       : success
Configuration inconsistency reason: Consistency Check Not Performed
Type-2 inconsistency reason       : Consistency Check Not Performed
vPC role                          : primary
Number of vPCs configured         : 10
Peer Gateway                      : Enabled
Dual-active excluded VLANs        : -
Graceful Consistency Check        : Disabled (due to peer configuration)
Auto-recovery status              : Enabled, timer is off.(timeout = 240s)
Delay-restore status              : Timer is off.(timeout = 10s)
Delay-restore SVI status          : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router    : Disabled

vPC Peer-link status
---------------------------------------------------------------------
id    Port   Status Active vlans
--    ----   ------ -------------------------------------------------
1     Po100  down   -


vPC status
----------------------------------------------------------------------------
Id    Port          Status Consistency Reason                Active vlans
--    ------------  ------ ----------- ------                ---------------
31    Po31          down   failed      Peer-link is down     -



32    Po32          down   failed      Peer-link is down     -



33    Po33          down   failed      Peer-link is down     -



34    Po34          down   failed      Peer-link is down     -



35    Po35          down   failed      Peer-link is down     -



36    Po36          down   failed      Peer-link is down     -



37    Po37          down   failed      Peer-link is down     -



38    Po38          down   failed      Peer-link is down     -



39    Po39          down   failed      Peer-link is down     -



40    Po40          down   failed      Peer-link is down     -




Please check "show vpc consistency-parameters vpc <vpc-num>" for the
consistency reason of down vpc and for type-2 consistency reasons for
any vpc

Khi show port-channel summary cũng cho kết quả tương tự.

StorageCA-SW01# show port-channel summary
Flags:  D - Down        P - Up in port-channel (members)
        I - Individual  H - Hot-standby (LACP only)
        s - Suspended   r - Module-removed
        b - BFD Session Wait
        S - Switched    R - Routed
        U - Up (port-channel)
        p - Up in delay-lacp mode (member)
        M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port-       Type     Protocol  Member Ports
      Channel
--------------------------------------------------------------------------------
31    Po31(SD)    Eth      LACP      Eth1/31(D)
32    Po32(SD)    Eth      LACP      Eth1/32(D)
33    Po33(SD)    Eth      LACP      Eth1/33(D)
34    Po34(SD)    Eth      LACP      Eth1/34(D)
35    Po35(SD)    Eth      LACP      Eth1/35(D)
36    Po36(SD)    Eth      LACP      Eth1/36(D)
37    Po37(SD)    Eth      LACP      Eth1/37(D)
38    Po38(SD)    Eth      LACP      Eth1/38(D)
39    Po39(SD)    Eth      LACP      Eth1/39(D)
40    Po40(SD)    Eth      LACP      Eth1/40(D)
100   Po100(SD)   Eth      LACP      Eth1/49(D)   Eth1/50(D)
101   Po101(RD)   Eth      LACP      Eth1/47(D)   Eth1/48(D)

Kết quả khi show vpc role.

StorageCA-SW01# show vpc role

vPC Role status
----------------------------------------------------
vPC role                        : primary
Dual Active Detection Status    : 0
vPC system-mac                  : 00:23:04:ee:be:01
vPC system-priority             : 32667
vPC local system-mac            : 54:7f:ee:76:46:7c
vPC local role-priority         : 0
vPC local config role-priority  : 10
vPC peer system-mac             : 00:00:00:00:00:00
vPC peer role-priority          : 0
vPC peer config role-priority   : 0

2. Chuẩn bị thiết bị mới và cấu hình vPC cho thiết bị mới.

Sau khi chuẩn bị xong thiết bị mới, bạn không được cắm dây mạng trước, nhất là dây keepalive và peerlink. Đầu tiên hãy thực hiện khôi phục cài đặt gốc và cấu hình vPC cho nó trước, lưu ý là hãy xem thông tin vPC ở thiết bị 1 để cấu hình cho đúng (ví dụ như vpc domain, vpc priority, …).

Sau khi cấu hình xong vPC cho thiết bị mới bạn hãy show vpc để thấy các trạng thái của vPC.

StorageCA-SW02(config-if)# show vpc
Legend:
                (*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                     : 1
Peer status                       : peer link is down
vPC keep-alive status             : Suspended (Destination IP not reachable)
Configuration consistency status  : failed
Per-vlan consistency status       : success
Configuration inconsistency reason: Consistency Check Not Performed
Type-2 inconsistency reason       : Consistency Check Not Performed
vPC role                          : none established
Number of vPCs configured         : 10
Peer Gateway                      : Enabled
Dual-active excluded VLANs        : -
Graceful Consistency Check        : Disabled (due to peer configuration)
Auto-recovery status              : Enabled, timer is off.(timeout = 240s)
Delay-restore status              : Timer is off.(timeout = 10s)
Delay-restore SVI status          : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router    : Disabled

vPC Peer-link status
---------------------------------------------------------------------
id    Port   Status Active vlans
--    ----   ------ -------------------------------------------------
1     Po100  down   -


vPC status
----------------------------------------------------------------------------
Id    Port          Status Consistency Reason                Active vlans
--    ------------  ------ ----------- ------                ---------------
31    Po31          down   Not         Consistency Check Not -

                           Applicable   Performed

32    Po32          down   Not         Consistency Check Not -

                           Applicable   Performed

33    Po33          down   Not         Consistency Check Not -

                           Applicable   Performed

34    Po34          down   Not         Consistency Check Not -

                           Applicable   Performed

35    Po35          down   Not         Consistency Check Not -

                           Applicable   Performed


Please check "show vpc consistency-parameters vpc <vpc-num>" for the
consistency reason of down vpc and for type-2 consistency reasons for
any vpc.

Kiểm tra vpc role trên thiết bị 2 bạn có thể thấy phần vPC role đang ở trạng thái none established vì thiết bị mới này chưa biết nó sẽ làm primary hay secondary.

StorageCA-SW02(config-if)# show vpc role

vPC Role status
----------------------------------------------------
vPC role                        : none established
Dual Active Detection Status    : 0
vPC system-mac                  : 00:00:00:00:00:00
vPC system-priority             : 32667
vPC local system-mac            : 88:f0:31:a5:84:81
vPC local role-priority         : 0
vPC local config role-priority  : 20
vPC peer system-mac             : 00:00:00:00:00:00
vPC peer role-priority          : 0
vPC peer config role-priority   : 0

3. Quy trình đấu nối keepalive và peerlink.

Như mình đã nói ở trên, bạn chưa nên cắm dây mạng khi chưa cấu hình xong vPC cho thiết bị thứ 2. Bạn hãy xem ở dưới do chưa cắm dây mạng nên 2 port channel chạy keepalive và peerlink của mình đang ở trạng thái down.

StorageCA-SW02# show  port-channel summary | grep 'Eth1/47\|Eth1/48\|Eth1/49\|Eth1/50'
100   Po100(SD)   Eth      LACP      Eth1/49(D)   Eth1/50(D)
101   Po101(RD)   Eth      LACP      Eth1/47(D)   Eth1/48(D)

Bây giờ mình sẽ thực hiện cắm dây keepalive trước (chưa cắm dây peerlink nhé).

Hình ảnh dây 10GB mình sử dụng 1 cặp để chạy keepalive

Sau khi cắm xong dây keepalive kiểm tra lại status port-channel bạn sẽ thấy port-channel chạy keepalive của mình đang ở trạng thái RU (Route Up) và port-channel chạy peerlink vẫn đang trạng thái Down SD (SwitchPort Down).

StorageCA-SW02# show  port-channel summary | grep 'Eth1/47\|Eth1/48\|Eth1/49\|Eth1/50'
100   Po100(SD)   Eth      LACP      Eth1/49(D)   Eth1/50(D)
101   Po101(RU)   Eth      LACP      Eth1/47(P)   Eth1/48(P)

Nếu port-channel keepalive đã up, bạn hãy check kết nối về ip 10.0.0.1 của thiết bị 1 nhé.

StorageCA-SW02# ping 10.0.0.1 source 10.0.0.2
PING 10.0.0.1 (10.0.0.1) from 10.0.0.2: 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=254 time=1.366 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=254 time=0.7 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=254 time=0.62 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=254 time=0.603 ms
64 bytes from 10.0.0.1: icmp_seq=4 ttl=254 time=0.601 ms

--- 10.0.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.601/0.778/1.366 ms

Sau khi port-channel keepalive đã up, kết quả khi show vpc ở phần vPC keep-alive status đang ở trạng thái peer is alive tức là keepalive đã hoạt động.

StorageCA-SW02# show vpc
Legend:
                (*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                     : 1
Peer status                       : peer link is down
vPC keep-alive status             : peer is alive
Configuration consistency status  : failed
Per-vlan consistency status       : success
Configuration inconsistency reason: Consistency Check Not Performed
Type-2 inconsistency reason       : Consistency Check Not Performed
vPC role                          : none established
Number of vPCs configured         : 10
Peer Gateway                      : Enabled
Dual-active excluded VLANs        : -
Graceful Consistency Check        : Disabled (due to peer configuration)
Auto-recovery status              : Enabled, timer is off.(timeout = 240s)
Delay-restore status              : Timer is off.(timeout = 10s)
Delay-restore SVI status          : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router    : Disabled

vPC Peer-link status
---------------------------------------------------------------------
id    Port   Status Active vlans
--    ----   ------ -------------------------------------------------
1     Po100  down   -


vPC status
----------------------------------------------------------------------------
Id    Port          Status Consistency Reason                Active vlans
--    ------------  ------ ----------- ------                ---------------
31    Po31          down   Not         Consistency Check Not -

                           Applicable   Performed

32    Po32          down   Not         Consistency Check Not -

                           Applicable   Performed

33    Po33          down   Not         Consistency Check Not -

                           Applicable   Performed

34    Po34          down   Not         Consistency Check Not -

                           Applicable   Performed

35    Po35          down   Not         Consistency Check Not -

                           Applicable   Performed

36    Po36          down   Not         Consistency Check Not -

                           Applicable   Performed

37    Po37          down   Not         Consistency Check Not -

                           Applicable   Performed

38    Po38          down   Not         Consistency Check Not -

                           Applicable   Performed

39    Po39          down   Not         Consistency Check Not -

                           Applicable   Performed

40    Po40          down   Not         Consistency Check Not -

                           Applicable   Performed


Please check "show vpc consistency-parameters vpc <vpc-num>" for the
consistency reason of down vpc and for type-2 consistency reasons for
any vpc.

Khi chắc chắn vPC keep-alive status đã ở trạng thái peer is alive, bạn hãy cắm dây peerlink vào.

Hình ảnh dây 40GB mình sử dụng 1 cặp để chạy peerlink

Và dưới đây là kết quả khi cắm xong dây peerlink, port-channel của peerlink đã chuyển trạng thái SU (SwitchPort Up).

StorageCA-SW02# show  port-channel summary | grep 'Eth1/47\|Eth1/49'
100   Po100(SU)   Eth      LACP      Eth1/49(D)   Eth1/50(P)
101   Po101(RU)   Eth      LACP      Eth1/47(P)   Eth1/48(P)

Hình ảnh sau khi mình cắm xong 2 sợi peerlink và keepalive

Và đây là kết quả khi show vpc, tất cả các trạngt thái của vPC đã sẵn sàng hoạt động.

StorageCA-SW02# show vpc
Legend:
                (*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                     : 1
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                          : secondary
Number of vPCs configured         : 10
Peer Gateway                      : Enabled
Dual-active excluded VLANs        : -
Graceful Consistency Check        : Enabled
Auto-recovery status              : Enabled, timer is off.(timeout = 240s)
Delay-restore status              : Timer is off.(timeout = 10s)
Delay-restore SVI status          : Timer is off.(timeout = 10s)
Operational Layer3 Peer-router    : Disabled

vPC Peer-link status
---------------------------------------------------------------------
id    Port   Status Active vlans
--    ----   ------ -------------------------------------------------
1     Po100  up     1,301


vPC status
----------------------------------------------------------------------------
Id    Port          Status Consistency Reason                Active vlans
--    ------------  ------ ----------- ------                ---------------
31    Po31          down*  success     success               -



32    Po32          down*  success     success               -



33    Po33          down*  success     success               -



34    Po34          down*  success     success               -



35    Po35          down*  success     success               -


Please check "show vpc consistency-parameters vpc <vpc-num>" for the
consistency reason of down vpc and for type-2 consistency reasons for
any vpc.

Khi show vpc role trên thiết bị mới, bạn có thể thấy thiết bị mới có role priority thấp hơn nên nó đã biết mình đang ở role secondary.

StorageCA-SW02# show vpc role

vPC Role status
----------------------------------------------------
vPC role                        : secondary
Dual Active Detection Status    : 0
vPC system-mac                  : 00:23:04:ee:be:01
vPC system-priority             : 32667
vPC local system-mac            : 88:f0:31:a5:84:81
vPC local role-priority         : 20
vPC local config role-priority  : 20
vPC peer system-mac             : 54:7f:ee:76:46:7c
vPC peer role-priority          : 10
vPC peer config role-priority   : 10

LEAVE A REPLY

Please enter your comment!
Please enter your name here

4,956FansLike
256FollowersFollow
223SubscribersSubscribe
spot_img

Related Stories