Vous êtes sur la page 1sur 12

Guía CCNP

BGP Community

 Configure direccionamiento mostrado.


 Configure OSPF 1 area 0 en AS 10. No debe existir elección de DR/BDR.Publique las interfaces loopback0 de
R2 y R3 en OSPF.

R2#ping 255.255.255.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:
.
Reply to request 1 from 1.1.12.1, 1 ms
Reply to request 1 from 10.1.23.3, 5 ms
Reply to request 2 from 10.1.23.3, 2 ms
Reply to request 2 from 1.1.12.1, 2 ms
Reply to request 3 from 10.1.23.3, 1 ms
Reply to request 3 from 1.1.12.1, 1 ms
Reply to request 4 from 10.1.23.3, 1 ms
Reply to request 4 from 1.1.12.1, 1 ms

R3#ping 1.1.34.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.34.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

R2
router ospf 1
router-id 2.2.2.2

interface Ethernet0/1
ip ospf network point-to-point
ip ospf 1 area 0
interface Loopback0
1
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

ip ospf network point-to-point


ip ospf 1 area 0

R3
router ospf 1
router-id 3.3.3.3

interface Ethernet0/1
ip ospf network point-to-point
ip ospf 1 area 0

interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0

R3#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:36 10.1.23.2 Ethernet0/1

R2#sh ip route ospf


Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O 10.3.3.3/32 [110/11] via 10.1.23.3, 00:01:13, Ethernet0/1

R2#ping 10.3.3.3 source 10.2.2.2


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 10.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

 Habilite iBGP en AS10. Utilice loopback0 como interface de origen para formar la sesión.
 Forme sesiones eBGP AS10AS20, y AS20AS40 utilizando la IP de próximo salto.

R2
router bgp 20
bgp log-neighbor-changes
neighbor 1.1.12.1 remote-as 10
neighbor 10.3.3.3 remote-as 20
neighbor 10.3.3.3 update-source Loopback0

R3
router bgp 20
bgp log-neighbor-changes
neighbor 1.1.34.4 remote-as 40
neighbor 10.2.2.2 remote-as 20
neighbor 10.2.2.2 update-source Loopback0

R1
router bgp 10
bgp log-neighbor-changes
neighbor 1.1.12.2 remote-as 20
2
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

R4
router bgp 40
bgp log-neighbor-changes
neighbor 1.1.34.3 remote-as 20

R2#show ip bgp summary


BGP router identifier 10.2.2.2, local AS number 20
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


1.1.12.1 4 10 8 8 1 0 0 00:05:28 0
10.3.3.3 4 20 8 8 1 0 0 00:04:59 0

R4#show ip bgp summary


BGP router identifier 10.4.4.4, local AS number 40
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


1.1.34.3 4 20 4 4 1 0 0 00:00:37 0

 En R1 cree y publique dentro de BGP las redes:


- 104.1.0.0/16
- 104.2.0.0/16
- 104.3.0.0/16
- 104.4.0.0/16
- 104.30.0.0/16
- 104.31.0.0/16
- 104.32.0.0/16
- 104.33.0.0/16
- 104.34.0.0/16
- 104.35.0.0/16
- 104.36.0.0/16
- 104.37.0.0/16
- 104.38.0.0/16
 Uilice la loopback104.

R1
interface LoopBack104
ip address 104.0.0.1 255.255.0.0
ip address 104.2.0.1 255.255.0.0 s
ip address 104.3.0.1 255.255.0.0 s
ip address 104.4.0.1 255.255.0.0 s
ip address 104.30.0.1 255.255.0.0 s
ip address 104.31.0.1 255.255.0.0 s
ip address 104.32.0.1 255.255.0.0 s
ip address 104.33.0.1 255.255.0.0 s
ip address 104.34.0.1 255.255.0.0 s
ip address 104.35.0.1 255.255.0.0 s
ip address 104.36.0.1 255.255.0.0 s
ip address 104.37.0.1 255.255.0.0 s
ip address 104.38.0.1 255.255.0.0 s
3
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

router bgp 10
network 104.0.0.0 mask 255.255.0.0
network 104.1.0.0 mask 255.255.0.0
network 104.2.0.0 mask 255.255.0.0
network 104.3.0.0 mask 255.255.0.0
network 104.4.0.0 mask 255.255.0.0
network 104.30.0.0 mask 255.255.0.0
network 104.31.0.0 mask 255.255.0.0
network 104.32.0.0 mask 255.255.0.0
network 104.33.0.0 mask 255.255.0.0
network 104.34.0.0 mask 255.255.0.0
network 104.35.0.0 mask 255.255.0.0
network 104.36.0.0 mask 255.255.0.0
network 104.37.0.0 mask 255.255.0.0
network 104.38.0.0 mask 255.255.0.0

R1#show ip bgp
BGP table version is 14, local router ID is 10.1.0.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


*> 104.0.0.0/16 0.0.0.0 0 32768 i
*> 104.2.0.0/16 0.0.0.0 0 32768 i
*> 104.3.0.0/16 0.0.0.0 0 32768 i
*> 104.4.0.0/16 0.0.0.0 0 32768 i
*> 104.30.0.0/16 0.0.0.0 0 32768 i
*> 104.31.0.0/16 0.0.0.0 0 32768 i
*> 104.32.0.0/16 0.0.0.0 0 32768 i
*> 104.33.0.0/16 0.0.0.0 0 32768 i
*> 104.34.0.0/16 0.0.0.0 0 32768 i
*> 104.35.0.0/16 0.0.0.0 0 32768 i
*> 104.36.0.0/16 0.0.0.0 0 32768 i
*> 104.37.0.0/16 0.0.0.0 0 32768 i
*> 104.38.0.0/16 0.0.0.0 0 32768 i

BGP Community No-Export/Internet


 Configure R1 de manera que actualizaciones para las actualizaciones de las redes 104.0.0.0/16,
104.4.0.0/16, 104.32.0.0/16, 104.36.0.0/16 se envíen al AS 20 pero para el AS 40 no sean conocidas. Las
demás redes con el primer octeto 104 deben ser instaladas en todos los routers del dominio BGP.
Nota. Las comunidades no se envían de manera predeterminada, debemos explicitarlas a cada vecino con el
comando send-community.

R1
access-list 10 permit 104.0.0.0 0.36.0.0

route-map COM permit 10

4
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

match ip address 10
set community no-export

route-map COM permit 20


set community internet

router bgp 10
neighbor 1.1.12.2 send-community
neighbor 1.1.12.2 route-map COM out

R2#show ip bgp 104.4.0.0 255.255.0.0


BGP routing table entry for 104.4.0.0/16, version 25
Paths: (1 available, best #1, table default, not advertised to EBGP peer)
Advertised to update-groups:
2
Refresh Epoch 1
10
1.1.12.1 from 1.1.12.1 (10.1.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-export
rx pathid: 0, tx pathid: 0x0

R2#show ip bgp 104.31.0.0 255.255.0.0


BGP routing table entry for 104.31.0.0/16, version 18
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 1
10
1.1.12.1 from 1.1.12.1 (10.1.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: internet
rx pathid: 0, tx pathid: 0x0

R3#show ip bgp 104.4.0.0 255.255.0.0


BGP routing table entry for 104.4.0.0/16, version 0
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 1
10
1.1.12.1 (inaccessible) from 10.2.2.2 (10.2.2.2) Commented [NMT1]: La comunidad no se ha ennviado desde
Origin IGP, metric 0, localpref 100, valid, internal R2, además podemos notar que el próximo salto para la ip
104.4.0.0/24 no es alcanzable.
rx pathid: 0, tx pathid: 0

R2
router bgp 20
neighbor 10.3.3.3 next-hop-self
neighbor 10.3.3.3 send-community

R2#clear ip bgp * soft

R3#show ip bgp 104.4.0.0 255.255.0.0


BGP routing table entry for 104.4.0.0/16, version 3
Paths: (1 available, best #1, table default, not advertised to EBGP peer)

5
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

Not advertised to any peer


Refresh Epoch 2
10
10.2.2.2 (metric 11) from 10.2.2.2 (10.2.2.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-export
rx pathid: 0, tx pathid: 0x0

R3#show ip bgp neighbors 1.1.34.4 advertised-routes


BGP table version is 14, local router ID is 10.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

Network Next Hop Metric LocPrf Weight Path


*>i 104.2.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.3.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.30.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.31.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.33.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.34.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.35.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.37.0.0/16 10.2.2.2 0 100 0 10 i
*>i 104.38.0.0/16 10.2.2.2 0 100 0 10 i

Total number of prefixes 9

R4#show ip bgp 104.4.0.0 255.255.0.0


% Network not in table

R4#show ip bgp 104.2.0.0 255.255.0.0


BGP routing table entry for 104.2.0.0/16, version 2
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
20 10
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin IGP, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0

R3
router bgp 20
neighbor 1.1.34.4 send-community

R4#show ip bgp 104.2.0.0 255.255.0.0


BGP routing table entry for 104.2.0.0/16, version 20
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
20 10
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin IGP, localpref 100, valid, external, best

6
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

Community: internet
rx pathid: 0, tx pathid: 0x0

 Configure un ejemplo para la comunidad no-advertised, none, y local-AS

7
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

BGP Filtrado utilizando Comunidades numéricas

 Cree el direccionamiento mostrado. Compruebe que tiene


 Configure eBGP formando sesiones R1↔R3, R2↔R3 y R3↔R4 como muestra la figura. Utilice la
dirección de próximo salto para establecer la sesión eBGP.

R3#ping 255.255.255.255 repeat 3


Type escape sequence to abort.
Sending 3, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:
Reply to request 0 from 1.1.23.2, 1 ms
Reply to request 1 from 1.1.23.2, 1 ms
Reply to request 1 from 1.1.34.4, 1 ms
Reply to request 1 from 1.1.13.1, 1 ms
Reply to request 2 from 1.1.34.4, 1 ms
Reply to request 2 from 1.1.23.2, 5 ms
Reply to request 2 from 1.1.13.1, 1 ms

R1
router bgp 10
bgp log-neighbor-changes
neighbor 1.1.13.3 remote-as 30

R2
router bgp 20
bgp log-neighbor-changes
neighbor 1.1.23.3 remote-as 30

R3
router bgp 30
bgp log-neighbor-changes
neighbor 1.1.13.1 remote-as 10
neighbor 1.1.23.2 remote-as 20

8
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

neighbor 1.1.34.4 remote-as 40

R4
router bgp 40
bgp log-neighbor-changes
neighbor 1.1.34.3 remote-as 30

R3#show ip bgp summary


BGP router identifier 10.3.3.3, local AS number 30
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


1.1.13.1 4 10 4 3 1 0 0 00:00:58 0
1.1.23.2 4 20 3 2 1 0 0 00:00:59 0
1.1.34.4 4 40 2 2 1 0 0 00:00:06 0

 R1 y R2 deben publicar las subredes utilizando comunidades con la siguiente disposición:


- R1→100.1.0.0/24, R2→ 100.2.0.0/24 Comunidad 100:12
- R1→10.1.0.0/24, R2→ 10.2.0.0/24 Comunidad 10:12
- R1→12.1.0.0/24, R2→ 12.2.0.0/24 Comunidad 10:1

R1
access-list 10 permit 10.1.0.0 0.0.0.255
access-list 11 permit 100.1.0.0 0.0.0.255
access-list 12 permit 12.1.0.0 0.0.0.255

ip bgp-community new-format

route-map COM-100 permit 10


match ip address 11
set community 100:12
!
route-map COM-10 permit 10
match ip address 10
set community 10:12
!
route-map COM-12 permit 10
match ip address 12
set community 10:1

router bgp 10
network 10.1.0.0 mask 255.255.255.0 route-map COM-10
network 12.1.0.0 mask 255.255.255.0 route-map COM-12
network 100.1.0.0 mask 255.255.255.0 route-map COM-100
neighbor 1.1.13.3 send-community

9
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

R2
interface Loopback10
ip address 10.2.0.1 255.255.255.0

interface Loopback12
ip address 12.2.0.1 255.255.255.0

interface Loopback100
ip address 100.2.0.1 255.255.255.0

access-list 10 permit 10.2.0.0 0.0.0.255


access-list 11 permit 100.2.0.0 0.0.0.255
access-list 12 permit 12.2.0.0 0.0.0.255

ip bgp-community new-format

route-map COM-100 permit 10


match ip address 11
set community 100:12
!
route-map COM-10 permit 10
match ip address 10
set community 10:12
!
route-map COM-12 permit 10
match ip address 12
set community 10:1

router bgp 20
network 10.2.0.0 mask 255.255.255.0 route-map COM-10
network 12.2.0.0 mask 255.255.255.0 route-map COM-12
network 100.2.0.0 mask 255.255.255.0 route-map COM-100
neighbor 1.1.23.3 send-community

R3#show ip bgp 12.2.0.0


BGP routing table entry for 12.2.0.0/24, version 6
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 5
20
1.1.23.2 from 1.1.23.2 (10.2.2.2)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 10:1
rx pathid: 0, tx pathid: 0x0

10
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

 Las redes 100.1.0.0/24 y 100.2.0.0/24 deben ser instaladas en AS 40 como redes redistribuidas.
 Las redes 10.1.0.0/24 y 10.2.0.0/24 deben ser instaladas en AS 40 como redes igp.
 La red 12.1.0.0/24 no debe ser instalada en AS 40.

- R1→100.1.0.0/24, R2→ 100.2.0.0/24 Comunidad 100:12


- R1→10.1.0.0/24, R2→ 10.2.0.0/24 Comunidad 10:12
- R1→12.1.0.0/24, R2→ 12.2.0.0/24 Comunidad 10:1

R3
ip community-list 10 permit 10:12
ip community-list 11 permit 100:12
ip community-list 12 permit 10:1

route-map COMM permit 10


match community 10
set origin igp

route-map COMM permit 20


match community 11
set origin incomplete

router bgp 30
neighbor 1.1.34.4 send-community
neighbor 1.1.34.4 route-map COMM out

R4#show ip bgp
BGP table version is 13, local router ID is 10.4.4.4
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


*> 10.1.0.0/24 1.1.34.3 0 30 10 i
*> 10.2.0.0/24 1.1.34.3 0 30 20 i
*> 100.1.0.0/24 1.1.34.3 0 30 10 ?
*> 100.2.0.0/24 1.1.34.3 0 30 20 ?

R4#show ip bgp 10.1.0.0


BGP routing table entry for 10.1.0.0/24, version 12
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 2
30 10
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin IGP, localpref 100, valid, external, best
Community: 10:12
rx pathid: 0, tx pathid: 0x0

R4#show ip bgp 10.2.0.0


BGP routing table entry for 10.2.0.0/24, version 11
Paths: (1 available, best #1, table default)
11
TLDR © 2016 Nicolás Montero Torrealba
Guía CCNP

Not advertised to any peer


Refresh Epoch 2
30 20
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin IGP, localpref 100, valid, external, best
Community: 10:12
rx pathid: 0, tx pathid: 0x0

R4#show ip bgp 100.1.0.0


BGP routing table entry for 100.1.0.0/24, version 9
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 2
30 10
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin incomplete, localpref 100, valid, external, best
Community: 100:12
rx pathid: 0, tx pathid: 0x0

R4#show ip bgp 100.2.0.0


BGP routing table entry for 100.2.0.0/24, version 8
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 2
30 20
1.1.34.3 from 1.1.34.3 (10.3.3.3)
Origin incomplete, localpref 100, valid, external, best
Community: 100:12
rx pathid: 0, tx pathid: 0x0

12
TLDR © 2016 Nicolás Montero Torrealba

Vous aimerez peut-être aussi