PROTOCOLOS DE COMUNICACIÓN PROTOCCOLO BGP UNIVERSIDAD NACIONAL DE INGENIERIA FACULTAD DE INGENIERIA ELECTRICA Y ELECTRONICA Ingeniería de Telecomunicaciones PROTOCOLOS DE COMUNICACIÓN PROTOCCOLO BGP Profesor Daniel Díaz Ataucuri Docente Asociado Tiempo Parcial FIEE-UNI Director de Investigación y Desarrollo Tecnológico del INICTEL-UNI Daniel Díaz Ataucuri Copyright@2007 Lima-Perú
INTRODUCCION
PROTOCOLOS DE ENRUTAMIENTO IGP: RIP, IGRP, OSPF, EIGRP EGP: BGP SISTEMA AUTÓNOMO RFC 4271: “A Border Gateway Protocol 4 (BGP-4)” http://www.ietf.org/rfc/rfc4271.txt RFC 1771: “A Border Gateway Protocol 4 (BGP-4)” http://www.ietf.org/rfc/rfc1771.txt
TIPOS DE SISTEMAS AUTONOMOS Sistemas Autónomos sin tránsito Sistemas Autónomos de tránsito ISP1 Redes n3, n4 ISP2 n5, n6 Redes n1, n2 AS ISP1 Redes n3, n4 ISP2 n5, n6 Redes n1, n2 AS eBGP n3, n4 eBGP n3, n4 eBGP n5, n6 eBGP n5, n6 eBGP n1, n2 eBGP n1, n2 eBGP n5, n6 n1, n2, eBGP n3, n4 n1, n2, iBGP ► El AS no permite el tráfico de tránsito a través de él. ► Los routers que utilizan iBGP se denominan de tránsito cuando transportan tráfico de transito. ► El AS sólo publica sus redes y no propaga otras redes aprendidas. No existen dos protocolos diferentes iBGP y eBGP. Es el mismo BGP en escenarios diferentes
ASPECTOS BASICOS DE BGP BGP es un protocolo de vector distancia avanzado. ► Utiliza TCP para obtener una comunicación confiable. ► Utiliza el puerto 179 de TCP. Distancia administrativa ► iBGP tiene una distancia administrativa de 200. ► eBGP tiene una distancia administrativa de 20. Al inicio de la conexión BGP intercambia las tablas de enrutamiento completamente ► Después sólo se envía los cambios. ► Se envían las nuevas rutas y las que no existen (withdraw) BGP envía mensajes keepalive en vez de hello.
SINCRONIZACIÓN DE BGP Cuando un AS proporciona tránsito a otro AS es necesario que todas las rutas del AS tengan valores estables debido a un protocolo IGP (OSPF, RIP, etc): deben estar sincronizados. En los router CISCO la sincronización está habilitada. Es aconsejable deshabilitar la sincronización de BGP para acelerar el proceso de convergencia habilitada: no synchronization ► Si los AS no son de tránsito. ► Todos los router en el AS corren iBGP.
ATRIBUTOS DE RUTA BGP: bien conocido Atributo bien conocido (well-known) ► Todas las implementaciones BGP lo deben reconocer. ► Se propagan a los vecinos BGP. ► Atributo bien conocido mandatorio: Tiene que ser incluido en todas las actualizaciones. Aparece en la descripción de una ruta - Next-Hop - Origin - AS-Path ► Atributo bien conocido discrecional: No tiene que ser incluido en todas las actualizaciones. No necesita aparecer en la descripción de una ruta - Local-Preference - Atomic Aggregator
ATRIBUTOS DE RUTA BGP: opcionales Atributo opcional (optional) ► No necesitan ser soportados por todas las implementaciones BGP. Pueden ser atributos privados. ► Atributo opcional transitivo: Si un router no lo soporta lo debe enviar a otro router BGP. - Community - Aggregator ► Atributo opcional no transitivo: El router elimina si no tiene implementado el atributo. - MED (discriminador de salida múltiples)
Dirección IP de Destino ENCAPSULAMIENTO BGP Protocolo BGP TCP, Puerto 179 0 8 16 31 Dirección IP de Destino Dirección IP de Origen TTL Protocolo 11H = 17 Suma de Chequeo Identificador Indicador/Desplazam. Ver HLEN ToS Longitud Total
CONFIGURACION
ANALISIS DE CONFIGURACION 13.13.13.4/30 13.13.13.8/30 11.11.11.8/30 12.12.12.4/30 AS 1000 .5 .6 .9 S1 S0 R2 R1 AREA 0 210.210.210.0/25 OSPF AS 2000 AS 3000 Ra Rb 12.12.12.8/30 .10 R4 R3 11.11.11.4/30 Fa0/1 Fa0/0 Rc 200.200.200.0/24 Lo 1: 50.5.5.5/24 Lo 2: 60.6.6.6/24 Lo 3: 70.7.7.7/24 Lo 4: 80.8.8.8/16 205.205.205.0/24 200.200.201.0/24
COMANDOS BASICOS BGP router bgp autonomous-system ► Activa el protocolo BGP en el router. ► autonomous-system identifica el sistema autónomo. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number ► Identifica un router igual (peer) con el que router local establece una sesión. Abre una conexión TCP con un vecino ► ip-address es la dirección IP del vecino. ► peer-group-name nombre del grupo igual (peer) BGP. network network number [mask network-mask] [route-map map-name] ► network number permite a BGP publicar la red que está presente en la tabla de enrutamiento IP.
COMANDOS BASICOS BGP-Activar BGP neighbor {ip-address | peer-group-name} description text ► text permite describir al vecino, hasta 80 caracteres. R1(config)#router bgp 2000 R1(cobfigure-router)#no auto-summary R1(config-router)#neighbor 13.13.13.9 remote-as 1000 description enlace eBGP con Ra R1(config-router)#network 210.210.210.0 mask 255.255.255.128 R1(config-router)#network 13.13.13.4 mask 255.255.255.252 Se define eBGP 13.13.13.4/30 13.13.13.8/30 11.11.11.8/30 12.12.12.4/30 AS 1000 .5 .6 .9 S1 S0 R2 R1 AREA 0 210.210.210.0/25 OSPF AS 2000 AS 3000 Ra Rb 12.12.12.8/30 .10 R4 R3 11.11.11.4/30 Fa0/1 Fa0/0 Rc 200.200.200.0/24 Lo 1: 50.5.5.5/24 Lo 2: 60.6.6.6/24 Lo 3: 70.7.7.7/24 Lo 4: 80.8.8.8/16 205.205.205.0/24 200.200.201.0/24 network anunciará la ruta sólo si ésta es conocida por el router: estáticamente o dinámicamente.
COMANDOS BASICOS BGP-Uso de loopback neighbor {ip-address | peer-group-name} update-source loopbak-number Ra(config)#router bgp 1000 Ra(config-router)#neighbor 13.13.13.10 remote-as 2000 description enlace eBGP con R1 Ra(config-router)#neighbor 60.6.6.6 remote-as 1000 description enlace iBGP con Rc update-source loopback 1 Ra(config-router)#network 205.205.205.0 mask 255.255.255.0 Ra(config-router)#network 12.12.12.8 mask 255.255.255.252 Ra(config-router)#network 12.12.12.4 13.13.13.4/30 13.13.13.8/30 11.11.11.8/30 12.12.12.4/30 AS 1000 .5 .6 .9 S1 S0 R2 R1 AREA 0 210.210.210.0/25 OSPF AS 2000 AS 3000 Ra Rb 12.12.12.8/30 .10 R4 R3 11.11.11.4/30 Fa0/1 Fa0/0 Rc 200.200.200.0/24 Lo 1: 50.5.5.5/24 Lo 2: 60.6.6.6/24 Lo 3: 70.7.7.7/24 Lo 4: 80.8.8.8/16 205.205.205.0/24 200.200.201.0/24 NOTA: Una interfaz loopback es utilizado sólo con iBGP para garantizar una dirección IP vecino activa
El router R3 envía a Rc la red COMANDOS BASICOS BGP-Agregación aggregate-address ip-address mask [summary-only] [as-set] ► aggregate-address crea una entrada agregada o de resumen. R3(config)#router bgp 3000 R3(config-router)#no auto-summary R3(config-router)#neighbor 11.11.11.9 remote-as 1000 R3(config-router)#neighbor 13.13.13.10 description enlace eBGP con Rc R3(config-router)#network 200.200.200.0 mask 255.255.255.0 R3(config-router)#network 200.200.201.0 R3(config-router)#aggregate-address 200.200.200.0 255.255.254.0 summary-only 13.13.13.4/30 13.13.13.8/30 11.11.11.8/30 12.12.12.4/30 AS 1000 .5 .6 .9 S1 S0 R2 R1 AREA 0 210.210.210.0/25 OSPF AS 2000 AS 3000 Ra Rb 12.12.12.8/30 .10 R4 R3 11.11.11.4/30 Fa0/1 Fa0/0 Rc 200.200.200.0/24 Lo 1: 50.5.5.5/24 Lo 2: 60.6.6.6/24 Lo 3: 70.7.7.7/24 Lo 4: 80.8.8.8/16 205.205.205.0/24 200.200.201.0/24 El router R3 envía a Rc la red agregada 200.200.200.0/23
REDISTRIBUCIÓN DINÁMICA-BGP con OSPF Proceso por el cual se importan rutas de un protocolo de enrutamiento a otro. 13.13.13.4/30 13.13.13.8/30 11.11.11.8/30 12.12.12.4/30 AS 1000 .5 .6 .9 S1 S0 R2 R1 AREA 0 210.210.210.0/25 OSPF AS 2000 AS 3000 Ra Rb 12.12.12.8/30 .10 R4 R3 11.11.11.4/30 Fa0/1 Fa0/0 Rc 200.200.200.0/24 Lo 1: 50.5.5.5/24 Lo 2: 60.6.6.6/24 Lo 3: 70.7.7.7/24 Lo 4: 80.8.8.8/16 205.205.205.0/24 200.200.201.0/24 S0/1 R3(config)#router ospf 10 R3(config-router)#network 11.11.11.4 0.0.0.3 area 0 R3(config-router)#redistribute bgp 3000 subnets R3(config-router)#passive-interface S0/1 R3(config-router)#exit R3(config)#router bgp 3000 R3(config-router)#redistribute ospf 10 R3(config-router)#
BIBLIOGRAFIA Resumen BGP: BGP: Frequently Ask Question-CISCO http://eduardocollado.com/2007/03/09/resumen-de-bgp/ BGP: Frequently Ask Question-CISCO http://www.cisco.com/warp/public/459/bgpfaq_5816.shtml/ Configuring BGP-CISCO http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_configuration_ guide_chapter09186a00800d97fc.html BGP Case Studies-CISCO http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml