Vecinos descubiertos automáticamente por BGP
Descripción del vecino descubierto automáticamente por BGP
SUMMARY Usar el vecino detectado automáticamente por BGP para configurar el emparejamiento BGP por interfaz en lugar de especificar direcciones IP vecinas remotas o locales.
Para establecer una sesión BGP entre enrutadores, debe configurar explícitamente los grupos BGP y pares por dirección. Las sesiones de emparejamiento BGP requieren que identifique las direcciones IP de origen y destino para los extremos de la comunicación TCP. Por lo tanto, la configuración explícita de estas direcciones es un obstáculo para la escalabilidad horizontal de la red y una oportunidad para una configuración incorrecta.
Para optimizar la configuración del BGP, hemos eliminado la necesidad de configurar la dirección por par del BGP. Usar el vecino detectado automáticamente por BGP para configurar el emparejamiento BGP por interfaz en lugar de especificar direcciones IP vecinas remotas o locales. Esto incluye el uso de mecanismos implícitos o de protocolo para descubrir las direcciones IP que se utilizarán en las sesiones de emparejamiento TCP.
El comportamiento de emparejamiento y el uso de direcciones deben configurarse explícitamente para evitar cambios de emparejamiento basados en la dirección de la interfaz cambios debidos a la configuración o la validez de la dirección (por ejemplo, detección de direcciones duplicadas (DAD) IPv6).
BGP determina las familias de direcciones que se deben emparejar en función de la configuración. Las sesiones de emparejamiento surgen en función de la disponibilidad de las direcciones de interfaz para las familias determinadas. La dirección local del vínculo del mismo nivel se detecta mediante el descubrimiento de vecinos IPv6 (RFC4861) y crea una sesión BGP hacia ese vecino. Se genera una dirección local de vínculo incluso cuando las interfaces IPv6 no tienen direcciones configuradas.
Debe habilitar la detección de vecinos IPv6 para que esta característica funcione.
Beneficios del vecino descubierto automáticamente por BGP
-
Simplifica la implementación de IGP en un BGP externo de un solo salto (EBGP)
-
Configura vecinos por interfaces y rangos de interfaces en lugar de por direcciones IP
-
Minimiza la configuración en ambos lados con grupos de vecinos dinámicos
Ejemplo: Configuración del vecino detectado automáticamente por BGP
SUMMARY En este ejemplo se muestra cómo configurar BGP Auto-discovered Neighbor.
Descripción general
A partir de Junos OS versión 21.1R1, admitimos vecinos descubiertos automáticamente por BGP mediante el protocolo de descubrimiento de vecinos (ND) IPv6. Esta función permite al BGP crear sesiones de vecinos pares utilizando direcciones IPv6 locales de enlace de enrutadores vecinos conectados directamente. No es necesario especificar direcciones IP de vecinos remotos o locales.
Topología
En la siguiente ilustración se muestra una topología de ejemplo simplificada.
Requisitos
En este ejemplo, se utilizan los siguientes componentes de hardware y software:
enrutadores serie MX
Junos OS versión 21.1R1 o posterior
Configuración
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 y, luego, copie y pegue los comandos en la CLI en el nivel de jerarquía [edit].
VM1
set interfaces interface-range tor-to-leaf member ge-0/0/4 set interfaces interface-range tor-to-leaf unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.1.1/24 set interfaces lo0 unit 0 family inet address 192.168.30.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:70::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64500 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface tor-to-leaf set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop set protocols bgp group to-leaf-v4 export DIRECT-RTS set protocols bgp group to-leaf-v4 local-as 64500 set protocols bgp group to-leaf-v4 neighbor 192.168.1.2 peer-as 64496
VM2
set interfaces interface-range tor-to-leaf member ge-0/0/4 set interfaces interface-range tor-to-leaf unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.2.1/24 set interfaces lo0 unit 0 family inet address 192.168.30.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:60::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64501 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface tor-to-leaf set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop set protocols bgp group to-leaf-v4 export DIRECT-RTS set protocols bgp group to-leaf-v4 local-as 64501 set protocols bgp group to-leaf-v4 neighbor 192.168.2.2 peer-as 64497
Hoja 1
set interfaces interface-range to-spine member "ge-0/0/[0-4]" set interfaces interface-range to-spine unit 0 family inet set interfaces interface-range to-spine unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.1.2/24 set interfaces lo0 unit 0 family inet address 192.168.10.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:90::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64496 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-spine max-advertisement-interval 9 set protocols router-advertisement interface to-spine min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-spine set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-crpd-v4 family inet unicast extended-nexthop set protocols bgp group to-crpd-v4 export DIRECT-RTS set protocols bgp group to-crpd-v4 neighbor 192.168.1.1 peer-as 64500
Hoja 2
set interfaces interface-range to-spine member "ge-0/0/[0-4]" set interfaces interface-range to-spine unit 0 family inet set interfaces interface-range to-spine unit 0 family inet6 set interfaces ge-0/0/4 unit 0 family inet address 192.168.2.2/24 set interfaces lo0 unit 0 family inet address 192.168.10.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:90::2/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64497 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-spine max-advertisement-interval 9 set protocols router-advertisement interface to-spine min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-spine set protocols bgp group autodisc peer-as-list a-list set protocols bgp group to-crpd-v4 family inet unicast extended-nexthop set protocols bgp group to-crpd-v4 export DIRECT-RTS set protocols bgp group to-crpd-v4 neighbor 192.168.2.1 peer-as 64501
Columna vertebral 1
set interfaces interface-range to-leaf member "ge-0/0/[0-3]" set interfaces interface-range to-leaf unit 0 family inet set interfaces interface-range to-leaf unit 0 family inet6 set interfaces lo0 unit 0 family inet address 192.168.20.1/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:80::1/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64498 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-leaf max-advertisement-interval 9 set protocols router-advertisement interface to-leaf min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-leaf set protocols bgp group autodisc peer-as-list a-list
Columna vertebral 2
set interfaces interface-range to-leaf member "ge-0/0/[0-3]" set interfaces interface-range to-leaf unit 0 family inet set interfaces interface-range to-leaf unit 0 family inet6 set interfaces lo0 unit 0 family inet address 192.168.20.2/32 set interfaces lo0 unit 0 family inet6 address 2001:db8:80::2/128 set policy-options policy-statement DIRECT-RTS from protocol direct set policy-options policy-statement DIRECT-RTS then accept set policy-options policy-statement lb then load-balance per-packet set policy-options as-list a-list members 1-65535 set routing-options autonomous-system 64499 set routing-options forwarding-table export lb set routing-options forwarding-table ecmp-fast-reroute set protocols router-advertisement interface to-leaf max-advertisement-interval 9 set protocols router-advertisement interface to-leaf min-advertisement-interval 3 set protocols bgp group autodisc family inet unicast extended-nexthop set protocols bgp group autodisc family inet6 unicast set protocols bgp group autodisc export DIRECT-RTS set protocols bgp group autodisc multipath multiple-as set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface to-leaf set protocols bgp group autodisc peer-as-list a-list
Configuración de VM1
Para configurar el vecino detectado automáticamente por BGP, realice los pasos siguientes en VM1:
-
Configure las interfaces del dispositivo.
user@VM1# set interfaces interface-range tor-to-leaf member ge-0/0/4 user@VM1# set interfaces interface-range tor-to-leaf unit 0 family inet6
-
Cree la interfaz de circuito cerrado y configure la dirección IP.
user@VM1# set interfaces lo0 unit 0 family inet address 192.168.30.1/32 user@VM1# set interfaces lo0 unit 0 family inet6 address 2001:db8:70::1/128
-
Habilite las políticas de enrutamiento.
user@VM1# set policy-options policy-statement DIRECT-RTS from protocol direct user@VM1# set policy-options policy-statement DIRECT-RTS then accept user@VM1# set policy-options policy-statement lb then load-balance per-packet user@VM1# set policy-options as-list a-list members 1-65535
-
Configurar el número de sistema autónomo (AS)
user@VM1# set routing-options autonomous-system 64500
-
Aplique la política por paquete para habilitar el equilibrio de carga del tráfico y el ECMP.
user@VM1# set routing-options forwarding-table export lb user@VM1# set routing-options forwarding-table ecmp-fast-reroute
-
Configure BGP para establecer sesiones de emparejamiento internas y externas.
user@VM1# set protocols bgp group autodisc family inet unicast extended-nexthop user@VM1# set protocols bgp group autodisc family inet6 unicast user@VM1# set protocols bgp group autodisc export DIRECT-RTS user@VM1# set protocols bgp group autodisc multipath multiple-as user@VM1# set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery family inet6 ipv6-nd user@VM1# set protocols bgp group autodisc dynamic-neighbor ndp peer-auto-discovery interface tor-to-leaf user@VM1# set protocols bgp group autodisc peer-as-list a-list user@VM1# set protocols bgp group to-leaf-v4 family inet unicast extended-nexthop user@VM1# set protocols bgp group to-leaf-v4 export DIRECT-RTS user@VM1# set protocols bgp group to-leaf-v4 local-as 5 user@VM1# set protocols bgp group to-leaf-v4 neighbor 192.168.1.2 peer-as 1
-
Cuando termine de configurar el dispositivo, confirme la configuración.
user@VM1# commit
Resultados
Desde el modo de configuración, confirme su configuración ingresando los comandos show interfaces, show protocols, show policy-options y show routing-options. Si el resultado no muestra la configuración deseada, repita las instrucciones en este ejemplo para corregir la configuración.
[edit] user@VM1# show interfaces interface-range tor-to-leaf { member ge-0/0/4; unit 0 { family inet6; } } ge-0/0/4 { unit 0 { family inet { address 192.168.1.1/24; } } } lo0 { unit 0 { family inet { address 192.168.30.1/32; } family inet6 { address 2001:db8:70::1/128; } } }
[edit] user@VM1# show protocols router-advertisement { interface tor-to-leaf; } bgp { group autodisc { family inet { unicast { extended-nexthop; } } family inet6 { unicast; } export DIRECT-RTS; multipath { multiple-as; } dynamic-neighbor ndp { peer-auto-discovery { family inet6 { ipv6-nd; } interface tor-to-leaf; } } peer-as-list a-list; } group to-leaf-v4 { family inet { unicast { extended-nexthop; } } export DIRECT-RTS; local-as 64500; neighbor 192.168.1.2 { peer-as 64496; } } }
[edit] user@VM1# show policy-options policy-statement DIRECT-RTS { from protocol direct; then accept; } policy-statement lb { then { load-balance per-packet; } } as-list a-list members 1-65535;
[edit] user@VM1# show policy-options policy-statement DIRECT-RTS { from protocol direct; then accept; } policy-statement lb { then { load-balance per-packet; } } as-list a-list members 1-65535; [
edit] user@VM1# show routing-options autonomous-system 64500; forwarding-table { export lb; ecmp-fast-reroute; }
Verificación
Confirme que la configuración funcione correctamente.
- Verificar vecinos descubiertos automáticamente
- Verificación de pares descubiertos automáticamente por BGP
Verificar vecinos descubiertos automáticamente
Propósito
Compruebe los vecinos de BGP detectados automáticamente.
Acción
Desde el modo operativo, ejecute el show bgp summary auto-discovered
comando
En la hoja1
user@Leaf1> show bgp summary auto-discovered Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 2 Peers: 5 Down peers: 1 Auto-discovered peers: 4 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 24 20 0 0 0 0 inet6.0 16 16 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... fe80::5668:a3ff:fe16:1049%ge-0/0/3.0 64499 194 195 0 1 1:25:18 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:104c%ge-0/0/4.0 64499 193 195 0 1 1:25:18 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:12c9%ge-0/0/1.0 64498 217 223 0 1 1:35:53 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:12ce%ge-0/0/2.0 64498 218 223 0 1 1:35:57 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0
En Spine1
user@Spine1> show bgp summary auto-discovered Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 1 Peers: 4 Down peers: 0 Auto-discovered peers: 4 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 24 20 0 0 0 0 inet6.0 16 16 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... fe80::5668:a3ff:fe16:2e7%ge-0/0/0.0 64496 245 237 0 0 1:45:19 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:2f2%ge-0/0/1.0 64496 245 238 0 0 1:45:23 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:e49%ge-0/0/2.0 64497 245 243 0 0 1:45:19 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0 fe80::5668:a3ff:fe16:e59%ge-0/0/3.0 64497 247 248 0 0 1:45:23 Establ inet.0: 5/6/6/0 inet6.0: 4/4/4/0
Significado
El resultado muestra el resumen de vecinos de bgp descubiertos automáticamente. Puede ver el número de pares descubiertos automáticamente y sus detalles.
Verificación de pares descubiertos automáticamente por BGP
Propósito
Compruebe los vecinos de BGP detectados automáticamente.
Acción
Desde el modo operativo, ejecute el show bgp neighbor auto-discovered
comando.
En la hoja1
user@Leaf1> show bgp neighbor auto-discovered Peer: fe80::5668:a3ff:fe16:1049%ge-0/0/3.0+65265 AS 64499 Local: fe80::5668:a3ff:fe16:2f6%ge-0/0/3.0+179 AS 64496 Group: autodisc Routing-Instance: master Forwarding routing-instance: master Type: External State: Established Flags: <Sync PeerAsList AutoDiscoveredNdp> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ DIRECT-RTS ] Options: <AddressFamily Multipath Refresh> Options: <MultipathAs> Options: <GracefulShutdownRcv> Address families configured: inet-unicast inet6-unicast Holdtime: 90 Preference: 170 Graceful Shutdown Receiver local-preference: 0 Number of flaps: 1 Last flap event: RecvNotify Error: 'Cease' Sent: 0 Recv: 1 Peer ID: 128.49.102.24 Local ID: 128.49.102.139 Active Holdtime: 90 Keepalive Interval: 30 Group index: 2 Peer index: 2 SNMP index: 9 I/O Session Thread: bgpio-0 State: Enabled BFD: disabled, down Local Interface: ge-0/0/3.0 NLRI for restart configured on peer: inet-unicast inet6-unicast NLRI advertised by peer: inet-unicast inet6-unicast NLRI for this session: inet-unicast inet6-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality Restart flag received from the peer: Notification NLRI that restart is negotiated for: inet-unicast inet6-unicast NLRI of received end-of-rib markers: inet-unicast inet6-unicast NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast ....................
En Spine1
user@Spine1> show bgp neighbor auto-discovered Peer: fe80::5668:a3ff:fe16:2e7%ge-0/0/0.0+60458 AS 64496 Local: fe80::5668:a3ff:fe16:12c9%ge-0/0/0.0+179 AS 64498 Group: autodisc Routing-Instance: master Forwarding routing-instance: master Type: External State: Established Flags: <Sync PeerAsList AutoDiscoveredNdp> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ DIRECT-RTS ] Options: <AddressFamily Multipath Refresh> Options: <MultipathAs> Options: <GracefulShutdownRcv> Address families configured: inet-unicast inet6-unicast Holdtime: 90 Preference: 170 Graceful Shutdown Receiver local-preference: 0 Number of flaps: 0 Peer ID: 128.49.102.139 Local ID: 128.49.103.129 Active Holdtime: 90 Keepalive Interval: 30 Group index: 1 Peer index: 3 SNMP index: 7 I/O Session Thread: bgpio-0 State: Enabled BFD: disabled, down Local Interface: ge-0/0/0.0 NLRI for restart configured on peer: inet-unicast inet6-unicast NLRI advertised by peer: inet-unicast inet6-unicast NLRI for this session: inet-unicast inet6-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality Restart flag received from the peer: Notification NLRI that restart is negotiated for: inet-unicast inet6-unicast NLRI of received end-of-rib markers: inet-unicast inet6-unicast NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 64496) Peer does not support Addpath NLRI that we support extended nexthop encoding for: inet-unicast NLRI that peer supports extended nexthop encoding for: inet-unicast Table inet.0 Bit: 20000 ....................
Significado
El resultado muestra información sobre los vecinos BGP descubiertos automáticamente.