BORDER GATEWAY PROTOCOL (BGP)

Description

Protocolo vector ruta de internet
joseph chiong
Mind Map by joseph chiong, updated more than 1 year ago
joseph chiong
Created by joseph chiong about 6 years ago
39
1

Resource summary

BORDER GATEWAY PROTOCOL (BGP)
  1. DESCRIPCION Y CARACTERISTICAS
    1. Intercambio de rutas (prefijos) ente ASs diferentes
      1. Usa port TCP:179
        1. Requiere un IGP para rutear con iBGP (tambien se puede con rutas estaticas o con BGPpuro pero no es recomendado
          1. Solo un proceso por Router
            1. Necesita neighbors que no necesariamente corren el protocolo en sus interfaces
              1. Los neighbors no necesitan estar directamente conectados
                1. Sesion iBGP en el mismo AS
                  1. Sesion eBGP en diferentes AS
                    1. AS publicos: 1-64511
                      1. AS privados: 64512-65535
                        1. Implementa politicas de enrutamiento complejas que no tienen otros protocolos IGP
                        2. OPERACION Y FUNCIONAMIENTO
                          1. Mecanismo para evitar LOOPS
                            1. Usa la informacion de los ASs para detectar la procedencia de las rutas
                              1. Las rutas aprendidas por una sesion iBGP no pueden ser anunciadas a otra sesion iBGP
                                1. pares iBGP FULL MESH
                                  1. Se necesita n(n-1)/2 pares
                                  2. ROUTE REFLECTORS RR (preferido)
                                    1. Un RR es como un DR OSPF
                                      1. Si una ruta viene de un eBGP, se anuncia a: eBGP, cliente, no-cliente
                                        1. Si una ruta viene de un cliente, se anuncia a: eBGP, cliente, no-cliente
                                          1. Si una ruta viene de un No-cliente, se anuncia a: eBGP, cliente
                                          2. CONFEDERATIONS
                                            1. Sub_AS
                                              1. Se usa ASs privadas
                                                1. Con Sub-ASs se puede usar Route-Reflectors
                                            2. Multihoming (2 diferentes ISPs via BGP)
                                              1. Verificar que tus redes internas esten correctamente anunciadas
                                                1. Estar seguros de no convertirse en un AS de transito
                                                  1. Filtrar las redes que no se originan en nuestro AS
                                                    1. UPDATE SOURCE Y MUTIHOP:
                                                      1. Por default, los packet TCP se envian a la interface mas cercana
                                                        1. En algunas ocasiones es buena idea que los paquetes TCP sean originados desde otra interface (ejm: loopbacks)
                                                          1. Una sesion eBGP debe estar directamente conectada, si no, se debe usar multihop
                                                        2. Diseño de BGP (Que rutas se debe recibir?)
                                                          1. Solo una ruta por defecto
                                                            1. Algunas rutas y una ruta por defecto
                                                              1. Todas las rutas
                                                                1. Impacto: Memoria, CPU, Seleccion de ruta
                                                                2. Mensajes BGP
                                                                  1. OPEN: Apertura de conexion TCP-179
                                                                    1. KEEPALIVE: Mensajes entre neighbors
                                                                      1. UPDATE: Actualizacion de rutas
                                                                        1. NOTIFICATION: Avisa de errores en las rutas
                                                                        2. Tablas BGP
                                                                          1. Tabla Vecinos
                                                                            1. Tabla BGP
                                                                              1. Tabla Enrutamiento
                                                                              2. Estados Vecinos y Timers BGP
                                                                                1. IDLE: Buscando neighbor
                                                                                  1. CONNECT: Sesion TCP-179 completa
                                                                                    1. OPEN SENT: Mensaje BGP apertura
                                                                                      1. OPEN CONFIRM: Responde Mensaje BGP
                                                                                        1. ESTABLISHED: Neighbor UP
                                                                                          1. TIMERS BGP
                                                                                            1. Keepalive: 60s
                                                                                              1. Holdtime: 180s
                                                                                            2. Anunciar redes BGP
                                                                                              1. BGP anuncia prefijos que sean conocidos por el router
                                                                                                1. Anuncia prefijos y un next-hop a sus vecinos (en sesiones eBGP se cambia el next-hop)
                                                                                                  1. En sesiones iBGP no cambia el next-hop
                                                                                                    1. Se tiene Static route
                                                                                                      1. Se tiene IGP
                                                                                                        1. Se tiene next-hop self
                                                                                                          1. Se tiene route-map para cambiar next-hop
                                                                                                          2. SUMARIZACION
                                                                                                            1. Usado en el borde AS
                                                                                                              1. Optimiza CPU y Memoria
                                                                                                                1. Anuncia ruta simple
                                                                                                              2. Redistribucion BGP
                                                                                                                1. Cuando se redistribuye rutas de IGP a BGP, BGP puede propagar hacia otro AS. Se pueden producir LOOPS ROUTING, porque las rutas externas IGP pueden originarse en otro AS
                                                                                                                  1. Cuando se redistribuye de BGP a IGP, podria causar alto CPU y memoria en el router (recibir mas de 200000 rutas de internet)
                                                                                                                  2. Peer Groups
                                                                                                                    1. Facilita administracion
                                                                                                                      1. Muchos neighbors con misma configuracion
                                                                                                                        1. Significancia local
                                                                                                                        2. Atributos BGP - Seleccion de rutas
                                                                                                                          1. AGGREGATOR; (O, T): Muestra RID y AS del router agregador ruta
                                                                                                                            1. AS PATH; (WK, M): Lista todos ASs que la ruta debe atravesar, influencia traffic in
                                                                                                                              1. WELL-KNOW - WK: Mandatory-M (requeridos y reconocdos)/ Discretionary-D (no requeridos y reconocidos)
                                                                                                                                1. OPTIONAL-O: Transitive-T (redistribuidos) / No Transitive-NT (no redistribuidos)
                                                                                                                                  1. ATOMIC AGGREGATE; (WK, D): Incluye resumen, multiples AS
                                                                                                                                    1. CLUSTER ID; (O, NT): Muestra el reflection path que se ha tomado
                                                                                                                                      1. COMMUNITY; (O, T): Capacidad de etiquetar rutas Route Tag
                                                                                                                                        1. LOCAL PREFERENCE; (WK, D): Los paths con mayor valor son deseados, influencia traffic out
                                                                                                                                          1. MED; (O, NT): Multihomming, metrica ext-ruta
                                                                                                                                            1. NEXT HOP; (WK, M): Preferencia el camino corto
                                                                                                                                              1. ORIGIN; (WK, M): Origen de la ruta
                                                                                                                                                1. ORIGINATOR ID; (O, NT): Es el route-reflector
                                                                                                                                                  1. WEIGHT; (O): Es de cisco, significancia local, influencia trafico out
                                                                                                                                                  2. Proceso de Seleccion de Rutas BGP
                                                                                                                                                    1. 1. WEIGHT, mas alto: cisco, local router
                                                                                                                                                      1. 2. LOCAL PREFERENCE, mas alto: todo el AS
                                                                                                                                                        1. 3. SELF ORIGINATED: prefiere rutas autoriginadas
                                                                                                                                                          1. 4. AS PATH, mas corto: menos saltos
                                                                                                                                                            1. 5. ORIGIN, i < ?: internal < redistribuido
                                                                                                                                                              1. 6. MED, mas bajo: metrica mismo AS
                                                                                                                                                                1. 7. EXTERNAL, eBGP<iBGP: external es mejor
                                                                                                                                                                  1. 8. IGP COST, mas bajo: costo iBGP a next-hop
                                                                                                                                                                    1. 9. eBGP PEERING, mas antiguo: mas estable
                                                                                                                                                                      1. 10. RID, mas pequeño: router ID BGP mas bajo
                                                                                                                                                                    2. CONFIGURACION Y ADMINISTRACION
                                                                                                                                                                      1. Configurando Vecinos BGP
                                                                                                                                                                        1. R4(config)#router bgp 100
                                                                                                                                                                          1. R4(config-router)#neighbor 172.16.46.6 remote-as 200
                                                                                                                                                                            1. R4(config-router)#neighbor 10.14.0.1 remote-as 100
                                                                                                                                                                              1. R4#show ip bgp summary
                                                                                                                                                                                1. R4#show ip route bgp
                                                                                                                                                                                2. Anunciando rutas en BGP
                                                                                                                                                                                  1. R4(config-router)#network 10.14.0.0 mask 255.255.255.0
                                                                                                                                                                                    1. R4(config)#router bgp 100
                                                                                                                                                                                      1. R4(config-router)#network 4.4.4.4 mask 255.255.255.255
                                                                                                                                                                                        1. R4(config-router)#network 1.1.1.1 mask 255.255.255.255
                                                                                                                                                                                          1. Se anuncia las redes remotas para el neighbor
                                                                                                                                                                                            1. R4(config-router)#network 10.35.0.0 mask 255.255.255.0
                                                                                                                                                                                            2. Creando Route Reflectors
                                                                                                                                                                                              1. R1(config)#router bgp 100
                                                                                                                                                                                                1. R1(config-router)#neighbor 10.14.0.4 route-reflector-client
                                                                                                                                                                                                  1. R1(config-router)#neighbor 10.13.0.2 route-reflector-client
                                                                                                                                                                                                    1. R3(config)#router bgp 100
                                                                                                                                                                                                      1. R3(config-router)#neighbor 10.35.0.5 route-reflector-client
                                                                                                                                                                                                        1. R3#show ip bgp neighbors 10.35.0.5
                                                                                                                                                                                                        2. Creando Confederaciones
                                                                                                                                                                                                          1. R1(config)#router bgp 65001
                                                                                                                                                                                                            1. R1(config-router)#bgp confederation id 100
                                                                                                                                                                                                              1. R1(config-router)#bgp confederation peers 65004 65035
                                                                                                                                                                                                              2. Cambiando el NEXT-HOP processing
                                                                                                                                                                                                                1. R4(config)#router bgp 100
                                                                                                                                                                                                                  1. R4(config-router)#neighbor 10.14.0.1 nex-hop-self
                                                                                                                                                                                                                    1. R1(config)#route-map NEXTHOP permit 10
                                                                                                                                                                                                                      1. R1(config-route-map)#set ip next-hop 10.14.0.4
                                                                                                                                                                                                                        1. R1(config)#router bgp 100
                                                                                                                                                                                                                          1. R1(config-router)#neighbor 10.14.0.4 route-map NEXTHOP in
                                                                                                                                                                                                                            1. R4#clear ip bgp * in
                                                                                                                                                                                                                            2. Configurando update-source y multihop
                                                                                                                                                                                                                              1. Sesiones iBGP
                                                                                                                                                                                                                                1. R1(config-router)#neighbor 4.4.4.4 remote-as 100
                                                                                                                                                                                                                                  1. R1(config-router)#neighbor 4.4.4.4 update-source Loopback0
                                                                                                                                                                                                                                    1. R1(config-router)#neighbor 4.4.4.4 route-reflector-client
                                                                                                                                                                                                                                      1. R1(config-router)#neighbor 4.4.4.4 route-map NEXTHOP in
                                                                                                                                                                                                                                        1. R4(config-router)#neighbor 1.1.1.1 remote-as 100
                                                                                                                                                                                                                                          1. R4(config-router)#neighbor 1.1.1.1 update-source Loopback0
                                                                                                                                                                                                                                            1. R4(config-router)#neighbor 1.1.1.1 next-hop-self
                                                                                                                                                                                                                                            2. Sesiones eBGP
                                                                                                                                                                                                                                              1. R4(config-router)#neighbor 6.6.6.6 remote-as 200
                                                                                                                                                                                                                                                1. R4(config-router)#neighbor 6.6.6.6 ebgp-multihop
                                                                                                                                                                                                                                                  1. R4(config-router)#neighbor 6.6.6.6 update-source Loopback0
                                                                                                                                                                                                                                                    1. R6(config-router)#neighbor 4.4.4.4 remote-as 100
                                                                                                                                                                                                                                                      1. R6(config-router)#neighbor 4.4.4.4 ebgp-multihop
                                                                                                                                                                                                                                                        1. R6(config-router)#neighbor 4.4.4.4 update-source Loopback0
                                                                                                                                                                                                                                                      2. Configurando Peers Groups
                                                                                                                                                                                                                                                        1. R3(config-router)#neighbor GRUPO1 peer-group
                                                                                                                                                                                                                                                          1. R3(config-router)#neighbor GRUPO1 remote-as 100
                                                                                                                                                                                                                                                            1. R3(config-router)#neighbor GRUPO1 route-reflector-client
                                                                                                                                                                                                                                                              1. R3(config-router)#neighbor 10.35.0.5 peer-group GRUPO1
                                                                                                                                                                                                                                                              2. Sumarizacion
                                                                                                                                                                                                                                                                1. R4(config-router)#aggregate-address 10.0.0.0 255.0.0.0 summary-only
                                                                                                                                                                                                                                                                  1. R6#sh ip route bgp | B 10.0.0.0/8 [20/0] via 4.4.4.4, 00:10:57
                                                                                                                                                                                                                                                                  2. Configurando Filtros
                                                                                                                                                                                                                                                                    1. R6(config)#ip prefix-list SUM permit 10.0.0.0/8
                                                                                                                                                                                                                                                                      1. R6(config)#route-map FILTRO deny 10
                                                                                                                                                                                                                                                                        1. R6(config-route-map)#match ip address prefix-list SUM
                                                                                                                                                                                                                                                                          1. R6(config-router)#route-map FILTRO permit 20
                                                                                                                                                                                                                                                                            1. R6(config-router)#neighbor 4.4.4.4 route-map FILTRO in
                                                                                                                                                                                                                                                                              1. R6(config-router)#neighbor 4.4.4.4 prefix-list SUM in
                                                                                                                                                                                                                                                                              2. Configurando timers BGP
                                                                                                                                                                                                                                                                                1. neighbor [ip-address | peer-group-name] timers keepalive holdtime [min-holdtime]
                                                                                                                                                                                                                                                                              3. CONFIGURACION Y ADMINISTRACION
                                                                                                                                                                                                                                                                                1. Seleccion de rutas con atributos BGP - WEIGHT
                                                                                                                                                                                                                                                                                  1. R4(config-router)#neighbor 172.16.46.6 weight 220
                                                                                                                                                                                                                                                                                    1. R4(config-router)#do sh ip bgp
                                                                                                                                                                                                                                                                                      1. R4(config-router)#do trace 2.2.2.2
                                                                                                                                                                                                                                                                                        1. R4(config-router)#do clear ip bgp * in
                                                                                                                                                                                                                                                                                          1. R4(config)#ip prefix-list LOOPBACKR2 permit 2.2.2.2/32
                                                                                                                                                                                                                                                                                            1. R4(config)#route-map WEIGHT permit 10
                                                                                                                                                                                                                                                                                              1. R4(config-route-map)#match ip address prefix-list LOOPBACKR2
                                                                                                                                                                                                                                                                                                1. R4(config-route-map)#set weight 199
                                                                                                                                                                                                                                                                                                  1. R4(config-route-map)#route-map WEIGHT permit 20
                                                                                                                                                                                                                                                                                                    1. R4(config-router)#neighbor 172.16.46.6 route-map WEIGHT in
                                                                                                                                                                                                                                                                                                    2. Seleccion de rutas con atributos BGP - LOCAL-P
                                                                                                                                                                                                                                                                                                      1. R4(config-router)#bgp default local-preference 150
                                                                                                                                                                                                                                                                                                        1. R4(config-router)#do clear ip bgp * in
                                                                                                                                                                                                                                                                                                          1. R4(config-router)#do clear ip bgp * out
                                                                                                                                                                                                                                                                                                            1. R4(config-router)#route-map LOCAL permit 10
                                                                                                                                                                                                                                                                                                              1. R4(config-route-map)#match ip address prefix-list LOOPBACKR2
                                                                                                                                                                                                                                                                                                                1. R4(config-route-map)#set local-preference 210
                                                                                                                                                                                                                                                                                                                  1. R4(config-route-map)#router-map LOCAL permit 20
                                                                                                                                                                                                                                                                                                                    1. R4(config-route-map)#router bgp 100
                                                                                                                                                                                                                                                                                                                      1. R4(config-router)#neighbor 172.16.46.6 route-map LOCAL in
                                                                                                                                                                                                                                                                                                                        1. R4(config-router)#do clear ip bgp * in
                                                                                                                                                                                                                                                                                                                          1. R5#traceroute 2.2.2.2
                                                                                                                                                                                                                                                                                                                          2. Seleccion de rutas con atributos BGP - AS-PATH
                                                                                                                                                                                                                                                                                                                            1. R4(config)#ip prefix-list LOOPBACKR4 permit 4.4.4.4/32
                                                                                                                                                                                                                                                                                                                              1. R4(config)#route-map ASPATH permit 10
                                                                                                                                                                                                                                                                                                                                1. R4(config-route-map)#match ip address prefix-list LOOPBACKR4
                                                                                                                                                                                                                                                                                                                                  1. R4(config-route-map)#set as-path prepend 100 100 100 100
                                                                                                                                                                                                                                                                                                                                    1. R4(config-route-map)#route-map ASPATH permit 20
                                                                                                                                                                                                                                                                                                                                      1. R4(config-router)#neighbor 172.16.46.6 route-map ASPATH out
                                                                                                                                                                                                                                                                                                                                      2. Seleccion de rutas con atributos BGP - MED
                                                                                                                                                                                                                                                                                                                                        1. R3(config)#access-list 10 permit 3.3.3.3 0.0.0.0
                                                                                                                                                                                                                                                                                                                                          1. R3(config)#route-map MED permit 10
                                                                                                                                                                                                                                                                                                                                            1. R3(config-route-map)#match ip address 10
                                                                                                                                                                                                                                                                                                                                              1. R3(config-route-map)#set metric 2323458
                                                                                                                                                                                                                                                                                                                                                1. R3(config)#route-map MED permit 20
                                                                                                                                                                                                                                                                                                                                                  1. R3(config-route-map)#router bgp 100
                                                                                                                                                                                                                                                                                                                                                    1. R3(config-router)#neighbor 172.16.32.2 route-map MED out
                                                                                                                                                                                                                                                                                                                                                      1. R6(config-router)#default-metric 300
                                                                                                                                                                                                                                                                                                                                                    Show full summary Hide full summary

                                                                                                                                                                                                                                                                                                                                                    Similar

                                                                                                                                                                                                                                                                                                                                                    PRESENTACION ROUTING
                                                                                                                                                                                                                                                                                                                                                    Edgar Andrey Ram
                                                                                                                                                                                                                                                                                                                                                    Routing
                                                                                                                                                                                                                                                                                                                                                    Damian Sanchez
                                                                                                                                                                                                                                                                                                                                                    CCNP CAP 1
                                                                                                                                                                                                                                                                                                                                                    bruce flores
                                                                                                                                                                                                                                                                                                                                                    Criminal Law
                                                                                                                                                                                                                                                                                                                                                    jesusreyes88
                                                                                                                                                                                                                                                                                                                                                    Women in Nazi Germany - Flashcards
                                                                                                                                                                                                                                                                                                                                                    Louisa Wania
                                                                                                                                                                                                                                                                                                                                                    Biology AQA 3.1.3 Osmosis and Diffusion
                                                                                                                                                                                                                                                                                                                                                    evie.daines
                                                                                                                                                                                                                                                                                                                                                    Key Biology Definitions/Terms
                                                                                                                                                                                                                                                                                                                                                    jane zulu
                                                                                                                                                                                                                                                                                                                                                    OCR gcse computer science
                                                                                                                                                                                                                                                                                                                                                    Jodie Awthinre
                                                                                                                                                                                                                                                                                                                                                    a christmas carol
                                                                                                                                                                                                                                                                                                                                                    maha.als10
                                                                                                                                                                                                                                                                                                                                                    1PR101 2.test - Část 11.
                                                                                                                                                                                                                                                                                                                                                    Nikola Truong
                                                                                                                                                                                                                                                                                                                                                    Anatomie - sistemul respirator 1
                                                                                                                                                                                                                                                                                                                                                    Eugeniu Nicolenco