Cisco ha traducido este documento combinando la traducción automática y los recursos humanos a fin de ofrecer a nuestros usuarios en todo el mundo contenido en su propio idioma. Tenga en cuenta que incluso la mejor traducción automática podría no ser tan precisa como la proporcionada por un traductor profesional. Cisco Systems, Inc. no asume ninguna responsabilidad por la precisión de estas traducciones y recomienda remitirse siempre al documento original escrito en inglés (insertar vínculo URL).
Este documento describe la carga a compartir, que permite que un router distribuya el tráfico entrante y saliente entre los trayectos múltiples. Los trayectos se obtienen estáticamente o mediante protocolos dinámicos, como:
Routing Information Protocol (RIP)
Enhanced Interior Gateway Routing Protocol (EIGRP)
Protocolo del Open Shortest Path First (OSPF)
Interior Gateway Routing Protocol (IGRP)
Por abandono, el Border Gateway Protocol (BGP) selecciona solamente un solo mejor trayecto y no realiza el Equilibrio de carga. Este documento muestra cómo realizar la carga a compartir en diversos escenarios con el uso del BGP. Para más información sobre el Equilibrio de carga, refiérase a cómo hace el trabajo del Equilibrio de carga?.
Asegúrese de cumplir estos requisitos antes de intentar esta configuración:
Conocimiento del algoritmo de selección del mejor trayecto BGP
Conocimiento de configurar el BGP
Este documento no tiene restricciones específicas en cuanto a versiones de software y de hardware.
La información que contiene este documento se creó a partir de los dispositivos en un ambiente de laboratorio específico. Todos los dispositivos que se utilizan en este documento se pusieron en funcionamiento con una configuración verificada (predeterminada). Si la red está funcionando, asegúrese de haber comprendido el impacto que puede tener cualquier comando.
Este escenario muestra cómo alcanzar la carga a compartir cuando hay múltiple (hasta un máximo de seis), los links de costo equivalente. Los links se terminan en un router en un sistema local y en otro router en un telecontrol COMO en un entorno BGP escoja dirigido. El diagrama de la red sirve como un ejemplo.
Esta sección utiliza esta configuración de red:
Esta sección usa estas configuraciones:
RouterA
interface loopback 0 ip address 1.1.1.1 255.255.255.0 interface serial 0 ip address 160.20.20.1 255.255.255.0 no ip route-cache interface serial 1 ip address 150.10.10.1 255.255.255.0 no ip route-cache router bgp 11 neighbor 2.2.2.2 remote-as 10 neighbor 2.2.2.2 update-source loopback 0 !--- Use the IP address of the loopback interface for TCP connections.>
neighbor 2.2.2.2 ebgp-multihop !--- You must configure ebgp-multihop whenever the external BGP (eBGP)
!--- connections are not on the same network address.
router eigrp 12
network 1.0.0.0
network 150.10.0.0
network 160.20.0.0
no auto-summary
RouterB
interface loopback 0 ip address 2.2.2.2 255.255.255.0 interface serial 0 ip address 160.20.20.2 255.255.255.0 no ip route-cache interface serial 1 ip address 150.10.10.2 255.255.255.0 no ip route-cache router bgp 10 neighbor 1.1.1.1 remote-as 11 neighbor 1.1.1.1 update-source loopback 0 !--- Use the IP address of the loopback interface for TCP connections.
neighbor 1.1.1.1 ebgp-multihop !--- You must configure ebgp-multihop whenever the eBGP connections
!--- are not on the same network address.
router eigrp 12
network 2.0.0.0
network 150.10.0.0
network 160.20.0.0
no auto-summary
Nota: Usted puede utilizar las Static rutas en el lugar de un Routing Protocol para introducir dos links de costo equivalente para alcanzar el destino. En este caso, el Routing Protocol es EIGRP.
Use esta sección para confirmar que su configuración funciona correctamente.
El Analizador de Cisco CLI (solo clientes registrados) admite determinados comandos show. Utilice el Analizador de Cisco CLI para ver un análisis de los resultados del comando show.
La salida del comando show ip route muestra que ambas trayectorias a la red de 2.2.2.0 son doctas vía el EIGRP. La salida del comando traceroute indica que la carga está distribuida entre dos links seriales. En este escenario, la carga a compartir ocurre sobre una base por paquete. Usted puede publicar el comando ip route-cache en las interfaces seriales de hacer la carga a compartir sobre una base del por destino. Usted puede también configurar por paquete y la carga por destino que equilibran con el Cisco Express Forwarding. Para más información sobre cómo configurar el Cisco Express Forwarding, refiera a la configuración de Cisco Express Forwarding.
RouterA# show ip route !--- Output suppressed.
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 150.10.10.2, 00:00:45, Serial1
[90/2297856] via 160.20.20.2, 00:00:45, Serial0
160.20.0.0/24 is subnetted, 1 subnets
C 160.20.20.0 is directly connected, Serial0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.10.0 is directly connected, Serial1
RouterA# traceroute 2.2.2.2 Type escape sequence to abort. Tracing the route to 2.2.2.2 1 160.20.20.2 16 msec 150.10.10.2 8 msec *
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.
Este escenario muestra cómo alcanzar la carga a compartir cuando los links múltiples existen entre un telecontrol COMO y un local COMO. Estos links se terminan en un router en el local COMO y en los routeres múltiples en los AS remotos en un entorno BGP escoja dirigido. El diagrama de la red es un ejemplo de tal red.
Esta configuración de muestra utiliza el comando maximum-paths. Por abandono, BGP eliges un mejor trayecto entre los links de costo equivalente posibles que son doctos a partir del uno COMO. Sin embargo, usted puede cambiar el número máximo de links de costo equivalente paralelos se permitan que. Para realizar este cambio, incluya el comando maximum-paths paths bajo configuración BGP. Utilice un número entre 1 y 6 para el argumento de los trayectos.
Esta sección utiliza esta configuración de red:
Esta sección usa estas configuraciones:
RouterA
interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Serial 0 ip address 160.20.20.1 255.255.255.0 ! ! interface Serial 1 ip address 150.10.10.1 255.255.255.0 ! ! router bgp 11 neighbor 160.20.20.2 remote-as 10 neighbor 150.10.10.2 remote-as 10 network 1.0.0.0 maximum-paths 2 !--- This command specifies the maximum number of paths
!--- to install in the routing table for the specific destination.
RouterB
interface Ethernet0 ip address 2.2.2.1 255.255.255.0 ! interface Serial 0 ip address 160.20.20.2 255.255.255.0 ! ! router bgp 10 neighbor 160.20.20.1 remote-as 11 network 2.0.0.0 auto-summary
RouterC
interface Ethernet0 ip address 2.2.2.2 255.255.255.0 ! interface Serial 1 ip address 150.10.10.2 255.255.255.0 ! ! router bgp 10 neighbor 150.10.10.1 remote-as 11 network 2.0.0.0 auto-summary
Use esta sección para confirmar que su configuración funciona correctamente.
El Analizador de Cisco CLI (solo clientes registrados) admite determinados comandos show. Utilice el Analizador de Cisco CLI para ver un análisis de los resultados del comando show.
La salida del comando show ip route muestra que ambas trayectorias a la red de 2.2.2.0 son doctas vía el BGP. La salida del comando traceroute indica que la carga está distribuida entre dos links seriales. En este escenario, la carga a compartir ocurre sobre una base del por destino. El comando show ip bgp da las entradas válidas para la red de 2.0.0.0.
RouterA# show ip route !--- Output suppressed
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
B 2.0.0.0/8 [20/0] via 150.10.10.2, 00:04:23 [20/0] via 160.20.20.2, 00:04:01
160.20.0.0/24 is subnetted, 1 subnets C 160.20.20.0 is directly connected, Serial0 150.10.0.0/24 is subnetted, 1 subnets C 150.10.10.0 is directly connected, Serial1 RouterA# traceroute 2.2.2.2 Type escape sequence to abort. Tracing the route to 2.2.2.2 1 160.20.20.2 16 msec 150.10.10.2 8 msec * RouterA# show ip bgp BGP table version is 3, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.0.0.0 0.0.0.0 0 32768 i *> 2.0.0.0 160.20.20.2 0 0 10 i * 150.10.10.2 0 0 10 i
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.
Este escenario muestra cómo alcanzar la carga a compartir cuando hay conexiones múltiples al mismo ISP a través de los routeres locales múltiples. Terminan a los dos pares del eBGP en dos routeres locales separados. El Equilibrio de carga en los dos links no es posible porque los BGP eliges el solo mejor trayecto entre las redes que es docto del eBGP y del Internal BGP (iBGP). La carga a compartir entre los trayectos múltiples al AS10 es la opción más segunda en calidad. Con este tipo de carga a compartir, tráfico a las redes específicas, en base de las directivas predefinidas, viajes a través de ambos links. Además, cada link actúa como respaldo al otro link, en caso de que un link falle.
Para la simplicidad, asuma que es la política de ruteo de BGP para COMO 11:
COMO 11 valida las rutas locales del AS10, junto con un valor por defecto para el resto de las rutas de Internet.
La política de tráfico saliente es:
Todo el tráfico que se destina a Internet del R101 sale a través del link R101-R103.
Si el link R101-R103 falla, entonces todo el tráfico hacia Internet desde R101 irá a través de R102 como AS 10.
Semejantemente, todo el tráfico que se destina a Internet del R102 pasa a través del link R102-R104.
Si el link R102-R104 falla, entonces todo el tráfico hacia Internet desde R102 irá a través de R101 como AS 10.
La política de tráfico entrante es:
Trafique que es destinado para la red 192.168.11.0/24 de Internet debe venir del link R103-R101.
Trafique que es destinado para la red 192.168.12.0/24 de Internet debe venir del link R104-R102.
Si un link al AS10 falla, después el otro link debe rutear el tráfico que es destinado para todas las redes de nuevo COMO a 11 de Internet.
Para alcanzar esto, 192.168.11.0 se anuncia del R101 al R103 con un AS_PATH más corto que se anuncia del R102 al R104. El AS10 encuentra el mejor trayecto a través del link R103-R101. Semejantemente, 192.168.12.0 se anuncia con una trayectoria más corta a través del link R102-R104. El AS10 prefiere el link R104-R102 para el tráfico que está limitado a 192.168.12.0 adentro COMO 11.
Para el tráfico saliente, el BGP determina el mejor trayecto en base de las rutas que son doctas con el eBGP. Estas rutas son preferibles a las rutas aprendidas con el iBGP. El R101 aprende tan 10.10.34.0 del R103 con el eBGP y del R102 con el iBGP. El trayecto externo se selecciona sobre el trayecto interno. Así pues, si usted mira la tabla BGP en la configuración R101, la ruta hacia 10.10.34.0 estaría a través del link R101-R103, con el salto siguiente 10.10.13.3. En el R102, la ruta hacia 10.10.34.0 estaría a través del link R102-R104, con el salto siguiente 10.10.24.4. Esto alcanza la carga a compartir para el tráfico que se destina a 10.10.34.0. El razonamiento similar se aplica a las rutas predeterminado en el R101 y el R102. Para más información sobre el criterio de selección de trayecto BGP, refiera al algoritmo de selección del mejor trayecto BGP.
Esta sección utiliza esta configuración de red:
Esta sección usa estas configuraciones:
R101
hostname R101 ! interface Ethernet0/0 ip address 192.168.11.1 255.255.255.0 secondary ip address 192.168.12.1 255.255.255.0 ! interface Serial8/0 ip address 10.10.13.1 255.255.255.0 ! router bgp 11 no synchronization bgp log-neighbor-changes network 192.168.11.0 network 192.168.12.0 neighbor 10.10.13.3 remote-as 10 neighbor 10.10.13.3 route-map R101-103-MAP out !--- The AS_PATH is increased for 192.168.12.0. neighbor 192.168.12.2 remote-as 11 neighbor 192.168.12.2 next-hop-self maximum-paths 2 no auto-summary ! access-list 1 permit 192.168.12.0 access-list 2 permit 192.168.11.0 route-map R101-103-MAP permit 10 match ip address 1 set as-path prepend 11 11 11 ! route-map R101-103-MAP permit 20 match ip address 2
R102
hostname R102 ! interface Ethernet0/0 ip address 192.168.11.2 255.255.255.0 secondary ip address 192.168.12.2 255.255.255.0 ! interface Serial8/0 ip address 10.10.24.2 255.255.255.0 ! router bgp 11 no synchronization bgp log-neighbor-changes network 192.168.11.0 network 192.168.12.0 neighbor 10.10.24.4 remote-as 10 neighbor 10.10.24.4 route-map R102-104-MAP out !--- The AS_PATH is increased for 192.168.11.0. neighbor 192.168.12.1 remote-as 11 neighbor 192.168.12.1 next-hop-self no auto-summary ! access-list 1 permit 192.168.11.0 access-list 2 permit 192.168.12.0 route-map R102-104-MAP permit 10 match ip address 1 set as-path prepend 11 11 11 ! route-map R102-104-MAP permit 20 match ip address 2 !
R103
hostname R103 ! interface Ethernet0/0 ip address 10.10.34.3 255.255.255.0 ! interface Serial8/0 ip address 10.10.13.3 255.255.255.0 ! router bgp 10 no synchronization bgp log-neighbor-changes network 10.10.34.0 mask 255.255.255.0 neighbor 10.10.13.1 remote-as 11 neighbor 10.10.13.1 default-originate neighbor 10.10.34.4 remote-as 10 neighbor 10.10.34.4 next-hop-self no auto-summary !
R104
hostname R104 ! interface Ethernet0/0 ip address 10.10.34.4 255.255.255.0 ! interface Serial8/0 ip address 10.10.24.4 255.255.255.0 ! router bgp 10 no synchronization bgp log-neighbor-changes neighbor 10.10.24.2 remote-as 11 neighbor 10.10.24.2 default-originate neighbor 10.10.34.3 remote-as 10 neighbor 10.10.34.3 next-hop-self no auto-summary !
En esta sección encontrará información que puede utilizar para confirmar que su configuración esté funcionando correctamente.
El analizador del CLI de Cisco soportan a los ciertos comandos show (clientes registrados solamente), que permite que usted vea una análisis de la salida del comando show.
Verificación de tráfico saliente
Nota: El signo de mayor (>) en la salida del comando show ip bgp representa el mejor trayecto para utilizar para esa red entre los trayectos posibles. Si desea obtener más información, consulte Algoritmo de Selección de la Mejor Trayectoria de BGP.
La tabla BGP en el R101 muestra que el mejor trayecto para todo el tráfico saliente a Internet está a través del link R101-R103. La salida del comando show ip route confirma las rutas en la tabla de ruteo.
R101# show ip bgp BGP table version is 5, local router ID is 192.168.12.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i0.0.0.0 192.168.12.2 100 0 10 i *> 10.10.13.3 0 10 i !--- This is the next hop of R103. * i10.10.34.0/24 192.168.12.2 100 0 10 i *> 10.10.13.3 0 0 10 i !--- This is the next hop of R103. * i192.168.11.0 192.168.12.2 0 100 0 i *> 0.0.0.0 0 32768 i * i192.168.12.0 192.168.12.2 0 100 0 i *> 0.0.0.0 0 32768 i R101# show ip route !--- Output suppressed.
Gateway of last resort is 10.10.13.3 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, Ethernet0/0 C 192.168.11.0/24 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 2 subnets C 10.10.13.0 is directly connected, Serial8/0 B 10.10.34.0 [20/0] via 10.10.13.3, 00:08:53 !--- This is the next hop of R103.
B* 0.0.0.0/0 [20/0] via 10.10.13.3, 00:08:53 !--- This is the next hop of R103.
Aquí están el BGP y las tablas de ruteo para el R102. Según la directiva, el R102 debe rutear todo el tráfico al AS10 a través del link R102-R104:
R102# show ip bgp BGP table version is 7, local router ID is 192.168.12.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 10.10.24.4 0 10 i !--- This is the next hop of R104.
* i 192.168.12.1 100 0 10 i *> 10.10.34.0/24 10.10.24.4 0 10 i !--- This is the next hop of R104.
* i 192.168.12.1 0 100 0 10 i * i192.168.11.0 192.168.12.1 0 100 0 i *> 0.0.0.0 0 32768 i * i192.168.12.0 192.168.12.1 0 100 0 i *> 0.0.0.0 0 32768 i R102# show ip route !--- Output suppressed.
Gateway of last resort is 10.10.24.4 to network 0.0.0.0 C 192.168.12.0/24 is directly connected, Ethernet0/0 C 192.168.11.0/24 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 2 subnets C 10.10.24.0 is directly connected, Serial8/0 B 10.10.34.0 [20/0] via 10.10.24.4, 00:11:21 !--- This is the next hop of R104.
B* 0.0.0.0/0 [20/0] via 10.10.24.4, 00:11:21 !--- This is the next hop of R104.
Verificación del tráfico entrante del AS10 COMO a 11
Las redes 192.168.11.0 y 192.168.12.0 pertenecen COMO a 11 según la directiva, PUES 11 deben preferir el link R103-R101 para el tráfico que se destina a la red 192.168.11.0 y al link R104-R102 para el tráfico que se destina a la red 192.168.12.0.
R103# show ip bgp BGP table version is 4, local router ID is 10.10.34.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.10.34.0/24 0.0.0.0 0 32768 i *> 192.168.11.0 10.10.13.1 0 0 11 i !--- The next hop is R101. * 192.168.12.0 10.10.13.1 0 0 11 11 11 11 i *>i 10.10.34.4 0 100 0 11 i !--- The next hop is R104. R103# show ip route !--- Output suppressed. Gateway of last resort is not set B 192.168.12.0/24 [200/0] via 10.10.34.4, 00:04:46 !--- The next hop is R104. B 192.168.11.0/24 [20/0] via 10.10.13.1, 00:04:46 !--- The next hop is R101. 10.0.0.0/24 is subnetted, 2 subnets C 10.10.13.0 is directly connected, Serial8/0 C 10.10.34.0 is directly connected, Ethernet0/0
El mejor trayecto para la red 192.168.11.0 en el R103 está a través del link R103-R101, y el mejor trayecto para la red 192.168.12.0 está con el R104 COMO a 11 en este caso, la longitud del trayecto más corto determina el mejor trayecto.
Semejantemente, en el R104, el BGP y la tabla de ruteo se asemeja a esto:
R104# show ip bgp BGP table version is 13, local router ID is 10.10.34.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *>i10.10.34.0/24 10.10.34.3 0 100 0 i *>i192.168.11.0 10.10.34.3 0 100 0 11 i * 10.10.24.2 0 0 11 11 11 11 i *> 192.168.12.0 10.10.24.2 0 0 11 i R104# show ip route !--- Output suppressed. Gateway of last resort is not set B 192.168.12.0/24 [20/0] via 10.10.24.2, 00:49:06 !--- The next hop is R102. B 192.168.11.0/24 [200/0] via 10.10.34.3, 00:07:36 !--- The next hop is R103. 10.0.0.0/24 is subnetted, 2 subnets C 10.10.24.0 is directly connected, Serial8/0 C 10.10.34.0 is directly connected, Ethernet0/0
Cuando se produce una falla en el link R101-R103, todo el tráfico debe rutearse nuevamente a través de R102. Este diagrama ilustra este cambio:
Apague el link R103-R101 en el R103 para simular esta situación.
R103(config)# interface serial 8/0 R103(config-if)# shutdown *May 1 00:52:33.379: %BGP-5-ADJCHANGE: neighbor 10.10.13.1 Down Interface flap *May 1 00:52:35.311: %LINK-5-CHANGED: Interface Serial8/0, changed state to administratively down *May 1 00:52:36.127: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial8/0, changed state to down
Verificar la ruta de salida a AS 10.
R101# show ip bgp BGP table version is 17, local router ID is 192.168.12.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *>i0.0.0.0 192.168.12.2 100 0 10 i !--- This is the next hop of R102.
*>i10.10.34.0/24 192.168.12.2 100 0 10 i
!--- This is the next hop of R102.
* i192.168.11.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
* i192.168.12.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
R101# show ip route
!--- Output suppressed.
Gateway of last resort is 192.168.12.2 to network 0.0.0.0
C 192.168.12.0/24 is directly connected, Ethernet0/0
C 192.168.11.0/24 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.34.0 [200/0] via 192.168.12.2, 00:01:34
B* 0.0.0.0/0 [200/0] via 192.168.12.2, 00:01:34
!--- All outbound traffic goes through R102.
R102# show ip route
!--- Output suppressed.
Gateway of last resort is 10.10.24.4 to network 0.0.0.0
C 192.168.12.0/24 is directly connected, Ethernet0/0
C 192.168.11.0/24 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.24.0 is directly connected, Serial8/0
B 10.10.34.0 [20/0] via 10.10.24.4, 00:13:22
B* 0.0.0.0/0 [20/0] via 10.10.24.4, 00:55:22
!--- All outbound traffic on R102 goes through R104.
Verifique la ruta de tráfico entrante cuando R101-R103 está inactivo.
R103# show ip bgp BGP table version is 6, local router ID is 10.10.34.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.10.34.0/24 0.0.0.0 0 32768 i *>i192.168.11.0 10.10.34.4 0 100 0 11 11 11 11 i *>i192.168.12.0 10.10.34.4 0 100 0 11 i R103# show ip route !--- Output suppressed.
Gateway of last resort is not set
B 192.168.12.0/24 [200/0] via 10.10.34.4, 00:14:55
!--- The next hop is R104.
B 192.168.11.0/24 [200/0] via 10.10.34.4, 00:05:46
!--- The next hop is R104.
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.34.0 is directly connected, Ethernet0/0
En el R104, el tráfico para 192.168.11.0 y 192.168.12.0 pasa a través del link R104-R102.
R104# show ip route !--- Output suppressed.
Gateway of last resort is not set
B 192.168.12.0/24 [20/0] via 10.10.24.2, 00:58:35
!--- The next hop is R102.
B 192.168.11.0/24 [20/0] via 10.10.24.2, 00:07:57
!--- The next hop is R102.
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.24.0 is directly connected, Serial8/0
C 10.10.34.0 is directly connected, Ethernet0/0
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.
En este escenario, el Equilibrio de carga no es una opción en un entorno Multihomed, así que usted puede hacer solamente la carga a compartir. Usted no puede hacer el Equilibrio de carga porque el BGP selecciona solamente un solo mejor trayecto a un destino entre las rutas BGP que son doctas de los diversos AS. La idea es fijar un mejor métrico para las rutas en el rango 1.0.0.0 a 128.0.0.0 que son doctas de ISP (A) y un mejor métrico para el resto de las rutas que son doctas de ISP (B). El diagrama de la red es un ejemplo.
Refiera a la configuración de muestra para el BGP con dos diversos proveedores de servicio (multihoming) para la información adicional.
Esta sección utiliza esta configuración de red:
Esta sección usa estas configuraciones:
RouterA
interface Serial 0 ip address 160.20.20.1 255.255.255.0 no ip route-cache interface Serial 1 ip address 150.10.10.1 255.255.255.0 no ip route-cache router bgp 11 neighbor 160.20.20.2 remote-as 10 neighbor 160.20.20.2 route-map UPDATES-1 in !--- This allows only the networks up to 128.0.0.0. neighbor 150.10.10.2 remote-as 12 neighbor 150.10.10.2 route-map UPDATES-2 in !--- This allows anything above the 128.0.0.0 network. auto-summary route-map UPDATES-1 permit 10 match ip address 1 set weight 100 route-map UPDATES-1 permit 20 match ip address 2 route-map UPDATES-2 permit 10 match ip address 1 route-map UPDATES-2 permit 20 match ip address 2 set weight 100 access-list 1 permit 0.0.0.0 127.255.255.255 access-list 2 deny 0.0.0.0 127.255.255.255 access-list 2 permit any
RouterB
interface Loopback0 ip address 2.2.2.2 255.255.255.0 int loopback 1 ip address 170.16.6.5 255.255.255.0 interface Serial 0 ip address 160.20.20.2 255.255.255.0 no ip route-cache router bgp 10 neighbor 160.20.20.1 remote-as 11 network 2.0.0.0 network 170.16.0.0 auto-summary
RouterC
interface Loopback0 ip address 170.16.6.6 255.255.255.0 interface Loopback1 ip address 2.2.2.1 255.255.255.0 interface Serial 1 ip address 150.10.10.2 255.255.255.0 no ip route-cache router bgp 12 neighbor 150.10.10.1 remote-as 11 network 2.0.0.0 network 170.16.0.0 auto-summary
Use esta sección para confirmar que su configuración funciona correctamente.
El Analizador de Cisco CLI (solo clientes registrados) admite determinados comandos show. Utilice el Analizador de Cisco CLI para ver un análisis de los resultados del comando show.
La salida del comando show ip route y la salida del comando traceroute muestran a eso cualquier red más bajo que el routerA de las salidas de 128.0.0.0 con 160.20.20.2. Esta ruta es la interfaz del serial0 de los del salto siguiente. El resto de las redes sale con 150.10.10.2, que es la interfaz del serial 1 de los del salto siguiente.
RouterA# show ip route !--- Output suppressed.
Gateway of last resort is not set
B 170.16.0.0/16 [20/0] via 150.10.10.2, 00:43:43
!--- This is the next hop out through serial 1.
B 2.0.0.0/8 [20/0] via 160.20.20.2, 00:43:43
!--- This is the next hop out through serial 0.
160.20.0.0/24 is subnetted, 1 subnets
C 160.20.20.0 is directly connected, Serial0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.10.0 is directly connected, Serial1
RouterA# show ip bgp
BGP table version is 3, local router ID is 160.20.20.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Network Next Hop Metric LocPrf Weight Path * 2.0.0.0 150.10.10.2 0 0 12 i *> 160.20.20.2 0 100 10 i * 170.16.0.0 160.20.20.2 0 0 10 i *> 150.10.10.2 0 100 12 i RouterA# traceroute 2.2.2.2 Type escape sequence to abort. Tracing the route to 2.2.2.2 1 160.20.20.2 16 msec * 16 msec RouterA# traceroute 170.16.6.6 Type escape sequence to abort. Tracing the route to 170.16.6.6 1 150.10.10.2 4 msec * 4 msec
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.
El Equilibrio de carga no es posible en un entorno Multihomed con dos ISP. El BGP selecciona solamente el solo mejor trayecto a un destino entre los trayectos BGP que son doctos de diversos AS, que hace el Equilibrio de carga imposible. Pero, la carga a compartir es posible en tales redes BGP con varias conexiones. En base de las directivas predeterminadas, el flujo de tráfico se controla con diversos atributos BGP.
Esta sección discute la configuración de varias conexiones que tiene el uso más frecuente. Las demostraciones de la configuración cómo alcanzar la carga a compartir. Vea el diagrama de la red, en el cual el multihome del AS100 alcanza la confiabilidad y la carga a compartir.
Nota: Los IP Addresses en este ejemplo siguen los estándares del RFC 1918 para el espacio de dirección privada y no son routable en Internet.
Para la simplicidad, asuma que es la política de ruteo de BGP para el AS100:
El AS100 valida las rutas locales de ambos proveedores, junto con un valor por defecto para el resto de las rutas de Internet.
La política de tráfico saliente es:
Trafique que se destina al AS300 pasa a través del link del r1-ISP(A).
Trafique que se destina al AS400 pasa a través del link del r2-ISP(B).
El resto del tráfico debe preferir la ruta predeterminado 0.0.0.0 a través del link del r1-ISP(A).
Si el link del r1-ISP(A) falla, todo el tráfico debe pasar a través del link del r2-ISP(B).
La política de tráfico entrante es:
Trafique que es destinado para la red 10.10.10.0/24 de Internet debe venir del link ISP(A)-R1.
Trafique que es destinado para la red 10.10.20.0/24 de Internet debe venir del link ISP(B)-R2.
Si un ISP falla, el otro ISP debe rutear el tráfico de nuevo al AS100 de Internet para todas las redes.
Esta sección utiliza esta configuración de red:
Esta sección usa estas configuraciones:
R2
interface Ethernet0 ip address 192.168.21.2 255.255.255.0 ! interface Serial0 ip address 192.168.42.2 255.255.255.0 router bgp 100 no synchronization bgp log-neighbor-changes !--- The next two lines announce the networks to BGP peers. network 10.10.10.0 mask 255.255.255.0 network 10.10.20.0 mask 255.255.255.0 !--- The next line configures iBGP on R1. neighbor 192.168.21.1 remote-as 100 neighbor 192.168.21.1 next-hop-self !--- The next line configures eBGP with ISP(B). neighbor 192.168.42.4 remote-as 400 !--- This is the incoming policy route map for the application
!--- of attributes to specific routes. neighbor 192.168.42.4 route-map AS-400-INCOMING in !--- This is the outgoing policy route map for the application
!--- of attributes to specific routes. neighbor 192.168.42.4 route-map AS-400-OUTGOING out no auto-summary ! ! !--- This line sets the AS path access list.
!--- The line permits all routes within the routing domain of the provider. ip as-path access-list 1 permit ^400$ ! !--- These two lines set the access list. access-list 10 permit 10.10.10.0 0.0.0.255 access-list 20 permit 10.10.20.0 0.0.0.255 !--- The next three lines configure LOCAL_PREF for routes
!--- that match AS path access list 1. route-map AS-400-INCOMING permit 10 match as-path 1 set local-preference 150 !--- Here, the route map prepends AS 100 to BGP updates for networks
!--- that are permitted by access list 10. route-map AS-400-OUTGOING permit 10 match ip address 10 set as-path prepend 100 !--- This line announces the network that is permitted by
!--- access list 20 without any changes in BGP attributes. route-map AS-400-OUTGOING permit 20 match ip address 20
R1
interface Serial0/0 ip address 192.168.31.1 255.255.255.0 ! interface Ethernet1/0 ip address 192.168.21.1 255.255.255.0 ! router bgp 100 no synchronization bgp log-neighbor-changes network 10.10.10.0 mask 255.255.255.0 network 10.10.20.0 mask 255.255.255.0 !--- IBGP peering with R2 neighbor 192.168.21.2 remote-as 100 neighbor 192.168.21.2 next-hop-self ! !--- This line sets eBGP peering with ISP(A). neighbor 192.168.31.3 remote-as 300 ! !--- This is the incoming policy route map for the application
!--- of attributes to specific routes. neighbor 192.168.31.3 route-map AS-300-INCOMING in ! !--- This is the outgoing policy route map for the application
!--- of attributes to specific routes. neighbor 192.168.31.3 route-map AS-300-OUTGOING out no auto-summary font color="#0000ff">!--- This line sets the AS path access list.
!--- The line permits all routes within the routing domain of the provider. ip as-path access-list 1 permit ^300$ ! !--- These two lines set the IP access list. access-list 10 permit 10.10.20.0 0.0.0.255 access-list 20 permit 10.10.10.0 0.0.0.255 !--- The next three lines configure LOCAL_PREF for routes that match
!--- AS path access list 1. route-map AS-300-INCOMING permit 10 match as-path 1 set local-preference 200 ! !--- Here, the route map prepends AS 100 to BGP updates for networks
!--- that are permitted by access list 10. route-map AS-300-OUTGOING permit 10 match ip address 10 set as-path prepend 100 ! !--- This line announces the network that is permitted
!--- by access list 20 without any changes in BGP attributes. route-map AS-300-OUTGOING permit 20 match ip address 20 !
Use esta sección para confirmar que su configuración funciona correctamente.
El Analizador de Cisco CLI (solo clientes registrados) admite determinados comandos show. Utilice el Analizador de Cisco CLI para ver un análisis de los resultados del comando show.
Publique el comando show ip bgp para verificar que la política de salida/entrada trabaja.
Nota: El signo mayor a (>) en el resultado del comando show ip bgp representa el mejor trayecto que puede usarse para esa red entre los diversos trayectos posibles. Si desea obtener más información, consulte Algoritmo de Selección de la Mejor Trayectoria de BGP.
R1# show ip bgp BGP table version is 6, local router ID is 192.168.31.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete BGP table version is 6, local router ID is 192.168.31.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 192.168.31.3 200 0 300 i !--- This line shows that the default route 0.0.0.0/0 is preferred
!--- through AS 300, ISP(A).
* i10.10.10.0/24 192.168.21.2 0 100 0 i
*> 0.0.0.0 0 32768 i
* i10.10.20.0/24 192.168.21.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.30.30.0/24 192.168.31.3 0 200 0 300 i
*>i40.40.40.0/24 192.168.21.2 0 150 0 400 i
!--- The route to network 30.30.30.0/24 (AS 300) is preferred
!--- through the R1-ISP(A) link.
!--- The route to network 40.40.40.0/24 (AS 400) is preferred
!--- through the R2-ISP(B) link.
Ahora, mirada en la demostración resultado de ip bgp en el r2:
R2# show ip bgp BGP table version is 8, local router ID is 192.168.42.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 0.0.0.0 192.168.42.4 150 0 400 i *>i 192.168.21.1 200 0 300 i !--- This line shows that the default route 0.0.0.0/0 is preferred
!--- through AS 300, through the R2-ISP(B) link.
*> 10.10.10.0/24 0.0.0.0 0 32768 i
* i 192.168.21.1 0 100 0 i
*> 10.10.20.0/24 0.0.0.0 0 32768 i
* i 192.168.21.1 0 100 0 i
*>i30.30.30.0/24 192.168.21.1 0 200 0 300 i
*> 40.40.40.0/24 192.168.42.4 0 150 0 400 i !--- The route to network 30.30.30.0/24 (AS 300) is preferred
!--- through the R1-ISP(A) link.
!--- The route to network 40.40.40.0/24 (AS 400) is preferred
!--- through the R2-ISP(B) link.
Publique el comando show ip bgp en el router 6 para observar la política de entrada para las redes 10.10.10.0/24 y 10.10.20.0/24:
R6# show ip bgp BGP table version is 15, local router ID is 192.168.64.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.10.10.0/24 192.168.63.3 0 300 100 100 i !--- This line shows that network 10.10.10.0/24 is routed through AS 300
!--- with the ISP(A)-R1 link.
* 192.168.64.4 0 400 100 100 100 i
* 10.10.20.0/24 192.168.63.3 0 300 100 100 i
*> 192.168.64.4 0 400 100 i
!--- This line shows that network 10.10.20.0/24 is routed through AS 400
!--- with the ISP(B)-R2 link.
*> 30.30.30.0/24 192.168.63.3 0 0 300 i
*> 40.40.40.0/24 192.168.64.4 0 0 400 i
Apague el link del r1-ISP(A) en el r1 y observe la tabla BGP. Espere que todo el tráfico a Internet sea ruteado a través del link del r2-ISP(B):
R1(config)# interface serial 0/0 R1(config-if)# shutdown *May 2 19:00:47.377: %BGP-5-ADJCHANGE: neighbor 192.168.31.3 Down Interface flap *May 2 19:00:48.277: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down *May 23 12:00:51.255: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down R1# show ip bgp BGP table version is 12, local router ID is 192.168.31.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *>i0.0.0.0 192.168.21.2 150 0 400 i !--- The best default path is now through the R2-ISP(B) link.
* i10.10.10.0/24 192.168.21.2 0 100 0 i
*> 0.0.0.0 0 32768 i
* i10.10.20.0/24 192.168.21.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i40.40.40.0/24 192.168.21.2 0 150 0 400 i
R2# show ip bgp
BGP table version is 14, local router ID is 192.168.42.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 0.0.0.0 192.168.42.4 150 0 400 i !--- The best default route is now through ISP(B) with a
!--- local preference of 150.
* i10.10.10.0/24 192.168.21.1 0 100 0 i
*> 0.0.0.0 0 32768 i
* i10.10.20.0/24 192.168.21.1 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 40.40.40.0/24 192.168.42.4 0 150 0 400 i
Mire la ruta para la red 10.10.10.0/24 en el router 6:
R6# show ip bgp BGP table version is 14, local router ID is 192.168.64.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.10.10.0/24 192.168.64.4 0 400 100 100 i !--- Network 10.10.10.0 is reachable through ISP(B), which announced
!--- the network with AS path prepend.
*> 10.10.20.0/24 192.168.64.4 0 400 100 i
*> 30.30.30.0/24 192.168.63.3 0 0 300 i
*> 40.40.40.0/24 192.168.64.4 0 0 400 i
Actualmente, no hay información específica de troubleshooting disponible para esta configuración.