VTP的配置(二)

接上一部分

6.关闭sw2连接sw1的端口,配置连接sw3的端口

 

sw2(config)#interface f0/1

sw2(config-if)#shutdown

sw2(config-if)#exit

sw2(config)#interface f0/2

sw2(config-if)#switchport mode trunk

sw2(config-if)#switchport trunk encapsulation dot1q

sw2(config-if)#end

 

7.配置sw3VTP server模式

sw3#vlan database

sw3(vlan)#vtp server  //sw3server

Device mode already VTP SERVER.

sw3(vlan)#vtp domain cisco  //域名必须相同

Changing VTP domain name from NULL to cisco

sw3(vlan)#exit

APPLY completed.

Exiting....

 

8.sw3上创建vlan2vlan3vlan4vlan5

sw3#vlan database

sw3(vlan)#vlan 2

VLAN 2 added:

    Name: VLAN0002

sw3(vlan)#exit

APPLY completed.

Exiting....

sw3#vlan database

sw3(vlan)#vlan 3

VLAN 3 added:

    Name: VLAN0003

sw3(vlan)#exit

APPLY completed.

Exiting....

sw3#vlan database

sw3(vlan)#vlan 4

VLAN 4 added:

    Name: VLAN0004

sw3(vlan)#exit

APPLY completed.

Exiting....

sw3#vlan database

sw3(vlan)#vlan 5

VLAN 5 added:

    Name: VLAN0005

sw3(vlan)#exit

APPLY completed.

Exiting....

 

9.再次查看sw2vlan信息

sw2#show vlan-switch br

 

VLAN Name                         Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/0, Fa0/1, 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    VLAN0002                     active   

3    VLAN0003                     active   

4    VLAN0004                     active   

5    VLAN0005                     active  //sw2学习到了sw3vlan信息  

1002 fddi-default                      active   

1003 token-ring-default                 active   

1004 fddinet-default                   active   

1005 trnet-default                     active  

 

10.查看sw2VTP状态

sw2#show vtp status

VTP Version                     : 2

Configuration Revision            : 4  //配置版本号高的覆盖掉了版本号低的

Maximum VLANs supported locally  : 256

Number of existing VLANs         : 9

VTP Operating Mode              : Client

VTP Domain Name                : cisco

VTP Pruning Mode                : Disabled

VTP V2 Mode                    : Disabled

VTP Traps Generation              : Disabled

MD5 digest                      : 0x2B 0x96 0xBB 0x47 0x66 0xB7 0x0D 0xA3

Configuration last modified by 0.0.0.0 at 3-1-02 00:32:04

 

11.打开sw2连接sw1的接口

sw2(config)#int f0/1

sw2(config-if)#no shut

 

12.sw1上查看vlan信息

sw1#show vlan-switch brief

 

VLAN Name                          Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/0, 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    VLAN0002                       active    

3    VLAN0003                       active   

4    VLAN0004                       active   

5    VLAN0005                       active  //sw1学习了sw2vlan信息   

1002 fddi-default                        active   

1003 token-ring-default                   active   

1004 fddinet-default                      active   

1005 trnet-default                        active 

 

13.sw1上查看VTP信息

 

sw1#show vtp status

VTP Version                     : 2

Configuration Revision           : 4  //sw1的修订号变成了4

Maximum VLANs supported locally : 256

Number of existing VLANs        : 9

VTP Operating Mode             : Server

VTP Domain Name                : cisco

VTP Pruning Mode                : Disabled

VTP V2 Mode                    : Disabled

VTP Traps Generation             : Disabled

MD5 digest                      : 0x2B 0x96 0xBB 0x47 0x66 0xB7 0x0D 0xA3

Configuration last modified by 0.0.0.0 at 3-1-02 00:32:04

Local updater ID is 0.0.0.0 (no valid interface found)

通过以上实验说明配置了VTP的交换机低修订号的交换机会去同步高修订号的交换机上的vlan信息,但前提是两个交换机配置了trunk链路。

 

 

你可能感兴趣的:(配置,职场,休闲,实验,VTP)