(安全防御)旁挂组网双机热备负载分担实验

实验拓扑:

需求:

1 、 SW3 的流量
正常情况下: SW1_VRF-->FW1--->SW1_Public--->R5
故障情况下: SW2_VRF-->FW2--->SW2_Public--->R6
2 、 SW4 的流量
正常情况下: SW2_VRF-->FW2--->SW2_Public--->R6
故障情况下: SW1_VRF-->FW1--->SW1_Public--->R5

实验步骤:

1.二层交换配置:

MSTP设计

实例 1 : VLAN 2
实例 2 : VLAN 3
SW3 是实例 1 的主根,实例 2 的备份根; SW4 是实例 2 的主根,实例 1 的备份根

vlan接口配置

地址规划:
SW3 :
VLAN 2:192.168.2.1/24
VLAN 3:192.168.3.1/24
修改优先级

抢占延迟修改
SW4 :
VLAN 2:192.168.2.2/24
VLAN 3:192.168.3.2/24
与sw3按要求配置相同
sw5 配置清楚对下面pc的vlan通过以及上面交换机的trunk

配置生成树 激活预配置

检查

虚拟 IP :
VLAN 2:192.168.2.254/24
VLAN 3:192.168.3.254/24
完成配置跨网段测试连接 pc2 ping pc1

2.汇聚到核心层路由配置

vlan划分

SW1-SW2 : VLAN 102---10.10.2.0/24
SW1-SW3 : VLAN 103---10.10.3.0/24
SW1-SW4 : VLAN 104---10.10.4.0/24
SW2-SW3 : VLAN 203---10.20.3.0/24
SW2-SW4 : VLAN 204---10.20.4.0/24

sw3配置ospf


sw4同样配置同sw3
sw3 sw4之间本身就存有下方vlan信息 避免通过trunk建立邻居关系 设置静默接口 沉默掉VLAN2和vlan3的转发

设置VRF空间


接口划入VRF中

3、防火墙和VRF配置

LSW1
复制代码
[SW1]vlan batch 401 402
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk     
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 401 402
[SW1]interface GigabitEthernet 0/0/4
[SW1-GigabitEthernet0/0/4]port link-type trunk 
[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan 401 402

[SW1]interface Vlanif 401
[SW1-Vlanif401]ip binding vpn-instance VRF
[SW1-Vlanif401]ip address 10.40.1.1 24
[SW1-Vlanif401]vrrp vrid 1 virtual-ip 10.40.1.100
[SW1-Vlanif401]vrrp vrid 1 priority 120
[SW1-Vlanif401]vrrp vrid 1 preempt-mode timer delay 60
[SW1-Vlanif401]vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 30

[SW1]interface Vlanif 402
[SW1-Vlanif402]ip binding vpn-instance VRF
[SW1-Vlanif402]ip address 10.40.2.1 24
[SW1-Vlanif402]vrrp vrid 2 virtual-ip 10.40.2.100
LSW2
复制代码
[SW2]vlan batch 401 402
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3]port link-type trunk 
[SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan 401 402
[SW2]interface GigabitEthernet 0/0/4
[SW2-GigabitEthernet0/0/4]port link-type trunk 
[SW2-GigabitEthernet0/0/4]port trunk allow-pass vlan 401 402

[SW2]interface Vlanif 401
[SW2-Vlanif401]ip binding vpn-instance VRF
[SW2-Vlanif401]ip address 10.40.1.2 24
[SW2-Vlanif401]vrrp vrid 1 virtual-ip 10.40.1.100

[SW2]interface Vlanif 402
[SW2-Vlanif402]ip binding vpn-instance VRF
[SW2-Vlanif402]ip address 10.40.2.2 24
[SW2-Vlanif402]vrrp vrid 2 virtual-ip 10.40.2.100
[SW2-Vlanif402]vrrp vrid 2 priority 120
[SW2-Vlanif402]vrrp vrid 2 preempt-mode timer delay 60
[SW2-Vlanif402]vrrp vrid 2 track interface GigabitEthernet 0/0/3 reduced 30
相关推荐
小小小米粒2 小时前
NAT 模式, 仅主机模式 Host-Only ,桥接模式 Bridge
linux·服务器·网络
梦白.4 小时前
Python的容器类型
运维·python
头疼的程序员6 小时前
计算机网络:自顶向下方法(第七版)第三章 学习分享(二)
网络·学习·计算机网络
Blurpath住宅代理6 小时前
代理协议深度解析:HTTP与SOCKS5如何科学选型?
网络·静态ip·动态代理·住宅代理
tuotali20266 小时前
天然气压缩机技术2026,高可靠性长周期运行与智能运维融合路径
运维·python
姚不倒6 小时前
三节点 TiDB 集群部署与负载均衡搭建实战
运维·数据库·分布式·负载均衡·tidb
gpio_016 小时前
自建gitlab服务器并用sakurafrp穿透
运维·服务器·gitlab
小二·7 小时前
Go 语言系统编程与云原生开发实战(第38篇)
网络·云原生·golang
k7Cx7e7 小时前
Debian执行ssh root@localhost 提示认证失败
运维·debian·ssh
闻道且行之7 小时前
Nginx 安装、做成服务及 HTTPS 配置全流程
linux·运维·nginx·https