码迷,mamicode.com
首页 > 其他好文 > 详细

思科VTP域统一管理VLAN

时间:2017-10-23 18:02:40      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:dy

技术分享

VTP统一管理VLAN,跨交换机同一VLAN通信

配置SW1

SW1#

SW1#vlan database 

SW1(vlan)#vtp domain benet  //VTP域名

Changing VTP domain name from NULL to benet

SW1(vlan)#vtp server      //VTP服务模式

Device mode already VTP SERVER.

SW1(vlan)#vtp password dayong  //VTP密码

Setting device VLAN database password to dayong.

SW1(vlan)#vlan 2   

VLAN 2 added:

    Name: VLAN0002

SW1(vlan)#exit

APPLY completed.

Exiting....

SW1#conf t 

Enter configuration commands, one per line.  End with CNTL/Z.

SW1(config)#int f0/0

SW1(config-if)#switchport mode trunk 

SW1(config-if)#no sh

SW1(config-if)#int f0/1

SW1(config-if)#switchport access vlan 2

SW1(config-if)#no sh

SW1(config-if)#exit

SW1(config-if)#ip add 10.10.10.10 255.255.255.0

SW1(config-if)#no sh

SW1(config)#do sh vlan-s br


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

1002 fddi-default                         active    

1003 token-ring-default                     active    

1004 fddinet-default                       active    

1005 trnet-default                        active    

SW1(config-if)#do sh ip int 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    

Ethernet1/0              unassigned      YES unset  administratively down down    

Ethernet1/1              unassigned      YES unset  administratively down down    

Ethernet1/2              unassigned      YES unset  administratively down down    

Ethernet1/3              unassigned      YES unset  administratively down down    

Vlan1                  unassigned      YES unset  up                    up      

Vlan2                  10.10.10.10      YES manual up                    up      

SW1(config-if)#do sh vtp st      显示vtp状态信息

VTP Version                     : 2

Configuration Revision              : 1

Maximum VLANs supported locally        : 256

Number of existing VLANs             : 6

VTP Operating Mode                 : Server

VTP Domain Name                   : benet

VTP Pruning Mode                  : Disabled

VTP V2 Mode                      : Disabled

VTP Traps Generation                : Disabled

MD5 digest                      : 0x02 0x1E 0x53 0xC7 0x7D 0x02 0xC0 0xD4 

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

配置SW2

SW2#

SW2#vlan database

SW2(vlan)#vtp domain benet

Changing VTP domain name from NULL to benet

SW2(vlan)#vtp client             //VTP客户模式

Setting device to VTP CLIENT mode.

SW2(vlan)#vtp password dayong

Setting device VLAN database password to dayong.

SW2(vlan)#vlan 2

VLAN 2 added:

    Name: VLAN0002

SW2(vlan)#exit 

In CLIENT state, no apply attempted.

Exiting....

SW2#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

SW2(config)#int f0/0

SW2(config-if)#switchport mode trunk 

SW2(config-if)#no sh 

SW2(config-if)#int f0/1

SW2(config-if)#switchport access vlan 2

SW2(config-if)#no sh

SW2#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

SW2(config)#int vlan 2

SW2(config-if)#ip add 10.10.10.10 255.255.255.0

SW2(config-if)#no sh 

SW2#sh vlan-s br          //显示vlan摘要信息


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

1002 fddi-default                        active    

1003 token-ring-default                    active    

1004 fddinet-default                      active    

1005 trnet-default                        active    

SW2(config-if)#do sh ip int 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    

Ethernet1/0              unassigned      YES unset  administratively down down    

Ethernet1/1              unassigned      YES unset  administratively down down    

Vlan2                  10.10.10.10      YES manual up              up  

SW2#sh vtp s

VTP Version                   : 2

Configuration Revision            : 1

Maximum VLANs supported locally      : 256

Number of existing VLANs           : 6

VTP Operating Mode               : Client

VTP Domain Name                 : benet

VTP Pruning Mode                : Disabled

VTP V2 Mode                    : Disabled

VTP Traps Generation              : Disabled

MD5 digest                      : 0x02 0x1E 0x53 0xC7 0x7D 0x02 0xC0 0xD4 

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

技术分享



本文出自 “DY” 博客,请务必保留此出处http://guochenyong.blog.51cto.com/11367898/1975232

思科VTP域统一管理VLAN

标签:dy

原文地址:http://guochenyong.blog.51cto.com/11367898/1975232

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!