Nosotros como AS200 nos vamos a conectar al AS100 y al AS300 los cuales anuncian sus propias rutas, y queremos evitar ser un sistema de tránsito entre los dos sistemas autónomos.
La configuración inicial de BGP de nuestro router es la siguiente
router bgp 200 no synchronization bgp log-neighbor-changes redistribute static neighbor 10.0.0.2 remote-as 100 neighbor 10.0.0.6 remote-as 300 no auto-summary
Ahora vamos a ver que anunciamos respectivamente al AS100
AS200#sh ip bgp neighbors 10.0.0.2 advertised-routes
BGP table version is 7, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 20.0.0.0 10.0.0.6 0 0 300 ?
*> 21.0.0.0/16 10.0.0.6 0 0 300 ?
*> 26.0.0.0/14 10.0.0.6 0 0 300 ?
*> 70.0.0.0 10.0.0.6 0 0 300 ?
*> 79.0.0.0/16 0.0.0.0 0 32768 ?
*> 80.0.0.0/16 0.0.0.0 0 32768 ?
Total number of prefixes 6
y que anunciamos al AS300
AS200#sh ip bgp neighbors 10.0.0.6 advertised-routes
BGP table version is 7, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 20.0.0.0 10.0.0.6 0 0 300 ?
*> 21.0.0.0/16 10.0.0.6 0 0 300 ?
*> 26.0.0.0/14 10.0.0.6 0 0 300 ?
*> 70.0.0.0 10.0.0.6 0 0 300 ?
*> 79.0.0.0/16 0.0.0.0 0 32768 ?
*> 80.0.0.0/16 0.0.0.0 0 32768 ?
Total number of prefixes 6
para que el AS300 no obtenga por nuestra parte rutas transferidas desde el AS100 aplicaremos un filtro mediante un as-path access-list
ip as-path access-list 1 permit ^$ ip as-path access-list 1 deny .*lo mismo haremos hacia el AS100 y vemos como queda la configuración de BGP actual
AS200#sh run | s bgp router bgp 200 no synchronization bgp log-neighbor-changes redistribute static neighbor 10.0.0.2 remote-as 100 neighbor 10.0.0.2 filter-list 1 out neighbor 10.0.0.6 remote-as 300 neighbor 10.0.0.6 filter-list 1 out no auto-summary
Forzamos el envio de rutas de nuevo y vemos que estamos anunciando actualmente
AS200#clear ip bgp * soft out
AS200#sh ip bgp neighbors 10.0.0.2 advertised-routes
BGP table version is 7, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 79.0.0.0/16 0.0.0.0 0 32768 ?
*> 80.0.0.0/16 0.0.0.0 0 32768 ?
Total number of prefixes 2
AS200#sh ip bgp neighbors 10.0.0.6 advertised-routes
BGP table version is 7, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 79.0.0.0/16 0.0.0.0 0 32768 ?
*> 80.0.0.0/16 0.0.0.0 0 32768 ?
Total number of prefixes 2
así de simple es la solución para no convertirnos en un sistema de tránsito.

No hay comentarios:
Publicar un comentario