vtp协议服务器配置,配置交换机VTP协议

本文介绍了如何通过三个交换机A、B和C配置VTP(Virtual Trunk Protocol),包括配置trunk链路、VLAN数据库、VTP域名、模式和口令,展示了VTP在不同模式下(服务器、透明和客户端)的学习行为,以及VTP版本2的使用。
摘要由CSDN通过智能技术生成

SA

sA>enable

sA#config terminal

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

sA(config)#interface f0/0

sA(config-if)#switchport mode trunk                   //启用trunk链路

*Mar  1 00:15:52.435: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk

sA(config-if)#end

*Mar  1 00:17:08.131: %SYS-5-CONFIG_I: Configured from console by console

sA#vlan database                                               //进入VLAN数据库

sA(vlan)#vlan 2 name vlan2                                //创建vlan

VLAN 2 added:

Name: vlan2

sA(vlan)#vlan 3 name vlan3

VLAN 3 added:

Name: vlan3

sA(config)#vtp domain benet                            //配置VTP域名

Changing VTP domain name from NULL to benet

sA(config)#vtp mode server                             //配置交换机的VTP模式

*Mar  1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console

Device mode already VTP SERVER.

sA(config)#vtp password cisco                          //配置VTP口令

Setting device VLAN database password to cisco.

sA(config)#vtp pruning                                      //配置VTP修剪

Pruning switched ON

sA(vlan)#vtp version 2                                       //默认情况下使用版本1,如果使用版本2需要使用如下命令

V2 mode enabled.

sA(config)#interface vlan 1                                 //进入VLAN 1

sA(config-if)#ip address 192.168.1.1 255.255.255.0     //配置管理IP 地址

sA(config-if)#no shutdown

sA(config-if)#exit

sA(config)#exit

*Mar  1 00:09:22.967: %SYS-5-CONFIG_I: Configured from console by console

sA#show vtp status                                               //查看VTP配置信息

VTP Version                                    : 2                 //显示设备支持扳本2

Configuration Revision                      : 2                //目前的配置修改编号

Maximum VLANs supported locally : 256            //支持的最大的VLAN数是256个

Number of existing VLANs               : 5               //已经存在的VLAN 数

VTP Operating Mode                       : Server       //VTP模式为服务器模式

VTP Domain Name                          : benet         //VTP域名

VTP Pruning Mode                          : Enabled     //VTP修剪已经启用

VTP V2 Mode                                : Enabled      //启用了VTP版本2

VTP Traps Generation                     : Disabled

MD5 digest                                      : 0x5C 0xFD 0x08 0x82 0x3E 0x7C 0xAE 0x1B  //MD5值

Configuration last modified by 0.0.0.0 at 3-1-02 00:08:13           //VTP更新者的IP及时间

Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)

SB

sB>enable

sB#config terminal

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

sB(config)#interface f0/0

sB(config-if)#switchport mode trunk

*Mar  1 00:18:52.435: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk

sB(config-if)exit

sB(config)#interface f0/1

sB(config-if)#switchport mode trunk

*Mar  1 00:19:21.435: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk

sB(config-if)#end

*Mar  1 00:20:08.131: %SYS-5-CONFIG_I: Configured from console by console

sB#vlan database

sB(vlan)#vlan 4 name vlan4

VLAN 2 added:

Name: vlan4

sB(vlan)#vlan 5 name vlan5

VLAN 3 added:

Name: vlan5

sB(config)#vtp domain benet

Changing VTP domain name from NULL to benet

sB(config)#vtp mode transparent

*Mar  1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console

Device mode already VTP transparent.

sB(config)#vtp password cisco

Setting device VLAN database password to cisco.

sB(config)#vtp pruning

Pruning switched ON

sB(vlan)#vtp version 2

V2 mode enabled.

sB(config-if)#exit

sB(config)#exit

sB#show vtp status

VTP Version                                    : 2

Configuration Revision                      : 0

Maximum VLANs supported locally : 256

Number of existing VLANs              : 5

VTP Operating Mode                      : Transparent

VTP Domain Name                         : benet

VTP Pruning Mode                          : Enabled

VTP V2 Mode                                : Enabled

VTP Traps Generation                     : Disabled

MD5 digest                                      : 0xAE 0x60 0xEF 0xB9 0x4E 0x18 0x4F 0x15

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

SC

sC>enable

sC#config terminal

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

sC(config)#interface f0/1

sC(config-if)#switchport mode trunk

*Mar  1 00:35:02.435: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk

sC(config-if)#end

*Mar  1 00:17:08.131: %SYS-5-CONFIG_I: Configured from console by console

sC(config)#vtp domain benet

Changing VTP domain name from NULL to benet

sC(config)#vtp mode client

*Mar  1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console

Device mode already VTP client.

sC(config)#vtp password cisco

Setting device VLAN database password to cisco.

sC(config)#vtp pruning

Pruning switched ON

sC(vlan)#vtp version 2

V2 mode enabled.

sC(config-if)#end

*Mar  1 00:09:22.967: %SYS-5-CONFIG_I: Configured from console by console

sC#show vtp status

VTP Version                                    : 2

Configuration Revision                      : 3

Maximum VLANs supported locally : 256

Number of existing VLANs              : 7

VTP Operating Mode                      : Client

VTP Domain Name                         : benet

VTP Pruning Mode                          : Enabled

VTP V2 Mode                                : Enabled

VTP Traps Generation                     : Disabled

MD5 digest                                     : 0x05 0x7F 0xB9 0xE6 0x48 0xD1 0xD6 0x6B

Configuration last modified by 192.168.1.1 at 3-1-02 00:19:46

交换机A查看VLAN信息,看是否学习到了交换B的VLAN信息

交换机B上配置透明模式,验证是否能学到交换机A的VLAN信息,同时在本地建立VLAN4和VLAN5,

交换机C查看本地学习到的是哪个交换机发出的VLAN信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值