配置CiscoVLANVLANTrunkVTP和STP文档格式.docx
- 文档编号:3182158
- 上传时间:2023-05-01
- 格式:DOCX
- 页数:16
- 大小:34.81KB
配置CiscoVLANVLANTrunkVTP和STP文档格式.docx
《配置CiscoVLANVLANTrunkVTP和STP文档格式.docx》由会员分享,可在线阅读,更多相关《配置CiscoVLANVLANTrunkVTP和STP文档格式.docx(16页珍藏版)》请在冰点文库上搜索。
第1段:
在SW1和SW2上配置VTP
SW1912#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z
SW1912(config)#hostnSW1
SW1(config)#vtp?
clientVTPclient
domainSetVTPdomaninname
passowrd SetVTPpassword
pruning VTPpruning
serverVTPserver
transparent VTPtransparent
trap VTPtrap
SW1(config-if)#tnmkon
SW1(config-if)#
(Ctrl+Shift+6,x)
Term_Server>
2
[Resumingconnection2toswitch2...]
>
en
#conft
Enterconfigurationcommands,oneperline,EndwithCNTL/Z
(config)#hostnSW2
SW2(config)#vtpdomaincisco
SW2(config)#vtpclient
SW2(config)#
第2段:
配置VLANTrunk
SW1(config)#intfa0/26
SW1(config-if)#trunk?
autoSetDISLstatetoAUTO
desirable SetDISLstatetoDESIRABLE
nonegotiateSetDISLstatetoNONEGOTIATE
offSetDISLstatetoOFF
on SetDISLstatetoON
SW1(config-if)#trunkon
(Ctrl+Shift+6,x)
SW2(config)#intfa0/26
SW2(config-if)#trunk?
SW2(config-if)#
SW2#shtrunka
DISLstate:
On,Trunking:
On,Encapsulationtype:
ISL
SW2#shtrunkb
Off,Trunking:
Off,Encapsulationtype:
Unknown
SW2#shtrunkaallowed-vlans
1-1005
第3段:
配置VLAN和查看VTP信息
1
[Resumingconnection1toswitch1...]
SW1(config)#vlan 10 name DEPT1
SW1(config)#vlan 11 name DEPT2
SW1(config)#vlan12 name DEPT3
SW1(config)#vlan13 name DEPT4
SW1(config)#
SW1#shvlan
VLANNameStatusPorts
-------------------------------------
1default Enabled 1-12,AUI,A,B
10 DEPT1Enabled
11 DEPT2Enabled
12 DEPT3Enabled
13 DEPT4Enabled
1002fddi-defaultSuspended
1003fddi-defaultSuspended
1004fddi-defaultSuspended
1005fddi-defaultSuspended
-----------------------------
VLANTypeSAIDMTUParentRingNoBridgeNoStp Trans1 Trans2
---------------------------------------------------------------------
1Ethernet1000011500 000Unkn10021003
10Ethernet1000101500 011Unkn00
11Ethernet1000111500 011Unkn00
12Ethernet1000121500 011Unkn00
13Ethernet1000131500 011Unkn00
1002FDDI 1010021500000Unkn11003
1003Token-Ring10100315001005 10Unkn11002
1004FDDI-Net 1010041500001IEEE00
1005Token-Ring-Net 1010051500 001IEEE00
SW1#
SW2#shvlan
VLANName StatusPorts
------------------------------------------
1defaultEnabled1-12,AUI,A,B
10DEPT1 Enabled
11DEPT2 Enabled
12DEPT3 Enabled
13DEPT4 Enabled
1002fddi-defaultSuspended
1003token-ring-defauSuspended
1004fddinet-defaultSuspended
1005fddi-defaultSuspended
...(有关VLAN的具体信息,如SW1,省略)
SW2#shvtp
VTPversion:
Configurationrevision:
4
MaximumVLANssupportedlocally:
1005
NumberofexistingVLANs:
9
VTPdomainname
VTPpassword
VTPoperatingmode :
Client
VTPpruningmode:
Disabled
VTPtrapsgeneration:
Enabled
Configrurationlastmodifiedby:
192.168.1.1at00-00-000000:
00:
00
SW2#
(第4段:
配置端口的VLAN归属并查看VLAN信息)
[Resumingconnection1toswitch1...]
SW1#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z
SW1(config)#inte0/1
SW1(config-if)#vlan-membership?
dynameicSetVLANmembershiptypeasdynamic
staticSetVLANmembershiptypeasstatic
SW1(config-if)#vlan-membershipstatic10
SW1(config-if)#inte0/2
SW1(config-if)#vlan-membershipstatic11
SW1(config-if)#inte0/3
SW1(config-if)#vlan-membershipstatic12
SW1(config-if)#inte0/10
VLANNameStatus Ports
--------------------------
1defaultEnabled4-9,11-12,AUI,A,B
10DEPT1 Enabled1,10
11DEPT2 Enabled2
12DEPT3 Enabled3
13DEPT4 Enabled
1002fddi-default Suspended
1003token-ring-defau Suspended
1004fddinet-default Suspended
1005trnet-defaultSuspended
VLANTypeSAIDMTUParentRingNoBridgeNoStpTranslTrans2
----------------------------------
1Ethernet 1000011500 000Unkn10021003
10Ethernet 1000101500 011Unkn00
11Ethernet 1000111500 011Unkn00
12Ethernet 1000121500 011Unkn00
13Ethernet 1000131500 011Unkn00
1002FDDI1010021500 00 Unkn1 1003
1003Token-Ring 1010031500 10 Unkn1 1002
1004FDDI-Net1010041500 01 IEEE0 0
1005Token-Ring-Net 1010051500 01 IEEE0 0
----------------------
SW1#shvlan11
-----------------
11DEPT2 Enabled 2
--------------
VLANType SAID MTUParentRingNoBridgeNoStp Trans1Trans2
------------
11 Ethernet 1000111500 011Unkn0 0
-------------------
SW1#shvlan-membership
Port VLAN MembershipType Port VLAN Membership Type
----------------------
110Static
211Static
312Static
41 Static
51 Static
61 Static
71 Static
81 Static
91 Static
10 10 Static
111Static
121Static
AUI 1Static
A1 Static
B1 Static
第5段:
查看STP信息
SW1#shspantree10
VLAN1OisexecutingtheIEEEcompatibleSpanningTreeProtocol
BridgeIdentifierhaspriority32768,address0004.DD4E.9C81
Configuredhellotime2,maxage20,forwarddelay15
Currentroothaspriority
RootportisFastEthernet0/26,costofrootpathis10
Topologychangeflagnotset,detectedflagnotset
Topologychanges1,lasttopologychangeoccured0d00h04ml0sago
Times:
hold1,topologychange8960
hello2,maxage20,forwarddelay15
Timers:
hello2,topologychange35,notification2
PortEthernet0/1ofVLANIOisForwarding
Portpathcost100,Portpriority128
Designatedroothaspriority32768,address0004.27C4.2401
Designatedbridgehaspriority32768,address0004.DD4E.9C81
Designatedportis1,pathcost10
Timers:
messageage20,forwarddelay15,hold1
PortEthernet0/10ofVLANIOisForwarding
Designatedroothaspriority32768,address0004.27C4.2401
Designatedbridgehaspriority32768,address0004.DD4E.9C81
Designatedportis10,pathcost10
PortFastEthernet0/26ofVLANIOisForwarding
Portpathcost10,Portpriority128
Designatedbridgehaspriority32768,address0004.27C4.2401
Designatedportis26,pathcost0
SW1(config)#nospantree10
Error>
r:
-STPisnotenabledforVLAN10
(1)第1段是对VTP进行配置。
在全局配置模式下,使用vtp?
命令查看VTP的可配置项目。
可以看到,有VTP域名、VTP模式(server、client和transparent)、VTP口令、VTP修剪和VTP陷井等几项,我们关心的是VTP域名和模式有关的命令。
(2)首先把SW1交换机设置成为VTPServer模式,当然这也是缺省模式,不需设置即为此模式。
在Server模式下,可以设置VTP的其他属性。
(3)vtpdomain命令设置VTP域名。
"
Cisco"
是本实验中设置的域名。
(4)在交换机SW2上。
缺省的VTP模式是Server。
首先设置VTP域名为cisco,然后把VTP模式更改为。
clint。
这样。
SW2就可以从SW1交换机上得到有关VLAN的设置信息了。
(5)在第2段中"
对2台交换机的FastEthernet0/26端口设置VLAN中继(主干)模式。
VLAN中继的模式如vlantrunk?
命令所列出的,有以下5种。
auto:
设置DISL(动态的ISL)状态为自动。
当相连设备端口状态为on和desirable,此端口成为主干模式。
desirable:
设置DISL状态为"
希望成为"
,与之相连的设备端口状态为on、desiirable或auto时,双方协商成为主干模式;
若与之相连的设备端口状态为off、noncgotiate,则相连的链路为非主干模式。
nonegotiate:
设置DISL状态为非协商,该端口永久处于主干模式;
off:
设置DISL状态为禁止成为主干模式;
on:
设置DISL状态为主干模式,并与相连的设备协商使相连设备的对应端口成为主干模式。
(6)在两台交换机上,把各自的Fa0/26端口设置为trunkon模式。
(7)检查VLANTrunk的运行状态时,用命令showtrunka和showtrunkb,其中a代表Fa0/26端口,b代表Fa0/27端口。
可以看到,a端口上的Trunk处于on的状态,封装类型是ISL;
b端口上的Trunk处于off状态,封装类型为不可知。
(8)showTrunkaallowed-vlans命令列出了trunka所能传输的VLAN号,1-1005表示所有VLAN上的数据帧都可以在这条VLAN主干链路上传输。
可以便用notrunkvlan-vlan_id命令使得主干链路不传送某些VLAN的数据帧,vlan_id处写入对应的VLAN号。
(9)在第3段中,我们定义了4个VLAN,它们是:
VLAN10名称为DEPT1;
VLAN11名称为DEPT2;
VLAN12名称为DEPT3;
VLAN13名称为DEPT4。
(10)用showvlan指令看到的VLAN是9个,除了刚刚定义的4个之外,还有1、1002、1003、1004和1OO5等5个VLAN编号。
其中VLANl是缺省VLAN,当交换机没有配置时,所有端口均处于VLAN1中;
其他的4个VLAN是FDDI和令牌环网络中使用的VLAN,也是交换机缺省给出的,它们的状态都是"
挂起的"
(Suspended),没有被实际使用。
showvlan命令列出了目前交换机所有端口均属于VLAN1。
(11)在SW2交换机上查看VLAN信息,发现SW1上新定义的VLAN信息已经通过VTP
协议发布到SW2上。
showvtp命令显示了SW2上详细的VTP信息。
(12)第4段是把由第3段定义好的VLAN配置到相应端口上去。
使用vlan,membershipstatic命令可以把相应端口设置为静态VLAN。
vlan-membershipdynamic是设置动态VLAN的命令,此命令不是CCNA考察的对象。
(13)showvlan命令表明(12)中进行的配置己经生效,相应的端口已经归属于所定义的VLAN。
其中属于ViAN10的端口编号为1和l0,属于VLANH的端口编号为2,属于VLAN12的端口编号为3,其余端口则依然属于VLAN1。
(14)showvlan11命令列出了VLANn的详细信息。
(15)showvlan-membership命令以端口号为序列出了各端口所对应的VLAN号和VLAN类型。
(16)第5段首先演示了使用showspantree10(注意是"
spantree"
,而不是"
spanningtree"
命令查看生成树信息的执行结果,表明对于VLAN10来说,SW1交换机的根交换机(Root)是SW2交换机,其MAC地址是0004.27C4.2401。
使用nospantree10命令可以关闭VLAN10上的生成树协议。
再次使用showspantree10命令,交换机应答"
VLAN10上的STP己被禁用"
。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 配置 CiscoVLANVLANTrunkVTP STP
![提示](https://static.bingdoc.com/images/bang_tan.gif)