实难拓朴:
 
 
 
VTP中继协议_职场
 
实验目的:
 
 
1.在交换机上通过VTP 实现VLAN传递,SWITCH1SWITCH2均为SERVERSWITCH3CLIENT.
 
2.SERVER SWITCH1上增加VLAN,请用SNIFFER载获VTP通告的数据包,表明发送汇总通告和子集通告的顺序和原则
 
3.如果把SWITCH2SERVER模式转成CLIENET,会有什么样的数据包
 
4.如果把SWITCH2CLIENT模式转成SERVER,会有什么样的数据包
 
 
 
实验步骤:
 
1.搭环境
2.配置交换机:
 
1Sw1:
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip http server
Router(config)#no ip domain-loo
Router(config)#line con 0
Router(config-line )#loggin syn
Router(config-line)#no exec-t
Router(config-line)#end
Router#
2. sw2:
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip http server
Router(config)#no ip domain-loo
Router(config)#line con 0
Router(config-line)#loggin syn
Router(config-line)#no exec-t
Router(config-line)#end
Router#
3. sw3:
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip http server
Router(config)#no ip domain-loo
Router(config)#line con 0
Router(config-line)#loggin syn5
Router(config-line)#no exec-t
Router(config-line)#end
Router#
4. Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname sw1
sw1(config)#
5 . Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname sw2
Sw2(config)#
6. Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname sw3
Sw3(config)#
 
7. SW1
 
sw1#vlan da
sw1(vlan)#vtp domain test
Changing VTP domain name from NULL to test
sw1(vlan)#vtp server
Device mode already VTP SERVER.
sw1(vlan)#vtp password 111111
Setting device VLAN database password to 111111.
sw1(vlan)#vtp v2-mode
V2 mode enabled.
sw1(vlan)#vtp pruning
Pruning switched ON
sw1(vlan)#exit
APPLY completed.
Exiting....
sw1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
sw1(config)#interface f0/0
sw1(config-if)#switchport mode trunk
sw1(config-if)#no
*Mar  1 00:23:07.867: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
sw1(config-if)#no sh
sw1(config-if)#exit
 
sw1#show vtp status
VTP Version                     : 2
Configuration Revision          : 1
Maximum VLANs supported locally : 256
Number of existing VLANs        : 5
VTP Operating Mode              : Server
VTP Domain Name                 : test
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Enabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xEE 0x18 0x41 0xD1 0x2B 0xFB 0x4F 0x52
Configuration last modified by 0.0.0.0 at 3-1-02 00:18:57
Local updater ID is 0.0.0.0 (no valid interface found)
sw1#
 
8. SW2
 
Sw2#vlan da
Sw2(vlan)#vtp domain test
Changing VTP domain name from NULL to test
Sw2(vlan)#vtp server
Device mode already VTP SERVER.
Sw2(vlan)#vtp password 111111
Setting device VLAN database password to 111111.
Sw2(vlan)#vtp v2-mode
V2 mode enabled.
Sw2(vlan)#vtp pruning
Pruning switched ON
Sw2(vlan)#exit
APPLY completed.
Exiting....
sw2(config)#interface range f0/0 - 1
sw2(config-if-range)#switchport mode trunk
sw2(config-if-range)#no sh
*Mar  1 00:30:42.567: %DTP-5-TRUNKPORTON: Port Fa0/0-1 has become dot1q trunk
sw2(config-if-range)#exit
sw2(config)#exit
sw2#show interfaces f0/0 switchport
Name: Fa0/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
 
sw2#show vtp status
VTP Version                     : 2
Configuration Revision          : 1
Maximum VLANs supported locally : 256
Number of existing VLANs        : 5
VTP Operating Mode              : Server
VTP Domain Name                 : test
VTP Pruning Mode                : Enabled
VTP V2 Mode                     : Enabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xEE 0x18 0x41 0xD1 0x2B 0xFB 0x4F 0x52
Configuration last modified by 0.0.0.0 at 3-1-02 00:40:59
Local updater ID is 0.0.0.0 (no valid interface found)
sw2#
 
 
9. SW3
 
 
sw3#vl da
sw3(vlan)#vtp domain test
Changing VTP domain name from NULL to test
sw3(vlan)#vtp client
Setting device to VTP CLIENT mode.
sw3(vlan)#vtp password 111111
Setting device VLAN database password to 111111.
sw3(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
sw3#show vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 256
Number of existing VLANs        : 5
VTP Operating Mode              : Client
VTP Domain Name                 : test
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x05 0xFC 0x00 0x59 0x49 0xAF 0x1D 0xE2
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
sw3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
sw3(config)#interface f0/1
sw3(config-if)#switchport mode trunk
sw3(config-if)#no
*Mar  1 00:46:44.839: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
sw3(config-if)#no sh
sw3(config-if)#exit
sw3(config)#exit
sw3#
*Mar  1 00:46:53.739: %SYS-5-CONFIG_I: Configured from console by console
 
 
10. SW1
 
sw1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
sw1(config)#interface vlan 1
sw1(config-if)#ip add 192.168.75.134 255.255.255.0    (配置SW1的管理IP,便于一会做抓包实验)
sw1(config-if)#no sh
sw1(config-if)#exit'
sw1#show ip in br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  up                    up     
FastEthernet0/1            unassigned      YES unset  up                    up     
FastEthernet0/2            unassigned      YES unset  up                    down   
FastEthernet0/3            unassigned      YES unset  up                    down   
FastEthernet0/4            unassigned      YES unset  up                    down   
FastEthernet0/5            unassigned      YES unset  up                    down   
FastEthernet0/6            unassigned      YES unset  up                    down   
FastEthernet0/7            unassigned      YES unset  up                    down   
FastEthernet0/8            unassigned      YES unset  up                    down   
FastEthernet0/9            unassigned      YES unset  up                    down   
FastEthernet0/10           unassigned      YES unset  up                    down   
FastEthernet0/11           unassigned      YES unset  up                    down   
FastEthernet0/12           unassigned      YES unset  up                    down   
FastEthernet0/13           unassigned      YES unset  up                    down   
FastEthernet0/14           unassigned      YES unset  up                    down   
FastEthernet0/15           unassigned      YES unset  up                    down   
Vlan1                      192.168.75.134  YES manual up                    up     
sw1#ping 192.168.75.133
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.75.133, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/30/72 ms
 
sw1(config)#monitor session 1 source interface f0/0 both
sw1(config)#monitor session 1 destination interface f0/1
 
3.交换机上配置VLAN.
 
sw1#vl da
sw1(vlan)#vlan 2 name v2
VLAN 2 added:
    Name: v2
sw1(vlan)#apply
APPLY completed.
sw1(vlan)#vlan 3 name v3
VLAN 3 added:
    Name: v3
sw1(vlan)#apply
APPLY completed.
sw1(vlan)#exit
APPLY completed.
Exiting....
sw1#show vlan-switch
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
2    v2                               active   
3    v3                               active   
1002 fddi-default                     active   
1003 trcrf-default                    active   
1004 fddinet-default                  active   
1005 trbrf-default                    active   
VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0  
3    enet  100003     1500  -      -      -        -    -        0      0  
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 trcrf 101003     4472  1005   3276   -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0  
1005 trbrf 101005     4472  -      -      15       ibm  -        0      0  
sw2#show vlan-switch
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    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
2    v2                               active   
3    v3                               active   
1002 fddi-default                     active   
1003 trcrf-default                    active   
1004 fddinet-default                  active   
1005 trbrf-default                    active   

Sw3#show vlan-switch
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    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
2    v2                               active   
3    v3                               active   
1002 fddi-default                     active   
1003 trcrf-default                    active   
1004 fddinet-default                  active   
1005 trbrf-default                    active