# VTP(VLAN Trunk Protocol)
- Cisco에서 개발한 프로토콜, Cisco 장비에서만 동작 가능하다.
- VTP란 트렁크로 구성된 환경에서 스위치간에 VLAN 정보를 공유(Share)하는 기능
- 단, VLAN 생성/삭제/수정에 대한 정보만 공유하며, 포트를 Access한 내용을 공유 X
- VTP 사용 조건
1) 트렁크 구간(Access X)
2) VTP 도메인 일치
3) VTP 패스워드 일치 (인증)
- VLAN 정보 공유 방법 : 'VTP Configuration Revision' 값이 높은 VTP 정보로 일치
- VTP 모드 3가지 유형
1) VTP Server (기본 모드)
- VLAN 생성/수정/삭제 가능 <- VLAN 데이터베이스 관리 권한 O
- VLAN 정보를 전파(광고) O
- VLAN 정보를 일치(대체) O
- VLAN 정보를 전달(중계) O
- Standard VLAN(1~1005) 생성 가능
2) VTP Client
- VLAN 생성/수정/삭제 불가능
- VLAN 정보를 전파(광고) X
- VLAN 정보를 일치(대체) O
- VLAN 정보를 전달(중계) O
- 단, 'VTP Configuration Revision' 값이 높을때만 일치시킨다.
3) VTP Transparent (= VTP Disable)
- VLAN 생성/수정/삭제 가능 <- VLAN 데이터베이스 관리 권한 O
- VLAN 정보를 전파(광고) X
- VLAN 정보를 일치(대체) X
- VLAN 정보를 전달(중계) O
- Standard VLAN(1~1005) & Extended VLAN(1006~4094) 생성 가능
- VTP Configuration Revision 값이 항상 '0'으로 동작한다.
- VTP Configuration Revision 값을 '0'으로 초기화할때 사용한다.
# VTP 설정 방법
1. Cisco IOS
Switch(config)# vtp domain CCNA
Switch(config)# vtp password cisco
Switch(config)# vtp mode [server|client|transparent]
2. Cat OS
Switch# vlan database
Switch(vlan)# vtp domain CCNA
Switch(vlan)# vtp password cisco
Switch(vlan)# vtp [server|client|transparent]
Switch(vlan)# exit
Ex) SW1은 VTP Server이며, SW2는 VTP Client로 구성하여, SW2는 SW1에서 생성한
VLAN 15~17까지를 공유가 되도록하여라.
- VTP Domain : CCNA
- VTP Password : cisco
SW1#vlan database
SW1(vlan)#vtp domain CCNA
SW1(vlan)#vtp pass cisco
SW1(vlan)#vtp server
SW1(vlan)#exit
SW2#vlan database
SW2(vlan)#vtp dom CCNA
SW2(vlan)#vtp pass cisco
SW2(vlan)#vtp client
SW2(vlan)#exit
SW1# vlan database
SW1(vlan)# vlan 15
SW1(vlan)# vlan 16
SW1(vlan)# vlan 17
SW1(vlan)# exit
SW2#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/12, Fa1/13
Fa1/14, Fa1/15
11 VLAN_A active
12 VLAN_B active
13 VLAN_C active
15 VLAN0015 active
16 VLAN0016 active
17 VLAN0017 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW1#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 11
VTP Operating Mode : Server
VTP Domain Name : CCNA
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x97 0x8C 0x40 0xDC 0x73 0xA3 0x01 0xF2
Configuration last modified by 13.13.1.1 at 3-1-02 00:44:18
Local updater ID is 13.13.1.1 on interface Vl1 (lowest numbered VLAN interface found)
SW2#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 11
VTP Operating Mode : Client
VTP Domain Name : CCNA
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x97 0x8C 0x40 0xDC 0x73 0xA3 0x01 0xF2
Configuration last modified by 13.13.1.1 at 3-1-02 00:44:18
SW1# vlan database
SW1(vlan)# no vlan 15
SW1(vlan)# no vlan 16
SW1(vlan)# no vlan 17
SW1(vlan)# exit
SW2#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/12, Fa1/13
Fa1/14, Fa1/15
11 VLAN_A active
12 VLAN_B active
13 VLAN_C active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Ex) SW1은 VTP Server이며, SW2을 VTP Transparent로 변경하여라.
SW2# vlan database
SW2(vlan)# vtp transparent
SW2(vlan)# exit
SW2#show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Transparent
VTP Domain Name : CCNA
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x7E 0xA6 0x7B 0xED 0x69 0x77 0x11 0x27
Configuration last modified by 13.13.1.1 at 3-1-02 00:48:41
- SW1(VTP Server)에서 vlan 20~21 생성
- SW2(VTP Transparent)에서 vlan 30~31 생성
SW1#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/1, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/11, Fa1/12, Fa1/13
Fa1/14, Fa1/15
11 VLAN_A active
12 VLAN_B active
13 VLAN_C active
20 VLAN0020 active
21 VLAN0021 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW2#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/12, Fa1/13
Fa1/14, Fa1/15
11 VLAN_A active
12 VLAN_B active
13 VLAN_C active
30 VLAN0030 active
31 VLAN0031 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW2#
------------------------------------------------------------------------------------------------
# BPDU (Bridge Protocol Data Unit)
- IEEE 802.1d STP가 지원되는 모든
스위치들은 생성 및 전송 가능
- 멀티케스트 2초 주기 전송 실시
- BPDU 내용
1) Bridge-ID
2) Cost (10M=100, 100M=19, 1G=4, 10G=2)
3) Port-ID (128.x)
-------------------- 비교/선출 단위
4) Hello Time : 2초
5) Forward Delay Time : 15초
6) Max Age Time : 20초
- Root Bridge가 선출되면 Root Bridge만
Configuration BPDU를 생성하여 전송 실시
# IEEE 802.1d Spanning-Tree Protocol
Bridge-ID : 64bit
1) Priority : 16bit (기본값 : 32768)
2) Mac Address : 48bit
1. Root Bridge 선출 (Bridge-ID 이용)
1) Priority가 가장 낮은 스위치로 선출
2) MAC 주소가 가장 낮은 스위치로 선출
2. 포트 선정 (Cost 값 이용)
1) Root Port(RP) : BPDU 수신 포트
2) Designated Port(DP) : BPDU 송신 포트
3. Blocking 포트 선정
1) Cost 값이 높은 구간 포트 차단
2) Sender Bridge ID가 높은 구간 포트 차단
3) Port-ID가 높은 구간 포트 차단
SW1#show spanning-tree vlan 1 brief
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address c400.0bb8.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c400.0bb8.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 0
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/10 128.51 128 19 FWD 0 32768 c400.0bb8.0000 128.51
FastEthernet1/15 128.56 128 19 FWD 0 32768 c400.0bb8.0000 128.56
- SW2를 Root Bridge로 선출하며, SW1 Fa1/15를 Blocking 하여라.
SW2(config)# spanning-tree vlan 1 priority 4096
SW3(config)# spanning-tree vlan 1 priority 16384
SW2#show spanning-tree vlan 1 brief
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 4096
Address c401.0bb8.0000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4096
Address c401.0bb8.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 0
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/11 128.52 128 19 FWD 0 4096 c401.0bb8.0000 128.52
FastEthernet1/12 128.53 128 19 FWD 0 4096 c401.0bb8.0000 128.53
SW1#show spanning-tree vlan 1 brief
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 4096
Address c401.0bb8.0000
Cost 19
Port 51 (FastEthernet1/10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address c400.0bb8.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 0
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/10 128.51 128 19 FWD 0 4096 c401.0bb8.0000 128.52
FastEthernet1/15 128.56 128 19 BLK 19 16384 c402.0bb8.0000 128.55