项目二 任务三 训练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

 

全网连通,完成。

相关内容

热门资讯

豆包手机重启限量发售!此前传被... 本文来源:时代周报 作者:何珊珊因AI接管功能迅速走红的豆包手机再次开放少量购买资格,此前它已接连深...
治不了阿尔兹海默还治不了你 今天看到复星医药准备花14亿把神药公司绿谷给买了,那乃悟作为绿谷的老朋友高低得来两句。绿谷现在最广为...
放弃控制权、索赔额大减36%!... 广州轻工工贸集团有限公司(下称“广州轻工集团”)放弃良品铺子了。12月16日,良品铺子发布公告称,广...
知名富翁疯狂代孕,吓坏美国法官... 近日,有媒体报道,一位中国亿万富翁在美国 “疯狂”代孕,吓得法官否了他的亲权申请。而这位富翁,正是多...
用12个问题,开启更有钱的20... 点击 “简七读财” ,发送消息“ 理财 ”小白轻松入门~晚上好,我是简七~上周我去了一趟普陀山,在...