본문 바로가기

INFOSEC/ NETWORK

STP (Spanning Tree Protocol )

STP(Spanning Tree Protocol)

-  ethernet frame looping 방지

 

스위치의 회선 이중화 : 보안의 3요소 중의 가용성에 해당

 

따로 구현을 하지 않아도 이렇게 포트 하나가 알아서 막아놓아져있다. ( ethernet frame looping 방지 )

어떤 포트를 열고 닫을지는, 얘네가 '어떤 기준' 에 의해서 주종관계를 형성하며 되어진다.

그게 뭔지를 알아보자.

 


 

Switch#sh int f0/1

FastEthernet0/1 is up, line protocol is up (connected)

Hardware is Lance, address is 0009.7c9b.d001 (bia 0009.7c9b.d001)

( 보라색 표시된 부분이 MAC주소 )

 

 


Switch0#show spanning-tree     // 따로 만들어주는 게 아니라 자동으로 되어있음

 

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0090.2152.13E7

Cost 19

Port 1(FastEthernet0/1)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

 

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 00D0.FF63.7D2C

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 20

 

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/1 Root LRN 19 128.1 P2p

 

Simulation 모드로 보면,

(핑을 보내거나 등 아무 행동도 하지 않고 Capture/Forward 를 해보면 )

계속해서 switch 간 STP 정보를 교환하는 것을 확인할 수 있다.

일방적으로 한 방향으로만 계속 보냄. (지금 내 경우에는 Switch1 -> Switch0 으로. )

 

 

Switch1 에서 스패닝 트리를 확인해보면,

Switch#show spanning-tree

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32769

Address 0090.2152.13E7

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

 

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0090.2152.13E7

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

 

여러 개의 스위치가 연결되는 경우 루트브릿지가 1개 선출됨.

지금 내 경우엔, 스위치1 의 Fa0/1 포트가 root port .

 

 

root port : 루트브릿지로 가는포트

designated port : 다른 스위치와 연결용 포트

alternative port : 루프를 막기 위해서 차단한 포트

 


 

 

 


 

 

BPDU

bridge ID = Bridge-priority + MAC address 를 가지고

가장 낮은 bridge ID 를 root bridge 로 뽑는다.

 

 

 

'INFOSEC > NETWORK' 카테고리의 다른 글

Static NAT 설정  (0) 2019.09.06
PVST ( Per VLAN Spanning Tree )  (0) 2019.09.05
VLAN 실습 (GNS3)  (0) 2019.09.05
UDP, TCP  (0) 2019.09.03
ICMP ( Internet Control Message Protocol )  (0) 2019.09.03