交换机配置——VTP管理交换机的VLAN配置
一、實(shí)驗(yàn)?zāi)康?#xff1a;將S1配置成VTP-Server,S2配置成VTP-Transparent,S3配置成VTP-Client,S4配置成VTP-Client
二、拓?fù)鋱D如下
?
三、具體步驟:
(1)S1交換機(jī)的配置
Switch>enable ?--進(jìn)入特權(quán)模式
Switch#config terminal ?--進(jìn)入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1 ?--修改交換機(jī)名為S1
S1(config)#vtp domain test ?--創(chuàng)建test域
Changing VTP domain name from NULL to test
S1(config)#vtp mode server ?--設(shè)置S1為Server?
Device mode already VTP SERVER.
S1(config)#vlan 7 ?--創(chuàng)建并進(jìn)入vlan 7端口,并開(kāi)啟
S1(config-vlan)#vlan 8 ?--創(chuàng)建并進(jìn)入vlan 8 端口,并開(kāi)啟
S1(config-vlan)#interface f0/1 ?--進(jìn)入f0/1端口
S1(config-if)#switchport mode trunk ?--將端口改為trunk模式
S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
?
(2)S2交換機(jī)的配置
Switch#enable ?--進(jìn)入特權(quán)模式
Switch#config terminal ?--進(jìn)入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S2 ?--修改交換機(jī)名為S2
S2(config)#vtp mode transparent ?--將S2設(shè)置為Transparent
Device mode already VTP TRANSPARENT.
S2(config)#interface range f0/1-2 ?--進(jìn)入f0/1和f0/2端口
S2(config-if)#switchport mode trunk ?--將端口改為trunk模式
?
(3)S3交換機(jī)配置
Switch#enable ?--進(jìn)入特權(quán)模式
Switch#config terminal ?--進(jìn)入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3 ?--修改交換機(jī)名為S3
S3(config)#vtp mode client ?--將S3設(shè)置為Client
Device mode already VTP CLIENT.
S3(config)#interface range f0/1-2 ? --進(jìn)入f0/1和f0/2端口
S3(config-if)#switchport mode trunk ?--將端口改為trunk模式
?
(4)S4交換機(jī)配置
Switch#enable ?--進(jìn)入特權(quán)模式
Switch#config terminal ?--進(jìn)入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S4 ?--將交換機(jī)名修改為S4
S4(config)#vtp mode client ?--將S4設(shè)置為Client
Device mode already VTP CLIENT.
S4(config)#interface f0/1 ?--進(jìn)入f0/1端口
S4(config-if)#switchport mode trunk ?--將端口改為trunk模式
四、驗(yàn)證,分別在各臺(tái)交換機(jī)上查看VLAN
(1)S1
?
(2)S2
?
?解釋:S2因?yàn)槭请[藏模式,所以看不見(jiàn)vlan 7 和 vlan 8
(3)S3
?解釋:S3是客戶端模式所以可以查看到vlan 7 和vlan 8
(4)S4
?解釋:S4因?yàn)槭强蛻舳四J?#xff0c;所以可以查看到vlan 7 和 vlan 8
轉(zhuǎn)載于:https://www.cnblogs.com/evolve/p/9178587.html
總結(jié)
以上是生活随笔為你收集整理的交换机配置——VTP管理交换机的VLAN配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: RHEL5.X 重启网卡出现./netw
- 下一篇: Linux记录-进程数和句柄数调整