ATEN—第一章vtp协议(虚拟局域网中继协议)
本文标签: 协议 vtp ATEN 虚拟局域网 中继 

实验使用的工具:小凡模拟器



一、
SW1
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-sw1  ————————更改名称为“jing-sw1”
jing-sw1(config)#interface f0/1  ————————|
jing-sw1(config-if)#switchport mode trunk |——激活端口并设置为trunk
jing-sw1(config-if)#no shutdown |
jing-sw1(config-if)#exit  ———————————-|
jing-sw1(config)#exit
SW2
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-sw2
jing-sw2(config)#interface range f0/1 - 2
jing-sw2(config-if-range)#switchport mode trunk
jing-sw2(config-if-range)#no shutdown
jing-sw2(config-if-range)#end
SW3
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-sw3
jing-sw3(config)#interface f0/2
jing-sw3(config-if)#switchport mode trunk
jing-sw3(config-if)#no shutdown
jing-sw3(config-if)#end
二、
SW1
jing-sw1#vlan database  ——————进入vlan数据库
jing-sw1(vlan)#vtp domain benet  ————设置VTP域名“benet”
jing-sw1(vlan)#exit
jing-sw1#show vlan-s ————查看vlan信息
SW2
jing-sw2#
jing-sw2#show vtp status ————查看VTP状态信息
jing-sw2#vlan database ——————|
jing-sw2(vlan)#vtp transparent   |——设置VTP模式为“透明模式”
jing-sw2(vlan)#exit ———————-|
jing-sw2#show vtp status
jing-sw2#show vlan-s
SW3
jing-sw3#
jing-sw3#show vtp status
jing-sw3#vlan database ————-|
jing-sw3(vlan)#vtp client|——设置VTP模式为“客户机模式”
jing-sw3(vlan)#exit——————-|
jing-sw3#show vtp status
jing-sw3#show vlan-s
三、
SW1
jing-sw1#vlan database
jing-sw1(vlan)#vlan 2 name jishubu —————|
jing-sw1(vlan)#vlan 3 name renshibu    |——创建vlan
jing-sw1(vlan)#exit ——————————————|
jing-sw1#show vlan-s
jing-sw1#show vtp status ——————查看VTP状态信息
SW2
jing-sw2#show vlan-s
jing-sw2#show vtp status
SW3
jing-sw3#show vlan-s
    查看是否从SW1上学习到VLAN???  YES!!!
四、
SW2在sw2上创建vlan,看sw1和sw2能否学到?NO!!(因为它是透明模式)
jing-sw2#vlan database
jing-sw2(vlan)#vlan 4 name li
jing-sw2(vlan)#vlan 5 name tang
jing-sw2(vlan)#exit
jing-sw2#show vtp status
SW1
jing-sw1#show vlan-s
SW3
jing-sw3#show vlan-s
  
五、
SW1在sw1上设密码、创建vlan 6,看sw2、sw3能否学习到?  不能!
jing-sw1#vlan database ———————|
     |——设置VTP密码
jing-sw1(vlan)#vtp password 123——--|
jing-sw1(vlan)#vlan 6
jing-sw1(vlan)#exit
jing-sw1#show vlan-s
jing-sw1#show vtp status
SW2
jing-sw2#show vtp status
SW3
jing-sw3#show vlan-s
jing-sw3#show vtp status
六、
SW3   对sw3设置与sw1相同的密码  再到sw1上启用VTP修剪    然后到SW3上查看  
jing-sw3#vlan database
jing-sw3(vlan)#vtp password 123
jing-sw3(vlan)#exit
SW1
jing-sw1#vlan database
jing-sw1(vlan)#vtp pruning
jing-sw1(vlan)#exit
jing-sw1#show vtp status
jing-sw1#show vlan-s
SW3
jing-sw3#show vtp status
jing-sw3#show vlan-s学到了vlan 6 !!!
OK!!! 完成!!


一、更改设备名
SW1
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-sw1
SW2
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-sw2
R1
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-R1
R2
Router>
Router>enable
Router#config terminal
Router(config)#hostname jing-R2
二、在交换机上激活端口并设置trunk
SW1
jing-sw1(config)#interface range f0/0 -15
jing-sw1(config-if-range)#no shutdown
jing-sw1(config-if-range)#exit
jing-sw1(config)#interface range f0/0 , f0/5
jing-sw1(config-if-range)#switchport mode trunk
jing-sw1(config-if-range)#end
SW2
jing-sw2(config)#interface range f0/0 -15
jing-sw2(config-if-range)#no shutdown
jing-sw2(config-if-range)#interface f0/5
jing-sw2(config-if)#switchport mode trunk
jing-sw2(config-if)#end
三、在SW1上配置VTP,创建vlan;让SW2学习到vlan
SW1
jing-sw1#vlan database
jing-sw1(vlan)#vtp domain benet
jing-sw1(vlan)#vlan 2 name jishubu
jing-sw1(vlan)#vlan 3 name caiwubu
jing-sw1(vlan)#exit
jing-sw1#show vlan-s
jing-sw1#show vtp status
SW2
jing-sw2#show vlan-s
jing-sw2#show vtp status
学习到了!
四、把端口加入到相应的vlan中
SW1
jing-sw1#config terminal
jing-sw1(config)#interface range f0/1 -2
jing-sw1(config-if-range)#switchport access vlan 2
jing-sw1(config-if-range)#interface f0/3
jing-sw1(config-if)#switchport access vlan 3
jing-sw1(config-if)#end
jing-sw1#show vlan-s
SW2
jing-sw2#config terminal
jing-sw2(config)#interface f0/1
jing-sw2(config-if)#switchport access vlan 2
jing-sw2(config-if)#interface f0/2
jing-sw2(config-if)#switchport access vlan 3
jing-sw2(config-if)#end
jing-sw2#show vlan-s
五、在R1上封装vlan,配置单臂路由
R1
jing-R1(config)#interface f0/0
jing-R1(config-if)#no shutdown
jing-R1(config-if)#interface f0/0.1
jing-R1(config-subif)#encapsulation dot1q 2
jing-R1(config-subif)#ip address 20.0.0.1 255.0.0.0
jing-R1(config-subif)#interface f0/0.2
jing-R1(config-subif)#encapsulation dot1q 3
jing-R1(config-subif)#ip address 30.0.0.1 255.0.0.0
jing-R1(config-subif)#exit
六、在两台路由器上设置接口地址、激活,并配置静态路由
R1
jing-R1(config)#interface f1/0
jing-R1(config-if)#ip address 10.0.0.1 255.0.0.0
jing-R1(config-if)#no shutdown
jing-R1(config-if)#exit
R2
jing-R2(config)#interface f1/0
jing-R2(config-if)#ip address 10.0.0.2 255.0.0.0
jing-R2(config-if)#no shutdown
jing-R2(config-if)#interface f0/0
jing-R2(config-if)#ip address 40.0.0.1 255.0.0.0
jing-R2(config-if)#no shutdown
jing-R2(config-if)#exit
R1
jing-R1(config)#ip route 40.0.0.0 255.0.0.0 10.0.0.2
jing-R1(config)#exit
jing-R1#show ip route
R2
jing-R2(config)#ip route 20.0.0.0 255.0.0.0 10.0.0.1
jing-R2(config)#ip route 30.0.0.0 255.0.0.0 10.0.0.1
jing-R2(config)#exit
jing-R2#show ip route
七、设置主机ip
VPCS 1 >show
VPCS 1 >ip 20.0.0.2 20.0.0.1 255.0.0.0
PC1 : 20.0.0.2 255.255.255.0 gateway 20.0.0.1
VPCS 1 >2
VPCS 2 >ip 20.0.0.3 20.0.0.1 255.0.0.0
PC2 : 20.0.0.3 255.255.255.0 gateway 20.0.0.1
VPCS 2 >3
VPCS 3 >ip 30.0.0.2 30.0.0.1 255.0.0.0
PC3 : 30.0.0.2 255.255.255.0 gateway 30.0.0.1
VPCS 3 >4
VPCS 4 >ip 20.0.0.4 20.0.0.1 255.0.0.0
PC4 : 20.0.0.4 255.255.255.0 gateway 20.0.0.1
VPCS 4 >5
VPCS 5 >ip 30.0.0.3 30.0.0.1 255.0.0.0
PC5 : 30.0.0.3 255.255.255.0 gateway 30.0.0.1
VPCS 5 >9
VPCS 9 >ip 40.0.0.2 40.0.0.1 255.0.0.0
PC9 : 40.0.0.2 255.255.255.0 gateway 40.0.0.1
八、验证  主机之间相互ping通
VPCS 9 >ping 20.0.0.2
VPCS 9 >ping 20.0.0.3
VPCS 9 >ping 20.0.0.4
VPCS 9 >ping 30.0.0.2
VPCS 9 >ping 30.0.0.3
VPCS 9 >1
VPCS 1 >ping 20.0.0.3
VPCS 1 >ping 20.0.0.4
VPCS 1 >ping 30.0.0.2
VPCS 1 >ping 30.0.0.3
VPCS 1 >ping 40.0.0.2
VPCS 1 >2
VPCS 2 >ping 20.0.0.2
VPCS 2 >ping 20.0.0.4
VPCS 2 >ping 30.0.0.2
VPCS 2 >ping 30.0.0.3
VPCS 2 >ping 40.0.0.2
VPCS 2 >3
VPCS 3 >ping 20.0.0.2
VPCS 3 >ping 20.0.0.3
VPCS 3 >ping 20.0.0.4
VPCS 3 >ping 30.0.0.3
VPCS 3 >ping 40.0.0.2
VPCS 3 >4
VPCS 4 >ping 20.0.0.2
VPCS 4 >ping 20.0.0.3
VPCS 4 >ping 30.0.0.2
VPCS 4 >ping 30.0.0.3
VPCS 4 >ping 40.0.0.2
VPCS 4 >5
VPCS 5 >ping 20.0.0.2
VPCS 5 >ping 20.0.0.3
VPCS 5 >ping 20.0.0.4
VPCS 5 >ping 30.0.0.2
VPCS 5 >ping 40.0.0.2

发表于: 2011-11-04 14:17 阅读(1282) 评论(1) 收藏 好文推荐
# re: ATEN—第一章vtp协议(虚拟局域网中继协议)
2011-11-04 14:29 | wcxsky | 1楼
实用配置案例~~~
强烈支持~~
以后多发点啊~~
o(∩_∩)o 哈哈

发表评论(网友发言只代表个人观点,不代表本网站观点或立场。)

您尚未登录,请先【登录或注册