由于VLAN隔离了二层广播域,也间接的隔离了各个VLAN之间的其他二层流量交换,这样导致属于不同VLAN之间的用户不能进行二层的通信。只能经过三层的路由转发才能将报文从一个VLAN转发到另外一个VLAN。

单臂路由实验拓扑图
企业内部网络通常会通过划分不同的VLAN来隔离不同部门之间的二层通信,并保证各部门间的信息安全。但是由于业务需要,部分部门之间需要实现跨VLAN通信,网络管理员决定借助路由器,通过配置单臂路由实现R1与R3之间跨VLAN通信的需求。
[R1]display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
interface GigabitEthernet0/0/1
ip address 10.0.4.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.4.254
#
return[R2]display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 4
ip address 10.0.4.254 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/1.3
dot1q termination vid 8
ip address 10.0.8.254 255.255.255.0
arp broadcast enable
#
return [R3]display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/1
ip address 10.0.8.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.8.254
#
return[S1]display current-configuration
!Software Version V200R008C00SPC500
#
sysname S1
#
vlan batch 4 8
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 4 8
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 8
#
return上面被我直接导成配置文件了,给大家建议就是先自己做,不会的时候看下配置命令。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。