본문 바로가기
ETC/실습 핵심 네트워크

임의로 Root Bridge 결정하기

by 계영수 2024. 2. 2.
728x90

본 포스팅에 대한 강의를 수강할 수 있습니다.

 

보물상자님의 소개 - 인프런 | 온라인 강의 플랫폼

인프런 보물상자님의 소개 페이지 입니다. - 보물상자님 소개 | 인프런

 

이전 학습에서 배웠듯이 아래 시나리오에서 Spanning Tree Protocol 알고리즘에 의해서 빨간 색 영역은 데이터 전송에 사용되지 않는다.

빨간생 영역은 데이터 전송에 사용되지 않는다. DSW02는 오직 DSW01에 장애가 발생하였을때만 사용된다.

 

위와 같은 시나리오에서 DSW02는 평상시에는 사용이 되지 않다가 DSW01에 장애가 발생하였을때만 동작하게 된다. 리소스 최적화를 하지 못하고 있다. 이를 해결하기 위해서 VLAN별로 STP을 다르게 돌리는 것이다.

 

VLAN 10에 대해서는 DSW01이 Root Bridge가 되게 하는 것이다.

VLAN 10에서는 DSW01이 Root Bridge이다.

 

VLAN 20에 대해서는 DSW02가 Root Bridge이다.

 

이렇게 VLAN 별로 STP의 경로를 달리하면, 네트워크의 자원을 골고루 사용할 수 있는 장점이 있다. Cisco 스위치의 경우는 기본적으로 PVST (Per VLAN Spanning Tree)를 사용한다. 따라서 VLAN별로 Spanning Tree Protocol의 경로를 다르게 할 수 있다.

 

DSW01은 VLAN 10에서는 Root Primary, VLAN 20에 대해서는 Root Secondary

DSW02는 VLAN 20에서는 Root Primary, VLAN 10에 대해서는 Root Secondary

DSW01#
DSW01#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW01(config)#spanning-tree vlan 10 root ?
  primary    Configure this switch as primary root for this spanning tree
  secondary  Configure switch as secondary root
DSW01(config)#spanning-tree vlan 10 root primary
DSW01(config)#spanning-tree vlan 20 root secondary
DSW01(config)#exit
DSW01#
DSW01#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    24586
             Address     00E0.A330.E114
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24586  (priority 24576 sys-id-ext 10)
             Address     00E0.A330.E114
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Gi0/1            Desg FWD 4         128.25   P2p
Fa0/2            Desg FWD 19        128.2    P2p

DSW01#show spanning-tree vlan 20
VLAN0020
  Spanning tree enabled protocol ieee
  Root ID    Priority    28692
             Address     00E0.A330.E114
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28692  (priority 28672 sys-id-ext 20)
             Address     00E0.A330.E114
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Gi0/1            Desg FWD 4         128.25   P2p
Fa0/2            Desg FWD 19        128.2    P2p

DSW01#

 

DSW02는 학습자가 직접 설정하여 본다.

728x90