Rotas estáticas Dell Networking SONiC IPv4 e IPv6
Samenvatting: Este artigo explica como configurar rotas estáticas na CLI do Dell SONiC Management Framework.
Dit artikel is van toepassing op
Dit artikel is niet van toepassing op
Dit artikel is niet gebonden aan een specifiek product.
Niet alle productversies worden in dit artikel vermeld.
Instructies
|
Pré-requisitos do artigo Este artigo usa um comutador que executa o Dell SONiC 4.1. Estamos usando a nomenclatura de interface padrão na configuração. Para saber mais sobre os vários modos de nomenclatura de interface no Dell SONiC, consulte o artigo da Dell 202172 Dell Networking Série S: Configuração básica de interface - SONiC 4.0 |
Índice
IntroduçãoRota estática IPv4 Rota estática IPv6
Introdução
Configure rotas fixas e estáticas para garantir que o tráfego roteado possa ser trocado por um dispositivo de destino especificado. Por exemplo, use uma rota estática como um backup caso uma rota dinâmica não esteja disponível ou para alcançar um gateway de rede se nenhuma outra rota estiver disponível.Sugestões de projeto para rota estática:
- Certifique-se de que não haja rotas estáticas sobrepostas no mesmo VRF
- A acessibilidade do próximo salto deve ser assegurada para o tráfego de roteamento
Rota estática IPv4
Sintaxe de configuração:
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# ip route [vrf vrf-name] dest-ip-prefix {next-hop-ip [interface interfacetype interface-number] | interface interface-type interface-number | blackhole} [nexthopvrf vrf-name] [tag tag-name] [track id] [dest-metric] |
Explanation: Para configurar uma rota IPv4 estática, digite o prefixo do endereço de destino e estes valores opcionais:
|
Exemplo de configuração de IPv4
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# ip route 6.6.6.6/32 5.5.5.1 sonic(config)# ip route 7.7.7.7/32 blackhole 100 sonic(config)# ip route 4.4.4.0/24 4.4.4.1 nexthop-vrf Vrf-GREEN 200 sonic(config)# ip route vrf Vrf-RED 3.3.3.0/24 10.0.0.2 nexthop-vrf Vrf-GREEN sonic(config)# ip route vrf Vrf-RED 8.8.8.0/24 interface Eth1/4 nexthop-vrf Vrf-GREEN 36 |
Verificar rotas estáticas IPv4
Use o comando show ip route static oushow ip route para ver a rota estática IPv4 na tabela de roteamento padrão.Use o comando show ip route vrf ou show ip route vrf static para ver a rota estática IPv4 na tabela de roteamento padrão.
sonic# show ip route static Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF > - selected route, * - FIB route, q - queued route, r - rejected route Destination Gateway Dist/Metric Last Update -------------------------------------------------------------------------------------------------------------------------------- S>* 4.4.4.0/24 via 4.4.4.1 Eth1/6(vrf Vrf-GREEN) 200/0 00:54:46 ago S>* 6.6.6.6/32 via 5.5.5.1 Eth1/5 1/0 01:09:10 ago S>* 7.7.7.7/32 Unreachable (blackhole) 100/0 01:23:19 ago |
sonic# show ip route vrf Vrf-RED
Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF
> - selected route, * - FIB route, q - queued route, r - rejected route
Destination Gateway Dist/Metric Last Update
--------------------------------------------------------------------------------------------------------------------------------
S>* 3.3.3.0/24 via 10.0.0.2 Eth1/9(vrf Vrf-GREEN) 1/0 00:00:17 ago
S>* 8.8.8.0/24 Direct Eth1/4(vrf Vrf-GREEN) 36/0 01:00:35 ago |
Rota estática IPv6
Sintaxe de configuração:
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# ipv6 route [vrf vrf-name] dest-ipv6-prefix {next-hop-ipv6 [interface interface-type interface-number] | interface interface-type interface-number | blackhole} [nexthop-vrf vrf-name] [tag tag-name] [track id] [dest-metric] |
Explanation: Para configurar uma rota IPv6 estática, digite o prefixo do endereço de destino e estes valores opcionais:
|
Exemplo de configuração de IPv6
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# ipv6 route 3030::3300/120 3030::3301 36 sonic(config)# ipv6 route 2001:db6::/32 interface Eth1/7 150 sonic(config)# ipv6 route 2006::/24 blackhole 200 sonic(config)# ipv6 route vrf Vrf-RED 1001::/24 interface Eth1/4 nexthop-vrf Vrf-GREEN 20 sonic(config)# ipv6 route vrf Vrf-RED 1002::/24 interface Eth1/2 nexthop-vrf Vrf-GREEN 50 |
Verificar rotas estáticas IPv6
Use o comando show ipv6 route static oushow ip route para ver a rota estática IPv6 na tabela de roteamento padrão.Use o comando show ipv6 route vrf estático para ver a rota estática IPv6 na tabela de roteamento padrão.
sonic# show ipv6 route static Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF > - selected route, * - FIB route, q - queued route, r - rejected route Destination Gateway Dist/Metric Last Update -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- S>* 2001:db6::/32 Direct Eth1/7 150/0 00:01:07 ago S>* 2006::/24 Unreachable (blackhole) 200/0 00:19:06 ago S 3030::3300/120 via 3030::3301 36/0 00:08:52 ago |
sonic# show ipv6 route vrf Vrf-RED static
Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF
> - selected route, * - FIB route, q - queued route, r - rejected route
Destination Gateway Dist/Metric Last Update
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
S>* 1001::/24 Direct Eth1/4(vrf Vrf-GREEN) 20/0 00:14:44 ago
S> 1002::/24 Direct Eth1/2(vrf Vrf-GREEN) 50/0 00:14:30 ago |
Getroffen producten
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON
, PowerSwitch Z9332F-ON, PowerSwitch Z9432F-ON
...
Artikeleigenschappen
Artikelnummer: 000218054
Artikeltype: How To
Laatst aangepast: 25 jun. 2025
Versie: 5
Vind antwoorden op uw vragen via andere Dell gebruikers
Support Services
Controleer of uw apparaat wordt gedekt door Support Services.