华三单臂路由+VRF配置实验

一、网络拓扑分析

1. 设备与接口信息

  • MSR36-20_3
  • GE_0/0:192.168.60.254/24(连接pc_8)ip:192.168.60.1/24
  • GE_0/1:192.168.40.2/24(路由器 MSR36-20_2)ip:192.168.40.1/24
  • 路由器 MSR36-20_2
    • GE_0/0:192.168.30.2/24( MSR36-20_1)ip:192.168.30.1/24
    • GE_0/1:192.168.50.254/24(连接pc_7)ip:192.168.50.1/24
  • 路由器 MSR36-20_1
    • GE_0/1:192.168.40.1/24(与 MSR36-20_3 的 GE_0/1 相连ip:1923168.40.2/24)
    • GE_0/0 :192.168.30.1/24( MSR36-20_1)ip:192.168.30.2/24
    • GE_0/2 :创建单臂路由子接口:interface GigabitEthernet0/2.1和interface GigabitEthernet0/2.2
#
interface GigabitEthernet0/2.1
 ip binding vpn-instance test1
 ip address 192.168.10.254 255.255.255.0
 vlan-type dot1q vid 10
#
interface GigabitEthernet0/2.2
 ip binding vpn-instance test2
 ip address 192.168.20.254 255.255.255.0
 vlan-type dot1q vid 20
#
  • 交换机 S5820V2:54QS-GE-4
    • GE_0/2:Trunk 模式,允许 VLAN10、20 流量,连接上行 MSR36-20_1 的 GE_0/2
#
interface GigabitEthernet1/0/2
 port link-mode bridge
 port link-type trunk
 port trunk permit vlan 1 10 20
 combo enable fiber
#
  • GE_0/3:连接 PC_5 Vlan10:192.168.10.1/24
  • GE_0/4:连接 PC_6 Vlan20: 192.168.20.1/24
  • PC_5
    • IP:192.168.10.1/24(属于 VLAN10)
    • 网关:192.168.10.254
  • PC_6
    • IP:192.168.20.1/24(属于 VLAN20)
    • 网关:192.168.20.254

二、交换机S5820V2:54QS-GE-4配置

system-view
sysname SW1

# 创建VLAN
vlan 10
vlan 20

# 配置接入端口
interface GigabitEthernet 1/0/3
 port link-type access
 port access vlan 10
 description Connect-to-PC1-VLAN10

interface GigabitEthernet 1/0/4
 port link-type access
 port access vlan 20
 description Connect-to-PC2-VLAN20

# 配置连接路由器的Trunk端口
interface GigabitEthernet 1/0/2
 port link-type trunk
 port trunk permit vlan 1 10 20
 description Connect-to-Router1-GE0/2

# 保存配置
save

三、路由器MSR36-20_1配置

  • 分别创建ip vpn-instance实例如下:
#
ip vpn-instance test1
#
ip vpn-instance test2
#
  • 配置单臂路由子接口,并分别绑定ip vpn-instance实例
system-view
sysname Router1

# 创建子接口并封装802.1Q,分别绑定ip binding vpn-instance test1,
ip binding vpn-instance test2

#
interface GigabitEthernet0/2.1
 ip binding vpn-instance test1
 ip address 192.168.10.254 255.255.255.0
 vlan-type dot1q vid 10
#
interface GigabitEthernet0/2.2
 ip binding vpn-instance test2
 ip address 192.168.20.254 255.255.255.0
 vlan-type dot1q vid 20
#

# 启用主接口(无需配置IP)
interface GigabitEthernet 0/2
 description Trunk-link-to-SW1
 undo shutdown

# 保存配置
save
  • 创建静态路由如下:
#
 ip route-static 192.168.50.0 24 192.168.30.2
 ip route-static 192.168.60.0 24 192.168.40.2
 ip route-static vpn-instance test1 192.168.50.0 24 192.168.30.2
 ip route-static vpn-instance test2 192.168.60.0 24 192.168.40.2
#

四、路由器 MSR36-20_2配置

  • 配置回程路由
#
 ip route-static 192.168.10.0 24 192.168.30.1
 ip route-static 192.168.20.0 24 192.168.30.1
#

五、路由器 MSR36-20_3配置

  • 配置回程路由
#
 ip route-static 192.168.10.0 24 192.168.40.1
 ip route-static 192.168.20.0 24 192.168.40.1
#

六,验证测试

实验目的通过VRF分割红蓝区域
  • PC_5可以Ping通PC_7,PC_5可以Ping不通PC_8
  • PC_6可以Ping通PC_8,PC_6可以Ping不通PC_7

华三单臂路由组网配置:https://www.hao0564.com/5813.html

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注