Beruflich Dokumente
Kultur Dokumente
1
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R1
interface loopback0
ip address 1.1.1.1 255.255.255.0
R2
interface loopback0
ip address 2.2.2.2 255.255.255.0
R1
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 disable-connected-check
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
neighbor 2.2.2.2 activate
exit-address-family
R2
router bgp 200
bgp router-id 2.2.2.2
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 disable-connected-check
neighbor 1.1.1.1 update-source Loopback0
2
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
En R1 cree las subredes 100.1.0.0/24 a 100.1.7.0/24. Redistribuyalas dentro de BGP. Utilcie el route-map
RED-CON.
R1
interface Loopback100
ip address 100.1.1.1 255.255.255.0 secondary
ip address 100.1.2.1 255.255.255.0 secondary
ip address 100.1.3.1 255.255.255.0 secondary
ip address 100.1.4.1 255.255.255.0 secondary
ip address 100.1.5.1 255.255.255.0 secondary
ip address 100.1.6.1 255.255.255.0 secondary
ip address 100.1.7.1 255.255.255.0 secondary
ip address 100.1.0.1 255.255.255.0
R2#show ip bgp
BGP table version is 9, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 100.1.0.0/24 1.1.1.1 0 0 100 ?
*> 100.1.1.0/24 1.1.1.1 0 0 100 ?
*> 100.1.2.0/24 1.1.1.1 0 0 100 ?
*> 100.1.3.0/24 1.1.1.1 0 0 100 ?
*> 100.1.4.0/24 1.1.1.1 0 0 100 ?
*> 100.1.5.0/24 1.1.1.1 0 0 100 ?
*> 100.1.6.0/24 1.1.1.1 0 0 100 ?
*> 100.1.7.0/24 1.1.1.1 0 0 100 ?
R1
router bgp 100
address-family ipv4
aggregate-address 100.1.0.0 255.255.248.0 summary-only
3
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R2#show ip bgp
BGP table version is 18, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
BGP ORF
En R2 cree y publique los prefijos 200.1.1.0/24, 201.1.1.0/24 y 202.1.1.0/24.
R1 debe indicar a R2 que solo necesita el prefijo 202.1.1.0/24.
El problema con esta configuración es que las actualizaciones viajan, se reciben, el router determina si existe algún
filtro y las bloquea. Esto implica gasto de BW, recursos del router (memoria, CPU).
Una forma efectiva es utilizar recursos de red es con ORF.
R2
interface Loopback200
ip address 200.1.1.2 255.255.255.0
interface Loopback201
ip address 201.1.1.2 255.255.255.0
interface Loopback202
ip address 202.1.1.2 255.255.255.0
4
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
network 202.1.1.0
R1
router bgp 100
address-family ipv4
neighbor 2.2.2.2 capability orf prefix-list send
R2
router bgp 200
address-family ipv4
neighbor 1.1.1.1 capability orf prefix-list receive
R1
ip prefix-list SOLO-202 permit 202.1.1.0/24
R1#
*Jun 6 11:36:03.023: BGP: nbr_topo global 2.2.2.2 IPv4 Unicast:base (0x6AD46428:1) rcvd Refresh Start-of-RIB
*Jun 6 11:36:03.023: BGP: nbr_topo global 2.2.2.2 IPv4 Unicast:base (0x6AD46428:1) refresh_epoch is 5
5
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
*Jun 6 11:36:03.059: BGP(0): 2.2.2.2 rcvd UPDATE w/ attr: nexthop 2.2.2.2, origin i, metric 0, merged path 20
0, AS_PATH
*Jun 6 11:36:03.063: BGP(0): 2.2.2.2 rcvd 202.1.1.0/24...duplicate ignored
*Jun 6 11:36:03.063: BGP(0): 2.2.2.2 rcv UPDATE about 200.1.1.0/24 -- withdrawn
*Jun 6 11:36:03.067: BGP(0): 2.2.2.2 rcv UPDATE about 201.1.1.0/24 -- withdrawn
*Jun 6 11:36:03.067: BGP: nbr_topo global 2.2.2.2 IPv4 Unicast:base (0x6AD46428:1) rcvd Refresh End-of-RIB
R1
router bgp 100
address-family ipv4
neighbor 2.2.2.2 soft-reconfiguration inbound
6
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
7
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
8
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R1
router bgp 100
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 10.1.12.2 remote-as 200
neighbor 10.1.13.3 remote-as 300
R2
router bgp 200
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 10.1.12.1 remote-as 100
R3
router bgp 300
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 10.1.13.1 remote-as 100
R3
interface Loopback172
ip address 172.16.3.3 255.255.255.0
R1
interface Loopback172
ip address 172.16.1.1 255.255.255.0
9
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
300
10.1.13.3 from 10.1.13.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:300
rx pathid: 0, tx pathid: 0x0
R2#show ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R1
ip community-list 10 permit 100:300
R2#show ip bgp
BGP table version is 4, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
10
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R2#show ip bgp
BGP table version is 6, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 172.16.1.0/24 10.1.12.1 0 0 100 i
11
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
Preparación N3
R1
router eigrp 1
network 1.1.1.0 0.0.0.255
network 10.1.12.0 0.0.0.255
R2
router eigrp 1
network 2.2.2.0 0.0.0.255
network 10.1.12.0 0.0.0.255
12
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
Configure iBGP AS1 entre R1 y R2 tomando como dirección de origen la interface loopback0.
R1
router bgp 1
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
R2
router bgp 1
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
En R2 redistribuya las redes 200.1.X.0/24 dentro de BGP. Compruebe que solo se redistribuyan los prefijos
indicados.
R2
route-map CON-200 permit 10
match interface Loopback200
router bgp 1
redistribute connected route-map CON-200
R1#show ip bgp
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 200.1.0.0 2.2.2.2 0 100 0 ?
*>i 200.1.1.0 2.2.2.2 0 100 0 ?
*>i 200.1.2.0 2.2.2.2 0 100 0 ?
*>i 200.1.3.0 2.2.2.2 0 100 0 ?
*>i 200.1.4.0 2.2.2.2 0 100 0 ?
*>i 200.1.5.0 2.2.2.2 0 100 0 ?
*>i 200.1.6.0 2.2.2.2 0 100 0 ?
13
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R1
router bgp 1
neighbor 10.1.13.3 remote-as 3
R3
router bgp 3
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 10.1.13.1 remote-as 1
neighbor 10.1.23.2 remote-as 1
neighbor 10.1.34.4 remote-as 4
R2
router bgp 1
neighbor 10.1.23.3 remote-as 3
neighbor 10.1.24.4 remote-as 4
R4
router bgp 4
bgp router-id 4.4.4.4
neighbor 10.1.24.2 remote-as 1
neighbor 10.1.34.3 remote-as 3
R2 debe sumarizar los prefijos 200.1.X.0/24 y solo enviar la sumarización a sus vecinos.
R2
router bgp 1
aggregate-address 200.1.0.0 255.255.248.0 summary-only
R1#show ip bgp
BGP table version is 37, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R3 debe acceder al prefijo sumarizado utilizando en la tarea anterior utilizando como próximo salto a AS4
(10.1.34.4). R1 debe enviar a R3 una métrica de 100, R2 debe enviar una métrica de 2000 a R3, y R4 debe
enviar una métrica de 1. Al final de esta tarea R3 debe tener como mejor camino al prefijo sumarizado a
través de R4.
R3#show ip bgp
BGP table version is 40, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R1
route-map MED permit 10
set metric 100
router bgp 1
neighbor 10.1.13.3 route-map MED out
15
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R2
route-map MED permit 10
set metric 2000
router bgp 1
neighbor 10.1.23.3 route-map MED out
R4
route-map MED permit 10
set metric 1
router bgp 4
neighbor 10.1.34.3 route-map MED out
R3#show ip bgp
BGP table version is 41, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R3
router bgp 3
bgp always-compare-med
bgp bestpath as-path ignore
R3#clear ip bgp *
R3#show ip bgp
BGP table version is 2, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
16
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R1
router bgp 1
neighbor 2.2.2.2 password class
R2
router bgp 1
neighbor 1.1.1.1 password class
Realice el mismo laboratorio anterior para la AFI IPv6 utilizando el siguiente direccionamiento:
17
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
BGP Route-Reflector
R2----------------------------R1----------------------------R3
10.1.12.0/24 10.1.13.0/24
<-----------------------------AS1----------------------------->
Cree el direccionamiento mostrado.
Configure EIGRP 1 en todos los routers del dominio BGP. Publique además las interfaces loopback0s.
Compruebe que tenga conectividad end to end.
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
router eigrp 1
network 1.0.0.0
network 10.0.0.0
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.0
router eigrp 1
network 2.0.0.0
network 10.0.0.0
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.0
router eigrp 1
network 3.0.0.0
network 10.0.0.0
18
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
Configure iBGP entre R1-R2, y R1-R3 estableciendo las sesiones en base a la loopback0 de cada router.
R1
router bgp 1
bgp router-id 1.1.1.1
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
R2
router bgp 1
bgp router-id 2.2.2.2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
R3
router bgp 1
bgp router-id 3.3.3.3
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
R1
interface Loopback1
ip address 11.1.1.1 255.255.255.0
router bgp 1
network 11.1.1.0 mask 255.255.255.0
R2
interface Loopback1
ip address 22.2.2.2 255.255.255.0
router bgp 1
network 22.2.2.0 mask 255.255.255.0
19
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R3
interface Loopback1
ip address 33.3.3.3 255.255.255.0
router bgp 1
network 33.3.3.0 mask 255.255.255.0
R3#show ip bgp
BGP table version is 3, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R2#show ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Como Podemos observar en la salida anterior, R2 y R3 no han instalado todos los prefijos publicados por la regla de
la sincronización.
Verificamos la tabla de enrutamiento para BGP.
20
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
Para que los peers iBGP intercambien rutas entre ellos, debe existir malla completa, o utilizar Route Reflectors.
Veneficios de route reflectors:
Reducen el numero de sesiones BGP.
No se necesita malla completa.
El RR refleja todas las rutas lo que implica que el RR debe conocer la tabla con todas las redes.
R1
router bgp 1
neighbor 2.2.2.2 route-reflector-client
neighbor 3.3.3.3 route-reflector-client
R2#show ip bgp
BGP table version is 20, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
R3#show ip bgp
BGP table version is 18, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
21
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
R1(config)#router bgp 1
R1(config-router)#no neighbor 3.3.3.3 route-reflector-client
R1(config-router)#no neighbor 2.2.2.2 route-reflector-client
R1
router bgp 1
bgp router-id 1.1.1.1
network 11.1.1.0 mask 255.255.255.0
neighbor AS1 peer-group
neighbor AS1 remote-as 1
neighbor AS1 update-source Loopback0
neighbor AS1 route-reflector-client
no neighbor 2.2.2.2
no neighbor 3.3.3.3
neighbor 2.2.2.2 peer-group AS1
neighbor 3.3.3.3 peer-group AS1
22
TLDR © 2018 Nicolás Montero Torrealba
CCNP ROUTE
23
TLDR © 2018 Nicolás Montero Torrealba