CCNA实验大全(6)

2019-04-04 22:38

sw2(config-line)#logging syn sw2(config-line)#exec-t 0

sw2(config-line)#interface fa0/0 sw2(config-if)#no shut

2、 在交换机1上的配置。

a. 新建两个vlan,vlan2和vlan4

sw1#vlan database (进入vlan配置模式) sw1(vlan)#vlan 2 name vlan2 VLAN 2 added: Name: vlan2

sw1(vlan)#vlan 4 name vlan4 VLAN 4 added: Name: vlan4

sw1(vlan)#exi (只能exit 才能退出) APPLY completed. Exiting....

b.配置VTP为server。 sw1#vlan database

sw1(vlan)#vtp server (配置VTP的模式) Device mode already VTP SERVER.

sw1(vlan)#vtp domain yu (配置vtp域名) Changing VTP domain name from NULL to yu

sw1(vlan)#vtp password 123 (配置vtp的密码) Setting device VLAN database password to 123. sw1(vlan)#exi APPLY completed. Exiting....

c.查看vlan信息。 sw1#sh vlan-switch

VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------

1 default active Fa0/0, 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 vlan2 active 4 vlan4 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-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 4 enet 100004 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 1003 1003 tr 101003 1500 1005 0 - - srb 1 1002 1004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0 d.在FA0/0口上配置为trunk模式,封装802.1q协议。 sw1(config)#interface fa0/0

sw1(config-if)#switchport mode trunk (trunk能传输多个vlan的信息) sw1(config-if)#switchport trunk encapsulation dot1q (封装802.1q) sw1(config-if)#end

3、 在交换机2上的配置。

a. 配置VTP为client模式。 sw2#vlan database

sw2(vlan)#vtp client (vtp客户端模式) Setting device to VTP CLIENT mode. sw2(vlan)#vtp domain yu

Changing VTP domain name from NULL to yu (域名和密码要一致) sw2(vlan)#vtp password 123

Setting device VLAN database password to 123. Exiting.... b..在FA0/0口上配置为trunk模式,封装802.1q协议。 Sw2(config)#interface fa0/0

Sw2(config-if)#switchport mode trunk

Sw2(config-if)#switchport trunk encapsulation dot1q Sw2(config-if)#end c.查看vlan信息。 Sw2#sh vlan-switch

VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------

1 default active Fa0/0, 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 vlan2 active (client端能检测到vlan信息) 4 vlan4 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-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 4 enet 100004 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 1003 1003 tr 101003 1500 1005 0 - - srb 1 1002 1004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0

十六、VTP的三种模式的配置。

F0/0

服务器 VLAN 2 3 4

FO/0

透明模式

客户模式

F0/1

F0./1

实验要求:在各自的交换机上配置自己的VTP模式,测试能否通过trunk进行

vlan的相互通信。

注:VTP透明模式支持传输,但是不能查看到server上的vlan信息。 实验步骤:

1、 基本信息的配置。 sw1(config)#hostname sw1 sw1(config)#no ip do loo sw1(config)#line con 0

sw1(config-line)#logging syn sw1(config-line)#exec-t 0

sw1(config-line)#interface fa0/0 sw1(config-if)#no shut

sw2(config)#hostname sw2

sw2(config)#no ip do loo sw2(config)#line con 0

sw2(config-line)#logging syn sw2(config-line)#exec-t 0

sw2(config-line)#interface fa0/0 sw2(config-if)#no shut

sw2(config-line)#interface fa0/1 sw2(config-if)#no shut

sw3(config)#hostname sw3 sw3(config)#no ip do loo sw3(config)#line con 0

sw3(config-line)#logging syn sw3(config-line)#exec-t 0

sw3(config-line)#interface fa0/0 sw3(config-if)#no shut 2、 在SW1上的配置。

a.新建三个vlan,vlan2、vlan3和vlan4 sw1#vlan database

sw1(vlan)#vlan 2 name vlan2 VLAN 2 added:

Name: vlan2

sw1(vlan)#vlan 3 name vlan3 VLAN 3 added: Name: vlan3

sw1(vlan)#vlan 4 name vlan4 VLAN 4 added: Name: vlan4 sw1(vlan)#exi APPLY completed. Exiting....

b.配置VTP为server。 sw1#vlan database sw1(vlan)#vtp server

Device mode already VTP SERVER. sw1(vlan)#vtp domain yu

Changing VTP domain name from NULL to yu sw1(vlan)#vtp password 123

Setting device VLAN database password to 123. sw1(vlan)#exi APPLY completed. Exiting....

c在FA0/0口上配置为trunk模式,封装802.1q协议。 sw1(config)#interface fa0/0

sw1(config-if)#switchport mode trunk

sw1(config-if)#switchport trunk encapsulation dot1q 3、 在SW2上的配置。 a 配置VTP为透明模式。

sw2(vlan)#vtp transparent (vtp透明模式) Setting device to VTP TRANSPARENT mode. sw2(vlan)#vtp domain yu

Changing VTP domain name from NULL to yu sw2(vlan)#vtp password 123

Setting device VLAN database password to 123. sw2(vlan)#exi APPLY completed. Exiting....

b 在fa0/0和f0/1配置模式为trunk并封装802.1q协议。 Sw2(config)#interface fa0/0

Sw2(config-if)#switchport mode trunk

Sw2(config-if)#switchport trunk encapsulation dot1q Sw2(config-if)#end

Sw2(config)#interface fa0/1

Sw2(config-if)#switchport mode trunk

Sw2(config-if)#switchport trunk encapsulation dot1q Sw2(config-if)#end c 查看vlan信息。 sw2#sh vlan-switch

(透明模式无法检测到server端的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 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 1002 1003 1002 fddi 101002 1500 - - - - - 1 1003 1003 tr 101003 1500 1005 0 - - srb 1 1002 1004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0 4、在SW3上的配置。


CCNA实验大全(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2013年第三届知网杯搜索竞赛试题 (1)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: