中文在线免费看视频,欧美日韩亚洲二区在线,亚洲视频欧洲视频,国产中文字幕一区

您好,歡迎來(lái)到江浙滬招生考試網(wǎng) !

設為首頁(yè)|加入收藏|聯(lián)系我們|網(wǎng)站地圖|

江浙滬招生考試網(wǎng)

您現在的位置: test4exam >> 計算機考試 >> CISCO認證 >> 正文

ccna實(shí)驗之配置STP與VTP

日期:2012/12/15 15:11:26 來(lái)源:本站原創(chuàng ) 訪(fǎng)問(wèn)量:

環(huán)境:三臺交換機,形成一個(gè)全互連結構,sw32950,sw1sw22900xl;

要求:設置sw3VTP server,設置sw1sw2VTP client,域名為cisco,密碼為:cisco,在server創(chuàng )建vlan 10(name:aa)vlan20(name:bb);設置sw3vlan1的根橋,sw1vlan10的根橋,sw2vlan20的根橋;

      

 

初始化配置:

 

Sw#show vlan          à查看vlan信息

Sw#Delete vlan.dat      à用此命令將vlan刪除

Sw#show startup-config  à查看一下NVRAM是否保存了配置

Sw#erase startup-config  à清空配置文件

Sw#reload              à重新啟動(dòng)交換機

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 à命令輸入達到同步

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        à設置域名

Changing VTP domain name from NULL to cisco

sw3(config)#vtp password cisco       à設置密碼

Setting device VLAN database password to cisco

 

sw1的配置:

sw1#vlan database          à進(jìn)入vlan數據庫

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      à設置密碼與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                    : 0x3F 0x17 0xC8 0xB8 0x5A 0xE3 0x01 0x66

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

 

創(chuàng )建vlan:

sw3(config)#vlan 10      à創(chuàng )建VLAN10

sw3(config-vlan)#name aa à命名為aa

sw3(config-vlan)#exit    à應用配置

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 0.0.0.0 at 3-1-93 00:52:05

 

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 0.0.0.0 at 3-1-93 00:52:05

 

sw1vlan信息:

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  à設置為vlan1的根橋

 

Sw1(config)#spanning-tree vlan 10 priority 4096 à設置為vlan10的根橋

 

Sw2(config)#spanning-tree vlan 20 priority 4096 à設置為vlan20的根橋

 

步驟五、顯示STP的信息

 

sw1的生成樹(shù)信息:

sw1#show spanning-tree brief   à顯示每VLAN生成樹(shù)信息

 

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 00b0.645f.34c2          àvlan20的根橋

             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的生成樹(shù)信息:

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     00b0.645f.34c0

             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     00b0.645f.34c1

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

 

VLAN20

  Spanning tree enabled protocol IEEE    

  ROOT ID    Priority 4096         àvlan20的根橋

             Address 00b0.645f.34c2

             This bridge is the root

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

 

  Bridge ID  Priority    4096

             Address     00b0.645f.34c2

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

 

sw3的生成樹(shù)信息:

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     00b0.645f.34c2

             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

 

步驟六、顯示當前配置結果

 

Sw1的配置結果:

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的配置結果:

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的配置結果:

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

相關(guān)閱讀
·推薦文章

Copyright ©2013-2015 江浙滬招生考試網(wǎng) All Rights Reserved.
地址: 蘇州市姑蘇區閶胥路483號(工投創(chuàng )業(yè)園)  電話(huà):0512-85551931 郵編: 214000
郵箱: [email protected] 版權所有:蘇州邁峰教育科技有限公司 蘇ICP備15050684號-2