华为网络设备 通过路由器子接口 Dot1q终结子接口实现跨VLAN通信

(二层交换机直接跳过三层交换价接入路由器时才使用该配置。推荐使用三层交换机建立VLANIF配置更简洁明了。如果VLAN较少可直接配置;路由器接口,一个物理接口一个VLAN)

S1配置

复制代码
vlan batch 2 to 3

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3

interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 2

interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 3

R1配置

复制代码
interface GigabitEthernet0/0/0.2
 dot1q termination vid 2
 ip address 192.168.2.254 255.255.255.0 
 arp broadcast enable

interface GigabitEthernet0/0/0.3
 dot1q termination vid 3
 ip address 192.168.3.254 255.255.255.0 
 arp broadcast enable

PC2配置

PC3配置

整体架构图

相关推荐
小小菜鸡ing7 小时前
pymysql
java·服务器·数据库
Mr. Cao code8 小时前
Docker:颠覆传统虚拟化的轻量级革命
linux·运维·ubuntu·docker·容器
wanhengidc9 小时前
云手机运行流畅,秒开不卡顿
运维·网络·科技·游戏·智能手机
笨小孩@GF 知行合一9 小时前
OSPF实验:外部路由引入
运维·网络·hcip·数通·ospf
光锥智能9 小时前
小平板元年,华为MatePad Mini创出一片蓝海
华为·电脑
asdfg125896310 小时前
为什么要在出口路由器router配置NAT与默认路由
运维·网络·计算机网络
当归102410 小时前
SQL Server死锁排查实战指南
java·服务器·网络
bug攻城狮10 小时前
Skopeo 工具介绍与 CentOS 7 安装指南
linux·运维·centos
宇宙第一小趴菜10 小时前
08 修改自己的Centos的软件源
linux·运维·centos
qinyia10 小时前
用 Wisdom SSH 轻松实现服务器自动化任务调度
服务器·自动化·ssh