侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Cisco Packet Tracert 之 三层交换机VLAN配置

2022-06-19 星期日 / 0 评论 / 0 点赞 / 91 阅读 / 2900 字

实验环境:实验目的:1、在三层交换机划分三个VLAN,分别是VLAN2/VNAL3/VLAN4,并且设置VLAN IP 分别为:192.168.2.1、192.168.3.1、192.168.4.1。

.

实验环境:

实验目的:

1、在三层交换机划分三个VLAN,分别是VLAN2/VNAL3/VLAN4,并且设置VLAN IP 分别为:192.168.2.1、192.168.3.1、192.168.4.1。

2、把fa0/1口设置为trunk口,fa0/4加入VLAN4。

3、启用路由功能,实现各VLAN之间互通。

4、设置二层交换机,把fa0/1口设置为trunk ,并把fa0/2加入VLAN2,fa0/3加入VLAN3.

5、测试各VLAN是否相通。

实验步骤:

1、在三层交换机划分三个VLAN,分别是VLAN2/VNAL3/VLAN4,并且设置VLAN IP 分别为:192.168.2.1、192.168.3.1、192.168.4.1。

Switch>enable

Switch#conf t

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

Switch(config)#hostname CoreSW

CoreSW(config)#vlan 2

CoreSW(config-vlan)#exit

CoreSW(config)#vlan 3

CoreSW(config-vlan)#vlan 4

CoreSW(config-vlan)#

 CoreSW(config)#int vlan 2

CoreSW(config-if)#

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

CoreSW(config-if)#ip add 192.168.2.1 255.255.255.0

CoreSW(config-if)#no shutdown

CoreSW(config-if)#exit

CoreSW(config)#int vlan 3

CoreSW(config-if)#

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

CoreSW(config-if)#ip add 192.168.3.1 255.255.255.0

CoreSW(config-if)#no shutdown

CoreSW(config-if)#exit

CoreSW(config)#int vlan 4

CoreSW(config-if)#exit

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

CoreSW(config-if)#ip add 192.168.4.1 255.255.255.0

CoreSW(config-if)#no shutdown

2、把fa0/1口设置为trunk口,fa0/4加入VLAN4。

CoreSW(config)#int fa0/1

CoreSW(config-if)#switchport trunk encapsulation dot1q 

CoreSW(config-if)#switchport mode trunk

CoreSW(config)#int fa0/4

CoreSW(config-if)#switchport mode access

CoreSW(config-if)#switchport access vlan 4

3、启用路由功能,实现各VLAN之间互通。

CoreSW#conf t

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

CoreSW(config)#ip routing

4、设置二层交换机划分VLAN2/VLAN3,把fa0/1口设置为trunk ,并把fa0/2加入VLAN2,fa0/3加入VLAN3。

Switch>enable

Switch#conf t

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

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#exit

Switch(config)#

Switch(config)#int fa0/1

Switch(config-if)#switchport mode trunk

5、测试各VLAN是否相通。

 


.

广告 广告

评论区