工匠


  • 首页

  • 分类

  • 归档

  • 标签

VLAN综合实验

发表于 2021-04-29 | 分类于 网络工程 , HCNA , 交换 , VLAN |

拓扑图

alt VLAN综合实验拓扑图

配置

接入层交换机S1配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sys
sys S1

vlan batch 10 20

int e0/0/1
port link-type access
port default vlan 10

int e0/0/2
port link-type access
port default vlan 20

int e0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20

汇聚层交换机S2配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
sys
sys S2

vlan batch 10 20 23

int g0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20

int g0/0/2
port link-type access
port default vlan 23

int vlanif23
ip add 23.0.0.2 24

int vlanif 10
ip add 192.168.10.1 24

int vlanif 20
ip add 192.168.20.1 24

ospf 1 router-id 2.2.2.2
area 0
net 192.168.10.1 0.0.0.255
net 192.168.20.1 0.0.0.255
net 23.0.0.2 0.0.0.0

核心层交换机S3配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sys
sys S3

vlan batch 13 23

int g0/0/1
port link-type access
port default vlan 23

int g0/0/2
port link-type access
port default vlan 13

int vlanif 23
ip add 23.0.0.1 24

int vlanif 13
ip add 13.0.0.2 24

ospf 1 router-id 3.3.3.3
area 0
net 13.0.0.2 0.0.0.0
net 23.0.0.1 0.0.0.0

出口路由R1配置

1
2
3
4
5
6
7
8
9
10
11
12
13
sys
sys R1

int g0/0/0
ip add 13.0.0.1 24

int loopback 1
ip add 1.1.1.1 32

ospf 1 router-id 1.1.1.1
area 0
net 13.0.0.1 0.0.0.0
net 1.1.1.1 0.0.0.0

解析

  1. 接入层交换机S1配置VLAN10、20并将接口设置成Access,上联汇聚层的接口配置Trunk并允许接入的VLAN通过
  2. 汇聚层交换S2与接入层交换S1连接的接口配置成Trunk并允许接入层的VLAN通过。汇聚层交换与核心层连接的接口设置成Access,并划分VLAN;添加OSPF路由
  3. 出口路由器R1与汇聚层交换机S3连接的接口配置成Access,并给该接口划分VLAN;添加OSPF路由

抓包

atl VLAN综合实验-抓包

测试

alt VLAN综合实验--测试

<i class="fa fa-angle-left"></i>1…717273…98<i class="fa fa-angle-right"></i>
吴超

吴超

98 日志
48 分类
59 标签
GitHub E-Mail
Links
  • 风的颜色
© 2015 - 2022 吴超
由 Hexo 强力驱动
主题 - NexT.Pisces