User Tag List

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

Tema: Escenario BGP Red ISP con Mikrotik

Ver modo hilado

Mensaje anterior Mensaje anterior   Próximo mensaje Próximo mensaje
  1. #1
    Avatar de josemiguel
    Fecha de ingreso
    08 Sep, 22
    Mensajes
    53
    Reconocimientos
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Escenario BGP Red ISP con Mikrotik

    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

    Nota



    Se pretende llegar al siguiente diagrama

    Nombre:  Diagrama-BGP-Red-ISP-Simulado-MK.jpg
Visitas: 11
Tamaño: 97.8 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:  add-list-route-core-red-isp-mk.png
Visitas: 11
Tamaño: 82.2 KB

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


    2 Configurar el enrutamiento BGP

    Agregamos el ASN dentro de la instancia default del Mikrotik.

    Nombre:  bgp-instance-isp-borde-red-isp-mk.png
Visitas: 11
Tamaño: 85.7 KB

    /routing bgp instance set default as=100


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

    Nombre:  bgp-networks-red-isp-mk.png
Visitas: 11
Tamaño: 70.9 KB

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


    Establecemos el peer con nuestro vecino.

    Nombre:  peer-established-red-isp-mk-fb.png
Visitas: 11
Tamaño: 101.2 KB

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


    3 Configuración Servidor Facebook

    Nombre:  config-server-fb-red-isp-mk.png
Visitas: 11
Tamaño: 12.3 KB

    /ip 1.1.1.6 255.255.255.252 1.1.1.5


    Script de router Facebook

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


    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:  add-list-google-red-isp-mk.png
Visitas: 11
Tamaño: 109.6 KB

    /ip address
    add address=2.2.2.1/24 comment=to-Alestra interface=ether3 network=2.2.2.0
    add address=8.8.8.1/24 comment=to-Server-Google interface=ether4 network=8.8.8.0


    2 Configurar el enrutamiento BGP

    Nombre:  bgp-session-red-isp-mk.png
Visitas: 11
Tamaño: 131.8 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=to-Alestra remote-address=2.2.2.2 remote-as=300


    3 Configuración Servidor Google

    Nombre:  config-server-google-red-isp-mk.png
Visitas: 11
Tamaño: 13.0 KB

    /ip 8.8.8.8 255.255.255.0 8.8.8.1


    Script de router Facebook

    /routing bgp instance set default as=200
    /ip address
    add address=2.2.2.1/24 comment=to-Alestra interface=ether3 network=2.2.2.0
    add address=8.8.8.1/24 comment=to-Server-Google interface=ether4 network=8.8.8.0
    /ip dhcp-client
    add disabled=no interface=ether1
    /routing bgp network
    add network=8.8.8.0/24 synchronize=no
    /routing bgp peer
    add name=to-Alestra remote-address=2.2.2.2 remote-as=300
    /system identity
    set name=google
    /tool romon
    set enabled=yes


    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:  add-list-alestra-red-isp-mk.png
Visitas: 11
Tamaño: 119.8 KB

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


    2 Configurar el enrutamiento BGP

    Configuramos filtro de Accept y Discard

    Nombre:  bgp-filtros-1-alestra-red-isp-mk.png
Visitas: 11
Tamaño: 91.8 KB

    Nombre:  bgp-filtros-2-alestra-red-isp-mk.png
Visitas: 11
Tamaño: 96.7 KB

    /routing filter
    add action=accept chain="BGP - Out" prefix=0.0.0.0/0
    add action=discard chain="BGP - Out"


    Activamos el filtro en el Peer de ISP-Borde

    Nombre:  bgp-session-alestra-red-isp-mk.png
Visitas: 11
Tamaño: 139.5 KB

    #
    /routing bgp network
    add network=3.3.3.0/24 synchronize=no
    #
    /routing bgp instance set default as=300 redistribute-connected=yes
    #
    add default-originate=always name=to-ISP-Borde out-filter="BGP - Out" remote-address=3.3.3.2 remote-as=400
    #


    Script de router Alestra

    /routing bgp instance
    set default as=300 redistribute-connected=yes
    /ip address
    add address=1.1.1.2/30 comment=to-Facebook interface=ether2 network=1.1.1.0
    add address=2.2.2.2/24 comment=to-Google interface=ether3 network=2.2.2.0
    add address=3.3.3.1/24 comment=to-ISP-Borde interface=ether4 network=3.3.3.0
    /ip dhcp-client
    add disabled=no interface=ether1
    /routing bgp network
    add network=3.3.3.0/24 synchronize=no
    /routing bgp peer
    add name=to-Facebook remote-address=1.1.1.1 remote-as=100
    add name=to-google remote-address=2.2.2.1 remote-as=200
    add default-originate=always name=to-ISP-Borde out-filter="BGP - Out" remote-address=3.3.3.2 remote-as=400
    /routing filter
    add action=accept chain="BGP - Out" prefix=0.0.0.0/0
    add action=discard chain="BGP - Out"
    /system identity
    set name=alestra
    /tool romon
    set enabled=yes


    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:  add-list-ispborde-red-isp-mk.png
Visitas: 11
Tamaño: 134.3 KB

    /ip address
    add address=3.3.3.2/24 comment=to-Alesstra interface=ether4 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:  bgp-session-ispborde-red-isp-mk.png
Visitas: 11
Tamaño: 133.1 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--Alestra remote-address=3.3.3.1 remote-as=300
    #


    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:  list-route-ispborde-red-isp-mk.png
Visitas: 11
Tamaño: 67.8 KB

    Script de router ISP-Borde

    /routing bgp instance
    set default as=400/ip address
    add address=3.3.3.2/24 comment=to-Alesstra interface=ether4 network=3.3.3.0
    add address=4.4.5.254/24 comment=to-ISP-Core interface=ether2 network=4.4.5.0
    /ip dhcp-client
    add disabled=no interface=ether1
    /routing bgp network
    add network=4.4.5.0/24 synchronize=no
    /routing bgp peer
    add name=to--Alestra remote-address=3.3.3.1 remote-as=300
    /system identity
    set name=isp-borde
    /tool romon
    set enabled=yes


    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:  add-list-ispcore-red-isp-mk.png
Visitas: 11
Tamaño: 113.9 KB

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


    2 Colocamos la ruta por defecto hacia el router de borde

    Nombre:  default-route-ispcore-red-isp-mk.png
Visitas: 11
Tamaño: 105.4 KB

    /ip route add distance=1 gateway=4.4.5.254


    3 Agregamos el NAT para salida a internet de los clientes

    Nombre:  nat-ispcore-red-isp-mk.png
Visitas: 11
Tamaño: 107.0 KB

    /ip firewall nat add action=masquerade chain=srcnat


    Script de router ISP-Core

    /ip address
    add address=4.4.5.2/24 comment=to-ISP-Borde interface=ether2 network=4.4.5.0add address=192.168.9.254/24 comment=to-Cliente-Final interface=ether4 network=192.168.9.0
    /ip dhcp-client
    add disabled=no interface=ether1
    /ip firewall nat
    add action=masquerade chain=srcnat
    /ip route
    add distance=1 gateway=4.4.5.254
    /system identity
    set name=isp-core
    /tool romon
    set enabled=yes


    Verificación en cliente final

    1 Configuración Laptop Cliente Final

    Nombre:  cliente-final-config-red-isp-mk.png
Visitas: 11
Tamaño: 15.7 KB

    /ip 192.168.9.2 255.255.255.0 192.168.9.254


    2 Validación del Ping y Tracer

    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-red-isp-mk.png
Visitas: 11
Tamaño: 60.7 KB

    ping 8.8.8.8
    tracer 8.8.8.8
    Última edición por josemiguel; 05/06/2026 a las 13:14

Permisos de publicación

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