Configuración de Alta Disponibilidad con Firewall Huawei, VRRP y MSTP en Red Empresarial

Implementación de alta disponibilidad para el acceso a Internet desde la red enterna utilizando VRRP y redundancia de firewalls.

Arquitectura de Topología

Se despliegan dos switches de núcleo con VRRP para conmutación por error, configurados como primario y secundario. Dos firewalls operan en modo de alta disponibilidad (HA) también mediante VRRP.

Objetivos de Configuración

  1. Tras la configuración, los switches SW_A, SW_B y SW_C habilitan MSTP. SW_A actúa como puente raíz y SW_B como puente raíz de respaldo. El puerto g0/0/22 de SW_C queda bloqueado. El firewall FW_Principal es el dispositivo activo y FW_Respaldo está en espera. El tráfico de los usuarios internos sigue la ruta: SW_C → SW_A → FW_Principal → Internet.
  2. Los firewalls se interconectan a través del puerto Ge1/0/2, desingado como enlace HA, que transporta los latidos (heartbeats) VRRP entre ellos. (En routers o switches que usan VRRP, este enlace de latido no es necesario).
  3. Si se interrumpe cualquier enlace entre SW_A, SW_B y SW_C, el servicio no se verá afectado.
  4. Si falla el enlace entre FW_Principal y SW_A, el firewall FW_Respaldo asume el rol maestro. Las IP virtuales de los grupos VRRP 3 y 4 se transfieren a FW_Respaldo. En este escenario, el tráfico se redirige a: SW_C → SW_A → FW_Respaldo → Internet.

Consideraciones Importantes

  • El enlace de latido puede implementarse con múltiples puertos agregados (Link Aggregation). En esta configuración se utiliza un único enlace.
  • SW_A está conifgurado como raíz primaria y SW_B como raíz secundaria en MSTP, lo que provoca que el puerto g0/0/22 de SW_C se bloquee.
  • Si los firewalls se conectan a un router de proveedor de servicios, es necesario configurar una ruta estática por defecto: ip route-static 0.0.0.0 0 Dirección_IP_Proveedor. En este laboratorio, la conexión es a un switch y la puerta de enlace del cliente PC2 reside en el firewall, por lo que no se requiere dicha ruta. El switch SW_D en este escenario es un switch no gestionable.

Configuración de Dispositivos

Firewall FW_Principal


HRP_M[FW_Principal]display current-configuration
!Software Version V500R005C10SPC300
#
sysname FW_Principal
#
 hrp enable
 hrp interface GigabitEthernet1/0/2 remote 10.0.0.2
#
interface GigabitEthernet0/0/0
 undo shutdown
 ip address 192.168.50.10 255.255.255.0
 service-manage ping permit
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 172.16.1.22 255.255.255.0
 vrrp vrid 10 virtual-ip 172.16.1.1 active
 service-manage ping permit
#
interface GigabitEthernet1/0/2
 undo shutdown
 ip address 10.0.0.1 255.255.255.0
 service-manage ping permit
#
interface GigabitEthernet1/0/3
 undo shutdown
 ip address 203.0.113.3 255.255.255.0
 vrrp vrid 20 virtual-ip 203.0.113.1 255.255.255.0 active
 service-manage ping permit
#
firewall zone trust
 add interface GigabitEthernet0/0/0
 add interface GigabitEthernet1/0/0
#
firewall zone untrust
 add interface GigabitEthernet1/0/3
#
firewall zone name ha id 4
 add interface GigabitEthernet1/0/2
#
ip route-static 10.10.10.0 255.255.255.0 172.16.1.10
#
security-policy
 rule name IntToExt
  source-zone trust
  destination-zone untrust
  action permit
 rule name ExtToInt
  source-zone untrust
  destination-zone trust
  action permit
#
return

Firewall FW_Respaldo


HRP_S[FW_Respaldo]display current-configuration
!Software Version V500R005C10SPC300
#
sysname FW_Respaldo
#
 hrp enable
 hrp interface GigabitEthernet1/0/2 remote 10.0.0.1
#
interface GigabitEthernet0/0/0
 undo shutdown
 ip address 192.168.50.11 255.255.255.0
 service-manage ping permit
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 172.16.1.21 255.255.255.0
 vrrp vrid 10 virtual-ip 172.16.1.1 standby
 service-manage ping permit
#
interface GigabitEthernet1/0/2
 undo shutdown
 ip address 10.0.0.2 255.255.255.0
 service-manage ping permit
#
interface GigabitEthernet1/0/3
 undo shutdown
 ip address 203.0.113.4 255.255.255.0
 vrrp vrid 20 virtual-ip 203.0.113.1 255.255.255.0 standby
 service-manage ping permit
#
firewall zone trust
 add interface GigabitEthernet0/0/0
 add interface GigabitEthernet1/0/0
#
firewall zone untrust
 add interface GigabitEthernet1/0/3
#
firewall zone name ha id 4
 add interface GigabitEthernet1/0/2
#
ip route-static 10.10.10.0 255.255.255.0 172.16.1.10
#
security-policy
 rule name IntToExt
  source-zone trust
  destination-zone untrust
  action permit
 rule name ExtToInt
  source-zone untrust
  destination-zone trust
  action permit
#
return

Switch SW_A (Núcleo 1)


[SW_A]display current-configuration
#
sysname SW_A
#
vlan batch 30 410
#
stp instance 0 root primary
#
interface Vlanif30
 ip address 10.10.10.3 255.255.255.0
 vrrp vrid 50 virtual-ip 10.10.10.1
 vrrp vrid 50 priority 120
#
interface Vlanif410
 ip address 172.16.1.12 255.255.255.0
 vrrp vrid 60 virtual-ip 172.16.1.10
 vrrp vrid 60 priority 120
#
interface GigabitEthernet0/0/20
 port link-type access
 port default vlan 410
#
interface GigabitEthernet0/0/21
 port link-type trunk
 port trunk allow-pass vlan 30 410
#
interface GigabitEthernet0/0/24
 port link-type trunk
 port trunk allow-pass vlan 30 410
#
ip route-static 0.0.0.0 0.0.0.0 172.16.1.1
#
return

Switch SW_B (Núcleo 2)


[SW_B]display current-configuration
#
sysname SW_B
#
vlan batch 30 410
#
stp instance 0 root secondary
#
interface Vlanif30
 ip address 10.10.10.2 255.255.255.0
 vrrp vrid 50 virtual-ip 10.10.10.1
#
interface Vlanif410
 ip address 172.16.1.11 255.255.255.0
 vrrp vrid 60 virtual-ip 172.16.1.10
#
interface GigabitEthernet0/0/20
 port link-type access
 port default vlan 410
#
interface GigabitEthernet0/0/22
 port link-type trunk
 port trunk allow-pass vlan 30 410
#
interface GigabitEthernet0/0/24
 port link-type trunk
 port trunk allow-pass vlan 30 410
#
ip route-static 0.0.0.0 0.0.0.0 172.16.1.1
#
return

Switch SW_C (Acceso)


[Huawei]display stp brief
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/1        DESI  FORWARDING      NONE
   0    GigabitEthernet0/0/21       ROOT  FORWARDING      NONE
   0    GigabitEthernet0/0/22       ALTE  DISCARDING      NONE
#
[Huawei]display current-configuration
#
sysname SW_C
#
vlan batch 30
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 30
#
interface GigabitEthernet0/0/21
 port link-type trunk
 port trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/22
 port link-type trunk
 port trunk allow-pass vlan 30
#
return

Etiquetas: HuaweiFirewall VRRP MSTP HRP DualFirewall

Publicado el 6-7 08:43