NESTA PÁGINA
Exemplo: Serviços de próxima geração Inter-Chassis alta disponibilidade stateful para NAT e firewall stateful (MX-SPC3)
Este exemplo mostra como configurar serviços de próxima geração com alta disponibilidade para firewall stateful e serviços NAT.
Requisitos
Este exemplo usa os seguintes componentes de hardware e software:
Dois roteadores MX480 com placas de serviçoS MX-SPC3
Junos OS Versão 19.3R2, 19.4R1 ou posterior
Visão geral
Dois roteadores MX 3D são configurados de maneira idêntica para facilitar o failover stateful para serviços de firewall e NAT em caso de falha no chassi.
Configuração
Para configurar a alta disponibilidade entre chassis para este exemplo, execute essas tarefas:
- Configuração rápida da CLI
- Configuração de interfaces para chassi 1.
- Configure informações de roteamento para chassi 1
- Configuração de NAT e firewall stateful para chassi 1
- Configurando o conjunto de serviços
- Configuração de interfaces para chassi 2
- Configure informações de roteamento para chassi 2
Configuração rápida da CLI
Para configurar rapidamente este exemplo nos roteadores, copie os seguintes comandos e cole-os na janela do terminal do roteador depois de remover quebras de linha e substituir informações de interface específicas do seu site.
A configuração a seguir é para chassi 1.
[edit] set interfaces vms-4/0/0 redundancy-options redundancy-peer ipaddress 5.5.5.2 set interfaces vms-4/0/0 redundancy-options routing-instance HA set interfaces vms-4/0/0 unit 10 ip-address-owner service-plane set interfaces vms-4/0/0 unit 10 family inet address 5.5.5.1/32 set interfaces vms-4/0/0 unit 20 family inet set interfaces vms-4/0/0 unit 20 service-domain inside set interfaces vms-4/0/0 unit 30 family inet set interfaces vms-4/0/0 unit 30 service-domain outside set interfaces ge-2/0/0 vlan-tagging set interfaces ge-2/0/0 unit 0 vlan-id 100 family inet address 20.1.1.1/24 set routing-instances HA instance-type vrf set routing-instances HA interface ge-2/0/0.0 set routing-instances HA interface vms-4/0/0.10 set routing-instances HA route-distinguisher 1:1 set policy-options policy-statement dummy term 1 then reject set routing-instances HA vrf-import dummy set routing-instances HA vrf-export dummy set routing-instances HA routing-options static route route 5.5.5.1/32 next-hop vms-4/0/0.10 set routing-instances HA routing-options static route route 5.5.5.2/32 next-hop 20.1.1.2 set services nat pool p2 address 32.0.0.0/24 set services nat pool p2 port automatic random-allocation set services nat pool p2 address-allocation round-robin set services nat rule r2 match-direction input set services nat rule r2 term t1 from source-address 129.0.0.0/8 set services nat rule r2 term t1 from source-address 128.0.0.0/8 set services nat rule r2 term t1 then translated source-pool p2 set services nat rule r2 term t1 then translated translation-type napt-44 set services nat rule r2 term t1 then translated address-pooling paired set services nat rule r2 term t1 then syslog set services stateful-firewall rule r2 match-direction input set services stateful-firewall rule r2 term t1 from source-address any-unicast set services stateful-firewall rule r2 term t1 then accept set services stateful-firewall rule r2 term t1 then syslog set services service-set ss2 replicate-services replication-threshold 180 set services service-set ss2 replicate-services stateful-firewall set services service-set ss2 replicate-services nat set services service-set ss2 stateful-firewall-rules r2 set services service-set ss2 nat-rules r2 set services service-set ss2 next-hop-service inside-service-interface vms-4/0/0.20 set services service-set ss2 next-hop-service outside-service-interface vms-4/0/0.30 set services service-set ss2 syslog host local class session-logs set services service-set ss2 syslog host local class stateful-firewall-logs set services service-set ss2 syslog host local class nat-logs
A configuração a seguir é para chassi 2. O NAT, o firewall stateful e as informações de conjunto de serviços devem ser idênticos para os chassis 1 e 2.
set interfaces vms-4/0/0 redundancy-options redundancy-peer ipaddress 5.5.5.1 set interfaces vms-4/0/0 redundancy-options routing-instance HA set interfaces vms-4/0/0 unit 10 ip-address-owner service-plane set interfaces vms-4/0/0 unit 10 family inet address 5.5.5.2/32 set interfaces vms-4/0/0 unit 20 family inet set interfaces vms-4/0/0 unit 20 service-domain inside set interfaces vms-4/0/0 unit 30 family inet set interfaces vms-4/0/0 unit 30 service-domain outside set interfaces ge-2/0/0 vlan-tagging set interfaces ge-2/0/0 unit 0 vlan-id 100 family inet address 20.1.1.2/24 set routing-instances HA instance-type vrf set routing-instances HA interface ge-2/0/0.0 set routing-instances HA interface vms-4/0/0.10 set routing-instances HA route-distinguisher 1:1 set policy-options policy-statement dummy term 1 then reject set routing-instances HA vrf-import dummy set routing-instances HA vrf-export dummy set routing-instances HA routing-options static route 5.5.5.2/32 next-hop vms-4/0/0.10 set routing-instances HA routing-options static route 5.5.5.1/32 next-hop 20.1.1.1 set services nat pool p2 address 32.0.0.0/24 set services nat pool p2 port automatic random-allocation set services nat pool p2 address-allocation round-robin set services nat rule r2 match-direction input set services nat rule r2 term t1 from source-address 129.0.0.0/8 set services nat rule r2 term t1 from source-address 128.0.0.0/8 set services nat rule r2 term t1 then translated source-pool p2 set services nat rule r2 term t1 then translated translation-type napt-44 set services nat rule r2 term t1 then translated address-pooling paired set services nat rule r2 term t1 then syslog set services stateful-firewall rule r2 match-direction input set services stateful-firewall rule r2 term t1 from source-address any-unicast set services stateful-firewall rule r2 term t1 then accept set services stateful-firewall rule r2 term t1 then syslog set services service-set ss2 replicate-services replication-threshold 180 set services service-set ss2 replicate-services stateful-firewall set services service-set ss2 replicate-services nat set services service-set ss2 stateful-firewall-rules r2 set services service-set ss2 nat-rules r2 set services service-set ss2 next-hop-service inside-service-interface vms-4/0/0.20 set services service-set ss2 next-hop-service outside-service-interface vms-4/0/0.30 set services service-set ss2 syslog host local class session-logs set services service-set ss2 syslog host local class stateful-firewall-logs set services service-set ss2 syslog host local class nat-logs
Configuração de interfaces para chassi 1.
Procedimento passo a passo
As interfaces de cada um dos roteadores ha são configuradas de maneira idêntica, com exceção das seguintes opções pic de serviço:
redundancy-options redundancy-peer ipaddress address
unit unit-number family inet address address
de uma unidade, diferente de 0, que contém a opçãoip-address-owner service-plane
Para configurar interfaces:
Configure o PIC de serviço redundante no chassi 1.
[edit interfaces} user@host# set interfaces vms-4/0/0 redundancy-options redundancy-peer ipaddress 5.5.5.2 user@host# set interfaces vms-4/0/0 redundancy-options routing-instance HA user@host# set interfaces vms-4/0/0 unit 10 ip-address-owner service-plane user@host# set interfaces vms-4/0/0 unit 10 family inet address 5.5.5.1/32 user@host# set interfaces vms-4/0/0 unit 20 family inet user@host# set interfaces vms-4/0/0 unit 20 service-domain inside user@host# set interfaces vms-4/0/0 unit 30 family inet user@host# set interfaces vms-4/0/0 unit 30 service-domain outside
Configure as interfaces para o chassi 1 que são usadas como links de interchassis para o tráfego de sincronização.
user@host# set interfaces ge-2/0/0 vlan-tagging user@host# set interfaces ge-2/0/0 unit 0 vlan-id 100 family inet address 20.1.1.1/24
Configure interfaces restantes conforme necessário.
Resultados
user@host# show interfaces ge-2/0/0 { vlan-tagging; unit 0 { vlan-id 100; family inet { address 20.1.1.1/24; } } } vms-4/0/0 { redundancy-options { redundancy-peer { ipaddress 5.5.5.2; } routing-instance HA; } unit 10 { ip-address-owner service-plane; family inet { address 5.5.5.1/32; } } unit 20 { family inet; family inet6; service-domain inside; } unit 30 { family inet; family inet6; service-domain outside; } } }
Configure informações de roteamento para chassi 1
Procedimento passo a passo
A configuração de roteamento detalhado não está incluída para este exemplo. Uma instância de roteamento é necessária para o tráfego de sincronização ha entre o chassi da seguinte forma:
Configure instâncias de roteamento para Chassis 1.
user@host# set routing-instances HA instance-type vrf user@host# set routing-instances HA interface ge-2/0/0.0 user@host# set routing-instances HA interface vms-4/0/0.10 user@host# set routing-instances HA route-distinguisher 1:1 user@host# set policy-options policy-statement dummy term 1 then reject user@host# set routing-instances HA vrf-import dummy user@host# set routing-instances HA vrf-export dummy user@host# set routing-instances HA routing-options static route route 5.5.5.1/32 next-hop vms-4/0/0.10 user@host# set routing-instances HA routing-options static route route 5.5.5.2/32 next-hop 20.1.1.2
Resultados
user@host# show routing-instances HA { instance-type vrf; interface ge-2/0/0.0; interface vms-4/0/0.10; route-distinguisher 1:1; vrf-import dummy; vrf-export dummy; routing-options { static { route 5.5.5.1/32 next-hop vms-4/0/0.10; route 5.5.5.2/32 next-hop 20.1.1.2; } } }
Configuração de NAT e firewall stateful para chassi 1
Procedimento passo a passo
Configure NAT e firewall stateful de maneira idêntica em ambos os roteadores. Para configurar NAT e firewall stateful:
Configure o NAT conforme necessário.
user@host# set services nat pool p2 address 32.0.0.0/24 user@host# set services nat pool p2 port automatic random-allocation user@host# set services nat pool p2 address-allocation round-robin user@host# set services nat rule r2 match-direction input user@host# set services nat rule r2 term t1 from source-address 129.0.0.0/8 user@host# set services nat rule r2 term t1 from source-address 128.0.0.0/8 user@host# set services nat rule r2 term t1 then translated source-pool p2 user@host# set services nat rule r2 term t1 then translated translation-type napt-44 user@host# set services nat rule r2 term t1 then translated address-pooling paired user@host# set services nat rule r2 term t1 then syslog
Configure firewall stateful conforme necessário.
user@host# set services stateful-firewall rule r2 match-direction input user@host# set services stateful-firewall rule r2 term t1 from source-address any-unicast user@host# set services stateful-firewall rule r2 term t1 then accept user@host# set services stateful-firewall rule r2 term t1 then syslog
Resultados
user@host# show services nat nat { pool p2 { address 32.0.0.0/24; port { automatic { random-allocation; } } address-allocation round-robin; } rule r2 { match-direction input; term t1 { from { source-address { 129.0.0.0/8; 128.0.0.0/8; } } then { translated { source-pool p2; translation-type { napt-44; } address-pooling paired; } syslog; } } } } }
user@host show services stateful-firewell rule r2 { match-direction input; term t1 { from { source-address { any-unicast; } } then { accept; syslog; } } }
Configurando o conjunto de serviços
Procedimento passo a passo
Configure o conjunto de serviços de maneira idêntica em ambos os roteadores. Para configurar o conjunto de serviços:
Configure as opções de replicação do conjunto de serviços.
user@host# set services service-set ss2 replicate-services replication-threshold 180 user@host# set services service-set ss2 replicate-services stateful-firewall user@host# set services service-set ss2 replicate-services nat
Configure referências ao NAT e regras de firewall stateful para o conjunto de serviços.
user@host# set services service-set ss2 stateful-firewall-rules r2 user@host# set services service-set ss2 nat-rules r2
Configure a interface de serviço de next-hop no vms-PIC.
user@host# set services service-set ss2 next-hop-service inside-service-interface vms-4/0/0.20 user@host# set services service-set ss2 next-hop-service outside-service-interface vms-4/0/0.30
Configure as opções de registro desejadas.
user@host# set services service-set ss2 syslog host local class session-logs user@host# set services service-set ss2 syslog host local class stateful-firewall-logs user@host# set services service-set ss2 syslog host local class nat-logs
Resultados
user@host# show services service-set ss2 syslog { host local { class { session-logs; inactive: stateful-firewall-logs; nat-logs; } } } replicate-services { replication-threshold 180; stateful-firewall; nat; } stateful-firewall-rules r2; inactive: nat-rules r2; next-hop-service { inside-service-interface vms-3/0/0.20; outside-service-interface vms-3/0/0.30; } }
Configuração de interfaces para chassi 2
Procedimento passo a passo
As interfaces de cada um dos roteadores ha são configuradas de maneira idêntica, com exceção das seguintes opções pic de serviço:
redundancy-options redundancy-peer ipaddress address
unit unit-number family inet address address
de uma unidade, diferente de 0, que contém a opçãoip-address-owner service-plane
Configure o PIC de serviço redundante no chassi 2.
Os
redundancy-peer ipaddress
pontos para o endereço da unidade (unidade 10) em vms-4/0/0 no chassi no chassi 1 que contém aip-address-owner service-plane
declaração.[edit interfaces} set interfaces vms-4/0/0 redundancy-options redundancy-peer ipaddress 5.5.5.1 user@host# set interfaces vms-4/0/0 redundancy-options routing-instance HA user@host# set interfaces vms-4/0/0 unit 10 ip-address-owner service-plane user@host# set interfaces vms-4/0/0 unit 10 family inet address 5.5.5.2/32 user@host# set interfaces vms-4/0/0 unit 20 family inet user@host# set interfaces vms-4/0/0 unit 20 service-domain inside user@host# set interfaces vms-4/0/0 unit 30 family inet user@host# set interfaces vms-4/0/0 unit 30 service-domain outside
Configure as interfaces para o chassi 2 que são usadas como links de interchassis para sincronização de tráfego
user@host# set interfaces ge-2/0/0 vlan-tagging user@host# set interfaces ge-2/0/0 unit 0 vlan-id 100 family inet address 20.1.1.2/24
Configure interfaces restantes para o chassi 2 conforme necessário.
Resultados
user@host# show interfaces vms-4/0/0 { redundancy-options { redundancy-peer { ipaddress 5.5.5.1; } routing-instance HA; } unit 0 { family inet; } unit 10 { ip-address-owner service-plane; family inet { address 5.5.5.2/32; } } ge-2/0/0 { vlan-tagging; unit 0 { vlan-id 100; family inet { address 20.1.1.2/24; } } unit 10 { vlan-id 10; family inet { address 2.10.1.2/24; }
Configure informações de roteamento para chassi 2
Procedimento passo a passo
A configuração de roteamento detalhado não está incluída para este exemplo. Uma instância de roteamento é necessária para o tráfego de sincronização ha entre os dois chassis e está incluído aqui.
Configure instâncias de roteamento para chassi 2.
user@host# set routing-instances HA instance-type vrf user@host# set routing-instances HA interface ge-2/0/0.0 user@host# set routing-instances HA interface vms-4/0/0.10 user@host# set routing-instances HA route-distinguisher 1:1 user@host# set policy-options policy-statement dummy term 1 then reject user@host# set routing-instances HA vrf-import dummy user@host# set routing-instances HA vrf-export dummy user@host# set routing-instances HA routing-options static route 5.5.5.2/32 next-hop vms-4/0/0.10 user@host# set routing-instances HA routing-options static route 5.5.5.1/32 next-hop 20.1.1.1
Nota:As etapas de configuração a seguir são idênticas às etapas mostradas para o chassi 1.
Configuração de NAT e firewall stateful
Configurando o conjunto de serviços
Resultados
user@host# show services routing-instances HA { instance-type vrf; interface xe-2/2/0.0; interface vms-4/0/0.10; route-distinguisher 1:1; vrf-import dummy; vrf-export dummy; routing-options { static { route 5.5.5.2/32 next-hop vms-4/0/0.10; route 5.5.5.1/32 next-hop 20.1.1.1; } }