User Tag List

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

Tema: Escenario full routing BGP y ruta por defecto BGP

  1. #1
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    28
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Escenario full routing BGP y ruta por defecto BGP

    En este post se representará un escenario donde simulamos que redes de internet se están comunicando con una red ISP a través de un Carrier. Los prefijos y ASN utilizados son sólo para emular el laboratorio generado en eve-ng

    Nombre:  diagrama-bgp.png
Visitas: 6
Tamaño: 500.2 KB

    Configuración de router Facebook

    Este router se usa para simular comunicación hacia Facebook. Como el router tiene su propio ASN esta publicando el prefijo 1.1.1.0/24 mediante BGP.

    1 Configurar direccionamiento en las interfaces.

    Este equipo tiene dos enlaces, uno hacia el router de Alestra y otro hacia un servidor que es a donde deben conectarse los clientes de la red ISP.

    Nombre:  ip-address-facebook-bgp.png
Visitas: 6
Tamaño: 286.0 KB

    /ip address
    add address=1.1.1.1/30 comment=to-Alestra interface=ether1 network=1.1.1.0
    add address=1.1.1.5/30 comment=to-Server-Facebook interface=ether2 network=1.1.1.4


    2 Anuncio de rutas mediante BGP

    Agregamos el ASN dentro de la instancia default del Mikrotik.

    Nombre:  instances-facebook-bgp.png
Visitas: 5
Tamaño: 86.0 KB

    /routing bgp instance set default as=100


    Agregamos la red para que BGP se encargue de publicarlas a los demás peer.

    Nombre:  networks-facebook-bgp.png
Visitas: 6
Tamaño: 57.8 KB

    /routing bgp network add network=1.1.1.0/24 synchronize=no


    Establecemos el peer con nuestro vecino.

    Nombre:  peer-facebook-bgp.png
Visitas: 5
Tamaño: 95.4 KB

    /routing bgp peer add name=peer-to-alestra remote-address=1.1.1.2 remote-as=300


    Configuración de router Google

    De la misma forma en como configuramos el router Facebook, en este configuraremos el peer hacia el router Alestra con la diferencia que aquí estamos anunciando dos prefijos, el 2.2.2.0/24 y el 8.8.8.0/24.

    1 Configurar direccionamiento en las interfaces.

    Nombre:  ip address-google-bgp.png
Visitas: 5
Tamaño: 6.7 KB

    /ip address
    add address=2.2.2.1/24 comment=to-Alestra interface=ether1 network=2.2.2.0
    add address=8.8.8.2/24 comment=to-Server-Google interface=ether2 network=8.8.8.0


    2 Configurar el enrutamiento BGP

    Nombre:  routing-bgp-google-bgp.png
Visitas: 5
Tamaño: 132.5 KB

    /routing bgp network
    add network=2.2.2.0/24 synchronize=no
    add network=8.8.8.0/24 synchronize=no
    #
    /routing bgp instance set default as=200
    #
    /routing bgp peer add name=peer-to-alestra remote-address=2.2.2.2 remote-as=300


    Configuración de router Alestra

    Para este laboratorio hemos colocado Alestra como representación de un Carrier, por lo cual sólo hemos puesto valores ficticios con el fin de la práctica. El prefijo anunciado por este router es el 3.3.3.0/24.

    1 Configurar direccionamiento en las interfaces.

    Nombre:  ip address-alestra-bgp.png
Visitas: 8
Tamaño: 7.6 KB

    /ip address
    add address=1.1.1.2/30 comment=to-Facebook interface=ether1 network=1.1.1.0
    add address=2.2.2.2/24 comment=to-Google interface=ether2 network=2.2.2.0
    add address=3.3.3.1/24 comment=to-ISP-Borde interface=ether3 network=3.3.3.0


    2 Configurar el enrutamiento BGP

    Nombre:  routing-bgp-alestra-bgp.png
Visitas: 4
Tamaño: 58.5 KB

    Nombre:  networks-alestra-bgp.png
Visitas: 4
Tamaño: 11.8 KB

    #
    /routing bgp network add network=3.3.3.0/24 synchronize=no
    #
    /routing bgp instance set default as=300 redistribute-connected=yes
    #
    /routing bgp peer
    add name=peer-to-facebook remote-address=1.1.1.1 remote-as=100
    add name=peer-to-google remote-address=2.2.2.1 remote-as=200
    add name=peer-to-isp-borde remote-address=3.3.3.2 remote-as=400
    #


    Configuración de router ISP-Borde

    Este router viene a representar a un ISP que esta haciendo peering con su Carrier (Alestra para esta práctica), por lo lo que este anuncia su prefijo hacia el Carrier mediante BGP y recibe las rutas de internet en su tabla de ruteo.

    1 Configurar direccionamiento en las interfaces.

    Nombre:  ip-address-isp-border-bgp.png
Visitas: 4
Tamaño: 7.0 KB

    /ip address
    add address=3.3.3.2/24 comment=to-Alestra interface=ether1 network=3.3.3.0
    add address=4.4.5.254/24 comment=to-ISP-Core interface=ether2 network=4.4.5.0


    2 Configurar el enrutamiento BGP

    Nombre:  routing-bgp-isp-borde-bgp.png
Visitas: 5
Tamaño: 363.4 KB

    #
    /routing bgp network
    add network=4.4.4.0/24 synchronize=no
    add network=4.4.5.0/24 synchronize=no
    #
    /routing bgp instance set default as=400
    #
    /routing bgp peer add name=peer-to-alestra remote-address=3.3.3.1 remote-as=300
    #


    Configuración de router ISP-Core

    Este router viene a representar un router de agregación donde estamos colocando a los clientes de la red. Se ha puesto que el enlace hacia el borde use las ips públicas de la red para que se pueda natear directamente desde el router core.

    1 Configurar direccionamiento en las interfaces.

    Nombre:  ip-address-isp-core-bgp.png
Visitas: 5
Tamaño: 6.9 KB

    /ip address
    add address=4.4.5.2/24 comment=to-ISP-Borde interface=ether1 network=4.4.5.0
    add address=192.168.9.254/24 comment=to-Cliente-Final interface=ether8 network=192.168.9.0


    2 Colocamos la ruta por defecto hacia el router de borde

    Nombre:  ip-route-isp-core-bgp.png
Visitas: 4
Tamaño: 23.7 KB

    /ip route add distance=1 gateway=4.4.5.254


    3 Agregamos el NAT para salida a internet de los clientes

    Nombre:  nat-isp-core-bgp.png
Visitas: 4
Tamaño: 30.0 KB

    /ip firewall nat add action=masquerade chain=srcnat out-interface=ether1


    Verificación en cliente final

    Si entramos al equipo de laptop que tenemos conectado al ISP-Core, podemos hacer un ping a 8.8.8.8 y veremos como obtenemos respuesta.

    Nombre:  cliente final ping-bgp.png
Visitas: 4
Tamaño: 194.2 KB

    Dentro de la tabla de ruteo del Mikrotik ISP-Borde podemos ver como se estan recibiendo las rutas de las redes simuladas en internet.

    Nombre:  tabla-rutas-isp-borde-bgp.png
Visitas: 4
Tamaño: 38.3 KB

    Nota

    Dado que tenemos un enlace hacia el router Alestra donde usamos el prefijo completo, la ruta recibida por BGP se observa secundaria respetando la prioridad de las rutas directamente conectadas.

  2. #2
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    28
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Conclusiones de la práctica.

    Escenario 1.- Hacer full routing

    Pregunta1.- ¿Alestra va a tomar las rutas de facebook y google cuando haga sesion BGP? Si, En este escenario el router Alestra esta simulando ser un Carrier con conexión directa en los datacenter de Facebook y Google, por lo que recibe directamente las redes medianrte peering BGP.

    ¿Dónde se ven las rutas? Dado que estamos en un router Mikrotik, las rutas las podemos observar en la tabla de ruteo del router

    Nombre:  ver-rutas-alestra-bgp.png
Visitas: 4
Tamaño: 75.6 KB

    Vemos que estan las redes 1.1.1.0/24 de facebook y 2.2.2.0/24, 8.8.8.0/24 de google. Debes poder hacer ping al 1.1.1.1, 2.2.2.1 y 8.8.8.8

    Para que las rutas se propaguen activamos la opcion redistribute-connected=yes

    Nombre:  activar-redistribute-connected-alestra-bgp.png
Visitas: 4
Tamaño: 108.1 KB

    Pregunta2.- El router ISP-Borde va a tomar las rutas de Alestra, facebook y google cuando haga sesion BGP? Si, las va recibir directamente del carrier alestra. Pero tenemos que habilitar la opcion Redistrbute Connected en BGP

    ¿Dónde veo las rutas?

    Nombre:  ver-rutas-isp-borde-bgp.png
Visitas: 4
Tamaño: 80.0 KB

    Pruebas de PING :

    Nombre:  ping-isp-borde-bgp.png
Visitas: 4
Tamaño: 149.2 KB

    Prueba 2.-

    Realizar ping 1.1.1.1 facebook, ping 2.2.2.1 y 8.8.8.8 google. Desde la Laptop



    Nombre:  pings-laptop-bgp.png
Visitas: 4
Tamaño: 152.4 KB

    ¿Cuántos saltos tengo desde la laptop hacia google 8.8.8.8?

    Nombre:  traceroute-laptop-bgp.png
Visitas: 4
Tamaño: 113.7 KB

    ¿Cuántos saltos tengo desde la laptop hacia el carrier alestra 3.3.3.1?

    Nombre:  traceroute-laptop-alestra-bgp.png
Visitas: 4
Tamaño: 104.4 KB

    ¿Cuántos saltos tengo desde la el carrier Alestra hacia google 8.8.8.8?

    Nombre:  traceroute-alestra-bgp.png
Visitas: 4
Tamaño: 69.2 KB

    ¿Cuántos saltos tengo desde el ISP-Borde hacia google 8.8.8.8 y faceboo 1.1.1.1?

    Nombre:  traceroute-isp-borde-bgp.png
Visitas: 4
Tamaño: 84.1 KB

    Prueba 3.- ¿Qué pasa si anuncio solo la red 4.4.5.0/24 en ISP Borde e intento usar la red 4.4.6.0/24 en el router ISP Core, es decir agrego las ips necesarias en ip/address o rutas necesarias en ip/routes. Tendre conexion a google y facebook desde ISP-Core?
    Respuesta: No tendras conexion ya que la red 4.4.4.6.0/24 no está anunciada en ISP Borde. Todos los equipos conectados bajo el router ISP Borde no podran usar ips que no esten anunciadas en BGP.


    Ver ejemplo de usar red 4.4.6.0/24 sin estar anunciada, No hay Ping

    Nombre:  nuevo-segmento-isp-core-bgp.png
Visitas: 5
Tamaño: 75.1 KB

    Nombre:  nuevo-segmento-isp-borde-bgp.png
Visitas: 4
Tamaño: 46.9 KB

    Nombre:  networks-isp-borde-bgp.png
Visitas: 4
Tamaño: 43.2 KB

    Nombre:  ping-timeout-isp-core.png
Visitas: 4
Tamaño: 81.1 KB

    ¿Cómo resolveriamos esto? La forma más fácil sería que en el ISP-Borde agreguemos el segmento 4.4.6.0/24 dentro de las redes anunciadas hacia el Carrier. Eso se hace en Routing>BGP

    Nos vamos a ISP Borde y anunciamos al rede 4.4.6.0/24

    Nombre:  anucio-segmento-isp-borde-bgp.png
Visitas: 6
Tamaño: 64.0 KB

    Nos vamos a ISP Core y debemos dar ping a google

    Nombre:  ping-nuevo-segmento-isp-core-bgp.png
Visitas: 4
Tamaño: 80.6 KB

  3. #3
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    28
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Configuración Escenario 1 Full routing BGP

    CONFIGURACION DE ROUTER FACEBOOK



    #
    /ip address
    add address=1.1.1.1/30 comment=to-Alestra interface=ether1 network=1.1.1.0
    add address=1.1.1.5/30 comment=to-Server-Facebook interface=ether2 network=1.1.1.4
    #
    /ip dhcp-client add disabled=no interface=ether3
    #
    /routing bgp network add network=1.1.1.0/24 synchronize=no
    /routing bgp instance set default as=100
    /routing bgp peer add name=peer-to-alestra remote-address=1.1.1.2 remote-as=300
    #
    /system identity set name=Facebook
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER GOOGLE



    #
    /ip address
    add address=2.2.2.1/24 comment=to-Alestra interface=ether1 network=2.2.2.0
    add address=8.8.8.2/24 comment=to-Server-Google interface=ether2 network=8.8.8.0
    #
    /routing bgp network
    add network=2.2.2.0/24 synchronize=no
    add network=8.8.8.0/24 synchronize=no
    /routing bgp instance set default as=200
    /routing bgp peer add name=peer-to-alestra remote-address=2.2.2.2 remote-as=300
    #
    /system identity set name=Google
    /tool romon set enabled=yes
    #





    CONFIGURACION DE ROUTER ALESTRA


    #
    /ip address
    add address=1.1.1.2/30 comment=to-Facebook interface=ether1 network=1.1.1.0
    add address=2.2.2.2/24 comment=to-Google interface=ether2 network=2.2.2.0
    add address=3.3.3.1/24 comment=to-ISP-Borde interface=ether3 network=3.3.3.0
    #
    /routing bgp network add network=3.3.3.0/24 synchronize=no
    #
    /routing bgp instance set default as=300 redistribute-connected=yes
    #
    /routing bgp peer
    add name=peer-to-facebook remote-address=1.1.1.1 remote-as=100
    add name=peer-to-google remote-address=2.2.2.1 remote-as=200
    add name=peer-to-isp-borde remote-address=3.3.3.2 remote-as=400
    #
    /system identity set name=Alestra
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER ISP-BODER


    #
    /ip address
    add address=3.3.3.2/24 comment=to-Alestra interface=ether1 network=3.3.3.0
    add address=4.4.5.254/24 comment=to-ISP-Core interface=ether2 network=4.4.5.0
    #
    /routing bgp network
    add network=4.4.4.0/24 synchronize=no
    add network=4.4.5.0/24 synchronize=no
    #
    /routing bgp instance set default as=400
    #
    /routing bgp peer add name=peer-to-alestra remote-address=3.3.3.1 remote-as=300
    #
    /system identity set name=ISP-Borde
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER ISP-CORE


    #
    /ip address
    add address=4.4.5.2/24 comment=to-ISP-Borde interface=ether1 network=4.4.5.0
    add address=192.168.9.254/24 comment=to-Cliente-Final interface=ether8 network=192.168.9.0
    #
    /ip firewall nat add action=masquerade chain=srcnat out-interface=ether1
    #
    /ip route add distance=1 gateway=4.4.5.254
    #
    /system identity set name=ISP-Core
    /tool romon set enabled=yes
    #


    CONFIGURACION DE SERVER FACEBOOK

    Nombre:  laptop-server-facebook.png
Visitas: 5
Tamaño: 91.0 KB

    CONFIGURACION DE SERVER GOOGLE

    Nombre:  laptop-server-google.png
Visitas: 7
Tamaño: 88.3 KB

    CONFIGURACION DE CLIENTE FINAL


  4. #4
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    28
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Escenario ruta por defecto

    Supongamos que tenemos el mismo escenario anterior donde un ISP tiene que colocar su sesión BGP con el Carrier para anunciarse a internet. Quizás no se tenga un equipo con los suficientes recursos para recibir todas las rutas hacia internet (Full Routing).

    El ejemplo de arriba donde salen todas las rutas en Alestra e ISP-Borde es un ejemplo de full routing, en un escenario real nuestra tabla mostraria alrededor de 800 mil rutas, que son todas las conexiones a internet, a todos los servidores, incluidos foroisp.com

    Entonces podemos plantearle al Carrier que sólo nos entregue una ruta por defecto en nuestro ISP-Border. Para ellos el Carrier dentro del Router Alestra deberá colocar unos filtros de salida en el peer hacia el router ISP-Border y habilitar que propague una ruta por defecto.

    Configuramos filtro de Accept

    Nombre:  agregar-filtro-bgp-1.png
Visitas: 3
Tamaño: 74.4 KB

    Nombre:  agregar-filtro-bgp-2.png
Visitas: 3
Tamaño: 77.7 KB

    Configuramos filtro de discard

    Nombre:  agregar-filtro-bgp-3.png
Visitas: 3
Tamaño: 71.5 KB

    Nombre:  agregar-filtro-bgp-4.png
Visitas: 3
Tamaño: 77.5 KB

    Debemos tener estas 2 reglas

    Nombre:  filtros-alestra-bgp.png
Visitas: 2
Tamaño: 44.0 KB

    Activamos el filtro en el Peer de ISP-Borde

    Nombre:  activar-filtro-alestra-bgp.png
Visitas: 2
Tamaño: 101.7 KB

    Nos vamos a ISP Borde
    Si observamos la tabla de ruteo del ISP-Borde podremos comprobar que en ves de recibir las rutas de Facebook y Google, estamos recibiendo una ruta por default mediante BGP.

    Nombre:  rutas-defecto-isp-borde.png
Visitas: 2
Tamaño: 40.1 KB

    Nombre:  ping-google-isp-borde-bgp.png
Visitas: 2
Tamaño: 89.0 KB

    Nombre:  ping-google-isp-core-bgp.png
Visitas: 2
Tamaño: 83.2 KB

    Prueba 2.- ping 1.1.1.1 facebook, ping 2.2.2.1, 8.8.8.8 google. Si la laptop logra hacer ping es porque ISP Borde, su sesion [COLOR=var(--clrSquiggleHighlightTextColor,#000000)]bgp es correcto y tiene conexion hasta google[/COLOR]

    Nombre:  ping-ruta-default-cliente-final.png
Visitas: 2
Tamaño: 729.2 KB

    Comprobamos dentro de la laptop 'Cliente Final' con ping hacia las ips de los servidores Facebook y Google. Vemos como se sigue teniendo conectividad pero ahora se tiene gracias a la ruta por defecto que se recibe del Carrier.

    Prueba 3: ¿Qué pasa si anuncio solo la red 4.4.5.0/24 en ISP Borde e intento usar la red 4.4.6.0/24 en el router ISP Core, es decir agrego las ips necesarias en ip/address o rutas necesarias en ip/routes. Tendre conexion a google y facebook desde ISP-Core?

    Respuesta: No tendras conexion ya que la red 4.4.4.6.0/24 no esta anunciada en ISP Borde. Todos los equipos conectados bajo el router ISP Borde no podran usar ips que no esten anunciadas en BGP

    Para resolverlo sigue los pasos de la Prueba 3.- del ejemplo de full routing.

  5. #5
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    28
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Configuración Escenario 1 Full routing BGP

    CONFIGURACION DE ROUTER FACEBOOK


    #
    /ip address
    add address=1.1.1.1/30 comment=to-Alestra interface=ether1 network=1.1.1.0
    add address=1.1.1.5/30 comment=to-Server-Facebook interface=ether2 network=1.1.1.4
    #
    /ip dhcp-client add disabled=no interface=ether3
    #
    /routing bgp network add network=1.1.1.0/24 synchronize=no
    /routing bgp instance set default as=100
    /routing bgp peer add name=peer-to-alestra remote-address=1.1.1.2 remote-as=300
    #
    /system identity set name=Facebook
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER GOOGLE



    #
    /ip address
    add address=2.2.2.1/24 comment=to-Alestra interface=ether1 network=2.2.2.0
    add address=8.8.8.2/24 comment=to-Server-Google interface=ether2 network=8.8.8.0
    #
    /routing bgp network
    add network=2.2.2.0/24 synchronize=no
    add network=8.8.8.0/24 synchronize=no
    /routing bgp instance set default as=200
    /routing bgp peer add name=peer-to-alestra remote-address=2.2.2.2 remote-as=300
    #
    /system identity set name=Google
    /tool romon set enabled=yes
    #





    CONFIGURACION DE ROUTER ALESTRA


    #
    /routing filter
    add action=accept chain="BGP - OUT" prefix=0.0.0.0/0
    add action=discard chain="BGP - OUT"
    #
    /ip address
    add address=1.1.1.2/30 comment=to-Facebook interface=ether1 network=1.1.1.0
    add address=2.2.2.2/24 comment=to-Google interface=ether2 network=2.2.2.0
    add default-originate=always name=peer-to-isp-border out-filter="BGP - OUT" remote-address=3.3.3.2 remote-as=400
    #
    /routing bgp network add network=3.3.3.0/24 synchronize=no
    #
    /routing bgp instance set default as=300 redistribute-connected=yes
    #
    /routing bgp peer
    add name=peer-to-facebook remote-address=1.1.1.1 remote-as=100
    add name=peer-to-google remote-address=2.2.2.1 remote-as=200
    add name=peer-to-isp-borde remote-address=3.3.3.2 remote-as=400
    #
    /system identity set name=Alestra
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER ISP-BODER


    #
    /ip address
    add address=3.3.3.2/24 comment=to-Alestra interface=ether1 network=3.3.3.0
    add address=4.4.5.254/24 comment=to-ISP-Core interface=ether2 network=4.4.5.0
    #
    /routing bgp network
    add network=4.4.4.0/24 synchronize=no
    add network=4.4.5.0/24 synchronize=no
    #
    /routing bgp instance set default as=400
    #
    /routing bgp peer add name=peer-to-alestra remote-address=3.3.3.1 remote-as=300
    #
    /system identity set name=ISP-Borde
    /tool romon set enabled=yes
    #



    CONFIGURACION DE ROUTER ISP-CORE


    #
    /ip address
    add address=4.4.5.2/24 comment=to-ISP-Borde interface=ether1 network=4.4.5.0
    add address=192.168.9.254/24 comment=to-Cliente-Final interface=ether8 network=192.168.9.0
    #
    /ip firewall nat add action=masquerade chain=srcnat out-interface=ether1
    #
    /ip route add distance=1 gateway=4.4.5.254
    #
    /system identity set name=ISP-Core
    /tool romon set enabled=yes
    #

Permisos de publicación

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