CCNP - BGP Community LOCAL - AS

 

Lab 8 Community LOCAL - AS




BGP Community adalah mekanisme filtering dlm BGP, prefix akan diberi tag/label. Router dgn community yg sama akan mendapat prefix tsb dan community yang berbeda akan diignore

R2(config)#int g3/0
R2(config-if)#ip add 24.24.24.2 255.255.255.0
R2(config-if)#no sh
R2(config)#int lo22
R2(config-if)#ip add 22.22.22.22 255.255.255.255

R4(config)#int g3/0
R4(config-if)#ip add 24.24.24.4 255.255.255.0
R4(config-if)#no sh
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255


lalu konfigurasi BGP pada semua Router

R1(config)#router bgp 123
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
R1(config-router)#neighbor 2.2.2.2 remote-as 123
R1(config-router)#neighbor 2.2.2.2 update-source Loopback0

R2(config)#router bgp 123
R2(config-router)#neighbor 1.1.1.1 remote-as 123
R2(config-router)#neighbor 1.1.1.1 up lo0
R2(config-router)#neighbor 1.1.1.1 route-reflector-client
R2(config-router)#neighbor 1.1.1.1 next-hop-self
R2(config-router)#neighbor 3.3.3.3 remote-as 123
R2(config-router)#neighbor 3.3.3.3 update lo0
R2(config-router)#neighbor 3.3.3.3 route-reflector-client
R2(config-router)#neighbor 3.3.3.3 next-hop-self
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#network 22.22.22.22 mask 255.255.255.255

CATATAN !!! R2 Sebagai Route Reflector 

R3(config)#int lo33
R3(config-if)#ip add 33.33.33.33 255.255.255.255
R3(config)#router bgp 123
R3(config-router)#neighbor 2.2.2.2 remote-as 123
R3(config-router)#neighbor 2.2.2.2 up lo0
R3(config-router)#network 33.33.33.33 mask 255.255.255.255

R4(config)#router bgp 4
R4(config-router)#neighbor 24.24.24.2 remote-as 123
R4(config-router)#network 4.4.4.4 mask 255.255.255.255

lakukan verifikasi.

R1#sh ip bgp
BGP table version is 6, local router ID is 11.11.11.11
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
*>i4.4.4.4/32 2.2.2.2 0 100 0 4 i
*> 11.11.11.11/32 0.0.0.0 0 32768 i
*>i22.22.22.22/32 2.2.2.2 0 100 0 i
*>i33.33.33.33/32 3.3.3.3 0 100 0 i

R4(config)#do show ip bgp
BGP table version is 5, local router ID is 4.4.4.4
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
*> 4.4.4.4/32 0.0.0.0 0 32768 i
*> 11.11.11.11/32 24.24.24.2 0 123 i
*> 22.22.22.22/32 24.24.24.2 0 0 123 i
*> 33.33.33.33/32 24.24.24.2 0 123 i 

R1(config)#access-list 1 permit host 11.11.11.11
R1(config)#route-map NO-EXPORT
R1(config-route-map)#match ip address 1
R1(config-route-map)#set community no-export
R1(config-route-map)#router bgp 123
R1(config-router)#neighbor 2.2.2.2 route-map NO-EXPORT out
R1(config-router)#neighbor 2.2.2.2 send-community
 
R4(config)#do show ip bgp
BGP table version is 6, local router ID is 4.4.4.4
Status codes: s suppres
sed, d damped, h history, * valid, > best, i - internal,
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 4.4.4.4/32 0.0.0.0 0 32768 i
*> 22.22.22.22/32 24.24.24.2 0 0 123 i
*> 33.33.33.33/32 24.24.24.2 0 123 i

R2(config)#do show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 6
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised
to EBGP peer)
Flag: 0x880
Advertised to update-groups:
1
Local, (Received from a RR-client)
1.1.1.1 (metric 156160) from 1.1.1.1 (11.11.11.11)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-export

R3(config)#access-list 1 permit host 33.33.33.33
R3(config)#route-map NO-ADVERTISE
R3(config-route-map)#match ip address 1
R3(config-route-map)#set community no-advertise
R3(config-route-map)#router bgp 123
R3(config-router)#neighbor 2.2.2.2 route-map NO-ADVERTISE out
R3(config-router)#neighbor 2.2.2.2 send-community


lalu pastikan NET 33.33.33.33 sudah ilang

R1(config)#do show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i4.4.4.4/32 2.2.2.2 0 100 0 4 i
*> 11.11.11.11/32 0.0.0.0 0 32768 i
*>i22.22.22.22/32 2.2.2.2 0 100 0 i

R2(config)#do show ip bgp 33.33.33.33
BGP routing table entry for 33.33.33.33/32, version 7
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised
to any peer)
Flag: 0x880
Not advertised to any peer
Local, (Received from a RR-client)
3.3.3.3 (metric 156160) from 3.3.3.3 (33.33.33.33)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-advertise 


BAB3. LOCAL AS
Untuk topologi physicalnya masih sama tetapi untuk topologi logical menjadi
seperti diatas. Kita konfigurasikan BPG Confederation pada R1, R2, R3

R1(config)#no router bgp 123
R1(config)#router bgp 12
R1(config-router)#bgp confederation identifier 123
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
R1(config-router)#neighbor 12.12.12.2 remote-as 12
R1(config-router)#access list 2 permit host 11.11.11.11
R1(config)#route-map LOCAL-AS
R1(config-route-map)#match ip address 2
R1(config-route-map)#set community local-AS
R1(config-route-map)#router bgp 12
R1(config-router)#neighbor 12.12.12.2 route-map LOCAL
R1(config-router)#neighbor 12.12.12.2 route-map LOCAL-AS out
R1(config-router)#neighbor 12.12.12.2 send-community

R2(config)#router bgp 12
R2(config-router)#bgp confederation identifier 123
R2(config-router)#bgp confederation peers 3
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#neighbor 12.12.12.1 remote-as 12
R2(config-router)#neighbor 12.12.12.1 next-hop-self
R2(config-router)#neighbor 23.23.23.3 remote-as 3
R2(config-router)#neighbor 23.23.23.3 next-hop-self
R2(config-router)#network 22.22.22.22 mask 255.255.255.255

R3(config)#no router bgp 123
R3(config)#router bgp 3
R3(config-router)#bgp confederation identifier 123
R3(config-router)#bgp confederation peers 12
R3(config-router)#neighbor 23.23.23.2 remote-as 12
R3(config-router)#network 33.33.33.33 mask 255.255.255.255

verifikasi yakinkan bahwa network 11.11.11.11 sudah tidak ada lagi.

R2#sh ip bgp
BGP table version is 5, local router ID is 22.22.22.22
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
*> 4.4.4.4/32 24.24.24.4 0 0 4 i
*>i11.11.11.11/32 12.12.12.1 0 100 0 i
*> 22.22.22.22/32 0.0.0.0 0 32768 i
*> 33.33.33.33/32 23.23.23.3 0 100 0 (3) i

R2#sh ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table,not advertised
outside local AS )
Not advertised to any peer
Local
12.12.12.1 from 12.12.12.1 (11.11.11.11)
Origin IGP, metric 0, localpref 100, valid, confed-internal, best
Community: local-AS 

Lalu kita SET community no export di R1 yang dimana NO EXPORT berarti tidak di Advertise ke E BGP.

BAB2. NO ADVERTISE

ok no Advertise yang artinya tidak Di advertise ke dalam  EBGP dan IBGP


R3(config)#access-list 1 permit host 33.33.33.33
R3(config)#route-map NO-ADVERTISE
R3(config-route-map)#match ip address 1
R3(config-route-map)#set community no-advertise
R3(config-route-map)#router bgp 123
R3(config-router)#neighbor 2.2.2.2 route-map NO-ADVERTISE out
R3(config-router)#neighbor 2.2.2.2 send-community

lalu pastikan NET 33.33.33.33 sudah ilang

R1(config)#do show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i4.4.4.4/32 2.2.2.2 0 100 0 4 i
*> 11.11.11.11/32 0.0.0.0 0 32768 i
*>i22.22.22.22/32 2.2.2.2 0 100 0 i

R2(config)#do show ip bgp 33.33.33.33
BGP routing table entry for 33.33.33.33/32, version 7
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised
to any peer)
Flag: 0x880
Not advertised to any peer
Local, (Received from a RR-client)
3.3.3.3 (metric 156160) from 3.3.3.3 (33.33.33.33)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-advertise 

BAB3. LOCAL AS

Untuk topologi physicalnya masih sama tetapi untuk topologi logical menjadi
seperti diatas. Kita konfigurasikan BPG Confederation pada R1, R2, R3

R1(config)#no router bgp 123
R1(config)#router bgp 12
R1(config-router)#bgp confederation identifier 123
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
R1(config-router)#neighbor 12.12.12.2 remote-as 12
R1(config-router)#access list 2 permit host 11.11.11.11
R1(config)#route-map LOCAL-AS
R1(config-route-map)#match ip address 2
R1(config-route-map)#set community local-AS
R1(config-route-map)#router bgp 12
R1(config-router)#neighbor 12.12.12.2 route-map LOCAL
R1(config-router)#neighbor 12.12.12.2 route-map LOCAL-AS out
R1(config-router)#neighbor 12.12.12.2 send-community

R2(config)#router bgp 12
R2(config-router)#bgp confederation identifier 123
R2(config-router)#bgp confederation peers 3
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#neighbor 12.12.12.1 remote-as 12
R2(config-router)#neighbor 12.12.12.1 next-hop-self
R2(config-router)#neighbor 23.23.23.3 remote-as 3
R2(config-router)#neighbor 23.23.23.3 next-hop-self
R2(config-router)#network 22.22.22.22 mask 255.255.255.255

R3(config)#no router bgp 123
R3(config)#router bgp 3
R3(config-router)#bgp confederation identifier 123
R3(config-router)#bgp confederation peers 12
R3(config-router)#neighbor 23.23.23.2 remote-as 12
R3(config-router)#network 33.33.33.33 mask 255.255.255.255

verifikasi yakinkan bahwa network 11.11.11.11 sudah tidak ada lagi.

R2#sh ip bgp
BGP table version is 5, local router ID is 22.22.22.22
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
*> 4.4.4.4/32 24.24.24.4 0 0 4 i
*>i11.11.11.11/32 12.12.12.1 0 100 0 i
*> 22.22.22.22/32 0.0.0.0 0 32768 i
*> 33.33.33.33/32 23.23.23.3 0 100 0 (3) i


R2#sh ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table,not advertised
outside local AS )
Not advertised to any peer
Local
12.12.12.1 from 12.12.12.1 (11.11.11.11)
Origin IGP, metric 0, localpref 100, valid, confed-internal, best
Community: local-AS 

Komentar

Postingan populer dari blog ini

CCNP - GLBP (Gateway Load Balancing Protocol)

CCNP - eBGP Peering

CCNP - IPv6 Tunneling IPv6IP 6to4