User Tag List

Gracias Gracias:  0
Me agrada Me agrada:  0
Me desagrada Me desagrada:  0
Resultados 1 al 1 de 1

Tema: Configuración de IXP con Rutas BGP y Failover mediante AS-PATH y Prepending en Cisco

  1. #1

    Fecha de ingreso
    07 Sep, 20
    Mensajes
    17
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Configuración de IXP con Rutas BGP y Failover mediante AS-PATH y Prepend en Cisco

    En este laboratorio se simula un entorno de interconexión de redes donde dos ISP (InterCun y TotalPlay) utilizan un IXP (Internet Exchange Point) como vía preferencial para alcanzar los servicios CDN de proveedores como Google y Facebook.
    El objetivo principal es optimizar la entrega de contenido a los clientes finales, priorizando rutas más directas y eficientes mediante políticas de BGP basadas en la longitud del AS Path.


    A través del uso de técnicas como AS Path Prepend y la configuración de múltiples rutas BGP, se logra que los routers de borde de los ISP seleccionen, de forma automática, las rutas más cercanas (vía el IXP) como primera opción. En caso de fallos o pérdida de comunicación con el IXP, se garantiza una segunda ruta alternativa a través de carriers de tránsito (Alestra y Cirion).

    Nombre:  Laboratorio de IXP con Rutas BGP y Failover mediante AS-PATH y Prepending-Cisco.jpg
Visitas: 22
Tamaño: 87.9 KB

    Entorno del laboratorio:
    Este laboratorio se desarrolla en GNS3 utilizando routers virtuales Cisco C7200. Sin embargo, también es totalmente compatible con EVE-NG o PNetLab, siempre que se siga la misma topología de red propuesta.
    Se adjunta la imagen del router Cisco C7200 utilizada en GNS3 para facilitar la replicación del entorno. Link descargar imagen cisco c7200 https://drive.google.com/drive/folde...kn?usp=sharing

    Configurar Router ISP-Border-InterCun (ASN 400)

    enable
    configure terminal
    hostname ISP-Border-InterCun


    ! Interfaces
    interface FastEthernet1/0
    description to Alestra-Carrier
    ip address 3.3.3.2 255.255.255.0
    no shutdown


    interface FastEthernet2/0
    description LAN ISP-Core-InterCun
    ip address 4.4.5.254 255.255.255.0
    no shutdown


    interface FastEthernet3/0
    description to IXP
    ip address 10.10.10.2 255.255.255.0
    no shutdown


    ! BGP
    router bgp 400
    ! Peer to IXP
    neighbor 10.10.10.1 remote-as 1000
    ! Peer to Alestra-Carrier
    neighbor 3.3.3.1 remote-as 300
    ! Anunciar redes
    network 4.4.4.0 mask 255.255.255.0
    network 4.4.5.0 mask 255.255.255.0
    network 10.10.10.0 mask 255.255.255.0



    Configurar Router ISP-Core-Intercun

    enable
    configure terminal
    hostname ISP-Core-InterCun


    ! Interfaces
    interface FastEthernet1/0
    description to-ISP-Border-Intercun
    ip address 4.4.5.2 255.255.255.0
    ip nat outside
    no shutdown


    interface FastEthernet2/0
    description to-Cliente-Final
    ip address 192.168.9.254 255.255.255.0
    ip nat inside
    no shutdown


    ! ACL para permitir todo el tráfico desde la LAN:
    access-list 1 permit 192.168.9.0 0.0.0.255


    ! NAT
    ip nat inside source list 1 interface FastEthernet1/0 overload


    ! Ruta por defecto
    ip route 0.0.0.0 0.0.0.0 4.4.5.254


    Configurar Router IXP (ASN 1000)

    enable
    configure terminal
    hostname IXP


    bridge irb
    bridge 1 protocol ieee
    bridge 1 route ip
    bridge 2 protocol ieee
    bridge 2 route ip


    ! Interfaces
    interface FastEthernet3/0
    description to ISP-Border-Intercun
    no shutdown
    bridge-group 1


    interface FastEthernet4/0
    description to ISP-Border-TotalPlay
    no shutdown
    bridge-group 1


    interface BVI1
    description Bridge ISPs Borde
    ip address 10.10.10.1 255.255.255.0
    no shutdown


    interface FastEthernet5/0
    description to Facebook-CDN
    ip address 9.9.9.1 255.255.255.248
    no shutdown


    interface FastEthernet6/0
    description Google-CDN
    ip address 9.9.9.9 255.255.255.248
    no shutdown


    ! BGP
    router bgp 1000
    ! Peer to ISP-Border-InterCun
    neighbor 10.10.10.2 remote-as 400
    ! Peer to ISP-Border-Totalplay
    neighbor 10.10.10.3 remote-as 500
    ! Peer Facebook-CDN
    neighbor 9.9.9.2 remote-as 100
    ! Peer to Google-CDN
    neighbor 9.9.9.10 remote-as 200
    ! Anunciar redes
    network 10.10.10.0 mask 255.255.255.0


    Configurar Router Google-CDN (ASN 200)

    enable
    configure terminal
    hostname Google-CDN


    ! Interfaces
    interface FastEthernet3/0
    description to-Server-Google-CDN
    ip address 8.8.8.2 255.255.255.0
    no shutdown


    interface FastEthernet6/0
    description to-IXP
    ip address 9.9.9.10 255.255.255.248
    no shutdown


    ! BGP
    router bgp 200
    ! peer to IXP
    neighbor 9.9.9.9 remote-as 1000
    ! Anunciar redes
    network 8.8.8.0 mask 255.255.255.0


    Configurar Router Facebook-CDN (ASN 100)

    enable
    configure terminal
    hostname Facebook-CDN


    ! Interfaces
    interface FastEthernet2/0
    description to-IXP
    ip address 9.9.9.2 255.255.255.248
    no shutdown


    interface FastEthernet3/0
    description to-Server-Facebook-CDN
    ip address 7.7.7.2 255.255.255.0
    no shutdown


    ! BGP
    router bgp 100
    ! Peer to IXP
    neighbor 9.9.9.1 remote-as 1000
    ! Anunciar redes
    network 7.7.7.0 mask 255.255.255.0


    Configurar Router ISP-Borde-TotalPlay (ASN 500)

    enable
    configure terminal
    hostname ISP-Borde-TotalPlay


    ! Interfaces
    interface FastEthernet2/0
    description to-Cirion-Carrier
    ip address 5.5.5.2 255.255.255.0
    no shutdown


    interface FastEthernet3/0
    description to-ISP-Core-TotalPlay
    ip address 11.11.12.254 255.255.255.0
    no shutdown


    interface FastEthernet4/0
    description to-IPX
    ip address 10.10.10.3 255.255.255.0
    no shutdown


    ! Filtro para simular un carrier extra, con esto hara que la ruta mas larga as path sea hacia cirion-carrier y la mas corta sea IXP, ya que sin esto se tendria 2 rutas iguales y no se podria prefenciar la ruta hacia ixp.
    route-map PREPEND_IN permit 10
    set as-path prepend 500 500


    ! BGP
    router bgp 500
    ! Peer to IXP
    neighbor 10.10.10.1 remote-as 1000
    ! Peer to Cirion-Carrier
    neighbor 5.5.5.1 remote-as 1100
    ! Peer to Cirion-Carrier (Carrier simulado)
    neighbor 5.5.5.1 route-map PREPEND_IN in
    ! Anunciar redes
    network 11.11.11.0 mask 255.255.255.0
    network 11.11.12.0 mask 255.255.255.0


    Configurar Router ISP-Core-TotalPlay

    enable
    configure terminal
    hostname ISP-Core-TotalPlay


    ! Interfaces
    interface FastEthernet2/0
    description to-Cliente-Final
    ip address 192.168.11.254 255.255.255.0
    ip nat inside
    no shutdown


    interface FastEthernet3/0
    description to-ISP-Border-TotalPlay
    ip address 11.11.12.2 255.255.255.0
    ip nat outside
    no shutdown


    ! ACL para permitir NAT desde la red LAN:
    access-list 1 permit 192.168.11.0 0.0.0.255


    ! NAT
    ip nat inside source list 1 interface FastEthernet3/0 overload


    ! Ruta por defecto
    ip route 0.0.0.0 0.0.0.0 11.11.12.254


    Configurar Router Alestra-Carrier (ASN 300)

    enable
    configure terminal
    hostname Alestra-Carrier


    ! Interfaces
    interface FastEthernet3/0
    description to-ISP-Borde-Intercun
    ip address 3.3.3.1 255.255.255.0
    no shutdown


    interface FastEthernet4/0
    description to-Cirion-Carrier
    ip address 12.12.12.1 255.255.255.0
    no shutdown


    ! BGP
    router bgp 300
    ! Peer to ISP-Borde-Intercun
    neighbor 3.3.3.2 remote-as 400
    ! Peer to Cirion-Carrier
    neighbor 12.12.12.2 remote-as 1100
    ! Anunciar redes
    redistribute connected


    Configurar Router Cirion-Carrier (ASN 1100)

    enable
    configure terminal
    hostname Cirion-Carrier


    ! Interfaces
    interface FastEthernet2/0
    description to-ISP-Borde-TotalPlay
    ip address 5.5.5.1 255.255.255.0
    no shutdown


    interface FastEthernet3/0
    description to-Google
    ip address 2.2.2.2 255.255.255.0
    no shutdown


    interface FastEthernet4/0
    description to-Alestra-Carrier
    ip address 12.12.12.2 255.255.255.0
    no shutdown


    interface FastEthernet5/0
    description to-Facebook
    ip address 1.1.1.2 255.255.255.0
    no shutdown


    ! BGP
    router bgp 1100
    ! Peer to Facebook
    neighbor 1.1.1.1 remote-as 100
    ! Peer to Google
    neighbor 2.2.2.1 remote-as 200
    ! Peer to ISP Borde TotalPlay
    neighbor 5.5.5.2 remote-as 500
    ! Peer to Alestra-Carrier
    neighbor 12.12.12.1 remote-as 300
    ! Anunciar redes
    redistribute connected




    Configurar Router Facebook (ASN 100)

    enable
    configure terminal
    hostname Facebook


    ! Interfaces
    interface FastEthernet2/0
    description to-Server-Facebook
    ip address 7.7.7.2 255.255.255.0
    no shutdown

    interface FastEthernet5/0
    description to-Cirion
    ip address 1.1.1.1 255.255.255.0
    no shutdown


    ! BGP
    router bgp 100
    ! peer con Cirion
    neighbor 1.1.1.2 remote-as 1100
    ! Anunciar red
    network 7.7.7.0 mask 255.255.255.0


    Configurar Router Google (ASN 200)

    enable
    configure terminal
    hostname Google


    ! Interfaces
    interface FastEthernet2/0
    description to-Server
    ip address 8.8.8.2 255.255.255.0
    no shutdown


    interface FastEthernet3/0
    description to-Cirion-Carrier
    ip address 2.2.2.1 255.255.255.0
    no shutdown


    ! BGP
    router bgp 200
    !Peer-Cirion-Carrier
    neighbor 2.2.2.2 remote-as 1100
    ! Anunciar red
    network 8.8.8.0 mask 255.255.255.0



    Configuracion en los servidores
    Google: ip 8.8.8.8 255.255.255.0 8.8.8.2
    Facebook: ip7.7.7.7 255.255.255.0 7.7.7.2

    Configuracion en los servidores cdn
    Google CDN: ip 8.8.8.8 255.255.255.0 8.8.8.2
    Facebook CDN: ip7.7.7.7 255.255.255.0 7.7.7.2


    Verificación en los bordes
    En ISP-Border-Intercun

    show ip bgp

    Nombre:  ixp-cisco-1.png
Visitas: 21
Tamaño: 62.6 KB
    para llegar A Google (8.8.8.8)
    1- Alestra-Carrier 300 > Cirion-Carrier 1100 > Google 200
    2- IXP 1000 > Google CDN 100
    para llegar A Facebook (7.7.7.7)
    1- Alestra-Carrier 300 > Cirion-Carrier 1100 > Facebook 200
    2- IXP 1000 > Facebook CDN 200
    En ese caso vemos que la mejor ruta es la 2, la del IXP porque es mas corta en cuanto caminos AS Path
    En ISP-Border-Total Play

    show ip bgp

    Nombre:  ixp-cisco-2.png
Visitas: 20
Tamaño: 62.0 KB

    para llegar A Google (8.8.8.8)
    1- Borde Total Play 500, Borde Total Play 500 > Cirion-Carrier 1100 > Google 200
    2- IXP 1000 > Google CDN 100
    para llegar A Facebook (7.7.7.7)
    1- Borde Total Play 500, Borde Total Play 500 > Cirion-Carrier 1100 > Facebook 200
    2- IXP 1000 > Facebook CDN 200
    si nos damos cuenta se repite el mismo as 500 en el as path, esto porque en la configuración de ISP-Borde-Totalplay se hizo un prepend interno hacia peer de cirion-carrier, esto se hizo para simular un carrier extra es decir para hacer el as path mas largo a proposito para hacer que ese camino sea el segundo preferido para llegar a los servidores google y facebook.
    con esto vemos que el mejor camino sera hacia el IXP, y los Carriers como camino secundario


    Verificación en los clientes finales.
    Configuración en clientes finales

    Cliente final Intercun: ip192.168.9.2 255.255.255.0 192.168.9.254
    hacemos ping a google y a facebook y vemos que se valla por los cdns del IXP
    Nombre:  test-ixp-1.png
Visitas: 22
Tamaño: 83.5 KB

    Cliente final Total play: ip192.168.11.2 255.255.255.0 192.168.11.254
    hacemos ping a google y a facebook y vemos que se valla por los cdns del IXP
    Nombre:  test-ixp-2.png
Visitas: 23
Tamaño: 83.0 KB

    Simular fallo IXP
    entramos a IXP y apagamos las interfaces que conectan a nuestros CDNs


    enable
    config

    ! apagar conexion hacia facebook cdn
    interface FastEthernet5/0
    shutdown

    ! apagar conexion hacia google cdn
    interface FastEthernet6/0
    shutdown



    Verificación segunda ruta alternativa, entramos en los clientes finales.

    Cliente final Intercun:
    Nombre:  fallo-ixp-1.png
Visitas: 22
Tamaño: 89.7 KB
    Cliente final Total play:
    Nombre:  fallo-ixp-2.png
Visitas: 22
Tamaño: 82.9 KB

    Con esto confirmamos que la segunda mejor ruta en caso que falle IXP o los CDNs sera la de los Carries, si volvemos a encender las interfaces que conectan a nuestros cnds, en automatico volvera a tomar la ruta hacia IXP para asi llegar a los nuestros cdns de google y facebbok
    Última edición por miguel20; 28/04/2025 a las 16:46

Etiquetas para este tema

Permisos de publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •