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: topologia.png
Visitas: 4
Tamaño: 159.9 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3141&d=1723697186)
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: facebook ip address.png
Visitas: 3
Tamaño: 7.5 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3142&d=1723697221)
/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: facebook instances.png
Visitas: 3
Tamaño: 13.6 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3143&d=1723697371)
/routing bgp instance set default as=100
Agregamos la red para que BGP se encargue de publicarlas a los demás peer.
![Nombre: facebook network.png
Visitas: 3
Tamaño: 13.1 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3145&d=1723697452)
/routing bgp network add network=1.1.1.0/24 synchronize=no
Establecemos el peer con nuestro vecino.
![Nombre: facebook peer.png
Visitas: 3
Tamaño: 23.0 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3146&d=1723697521)
/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: Google ip address.png
Visitas: 3
Tamaño: 6.7 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3147&d=1723697581)
/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: Google routing bgp.jpg
Visitas: 4
Tamaño: 108.1 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3148&d=1723697619)
/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: alestra ip address.png
Visitas: 3
Tamaño: 7.6 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3149&d=1723697655)
/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-Border interface=ether3 network=3.3.3.0
2 Configurar el enrutamiento BGP
![Nombre: alestra routing bgp 1.jpg
Visitas: 2
Tamaño: 83.1 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3150&d=1723697690)
![Nombre: alestra routing bgp 2.png
Visitas: 2
Tamaño: 11.8 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3151&d=1723697704)
#
/routing bgp network add network=3.3.3.0/24 synchronize=no
#
/routing bgp instance set default as=300
#
/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-border remote-address=3.3.3.2 remote-as=400
#
Configuración de router ISP-Border
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: isp-border-ip address.png
Visitas: 4
Tamaño: 7.0 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3152&d=1723697751)
/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: isp-border-routing bgp.jpg
Visitas: 4
Tamaño: 103.2 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3153&d=1723697791)
#
/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: isp-core-ip address.png
Visitas: 2
Tamaño: 6.9 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3154&d=1723697825)
/ip address
add address=4.4.5.2/24 comment=to-ISP-Border 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: isp-core-ip route.png
Visitas: 2
Tamaño: 23.7 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3155&d=1723697867)
/ip route add distance=1 gateway=4.4.5.254
3 Agregamos el NAT para salida a internet de los clientes
![Nombre: isp-core-nat.png
Visitas: 2
Tamaño: 30.0 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3156&d=1723697899)
/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.png
Visitas: 2
Tamaño: 194.2 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3157&d=1723698107)
Dentro de la tabla de ruteo del Mikrotik ISP-Border podemos ver como se estan recibiendo las rutas de las redes simuladas en internet.
![Nombre: tabla de rutas de ISP-Border.png
Visitas: 2
Tamaño: 38.3 KB](http://foroisp.com/attachment.php?s=ddee243702278a5a93c26656f396697a&attachmentid=3158&d=1723698399)