项目二 任务三 训练2 交换机的VTP技术
创始人
2025-06-01 20:32:40

1、三层交换机配置

Switch>

Switch>en

Switch#conf t

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

Switch(config)#vtp domain wgj

Changing VTP domain name from NULL to wgj

Switch(config)#vtp mode server

Device mode already VTP SERVER.


Switch(config)#vlan 50

Switch(config-vlan)#vlan 60

Switch(config-vlan)#exit

Switch(config)#interface vlan 50

Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan50, changed state to up

Switch(config-if)#ip address 192.168.50.254 255.255.255.0

Switch(config-if)#interface vlan 60

Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan60, changed state to up

Switch(config-if)#ip address 192.168.60.254 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#


 使用ping命令检测,网关不通,什么原因?

 

 需设置二层交换机的trunk和vlan通过

 2、二层交换机50-2配置

Switch>en

Switch#conf t

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

Switch(config)#interface gigabitEthernet 0/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up


Switch(config-if)#exit

Switch(config)#vtp domain wgj

Domain name already set to wgj.

Switch(config)#vtp mode client

Setting device to VTP CLIENT mode.

Switch(config)#exit

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#show vlan

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, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22, Fa0/23, Fa0/24

Gig0/2

50 VLAN0050 active

60 VLAN0060 active

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

Switch#

使用ping命令测试,仍然不通,需要配置三层交换机vlan 通过,二层交换机vlan通过,pc网关设置

4、三层交换机配置

Switch(config)#interface range gigabitEthernet 0/1-2

Switch(config-if-range)#switchport trunk allowed vlan all

5、二层交换机配置

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport access vlan 50

Switch(config)#interface fastEthernet 0/2

Switch(config-if)#switchport access vlan 60

Switch(config-if)#end

Switch#

%SYS-5-CONFIG_I: Configured from console by console

6、PC机IP地址设置

 

 7、同样的方法设置其余3台PC和50-3二层交换机

Switch>

Switch>en

Switch#conf t

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

Switch(config)#vtp domain wgj

Changing VTP domain name from NULL to wgj

Switch(config)#vtp mode client

Setting device to VTP CLIENT mode.


 

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

Switch(config)#interface gigabitEthernet 0/2

Switch(config-if)#switchport trunk allowed vlan all

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport access vlan 50

Switch(config-if)#interface fastEthernet 0/2

Switch(config-if)#switchport access vlan 60

Switch(config-if)#

使用ping命令检测,发现相同网段的连通,不同网段的不通,需开启三层交换机的路由。

 

 8、开启三层交换机路由

Switch(config)#ip routing

 

全网连通,完成。

相关内容

热门资讯

玩家必备攻略“决战十三水怎么装... 您好:决战十三水这款游戏可以开挂,确实是有挂的,需要软件加微信【8984612】,很多玩家在决战十三...
{重大来袭}“非凡贪玩.怎么装... 您好:非凡贪玩这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款游戏...
重大通报“乐山游戏中心可不可以... 您好:乐山游戏中心这款游戏可以开挂,确实是有挂的,需要了解加客服微信【5951795】很多玩家在乐山...
今日重大通报“美猴王斗牛其实的... 您好:美猴王斗牛这款游戏可以开挂,确实是有挂的,需要软件加微信【5951795】,很多玩家在美猴王斗...
重大发现“闽游麻将.到底是不是... 您好:闽游麻将这款游戏可以开挂,确实是有挂的,需要了解加客服微信【8435338】很多玩家在这款游戏...