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
Como ayuda, se puede tomar en cuenta los siguientes manuales:
Activar internet en dispositivos Ubuntu en EVE NG
Como entrar por Winbox y poner Romon en Eve NG
Se pretende llegar al siguiente diagrama
Configuración de router Google
Este router se usa para simular comunicación hacia Google. Como el router tiene su propio ASN esta publicando el prefijo 8.8.8.0/24 y 2.2.2.0/24 mediante BGP.
1 Configurar direccionamiento en las interfaces.
/ip address
add address=8.8.8.1/24 comment=to-Server-Google interface=ether4 network=8.8.8.0add address=2.2.2.2/24 comment=to-Liberty interface=ether2 network=2.2.2.0
add address=3.3.3.2/24 comment=to-Cirion interface=ether3 network=3.3.3.0
2 Configurar el enrutamiento BGP
/routing bgp network
add network=8.8.8.0/24 synchronize=no
#
/routing bgp instance set default as=15169
#
/routing bgp peer
add name=to-liberty remote-address=2.2.2.1 remote-as=6830
add name=to-cirion remote-address=3.3.3.1 remote-as=272614
3 Configuración Servidor Google
/ip 8.8.8.8 255.255.255.0 8.8.8.1
Script de router Google
/routing bgp instance
set default as=15169/ip address
add address=8.8.8.1/24 comment=to-Server-Google interface=ether4 network=8.8.8.0
add address=2.2.2.2/24 comment=to-Liberty interface=ether2 network=2.2.2.0
add address=3.3.3.2/24 comment=to-Cirion interface=ether3 network=3.3.3.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-liberty remote-address=2.2.2.1 remote-as=6830
add name=to-cirion remote-address=3.3.3.1 remote-as=272614
/system identity
set name=google
/tool romon
set enabled=yes
Configuración de router Liberty
Para este laboratorio hemos colocado Liberty 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 181.191.190.48/28 mediante BGP.
1 Configurar direccionamiento en las interfaces.
/ip address
add address=2.2.2.1/24 comment=to-Google interface=ether2 network=2.2.2.0
add address=181.191.190.54/28 comment=to-ISP-Borde interface=ether3 network=181.191.190.48
2 Configurar el enrutamiento BGP
#
/routing bgp network
add network=181.191.190.48/28 synchronize=no
#
/routing bgp instance
set default as=6830 redistribute-connected=yes
#
//routing bgp peer
add name=to-google remote-address=2.2.2.2 remote-as=15169
add name=to-isp-borde remote-address=181.191.190.55 remote-as=270200
#
Script de router Liberty
/routing bgp instance
set default as=6830 redistribute-connected=yes/ip address
add address=2.2.2.1/24 comment=to-Google interface=ether2 network=2.2.2.0
add address=181.191.190.54/28 comment=to-ISP-Borde interface=ether3 network=181.191.190.48
/ip dhcp-client
add disabled=no interface=ether1
/routing bgp network
add network=181.191.190.48/28 synchronize=no
/routing bgp peer
add name=to-google remote-address=2.2.2.2 remote-as=15169
add name=to-isp-borde remote-address=181.191.190.55 remote-as=270200
/system identity
set name=liberty
/tool romon
set enabled=yes
Configuración de router Cirion
Para este laboratorio hemos colocado Cirion 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 181.191.190.48/28 mediante BGP.
1 Configurar direccionamiento en las interfaces.
/ip address
add address=3.3.3.1/24 comment=to-Google interface=ether3 network=3.3.3.0
add address=204.190.201.98/30 comment=to-ISP-Borde interface=ether2 network=204.190.201.96
2 Configurar el enrutamiento BGP
#
/routing bgp instance
set default as=272614 redistribute-connected=yes
#
/routing bgp network
add network=204.190.201.96/30 synchronize=no
#
/routing bgp peer
add name=to-google remote-address=3.3.3.2 remote-as=15169
add name=to-isp-borde remote-address=204.190.201.97 remote-as=270200
#
Script de router Cirion
/routing bgp instance
set default as=272614 redistribute-connected=yes/ip address
add address=3.3.3.1/24 comment=to-Google interface=ether3 network=3.3.3.0
add address=204.190.201.98/30 comment=to-ISP-Borde interface=ether2 network=204.190.201.96
/ip dhcp-client
add disabled=no interface=ether1
/routing bgp network
add network=204.190.201.96/30 synchronize=no
/routing bgp peer
add name=to-google remote-address=3.3.3.2 remote-as=15169
add name=to-isp-borde remote-address=204.190.201.97 remote-as=270200
/system identity
set name=cirion
/tool romon
set enabled=yes
Configuración de router ISP-Borde
Este router viene a representar a un ISP que esta haciendo peering con 2 Carriers (Liberty y Cirion para esta práctica), por lo lo que este anuncia su prefijo hacia los Carriers mediante BGP y recibe la ruta por defecto de internet en su tabla de ruteo.
1 Configurar direccionamiento en las interfaces.
/ip address
add address=204.190.201.97/30 comment=to-Cirion interface=ether2 network=204.190.201.96add address=181.191.190.55/28 comment=to-Liberty interface=ether3 network=181.191.190.48
add address=190.9.108.1/24 comment=to-ISP-Core interface=ether4 network=190.9.108.0
2 Configurar filtros para el prepend
3 Configurar el enrutamiento BGP
#
/routing bgp network
add network=190.9.108.0/24 synchronize=no
#
/routing bgp instance
set default as=270200
#
/routing bgp peer
add name=to-cirion remote-address=204.190.201.98 remote-as=272614
add in-filter=ruta_larga name=to-liberty remote-address=181.191.190.54 remote-as=6830
#
Script de router ISP-Borde
/routing bgp instance
set default as=270200/ip address
add address=204.190.201.97/30 comment=to-Cirion interface=ether2 network=204.190.201.96
add address=181.191.190.55/28 comment=to-Liberty interface=ether3 network=181.191.190.48
add address=190.9.108.1/24 comment=to-ISP-Core interface=ether4 network=190.9.108.0
/ip dhcp-client
add disabled=no interface=ether1
/routing bgp network
add network=190.9.108.0/24 synchronize=no
/routing bgp peer
add name=to-cirion remote-address=204.190.201.98 remote-as=272614
add in-filter=ruta_larga name=to-liberty remote-address=181.191.190.54 remote-as=6830
/routing filter
add action=accept bgp-as-path=2 chain=ruta_larga
/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.
/ip address
add address=190.9.108.2/24 comment=to-ISP-Borde interface=ether4 network=190.9.108.0
add address=192.168.20.1/24 comment=to-Cliente-Final interface=ether2 network=192.168.20.0
2 Colocamos la ruta por defecto hacia el router de borde
/ip route add distance=1 gateway=4.4.5.254
3 Agregamos el NAT para salida a internet de los clientes
/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
/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.
ping 8.8.8.8
tracer 8.8.8.8
Última edición por josemiguel; Ayer a las 14:06


Gracias:
Me agrada:
Me desagrada: 



Citar