利用MSTP+VRRP+HRP+IP-LINK实现双机热备

华为防火墙、核心双机热备实例
1.1 项目实训目的

  1. 实现两个运营商专线接入,分别接入到FW1、FW2实现主备
  2. 实现防火墙实现双机热备。
  3. 实现核心交换机双机热备。
  4. 掌握MSTP(二层)、VRRP、HRP、IP-LINK等运用。
    1.2 项目实训拓扑图
    利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第1张图片

1.3 项目实训设备
设备清单:
云彩1:用于物理连接防火墙web
路由器1:模拟运营商设备
二层交换机4台:用于运营商接入分线和接入层
USG防火墙2:用于出口接入运营商
三层交换机2:用于核心交换
PC 2:模拟用户
1.4 项目实训要求
1.Vlan规划
VLAN10用户PC2
VLAN20用户PC1
VLAN100 LSW1与FW1连接
VLAN200 LSW2与FW2连接
2.IP地址规划
vlan 10:192.168.10.0 /24
vlan 20:192.168.20.0 /24
vlan 100:172.16.100.0 /24
vlan 200:172.16.200.0/24
FW心跳:172.16.1.0/24
外网dx:1.1.1.0/24
外网lt: 2.2.2.0/24
模拟外网网站:9.9.9.9
3. 每台防火墙都有两个出口,主线路故障时自动切换到备份线路,当FW1宕机时候所有流量走到FW2,实现双机热备。
4. LSW1与LSW2配置VRRP网关冗余,任何一台宕机时自动切换。
5. 核心下面所有交换机配置MSTP。
1.5 项目实训步骤及主要配置
1.5.1交换机配置:
1.交换机基础配置配(不做详细解释)
LSW1:
vlan batch 10 20 100 200
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
interface Vlanif100
ip address 172.16.100.1 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp-static
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/4
eth-trunk 1
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/6
eth-trunk 1
ospf 1
area 0.0.0.0
network 172.16.100.0 0.0.0.255
network 192.168.10.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 172.16.100.2
LSW2:
vlan batch 10 20 100 200
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
vrrp vrid 2 track interface Eth-Trunk1
interface Vlanif200
ip address 172.16.200.1 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp-static
interface GigabitEthernet0/0/1
port link-type access
port default vlan 200
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/3
eth-trunk 1
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/5
eth-trunk 1
ospf 1
area 0.0.0.0
network 172.16.200.0 0.0.0.255
network 192.168.20.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 172.16.200.2
LSW3:
vlan batch 10 20 100 200
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/3
port link-type access
port default vlan 10
LSW4:
vlan batch 10 20 100 200
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/3
port link-type access
port default vlan 20

6.配置交换机MSTP
要求:实现VLAN10主LSW1备LSW2,VLAN20主LSW2备LSW1
注意:每台设备需要修改生成树模式为MSTP
LSW1:
stp region-configuration //进入STP区域配置
region-name mstp1 //创建区域名mstp1
instance 1 vlan 10 //实例1 成员vlan10 可以多个vlan
instance 2 vlan 20 //实例2 成员vlan20 可以多个vlan
active region-configuration //激活实例
stp instance 1 root primary //在SW1设置实例1 根交换机
stp instance 2 root secondary //在SW1设置实例2 备份根交换机
LSW2:
stp instance 1 root secondary
stp instance 2 root primary
stp region-configuration
region-name mstp1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
LSW3:
stp region-configuration
region-name mstp1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
LSW4:
stp region-configuration
region-name mstp1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
4配置网关VRRP
要求:实现VLAN10主LSW1备LSW2,VLAN20主LSW2备LSW1
LSW1:
interface Vlanif10
ip address 192.168.10.253 255.255.255.0 //设置vlanip
vrrp vrid 1 virtual-ip 192.168.10.254 //设置vrrp 虚拟ip
vrrp vrid 1 priority 110 //vrrp优先级110 越大越优先
vrrp vrid 1 track interface GigabitEthernet0/0/2 reduced 90 //跟踪G0/0/2口 如果dow掉则降低优先级为90
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.254
LSW2:
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.254
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.254
vrrp vrid 2 priority 110
vrrp vrid 2 track interface GigabitEthernet0/0/1 reduced 90
1.5.2防火墙配置:
1.防火墙基础配置配(WEB)
FW1:
1.端口配置:并划分Trust、untrust
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第2张图片
2.创建两条IP-LINK用于默认路由追踪
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第3张图片
3.创建静态路由,创建两条默认路由并绑定IP-link
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第4张图片
4.创建访问外网安全策略,允许所有
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第5张图片
5.创建两条NAT策略
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第6张图片利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第7张图片

6.开启双机热备,指定心跳接口和对端地址。
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第8张图片
FW2:
1.接口配置
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第9张图片
2.创建两条IP-LINK用于默认路由探测
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第10张图片
3.创建静态路由,创建两条默认路由并绑定IP-link
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第11张图片
4.创建访问外网安全策略,允许所有
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第12张图片
5.创建两条NAT策略
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第13张图片
6.开启双机热备,指定心跳接口和对端地址。
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第14张图片
防火墙配置完成。

1.6 验证测试
1.测试PC2主线路ping 9.9.9.9 在FW1 G1/0/3口抓包查看,数据走主线路,正常。
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第15张图片利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第16张图片
2.继续ping 9.9.9.9关闭FW1 G1/0/3口 ,在FW1 G1/0/2抓包查看,数据走备线路,正常
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第17张图片利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第18张图片
3.模拟FW1宕机,继续ping 9.9.9.9查看连接正常,丢包1个,查看FW2运行状态已切换到主用。
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第19张图片
利用MSTP+VRRP+HRP+IP-LINK实现双机热备_第20张图片
以上所有配置完成。
总结:能实现双机热备的方式很多,设计时根据实际场景情况进行规划。
拓展知识:IP-LINK、BFD、NQA、SLA有什么区别呢?

你可能感兴趣的:(网络实例,笔记,网络,wireshark,网络协议,网络安全)