시스코 스위치(ios-xe) 스택 관련 명령어.

시스코 스위치(ios-xe) 스택 관련 명령어.

* 작업 환경
스위치: C9200L-48T-4X
OS: Cisco IOS XE Software, Version 17.03.05

1. 스택 케이블 연결 전, 후

스택 케이블 연결전 switch 확인하면 아래처럼 Active 상태가 보인다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     1      V03     Ready

스택 케이블을 연결하면 스위치가 자동으로 재부팅된다.

Switch#
Chassis 1 reloading, reason - stack merge
Aug  8 07:56:58.554: %PMAN-5-EXITACTION: C0/0: pvp: Process manager is exiting: reload cc action requested
Aug  8 07:56:58.580: %PMAN-5-EXITACTION: F0/0: pvp: Process manager is exiting: reload fp action requested
Aug  8 07:57:03.415: %PMAN-5-EXITACTION: R0/0: pvp: Process manager is exiting: rp processes et with reload switch code
Aug  8 07:57:14.017: %PMAN-3-PROCESS_NOTIFICATION: R0/0: pvp: System report /crashinfo/Switch_1_RP_0-system-report_1_20220808-075704-UTC.tar.gz (size: 8870 KB) generated

재부팅후 상태 확인해 보면, 우선순위(priority)가 모두 1인 상태며 이 경우 MAC주소가 가장 작은 스위치가 Active 스위치가 된다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     1      V03     Ready
 2       Member   f8e9.4f66.e000     1      V03     Ready
 3       Member   f8e9.4f95.2c80     1      V03     Ready

시간이 조금 지나면 standby 스위치, member 스위치가 결정된다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     1      V03     Ready
 2       Standby  f8e9.4f66.e000     1      V03     HA sync in progress
 3       Member   f8e9.4f95.2c80     1      V03     Ready

standby 스위치가 동기화되는 중에는 스위치 설정이 불가능 하다.

Switch#
Switch#conf t
Config mode cannot be entered during Standby initialization or when switch is in recovery mode

시간이 조금 지나면 동기화가 완료 되고, 설정이 가능하다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     1      V03     Ready
 2       Standby  f8e9.4f66.e000     1      V03     Ready
 3       Member   f8e9.4f95.2c80     1      V03     Ready

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#

2. 스택 연결 상태 확인
show switch neighbors 명령으로 스택포트와 연결상태를 확인 할 수 있다.

Switch#show switch neighbors
  Switch #    Port 1       Port 2
  --------    ------       ------
      1         2             3
      2         3             1
      3         1             2

show module 명령으로 스위치 모델과 시리얼 번호등의 정보를 확인할 수 있다.

Switch#show module
Switch  Ports    Model                Serial No.   MAC address     Hw Ver.       Sw Ver.
------  -----   ---------             -----------  --------------  -------       --------
 1       52     C9200L-48T-4X         JAE26271PW9  f8e9.4f52.db00  V03           17.03.05
 2       52     C9200L-48T-4X         JAE26271PXD  f8e9.4f66.e000  V03           17.03.05
 3       52     C9200L-48T-4X         JAE26271NWT  f8e9.4f95.2c80  V03           17.03.05

스택 포트 확인하면 연결된 케이블 길이까지 확인 가능 하다.

Switch#show switch stack-ports summary
Sw#/Port#  Port Status  Neighbor/Port  Cable Length   Link OK   Link Active   Sync OK   #Changes to LinkOK  In Loopback
-------------------------------------------------------------------------------------------------------------------
1/1        OK           2/2            50cm           Yes       Yes           Yes       2                   No
1/2        OK           3/1            50cm           Yes       Yes           Yes       3                   No
2/1        OK           3/2            50cm           Yes       Yes           Yes       1                   No
2/2        OK           1/1            50cm           Yes       Yes           Yes       1                   No
3/1        OK           1/2            50cm           Yes       Yes           Yes       1                   No
3/2        OK           2/1            50cm           Yes       Yes           Yes       1                   No

3. 스위치 우선 순위와 Role 변경하기.

Switch#switch 1 priority 14
Switch#switch 2 priority 15
Switch#switch 3 priority 13

Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     14     V03     Ready
 2       Standby  f8e9.4f66.e000     15     V03     Ready
 3       Member   f8e9.4f95.2c80     13     V03     Ready

우선순위는 변경되었지만 스위치의 Role은 그대로인 상태다. 이때 우선 순위가 높은 스위치를 Active 스위치로 변경 하도록 한다.

2번 스위치를 Active 상태로 변경하려고 하면 아래처럼 스택을 먼저 삭제하라는 메시지를 볼 수 있다.

Switch#switch 2 role active
WARNING: Changing the switch role may result in redundancy mode being configured to designated Active/Standby mode for this stack. If the configured Active or Standby switch numbers do not boot up, then the stack will not be able to boot. Do you want to continue?[y/n]? [yes]: yes
Designated active switch number is same as designated standby switch number, please run switch clear stack-mode first.

스택이 스위치 3대로 구성되어 있으므로 스택을 삭제하지 않고 원하는 우선순위에 원하는 role을 할당할 수 있다.

먼저, 3번 member 스위치를 standby 스위치로 바꾼다.

Switch#switch 3 role standby
WARNING: Changing the switch role may result in redundancy mode being configured to designated Active/Standby mode for this stack. If the configured Active or Standby switch numbers do not boot up, then the stack will not be able to boot. Do you want to continue?[y/n]? [yes]: yes

Switch#show switch
Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     14     V03     Ready
 2       Standby  f8e9.4f66.e000     15     V03     Ready
 3       Member   f8e9.4f95.2c80     13     V03     Ready

그리고, standby 스위치였던 2번 스위치를 active 스위치로 변경한다.

Switch#switch 2 role active
WARNING: Changing the switch role may result in redundancy mode being configured to designated Active/Standby mode for this stack. If the configured Active or Standby switch numbers do not boot up, then the stack will not be able to boot. Do you want to continue?[y/n]? [yes]: yes
Switch#show switch
Switch/Stack Mac Address : f8e9.4f52.db00 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f52.db00     14     V03     Ready
 2       Standby  f8e9.4f66.e000     15     V03     Ready
 3       Member   f8e9.4f95.2c80     13     V03     Ready

재부팅하고 확인한다.

Switch#reload

System configuration has been modified. Save? [yes/no]: yes
Building configuration...
[OK]Reload command is being issued on Active unit, this will reload the whole stack
Proceed with reload? [confirm]

재부팅하면 아래처럼 우선순위가 가장 높은 스위치가 Active 스위치가 된 것을 확인 할 수 있다.

Switch#  show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Member   f8e9.4f52.db00     14     V03     Ready
 3       Standby  f8e9.4f95.2c80     13     V03     Ready

이제, 2번 스위치를 standby 스위치로 변경한다.

Switch#switch 2 role standby
WARNING: Changing the switch role may result in redundancy mode being configured to designated Active/Standby mode for this stack. If the configured Active or Standby switch numbers do not boot up, then the stack will not be able to boot. Do you want to continue?[y/n]? [yes]: yes

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Member   f8e9.4f52.db00     14     V03     Ready
 3       Standby  f8e9.4f95.2c80     13     V03     Ready

다시 재부팅한다.

Switch#reload
Reload command is being issued on Active unit, this will reload the whole stack
Proceed with reload? [confirm]

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     HA sync in progress
 3       Member   f8e9.4f95.2c80     13     V03     Ready

시간이 조금 지나면,

Switch#sh switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     Ready
 3       Member   f8e9.4f95.2c80     13     V03     Ready

4. 스택에서 스위치 제거.

3번 스위치를 물리적으로 제거(스택 케이블 제거)하면, 아래처럼 Removed로 보인다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     Ready
 3       Member   0000.0000.0000     0              Removed

재부팅을 하면 Provisioned로 보인다.

Switch#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     Ready
 3       Member   0000.0000.0000     0              Provisioned

3번 스위치를 unprovision한다.

SwitchF#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SwitchF(config)#no switch 3 provision
SwitchF(config)#end
SwitchF#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000     15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     Ready
 3       Member   0000.0000.0000     0              Unprovisioned

설정을 저장하고 재부팅한다.

SwitchF#wr
Building configuration...
[OK]
SwitchF#reload
Reload command is being issued on Active unit, this will reload the whole stack
Proceed with reload? [confirm]

재부팅 후 확인하면 아래처럼 원하는 결과를 볼 수 있다.

SwitchF#show switch
Switch/Stack Mac Address : f8e9.4f66.e000 - Local Mac Address
Mac persistency wait time: Indefinite
                                             H/W   Current
Switch#   Role    Mac Address     Priority Version  State
-------------------------------------------------------------------------------------
*1       Active   f8e9.4f66.e000      15     V03     Ready
 2       Standby  f8e9.4f52.db00     14     V03     Ready

참고 문서:
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/17-3/configuration_guide/ha/b_173_stck_mgr_ha_9200_cg/managing_switch_stacks.html#concept_j2w_shc_31b

답글 남기기

Your email address will not be published.

%d bloggers like this: