您現(xiàn)在的位置: test4exam >> 計(jì)算機(jī)考試 >> CISCO認(rèn)證 >> 正文
環(huán)境:三臺交換機(jī),形成一個全互連結(jié)構(gòu),sw3為2950,sw1和sw2為2900xl;
要求:設(shè)置sw3為VTP server,設(shè)置sw1和sw2為VTP client,域名為cisco,密碼為:cisco,在server創(chuàng)建vlan 10(name:aa)和vlan20(name:bb);設(shè)置sw3為vlan1的根橋,sw1為vlan10的根橋,sw2為vlan20的根橋;
初始化配置:
Sw#show vlan à查看vlan信息
Sw#Delete vlan.dat à用此命令將vlan刪除
Sw#show startup-config à查看一下NVRAM是否保存了配置
Sw#erase startup-config à清空配置文件
Sw#reload à重新啟動交換機(jī)
sw>enable
sw#config terminal
sw(config)#hostname sw1
sw1(config)#no ip domain-lookup à關(guān)閉域名查找
sw1(config)#line console 0
sw1(config-line)#logging synchronous à命令輸入達(dá)到同步
sw1(config-line)#exec-timeout 0 0 à設(shè)置永不超時
sw1(config-line)#exit
步驟一、配置VTP
sw3的配置:
sw3(config)#vtp mode server à在sw3上啟用vtp server
Device mode already VTP SERVER.
sw3(config)#vtp domain cisco à設(shè)置域名
Changing VTP domain name from NULL to cisco
sw3(config)#vtp password cisco à設(shè)置密碼
Setting device VLAN database password to cisco
sw1的配置:
sw1#vlan database à進(jìn)入vlan數(shù)據(jù)庫
sw1(vlan)#vtp client à啟用VTP client模式
Setting device to VTP CLIENT mode.
sw1(vlan)#vtp domain cisco à作用到cisco域中
Changing VTP domain name from NULL to cisco
sw1(vlan)#vtp password cisco à設(shè)置密碼與server端相同
Setting device VLAN database password to cisco.
sw1(vlan)#exit à使配置生效
In CLIENT state, no apply attempted.
Exiting....
sw2的配置:
sw2#vlan database
sw2(vlan)#vtp client
Setting device to VTP CLIENT mode.
sw2(vlan)#vtp domain cisco
Changing VTP domain name from NULL to cisco
sw2(vlan)#vtp password cisco
Setting device VLAN database password to cisco.
sw2(vlan)#exit
sw2#
步驟二、啟用干道端口
sw3的配置:
sw3(config)#interface fa0/23
sw3(config-if)#switchport mode trunk à啟用trunk端口
sw3(config-if)#interface fa0/24
sw3(config-if)#switchport mode trunk
sw1的配置:
sw1(config)#interface fa0/23
sw1(config-if)#switchport trunk encapsulation dot1q à封裝干道協(xié)議
sw1(config-if)#switchport mode trunk à啟用trunk模式
sw1(config-if)#
sw1(config)#interface fa0/24
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
sw2的配置:
sw2(config)#interface fa0/23
sw2(config-if)#switchport trunk encapsulation dot1q
sw2(config-if)#switchport mode trunk
sw2(config)#interface fa0/24
sw2(config-if)#switchport trunk encapsulation dot1q
sw2(config-if)#switchport mode trunk
步驟三、測試vtp狀態(tài)及創(chuàng)建vlan
sw3的狀態(tài):
sw3#show vtp status à顯示vtp狀態(tài)
VTP Version : 2
Configuration Revision : 0 à配置修訂號
Maximum VLANs supported locally : 254
Number of existing VLANs : 5
VTP Operating Mode : server àvtp模式
VTP Domain Name : cisco àvtp域名
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x
Configuration last modified by
創(chuàng)建vlan:
sw3(config)#vlan 10 à創(chuàng)建VLAN10
sw3(config-vlan)#name aa à命名為aa
sw3(config-vlan)#exit à應(yīng)用配置
sw3(config)#vlan 20 à創(chuàng)建VLAN20
sw3(config-vlan)#name bb à命名為bb
sw3(config-vlan)#exit
sw3(config)#
sw3的狀態(tài):
sw3#show vtp status à在sw3顯示vtp的狀態(tài)
VTP Version : 2
Configuration Revision : 2 àserver的修訂號
Maximum VLANs supported locally : 254
Number of existing VLANs : 7 àvlan也已經(jīng)增加
VTP Operating Mode : server
VTP Domain Name : cisco
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x98 0x31 0xCF 0xA0 0xA7 0x17 0x73 0x66
Configuration last modified by
sw2的狀態(tài):
sw2#show vtp status
VTP Version : 2
Configuration Revision : 2 à已經(jīng)同步了server
Maximum VLANs supported locally : 254
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x98 0x31 0xCF 0xA0 0xA7 0x17 0x73 0x66
Configuration last modified by
sw1的vlan信息:
sw1#show vlan à顯示vlan信息
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4,
Fa0/5, Fa0/6, Fa0/7, Fa0/8,
Fa0/9, Fa0/10, Fa0/11, Fa0/12,
Fa0/13, Fa0/14, Fa0/15, Fa0/16,
Fa0/17, Fa0/18, Fa0/19, Fa0/20,
Fa0/21, Fa0/22, Fa0/23, Fa0/24
10 aa active à已經(jīng)同步了vlan的信息
20 bb active
步驟四、配置PVST
sw3(config)#spanning-tree vlan 1 root primary à設(shè)置為vlan1的根橋
Sw1(config)#spanning-tree vlan 10 priority 4096 à設(shè)置為vlan10的根橋
Sw2(config)#spanning-tree vlan 20 priority 4096 à設(shè)置為vlan20的根橋
步驟五、顯示STP的信息
sw1的生成樹信息:
sw1#show spanning-tree brief à顯示每VLAN生成樹信息
VLAN1
Spanning tree enabled protocol IEEE
ROOT ID Priority 24577
Address 0007.eb06.1740 à非vlan1的根橋
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 0030.803d.f640
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN10
Spanning tree enabled protocol IEEE
ROOT ID Priority 4096
Address 0030.803d.f641 à為vlan10的根橋
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4096
Address 0030.803d.f641
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN20
Spanning tree enabled protocol IEEE
ROOT ID Priority 4096
Address 00b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 0030.803d.f642
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
sw2的生成樹信息:
sw2#show spanning-tree brief
VLAN1
Spanning tree enabled protocol IEEE à非vlan1的根橋
ROOT ID Priority 24577
Address 0007.eb06.1740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 00b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN10
Spanning tree enabled protocol IEEE
ROOT ID Priority 4096 à非vlan10的根橋
Address 0030.803d.f641
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 00b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN20
Spanning tree enabled protocol IEEE
ROOT ID Priority 4096 à為vlan20的根橋
Address 00b
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4096
Address 00b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
sw3的生成樹信息:
sw3#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577 à為vlan1的根橋
Address 0007.eb06.1740
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0007.eb06.1740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 4096 à非vlan10的根橋
Address 0030.803d.f641
Cost 19
Port 24 (FastEthernet0/24)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32779 (priority 32768 sys-id-ext 11)
Address 0007.eb06.1740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 4096 à非vlan20的根橋
Address 00b
Cost 19
Port 23 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32780 (priority 32768 sys-id-ext 12)
Address 0007.eb06.1740
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/23 Root FWD 19 128.23 P2p
Fa0/24 Altn BLK 19 128.24 P2p
步驟六、顯示當(dāng)前配置結(jié)果
Sw1的配置結(jié)果:
sw1#show running-config
!
hostname sw1
!
spanning-tree vlan 10 priority 4096
!
no ip domain-lookup
!
interface FastEthernet0/23
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/24
switchport trunk encapsulation dot1q
switchport mode trunk
!
end
sw2的配置結(jié)果:
sw2#show running-config
hostname sw2
!
spanning-tree vlan 20 priority 4096
!
no ip domain-lookup
!
interface FastEthernet0/23
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/24
switchport trunk encapsulation dot1q
switchport mode trunk
!
end
sw3的配置結(jié)果:
sw3#show running-config
!
hostname sw3
!
no ip domain-lookup
!
spanning-tree vlan 1 priority 24576
!
interface FastEthernet0/23
switchport mode trunk
!
interface FastEthernet0/24
switchport mode trunk
!
End
上一篇:最新ccna題庫下載
下一篇:CCNA多少錢能考下來?
Copyright ©2013-2015 江浙滬招生考試網(wǎng) All Rights Reserved.
地址: 蘇州市姑蘇區(qū)閶胥路483號(工投創(chuàng)業(yè)園) 電話:0512-85551931 郵編: 214000
郵箱: [email protected] 版權(quán)所有:蘇州邁峰教育科技有限公司 蘇ICP備15050684號-2