Lab 35. BGP Attribute (Community)

Setelah sebelumnya kita belajar tentang Origin, sekarang kita akan belajar tentang BGP atribut yang lain yaitu community. Atribut community terbagi menjadi 4 yakni no-export, no-advertise, internet dan local-as. Yuk kita pelajari di TKP ...
1. Topologi Lab
2. Metode Lab
  • Gunakan pengalamatan IP standard IDN
  • Gunakan EIGRP di IDN-R1,R2 dan R3 agar ip loopback 0 reachable dari ketiga router tersebut.
  • Konfigurasikan iBGP peers menggunakan loopback 0, IDN-R2 sebagai RR
  • Buat loopback 1 kemudian diadvertise ke BGP
  • Konfigurasikan eBGP peers menggunakan ip fisik interface antara IDN-R2 dan IDN-R4
3. Verifikasi
  • Konfigurasikan no-export di IDN-R1, cek BGP route di IDN-R4
  • Konfigurasikan no-advertise di IDN-R3, cek BGP route di IDN-R1 dan IDN-R4
4. Konfigurasi

IDN-R1(config-router)#router eigrp 1
IDN-R1(config-router)#net 12.12.12.1 0.0.0.0
IDN-R1(config-router)#net 1.1.1.1 0.0.0.0
IDN-R1(config-router)#router bgp 123
IDN-R1(config-router)#nei 2.2.2.2 remote-as 123
IDN-R1(config-router)#nei 2.2.2.2 up l0
IDN-R1(config-router)#int lo1
IDN-R1(config-if)#ip add 11.11.11.11 255.255.255.255
IDN-R1(config-if)#router bgp 123
IDN-R1(config-router)#net 11.11.11.11 mask 255.255.255.255

IDN-R2(config)#router eigrp 1
IDN-R2(config-router)#net 12.12.12.2 0.0.0.0
*Mar  1 00:04:20.231: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.12.12.1 (FastEthernet0/0) is up: new adjacency
IDN-R2(config-router)#net 23.23.23.2 0.0.0.0
IDN-R2(config-router)#net 2.2.2.2 0.0.0.0
IDN-R2(config-router)#ex
IDN-R2(config)#router bgp 123
IDN-R2(config-router)#nei 1.1.1.1 remote-as 123
IDN-R2(config-router)#nei 1.1.1.1 route-r
IDN-R2(config-router)#nei 1.1.1.1 up l0
IDN-R2(config-router)#nei 1.1.1.1 next-hop-self
IDN-R2(config-router)#nei 3.3.3.3 remote-as 123
*Mar  1 00:08:34.471: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
IDN-R2(config-router)#nei 3.3.3.3 route-r
IDN-R2(config-router)#nei 3.3.3.3 up l0
IDN-R2(config-router)#nei 3.3.3.3 next-hop-self
*Mar  1 00:08:51.571: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Up
IDN-R2(config-router)#nei 24.24.24.4 remote-as 4
*Mar  1 00:10:14.435: %BGP-5-ADJCHANGE: neighbor 24.24.24.4 Up
IDN-R2(config-router)#int l01
IDN-R2(config-if)#ip add 22.22.22.22 255.255.255.255
IDN-R2(config-if)#router bgp 123
IDN-R2(config-router)#net 22.22.22.22 mask 255.255.255.255

IDN-R3(config)#router eigrp 1
IDN-R3(config-router)#net 23.23.23.3 0.0.0.0
*Mar  1 00:04:59.699: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 23.23.23.2 (FastEthernet0/0) is up: new adjacency
IDN-R3(config-router)#net 3.3.3.3 0.0.0.0
IDN-R3(config-router)#ex
IDN-R3(config)#router bgp 123
IDN-R3(config-router)#nei 2.2.2.2 remote-as 123
IDN-R3(config-router)#nei 2.2.2.2 up  l0
*Mar  1 00:09:00.703: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
IDN-R3(config-router)#int lo1
IDN-R3(config-if)#ip add 33.33.33.33 255.255.255.255
IDN-R3(config-if)#router bgp 123
IDN-R3(config-router)#net 33.33.33.33 mask 255.255.255.255

IDN-R4(config-if)#router bgp 4
IDN-R4(config-router)#nei 24.24.24.2 remote-as 123
*Mar  1 00:10:11.947: %BGP-5-ADJCHANGE: neighbor 24.24.24.2 Up
IDN-R4(config-router)#net 4.4.4.4 mask 255.255.255.255

Cek BGP router di IDN-R1 dan IDN-R4

IDN-R1(config-router)#do sh ip bgp
BGP table version is 5, 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
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

IDN-R4(config-router)#do sh 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


Set Community "no-export" di IDN-R1 (no-export : tidak diadvertise ke eBGP)

IDN-R1(config)#access-list 1 permit host 11.11.11.11
IDN-R1(config)#route-map NO-EXPORT
IDN-R1(config-route-map)#match ip address 1
IDN-R1(config-route-map)#set community no-export
IDN-R1(config-route-map)#router bgp 123
IDN-R1(config-router)#nei 2.2.2.2 route-map NO-EXPORT out
IDN-R1(config-router)#nei 2.2.2.2 send-community


Kita reset dulu BGP di semua router, dan runggu beberapa saat

IDN-R1 - R4(config-router)#do clear ip bgp *

Sekarang kita cek ip bgp di IDN-R4, pastikan network 11.11.11.11 sudah tidak ada

IDN-R4(config-router)#do sh ip bgp
BGP table version is 8, 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
*> 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

Sedangkan di IDN-R3 masih ada karena dia menggunakan iBGP untuk peering ke IDN-R1

IDN-R3(config-router)#do sh ip bgp
BGP table version is 11, local router ID is 33.33.33.33
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
*>i11.11.11.11/32      1.1.1.1                          0    100              0         i
*>i22.22.22.22/32  2.2.2.2                        0    100              0         i
*> 33.33.33.33/32   0.0.0.0                       0                32768        i


IDN-R2(config-router)#do 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 to EBGP peer)
  Advertised to update-groups:
        3
  Local, (Received from a RR-client)
    1.1.1.1 (metric 409600) from 1.1.1.1 (11.11.11.11)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Community: no-export



Set community "no-advertise" di R3 (no-advertise : tidak diadvertise ke iBGP/eBGP)

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



Kita reset dulu BGP di semua router, dan runggu beberapa saat

IDN-R1 - R4(config-router)#do clear ip bgp *

Kita cek di IDN-R1 dan IDN-R4

IDN-R1(config-router)#do 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


IDN-R4(config-router)#do sh ip bgp
BGP table version is 9, 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
*> 22.22.22.22/32   24.24.24.2                   0                          0 123 i


Look, network 33.33.33.33 sudah tidak ada. Cek ri IDN-R2

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

Sipp dah.. kurang lebih gitu deh tentang atribut community di BGP.



0 komentar:

Posting Komentar