EN ESTA PÁGINA
Ejemplo: Tunelización de LDP a través de SR-TE en una red IS-IS
Use este ejemplo para aprender a tunelizar LSP de LDP a través de SR-TE en su red central.
Nuestro equipo de pruebas de contenido ha validado y actualizado este ejemplo.
Requisitos
En este ejemplo, se utilizan los siguientes componentes de hardware y software:
Enrutadores de la serie MX como enrutadores CE, PE y de núcleo.
-
Junos OS versión 20.3R1 o posterior ejecutándose en todos los dispositivos.
-
Actualizado y revalidado con vMX en Junos OS versión 21.1R1.
-
¿Está interesado en obtener experiencia práctica en esta función?
Visite Juniper vLabs para reservar su sandbox vLab preconfigurado : Enrutamiento por segmentos - ¡Básico y pruébalo gratis!
Descripción general
La siguiente topología (Figura 1) muestra dos dominios LDP (dominio LDP A y dominio LDP B) conectados a la red principal de SR-TE, que extiende la sesión de LSP sobre el núcleo mediante un túnel a través de SR-TE.
Topología
Configuración
Para tunelizar LDP LSP a través de SR-TE en su red principal, realice estas tareas:
Configuración rápida de CLI
Para configurar rápidamente este ejemplo, copie los siguientes comandos, péguelos en un archivo de texto, elimine los saltos de línea, cambie los detalles necesarios para que coincidan con su configuración de red, copie y pegue los comandos en la CLI en el nivel de jerarquía [edit]
y, luego, ingrese commit
desde el modo de configuración.
Dispositivo CE1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description CE1-to-PE1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 192.168.100.11/32 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set routing-options router-id 192.168.100.11
Dispositivo PE1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description PE1-to-CE1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/3 description PE1-to-R1 set interfaces ge-0/0/3 unit 0 family inet address 10.1.2.1/24 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.5/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0005.00 set interfaces lo0 unit 0 family mpls set policy-options policy-statement export_bgp term a from protocol bgp set policy-options policy-statement export_bgp term a from protocol direct set policy-options policy-statement export_bgp term a then accept set routing-instances CE1_vpn1 instance-type vrf set routing-instances CE1_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set routing-instances CE1_vpn1 protocols ospf export export_bgp set routing-instances CE1_vpn1 interface ge-0/0/1.0 set routing-instances CE1_vpn1 route-distinguisher 192.168.100.5:1 set routing-instances CE1_vpn1 vrf-target target:100:4 set routing-instances CE1_vpn1 vrf-table-label set protocols bgp group ibgp1 type internal set protocols bgp group ibgp1 local-address 192.168.100.5 set protocols bgp group ibgp1 family inet unicast set protocols bgp group ibgp1 family inet-vpn unicast set protocols bgp group ibgp1 neighbor 192.168.100.6 set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/3.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.5 set routing-options autonomous-system 65410
Dispositivo R1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R1-to-R2 set interfaces ge-0/0/1 unit 0 family inet address 10.1.3.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/2 description R1-to-R3 set interfaces ge-0/0/2 unit 0 family inet address 10.1.4.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description R1-to-PE1 set interfaces ge-0/0/3 unit 0 family inet address 10.1.2.2/24 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.1/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0001.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 108 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 110 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 109 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 111 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 104 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 106 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 105 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 107 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 100 set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 102 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 101 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 103 set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5001 set protocols isis source-packet-routing node-segment ipv6-index 5501 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols ldp auto-targeted-session set protocols ldp preference 1 set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols mpls interface lo0.0 set protocols source-packet-routing segment-list seg1 inherit-label-nexthops set protocols source-packet-routing segment-list seg1 auto-translate set protocols source-packet-routing segment-list seg1 hop1 ip-address 10.1.4.2 set protocols source-packet-routing segment-list seg1 hop2 ip-address 10.1.5.2 set protocols source-packet-routing segment-list seg1 hop3 ip-address 10.1.6.2 set protocols source-packet-routing source-routing-path sr_static_r5 ldp-tunneling set protocols source-packet-routing source-routing-path sr_static_r5 to 192.168.100.2 set protocols source-packet-routing source-routing-path sr_static_r5 binding-sid 1003001 set protocols source-packet-routing source-routing-path sr_static_r5 primary seg1 set routing-options router-id 192.168.100.1
Dispositivo R2
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R2-to-R1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.3.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/2 description R2-to-R4 set interfaces ge-0/0/2 unit 0 family inet address 10.1.6.2/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description R2-to-PE2 set interfaces ge-0/0/3 unit 0 family inet address 10.1.7.1/24 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.2/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0002.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 500 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 502 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 501 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 503 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 504 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 506 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 505 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 507 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 508 set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 510 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 509 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 511 set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5005 set protocols isis source-packet-routing node-segment ipv6-index 5505 set protocols isis source-packet-routing traffic-statistics statistics-granularity per-interface set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols mpls interface lo0.0 set protocols source-packet-routing segment-list seg1 inherit-label-nexthops set protocols source-packet-routing segment-list seg1 auto-translate set protocols source-packet-routing segment-list seg1 hop1 ip-address 10.1.6.1 set protocols source-packet-routing segment-list seg1 hop2 ip-address 10.1.5.1 set protocols source-packet-routing segment-list seg1 hop3 ip-address 10.1.4.1 set protocols source-packet-routing source-routing-path sr_static_r1 ldp-tunneling set protocols source-packet-routing source-routing-path sr_static_r1 to 192.168.100.1 set protocols source-packet-routing source-routing-path sr_static_r1 binding-sid 1003001 set protocols source-packet-routing source-routing-path sr_static_r1 primary seg1 set routing-options router-id 192.168.100.2
Dispositivo R3
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R3-to-R4 set interfaces ge-0/0/1 unit 0 family inet address 10.1.5.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R3-to-R1 set interfaces ge-0/0/2 unit 0 family inet address 10.1.4.2/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.3/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0003.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 204 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 206 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 205 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 207 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 200 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 202 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 201 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 203 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5003 set protocols isis source-packet-routing node-segment ipv6-index 5503 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.3
Dispositivo R4
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R4-to-R3 set interfaces ge-0/0/1 unit 0 family inet address 10.1.5.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R4-to-R2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.6.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.4/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0004.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 300 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 302 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 301 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 303 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 304 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 306 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 305 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 307 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5004 set protocols isis source-packet-routing node-segment ipv6-index 5504 set protocols isis source-packet-routing traffic-statistics statistics-granularity per-interface set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.4
Dispositivo PE2
set chassis network-services enhanced-ip set interfaces ge-0/0/2 description PE2-to-CE2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.8.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description PE2-to-R2 set interfaces ge-0/0/3 unit 0 family inet address 10.1.7.2/24 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.6/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0006.00 set interfaces lo0 unit 0 family mpls set policy-options policy-statement export_bgp term a from protocol bgp set policy-options policy-statement export_bgp term a from protocol direct set policy-options policy-statement export_bgp term a then accept set routing-instances CE2_vpn1 instance-type vrf set routing-instances CE2_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set routing-instances CE2_vpn1 protocols ospf export export_bgp set routing-instances CE2_vpn1 interface ge-0/0/2.0 set routing-instances CE2_vpn1 route-distinguisher 192.168.100.6:1 set routing-instances CE2_vpn1 vrf-target target:100:4 set routing-instances CE2_vpn1 vrf-table-label set protocols bgp group ibgp1 type internal set protocols bgp group ibgp1 local-address 192.168.100.6 set protocols bgp group ibgp1 family inet unicast set protocols bgp group ibgp1 family inet-vpn unicast set protocols bgp group ibgp1 neighbor 192.168.100.5 set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/3.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.6 set routing-options autonomous-system 65410
Dispositivo CE2
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description CE2-to-PE2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.8.2/24 set interfaces lo0 unit 0 family inet address 192.168.100.22/32 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set routing-options router-id 192.168.100.22
Configuración de PE1
Procedimiento paso a paso
En el ejemplo siguiente, debe explorar por varios niveles en la jerarquía de configuración. Para obtener información acerca de cómo navegar por la CLI, consulte Uso del editor de CLI en modo de configuración en la Guía del usuario de CLI.
Para configurar el dispositivo PE1:
Configure el modo de servicios de red como IP mejorada. IP mejorada establece los servicios de red del enrutador en Protocolo de Internet mejorado y utiliza capacidades de modo mejorado.
[edit chassis] user@PE1#set network-services enhanced-ip
Después de configurar la
enhanced-ip
instrucción y confirmar la configuración, aparece el siguiente mensaje de advertencia solicitándole que reinicie el enrutador:'chassis' WARNING: Chassis configuration for network services has been changed. A system reboot is mandatory. Please reboot the system NOW. Continuing without a reboot might result in unexpected system behavior. commit complete
El reinicio abre los FPC en el enrutador.
-
Configure las interfaces del dispositivo.
[edit interfaces] user@PE1#set ge-0/0/1 description PE1-to-CE1 user@PE1#set ge-0/0/1 unit 0 family inet address 10.1.1.2/24 user@PE1#set ge-0/0/1 unit 0 family iso user@PE1#set ge-0/0/3 description PE1-to-R1 user@PE1#set ge-0/0/3 unit 0 family inet address 10.1.2.1/24 user@PE1#set ge-0/0/3 unit 0 family iso user@PE1#set ge-0/0/3 unit 0 family mpls user@PE1#set lo0 unit 0 family inet address 192.168.100.5/32 user@PE1#set lo0 unit 0 family iso address 49.0004.0192.0168.0005.00 user@PE1#set lo0 unit 0 family mpls
-
Configure las opciones de directiva para exportar rutas BGP al enrutador CE, que ejecuta el protocolo OSPF en este ejemplo.
[edit policy-options] user@PE1#set policy-statement export_bgp term a from protocol bgp user@PE1#set policy-statement export_bgp term a from protocol direct user@PE1#set policy-statement export_bgp term a then accept
-
Configure una instancia de enrutamiento VPN de capa 3 para admitir el dispositivo CE1 basado en OSPF.
[edit routing-instances] user@PE1#set CE1_vpn1 instance-type vrf user@PE1#set CE1_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/1.0 user@PE1#set CE1_vpn1 protocols ospf export export_bgp user@PE1#set CE1_vpn1 interface ge-0/0/1.0 user@PE1#set CE1_vpn1 route-distinguisher 192.168.100.5:1 user@PE1#set CE1_vpn1 vrf-target target:100:4 user@PE1#set CE1_vpn1 vrf-table-label
-
Configure el ID del enrutador y el número de sistema autónomo para el dispositivo PE1.
[edit routing-options] user@PE1#set router-id 192.168.100.5 userPE1# set autonomous-system 65410
-
Configure ISIS, LDP y MPLS en las interfaces conectadas a la red principal.
[edit protocols] user@PE1#set isis interface ge-0/0/3.0 point-to-point user@PE1#set isis interface lo0.0 passive user@PE1#set ldp interface ge-0/0/3.0 user@PE1#set ldp interface lo0.0 user@PE1#set mpls interface ge-0/0/3.0 user@PE1#set mpls interface lo0.0
-
Configure BGP entre los dispositivos PE.
[edit protocols] user@PE1#set bgp group ibgp1 type internal user@PE1#set bgp group ibgp1 local-address 192.168.100.5 user@PE1#set bgp group ibgp1 family inet unicast user@PE1#set bgp group ibgp1 family inet-vpn unicast user@PE1#set bgp group ibgp1 neighbor 192.168.100.6
Resultados
Desde el modo de configuración, escriba los comandos , show interfaces
, show routing-instances
show policy-options
, , yshow routing-options
show protocols
para confirmar la show chassis
configuración. Si el resultado no muestra la configuración deseada, repita las instrucciones en este ejemplo para corregir la configuración.
user@PE1#show chassis network-services enhanced-ip;
user@PE1#show interfaces ge-0/0/1 { description PE1-to-CE1; unit 0 { family inet { address 10.1.1.2/24; } family iso; } } ge-0/0/3 { description PE1-to-R1; unit 0 { family inet { address 10.1.2.1/24; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 192.168.100.5/32; } family iso { address 49.0004.0192.0168.0005.00; } family mpls; } }
user@PE1#show policy-options policy-statement export_bgp { term a { from protocol [ bgp direct ]; then accept; } }
user@PE1#show routing-instances CE1_vpn1 { instance-type vrf; protocols { ospf { area 0.0.0.0 { interface ge-0/0/1.0; } export export_bgp; } } interface ge-0/0/1.0; route-distinguisher 192.168.100.5:1; vrf-target target:100:4; vrf-table-label; }
user@PE1#show routing-options router-id 192.168.100.5; autonomous-system 65410;
user@PE1#show protocols bgp { group ibgp1 { type internal; local-address 192.168.100.5; family inet { unicast; } family inet-vpn { unicast; } neighbor 192.168.100.6; } } isis { interface ge-0/0/3.0 { point-to-point; } interface lo0.0 { passive; } } ldp { interface ge-0/0/3.0; interface lo0.0; } mpls { interface ge-0/0/3.0; interface lo0.0; }
Configuración del dispositivo R1
Procedimiento paso a paso
En el ejemplo siguiente, debe explorar por varios niveles en la jerarquía de configuración. Para obtener información acerca de cómo navegar por la CLI, consulte Uso del editor de CLI en modo de configuración en la Guía del usuario de CLI.
Para configurar el dispositivo R1:
Configure el modo de servicios de red como IP mejorada. IP mejorada establece los servicios de red del enrutador en Protocolo de Internet mejorado y utiliza capacidades de modo mejorado.
[edit chassis] user@R1#set network-services enhanced-ip
Después de configurar la
enhanced-ip
instrucción y confirmar la configuración, aparece el siguiente mensaje de advertencia solicitándole que reinicie el enrutador:'chassis' WARNING: Chassis configuration for network services has been changed. A system reboot is mandatory. Please reboot the system NOW. Continuing without a reboot might result in unexpected system behavior. commit complete
El reinicio abre los FPC en el enrutador.
-
Configure las interfaces del dispositivo.
[edit interfaces] user@R1#set ge-0/0/1 description R1-to-R2 user@R1#set ge-0/0/1 unit 0 family inet address 10.1.3.1/24 user@R1#set ge-0/0/1 unit 0 family iso user@R1#set ge-0/0/1 unit 0 family mpls maximum-labels 8 user@R1#set ge-0/0/2 description R1-to-R3 user@R1#set ge-0/0/2 unit 0 family inet address 10.1.4.1/24 user@R1#set ge-0/0/2 unit 0 family iso user@R1#set ge-0/0/2 unit 0 family mpls maximum-labels 8 user@R1#set ge-0/0/3 description R1-to-PE1 user@R1#set ge-0/0/3 unit 0 family inet address 10.1.2.2/24 user@R1#set ge-0/0/3 unit 0 family iso user@R1#set ge-0/0/3 unit 0 family mpls maximum-labels 8 user@R1#set lo0 unit 0 family inet address 192.168.100.1/32 user@R1#set lo0 unit 0 family iso address 49.0004.0192.0168.0001.00 user@R1#set lo0 unit 0 family mpls
Configure las opciones de enrutamiento para identificar el enrutador en el dominio.
[edit routing-options] user@R1#set router-id 192.168.100.1
-
Configure SID de adyacencia ISIS en las interfaces y asigne etiquetas SRGB para habilitar el enrutamiento de segmentos. Las etiquetas en todo el SRGB están disponibles para ISIS. Los SID de prefijo (y los SID de nodo) se indexan desde el SRGB.
[edit protocols] user@R1#set isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 108 user@R1#set isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 110 user@R1#set isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 109 user@R1#set isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 111 user@R1#set isis interface ge-0/0/1.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/1.0 point-to-point user@R1#set isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 104 user@R1#set isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 106 user@R1#set isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 105 user@R1#set isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 107 user@R1#set isis interface ge-0/0/2.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/2.0 point-to-point user@R1#set isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 100 user@R1#set isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 102 user@R1#set isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 101 user@R1#set isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 103 user@R1#set isis interface ge-0/0/3.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/3.0 point-to-point user@R1#set isis interface lo0.0 passive user@R1#set isis source-packet-routing srgb start-label 80000 user@R1#set isis source-packet-routing srgb index-range 50000 user@R1#set isis source-packet-routing node-segment ipv4-index 5001 user@R1#set isis source-packet-routing node-segment ipv6-index 5501 user@R1#set isis level 1 disable
Configure TI-LFA para habilitar la protección contra fallas de vínculos y nodos. El SR que usa TI-LFA proporciona una restauración más rápida de la conectividad de red al enrutar el tráfico instantáneamente a una copia de seguridad o una ruta alternativa si la ruta principal falla o no está disponible.
[edit protocols] user@R1#set isis backup-spf-options use-post-convergence-lfa user@R1#set isis backup-spf-options use-source-packet-routing
Configure los parámetros de ingeniería de tráfico ISIS.
[edit protocols] user@R1#set isis traffic-engineering l3-unicast-topology user@R1#set isis traffic-engineering credibility-protocol-preference
Habilite la tunelización de LDP a través de SR-TE.
[edit protocols] user@R1#set isis traffic-engineering tunnel-source-protocol spring-te
Configure los protocolos MPLS y LDP en las interfaces del dominio LDP para intercambiar etiquetas en el dominio LDP.
[edit protocols] user@R1#set ldp preference 1 user@R1#set ldp interface ge-0/0/3.0 user@R1#set ldp interface lo0.0 user@R1#set mpls interface ge-0/0/1.0 user@R1#set mpls interface ge-0/0/2.0 user@R1#set mpls interface ge-0/0/3.0 user@R1#set mpls interface lo0.0
Habilite la sesión LDP dirigida entre los enrutadores perimetrales del dominio LDP.
[edit protocols] user@R1#set ldp auto-targeted-session
Configure una lista de segmentos para enrutar el tráfico a una ruta específica.
[edit protocols] user@R1#set source-packet-routing segment-list seg1 inherit-label-nexthops user@R1#set source-packet-routing segment-list seg1 auto-translate user@R1#set source-packet-routing segment-list seg1 hop1 ip-address 192.168.4.2 user@R1#set source-packet-routing segment-list seg1 hop2 ip-address 192.168.5.2 user@R1#set source-packet-routing segment-list seg1 hop3 ip-address 192.168.6.2
Configure LSP SR-TE en los enrutadores perimetrales remotos para habilitar la tunelización LDP a través de SR-TE.
[edit protocols] user@R1#set source-packet-routing source-routing-path sr_static_r5 ldp-tunneling user@R1#set source-packet-routing source-routing-path sr_static_r5 to 192.168.66.66 user@R1#set source-packet-routing source-routing-path sr_static_r5 binding-sid 1003001 user@R1#set source-packet-routing source-routing-path sr_static_r5 primary seg1
Resultados
Desde el modo de configuración, ingrese los comandos show chassis
, show interfaces
, show routing-options
y show protocols
para confirmar la configuración. Si el resultado no muestra la configuración deseada, repita las instrucciones en este ejemplo para corregir la configuración.
user@R1#show chassis network-services enhanced-ip;
user@R1#show interfaces ge-0/0/1 { description R1-to-R2; unit 0 { family inet { address 10.1.3.1/24; } family iso; family mpls { maximum-labels 8; } } } ge-0/0/2 { description R1-to-R3; unit 0 { family inet { address 10.1.4.1/24; } family iso; family mpls { maximum-labels 8; } } } ge-0/0/3 { description R1-to-PE1; unit 0 { family inet { address 10.1.2.2/24; } family iso; family mpls { maximum-labels 8; } } } lo0 { unit 0 { family inet { address 192.168.100.1/32; } family iso { address 49.0004.0192.0168.0001.00; } family mpls; } }
user@R1#show protocols isis { interface ge-0/0/1.0 { level 2 { ipv4-adjacency-segment { protected index 108; unprotected index 110; } ipv6-adjacency-segment { protected index 109; unprotected index 111; } post-convergence-lfa; } point-to-point; } interface ge-0/0/2.0 { level 2 { ipv4-adjacency-segment { protected index 104; unprotected index 106; } ipv6-adjacency-segment { protected index 105; unprotected index 107; } post-convergence-lfa; } point-to-point; } interface ge-0/0/3.0 { level 2 { ipv4-adjacency-segment { protected index 100; unprotected index 102; } ipv6-adjacency-segment { protected index 101; unprotected index 103; } post-convergence-lfa; } point-to-point; } interface lo0.0 { passive; } source-packet-routing { srgb start-label 80000 index-range 50000; node-segment { ipv4-index 5001; ipv6-index 5501; } } level 1 disable; backup-spf-options { use-post-convergence-lfa; use-source-packet-routing; } traffic-engineering { l3-unicast-topology; credibility-protocol-preference; tunnel-source-protocol { spring-te; } } } ldp { auto-targeted-session; preference 1; interface ge-0/0/3.0; interface lo0.0; } mpls { interface ge-0/0/1.0; interface ge-0/0/2.0; interface ge-0/0/3.0; interface lo0.0; } source-packet-routing { segment-list seg1 { inherit-label-nexthops; auto-translate; hop1 ip-address 10.1.4.2; hop2 ip-address 10.1.5.2; hop3 ip-address 10.1.6.2; } source-routing-path sr_static_r5 { ldp-tunneling; to 192.168.100.4; binding-sid 1003001; primary { seg1; } } }
user@R1#show routing-options router-id 192.168.100.1;
Verificación
Para confirmar que la configuración funciona correctamente, realice las siguientes tareas:
- Verificación de la tunelización de LDP a través de SR-TE
- Comprobar el reenvío de LDP al dispositivo de PE remoto
- Verificación de la etiqueta anunciada
Verificación de la tunelización de LDP a través de SR-TE
Propósito
Compruebe que el túnel LDP a través de SR-TE esté habilitado y que el túnel LDP al enrutador de borde remoto esté tomando la ruta correcta.
Acción
Desde el modo operativo, ejecute el show spring-traffic-engineering lsp detail
comando.
En R1
user@R1>show spring-traffic-engineering lsp detail Name: sr_static_r5 Tunnel-source: Static configuration To: 192.168.100.2 State: Up LDP-tunneling enabled Path: seg1 Outgoing interface: NA Auto-translate status: Enabled Auto-translate result: Success Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A BFD status: N/A BFD name: N/A ERO Valid: true SR-ERO hop count: 3 Hop 1 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.4.2 SID type: 20-bit label, Value: 80104 Hop 2 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.5.2 SID type: 20-bit label, Value: 80204 Hop 3 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.6.2 SID type: 20-bit label, Value: 80304 Total displayed LSPs: 1 (Up: 1, Down: 0)
En R2
user@R2>show spring-traffic-engineering lsp detail Name: sr_static_r1 Tunnel-source: Static configuration To: 192.168.100.1 State: Up LDP-tunneling enabled Path: seg1 Outgoing interface: NA Auto-translate status: Enabled Auto-translate result: Success Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A BFD status: N/A BFD name: N/A ERO Valid: true SR-ERO hop count: 3 Hop 1 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.6.1 SID type: 20-bit label, Value: 80504 Hop 2 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.5.1 SID type: 20-bit label, Value: 80300 Hop 3 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.4.1 SID type: 20-bit label, Value: 80200 Total displayed LSPs: 1 (Up: 1, Down: 0)
Significado
En R1, el túnel LDP se establece con el enrutador 192.168.100.2 perimetral remoto en la red central de SR-TE. También puede ver los valores 80104, 80204, 80304 de la etiqueta SID en la salida.
En R2, el túnel LDP se establece con el enrutador 192.168.100.1 perimetral remoto en la red central de SR-TE. También puede ver los valores 80504, 80300, 80200 de la etiqueta SID en la salida.
Comprobar el reenvío de LDP al dispositivo de PE remoto
Propósito
Verifique que la ruta al enrutador de PE remoto use el reenvío LDP y esté tunelizada a través de SR-TE.
Acción
Desde el modo operativo, ejecute el show route destination-prefix
comando.
En R1
Compruebe que la ruta al enrutador PE (PE2) remoto se realiza a través de LDP a través del túnel SR-TE.
user@R1>show route 192.168.100.6 inet.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[IS-IS/18] 5d 13:10:09, metric 20 > to 10.1.3.2 via ge-0/0/1.0 inet.3: 8 destinations, 13 routes (5 active, 0 holddown, 6 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[LDP/1] 5d 13:10:09, metric 1 > to 10.1.4.2 via ge-0/0/2.0, Push 16, Push 80304, Push 80204(top) to 10.1.3.2 via ge-0/0/1.0, Push 16, Push 80304, Push 80204, Push 85003, Push 85004(top)
En R2
Compruebe que la ruta al enrutador PE (PE1) remoto se realiza a través de LDP a través del túnel SR-TE.
user@R2>show route 192.168.100.5 inet.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[IS-IS/18] 5d 13:20:15, metric 20 > to 10.1.3.1 via ge-0/0/1.0 inet.3: 8 destinations, 13 routes (5 active, 0 holddown, 6 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[LDP/9] 5d 13:20:15, metric 1 > to 10.1.6.1 via ge-0/0/2.0, Push 16, Push 80200, Push 80300(top) to 10.1.3.1 via ge-0/0/1.0, Push 16, Push 80200, Push 80300, Push 85004, Push 85003(top)
En PE1
Compruebe que la ruta al enrutador de PE remoto (PE2) se realiza a través de una sesión de LDP dirigida al PE remoto.
user@PE1>show route 192.168.100.6
inet.0: 22 destinations, 22 routes (22 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.6/32 *[IS-IS/18] 1w3d 15:58:20, metric 30
> to 10.1.2.2 via ge-0/0/3.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.6/32 *[LDP/9] 1w0d 16:00:05, metric 1
> to 10.1.2.2 via ge-0/0/3.0, Push 18
En PE2
Compruebe que la ruta al enrutador de PE remoto (PE1) se realiza a través de una sesión de LDP dirigida al PE remoto.
user@PE2>show route 192.168.100.5
inet.0: 22 destinations, 22 routes (22 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.5/32 *[IS-IS/18] 1w3d 15:59:19, metric 30
> to 10.1.7.1 via ge-0/0/3.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.5/32 *[LDP/9] 1w0d 16:01:14, metric 1
> to 10.1.7.1 via ge-0/0/3.0, Push 18
Significado
En R1, puede ver la etiqueta LDP como 16 y la etiqueta SR-TE se apilan como 80304, 80204, 85003, 85004.
En R2, puede ver la etiqueta LDP como 16 y la etiqueta SR-TE se apilan como 80200, 80300, 85004, 85003.
En PE1 y PE2, puede ver la etiqueta LDP como 18 y 19, respectivamente.
Verificación de la etiqueta anunciada
Propósito
Compruebe las etiquetas anunciadas para la clase de equivalencia de reenvío (FEC).
Acción
Desde el modo operativo, ejecute el show ldp database
comando.
En R1
Verifique las etiquetas anunciadas para el PE conectado directamente (PE1) y las etiquetas recibidas del enrutador de borde remoto (R2).
user@R1>show ldp database Input label database, 192.168.100.1:0--192.168.100.2:0 Labels received: 4 Label Prefix 17 192.168.100.1/32 3 192.168.100.2/32 18 192.168.100.5/32 16 192.168.100.6/32 Output label database, 192.168.100.1:0--192.168.100.2:0 Labels advertised: 4 Label Prefix 3 192.168.100.1/32 17 192.168.100.2/32 16 192.168.100.5/32 18 192.168.100.6/32 Input label database, 192.168.100.1:0--192.168.100.5:0 Labels received: 4 Label Prefix 17 192.168.100.1/32 18 192.168.100.2/32 3 192.168.100.5/32 19 192.168.100.6/32 Output label database, 192.168.100.1:0--192.168.100.5:0 Labels advertised: 4 Label Prefix 3 192.168.100.1/32 17 192.168.100.2/32 16 192.168.100.5/32 18 192.168.100.6/32
En R2
Verifique las etiquetas anunciadas para el PE conectado directamente (PE2) y las etiquetas recibidas del enrutador de borde remoto (R1).
user@R2>show ldp database Input label database, 192.168.100.2:0--192.168.100.1:0 Labels received: 4 Label Prefix 3 192.168.100.1/32 17 192.168.100.2/32 16 192.168.100.5/32 18 192.168.100.6/32 Output label database, 192.168.100.2:0--192.168.100.1:0 Labels advertised: 4 Label Prefix 17 192.168.100.1/32 3 192.168.100.2/32 18 192.168.100.5/32 16 192.168.100.6/32 Input label database, 192.168.100.2:0--192.168.100.6:0 Labels received: 4 Label Prefix 18 192.168.100.1/32 17 192.168.100.2/32 19 192.168.100.5/32 3 192.168.100.6/32 Output label database, 192.168.100.2:0--192.168.100.6:0 Labels advertised: 4 Label Prefix 17 192.168.100.1/32 3 192.168.100.2/32 18 192.168.100.5/32 16 192.168.100.6/32
En PE1
Compruebe que el dispositivo perimetral R1 anuncia la etiqueta de la dirección de circuito cerrado del dispositivo de PE remoto (PE2) en el dispositivo de PE local (PE1).
user@PE1>show ldp database
Input label database, 192.168.100.5:0--192.168.100.1:0
Labels received: 4
Label Prefix
3 192.168.100.1/32
17 192.168.100.2/32
16 192.168.100.5/32
18 192.168.100.6/32
Output label database, 192.168.100.5:0--192.168.100.1:0
Labels advertised: 4
Label Prefix
17 192.168.100.1/32
18 192.168.100.2/32
3 192.168.100.5/32
19 192.168.100.6/32
En PE2
Compruebe que el dispositivo perimetral R2 anuncia la etiqueta de la dirección de circuito cerrado del dispositivo PE remoto (PE1) al dispositivo PE local (PE2).
user@PE2>show ldp database
Input label database, 192.168.100.6:0--192.168.100.2:0
Labels received: 4
Label Prefix
17 192.168.100.1/32
3 192.168.100.2/32
18 192.168.100.5/32
16 192.168.100.6/32
Output label database, 192.168.100.6:0--192.168.100.2:0
Labels advertised: 4
Label Prefix
18 192.168.100.1/32
17 192.168.100.2/32
19 192.168.100.5/32
3 192.168.100.6/32
Significado
En R1, puede ver que la etiqueta 18 se anuncia hacia el PE conectado directamente (PE1) y la etiqueta 19 se recibe del enrutador de borde remoto (R2).
En R2, puede ver que la etiqueta 17 se anuncia hacia el PE conectado directamente (PE2) y la etiqueta 19 se recibe del enrutador de borde remoto (R1).
En PE1, puede ver que la etiqueta 18 se recibe del enrutador perimetral local (R1).
En PE2, puede ver que la etiqueta 17 se recibe del enrutador perimetral local (R2).