单臂路由概述及三层交换

本文详细介绍了单臂路由在不同VLAN间通信中的原理、缺陷,涉及交换机配置,如access和trunk链路,以及三层交换的概念。通过实验操作展示了如何使用单臂路由和三层交换机配置实现VLAN间的通信,包括IP路由和子接口设置。

目录

-链路类型

-子接口

单臂路由实现不同VLAN间通信的原理

单臂路由的缺陷

vlan之间的通讯

实验操作

单臂路由​编辑

三层交换

三层交换机原理​编辑

综合操作实验​编辑


-链路类型

交换机连接主机的端口为access链路

交换机连接路由器的端口为Trunk链路

-子接口

路由器的物理接口可以被划分成多个逻辑接口

每个子接口对应一个VLAN网段的网关

单臂路由实现不同VLAN间通信的原理

路由器重新封装MAC地址,转换VLAN标签

单臂路由的缺陷

-“单臂”为网络骨干链路,容易形成网络瓶颈

-子接口依然依托于物理接口,应用不灵活

-VLAN间转发需要查看路由表,严重浪费设备资源

vlan之间的通讯

vlan虚拟局域网,分隔广播域 解决广播风暴(泛洪)

vlan之间无法直接通信,三层交换,单臂路由来实现vlan之间的通信

实验操作

单臂路由

交换机

sys

vlan batch 10 20 30

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 access

port default vlan 30

int e0/0/4

port link-type trunk

port trunk allow-pass vlan all

路由器 : sys

int g0/0/0.10

dotlg termination vid 10

ip address 192.168.1.254 24

arp broadcast enable

int g0/0/0.20

dotlg termination vid 20

ip address 192.168.2.254 24

arp broadcast enable

int g0/0/0. 30

dotlg termination vid 30

ip address 192.168.3.254 24

arp broadcast enable

三层交换

二层交换

sys

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 access

port default vlan 30

int e0/0/4

port link-type trunk

port trunk allow-pass vlan all

三层交换

vlan batch 10 20 30

int e0/0/1

port link-type trunk

port trunk allow-pass vlan all

nt Vlanif10 ip address 192.168.1.254 24

int Vlanif20 ip address 192.168.2.254 24

int Vlanif30 ip address 192.168.3.254 24

三层交换机原理

综合操作实验

sw1

vlan batch 10 20 30

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 access

port default vlan 30

int g0/0/1 port link-type trunk

port trunk allow-pass vlan 2 to 4094

sw2

vlan batch 10 20 30 100

int g0/0/1 port link-type trunk

port trunk allow-pass vlan 2 to 4094

int g0/0/2 port link-type access

port default vlan 100

int Vlanif10 ip address 192.168.1.254 255.255.255.0

int Vlanif20 ip address 192.168.2.254 255.255.255.0

int Vlanif30 ip address 192.168.3.254 255.255.255.0

int Vlanif100 ip address 192.168.4.1 255.255.255.0

ip route-static 192.168.5.0 255.255.255.0 192.168.4.2

R1

int g0/0/0 ip address 192.168.4.2 255.255.255.0

int g0/0/1 ip address 192.168.5.254 255.255.255.0

int g0/0/2

ip route-static 0.0.0.0 0.0.0.0 192.168.4.1

最后PC1,PC2,PC3均可ping通PC4

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值