BGP

Selasa, 11 Desember 2012

BGP









































































 ---BGP FEATURES---
  • EGP merupakan routing protokol yang digunakan untuk kebutuhan Inter-domain
  • Inter-domain routing protocol also known as EGP
  • Autonomous system is a set of routers under a single technical administration, using an IGP & common metrics to route packets within the AS, and using an EGP to route packets to other AS.
  • BGP exchanges routes between AS in a loop free manner.
  • Runs on top of the TCP port 179
  • Periodic keep-alives to verify connectivity
  • Rich metric (called path vectors or attributes)
  • Peers/Neighbours � any two routers that have formed a TCP connection in order to exchange BGP routing information.
---BGP NEIGHBOR---
  • Internal BGP 
          BGP Neighbor semestinya sama AS
          BGP Neighbor tidak harus directly Connected
  • External BGP
          BGP Neighbor semestinya beda AS
          BGP Neighbor seharusnya directly Connected

---Policy Based Routing of BGP---
  • Administrator dapat membuat kebijakan atau aturan, bagaimana data akan dapat dilewati melalui AS atau bisa dikatakan hop-by-hop paradigma Routing.
---BGP METRIC---




Gambar diatas menunjukkan semua atribut yang digunakan oleh BGP
secara umum atribut BGP terbagi menjadi dua, yakni :
  1. Well Known
  • Semua pabrikan perangkat merk apapun yang menjalankan BGP pasti mengenali dan memiliki atribut tipe ini.
  • Well known atribut terbagi menjadi dua yakni :
  1.  Mandatory
  • Atribut ini pasti ada setiap kali router menjalankan BGP 
  •  Terbagi menjadi 3 yaitu :
  1. AS-Path, Menampilkan informasi jalur AS suatu route
                                   2.  Next-Hop, Menampilkan ip via untuk menuju ke suatu route

                                   3. Origin, Menampilkan informasi dari mana route berasal,
                                 
                                       apakah dari BGP atau IGP yang di redistribute ke BGP

               2.   Optional
  • Atribut ini baru ada apabila dikonfigurasikan, bila tidak dikonfigurasikan, maka atribut ini tidak dibawa serta oleh BGP
  • Terbagi menjadi 2 yakni : 
    1. Local Preference, digunakan untuk menentukan jalur upstream
    2. Automic Aggregate. Merupakan suatu route hasil summarization
                                               

        2. Optional
    • Atribut ini hanya dimiliki oleh beberapa pabrikan tertentu saja, tidak semua perangkat, yang menjalankan BGP mengenali dan memiliki fitur ini
    • Optional atribut terbagi menjadi dua yakni
    1. Transitive
    • Atribut ini apabila tidak dikenali oleh perangkat tertentu, maka atribut ini akan tetap diteruskan ke yang lainnya
    • Terbagi menjadi dua yakni
    1. Aggregator, merupakan router yang melakukan summarization
    2. Community, terbagi menjadi 4
      • No-Export, atribut ini akan menjadikan suatu route di advertise hanya ke internal bgp saja.
    •  No-Advertise, atribut ini akan menjadikan suatu route tidak diadvertise kemana-mana, baik internal maupun external.
    • Internet, atribut ini akan menjadikan route nya di advertise kemana saja
    • Local AS, atribut ini hanya ada pada bgp confederation,dimana route nya hanya akan di advertise ke dalam sub-as yang sama saja tidak di advertise ke sub AS yang lain.

                      2.  Non Transitive
    • Atribut ini apabila tidak dikenali oleh perangkat tertentu, maka akan di drop atributnya oleh perangkat tersebut.
    • Terbagi menjadi 3 yaitu :
      • MED, digunakan untuk menentukan trafik kembali / downstream
    • Originator, menunjukkan router yang menjadi route reflector.
    • Cluster ID, menunjukkan nilai cluster id yang digunakan pada redundant route reflector.

    ---Pemilihan Route BGP---
    1. Highest Weight
    2. Highest Local Preference
    3. Route originated by the local router
    4. Shortest AS-Path
    5. Lowest Origin code ( IGP < EGP)
    6. Lowest MED from other AS
    7. EBGP over IBGP
    8. The Path through the closest IGP Neighbour
    9. Oldest route for EBGP
    10. Path with the lowest Neighbour BGP Router ID
    11. Path with the lowest Neighbour IP 
    ---BGP ATTRIBUTE---
    • Weight (Highest)
    • Local-Preference (Highest)
    • Locally Originated
    • AS-Path (Shortest)
    • Origin ( IGP > EGP > ? ) 
    • MED (Lowest)

     

      Dari Pada Teori Terus, mari kita Ngelab Supaya lebih paham

      Lab. 1  Konfigurasi Dasar iBGP Peering






                                              




      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int fa0/1
      R1(config-if)#ip add 21.21.21.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo1
      R1(config-if)#ip add 10.10.10.10 255.255.255.255
      R1(config-if)#


      static route
      R1(config)#ip route 2.2.2.2 255.255.255.0 fa0/0

      IGP Jakarta
      R1(config)#router eigrp 101
      R1(config-router)#net 10.10.10.0
      R1(config-router)#no au

      Network Command and redistribution
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 remote-as 101
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#redistribute eigrp 101
      R1(config-router)#network 12.12.12.0 mask 255.255.255.0


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/1
      R2(config-if)#ip add 21.21.21.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 20.20.20.20 255.255.255.255
      R2(config-if)#


      IGP R2
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#router eigrp 101
      R2(config-router)#net 20.20.20.0
      R2(config-router)#no au

      Network and redistribution
      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as 101
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#redistribute eigrp 101
      R2(config-router)#network 12.12.12.0 mask 255.255.255.0


      CEK
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp

      Lab 2. iBGP Loopback and eBGP Loopback














      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo1
      R1(config-if)#ip add 11.11.11.11 255.255.255.255
      R1(config-if)#int lo2
      R1(config-if)#ip add 111.111.111.111 255.255.255.255


      IGP Jakarta
      R1(config)#ip route 2.2.2.2 255.255.255.255 fa0/0
      R1(config)#router rip
      R1(config-router)#ver 2
      R1(config-router)#net 11.0.0.0
      R1(config-router)#net 111.0.0.0
      R1(config-router)#no au

      Network Command and Redistribution
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 remote-as 101
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#network 12.12.12.0 mask 255.255.255.0
      R1(config-router)#network 111.111.111.111 mask 255.255.255.255
      R1(config-router)#redistribute static
      R1(config-router)#redistribute rip


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int s0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 22.22.22.22 255.255.255.255
      R2(config-if)#int lo2
      R2(config-if)#ip add 222.222.222.222 255.255.255.255

      R2 IGP
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#ip route 3.3.3.3 255.255.255.255 s0/0
      R2(config)#router rip
      R2(config-router)#ver 2
      R2(config-router)#net 22.0.0.0
      R2(config-router)#net 222.0.0.0
      R2(config-router)#no au


      network command and redistribution
      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as 101
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 remote-as 102
      R2(config-router)#neighbor 3.3.3.3 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 ebgp-multihop
      R2(config-router)#network 12.12.12.0 mask 255.255.255.0
      R2(config-router)#network 23.23.23.0 mask 255.255.255.0
      R2(config-router)#network 222.222.222.222 mask 255.255.255.255
      R2(config-router)#redistribute rip
      R2(config-router)#redistribute static

      R3
      R3(config)#int s0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#int lo1
      R3(config-if)#ip add 33.33.33.33 255.255.255.255
      R3(config-if)#int lo2
      R3(config-if)#ip add 223.223.223.223 255.255.255.255


      R3 IGP
      R3(config)#ip route 2.2.2.2 255.255.255.255 s0/0
      R3(config)#router rip
      R3(config-router)#ver 2
      R3(config-router)#net 33.0.0.0
      R3(config-router)#net 223.0.0.0

      network Command and redistribution
      R3(config)#router bgp 102
      R3(config-router)#neighbor 2.2.2.2 remote-as 101
      R3(config-router)#neighbor 2.2.2.2 update-source lo0
      R3(config-router)#neighbor 2.2.2.2 ebgp-multihop
      R3(config-router)#net 23.23.23.0 mask 255.255.255.0
      R3(config-router)#net 223.223.223.223 mask 255.255.255.255

      CEK
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp


      Lab 3. BGP Next-Hop-Self















      R2(config)#router bgp 101
      R2(config-router)#neighbor 1.1.1.1 remote-as  101
      R2(config-router)#neighbor 1.1.1.1 next-hop-self

      R1
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping 23.23.23.23.3
      Ping 3.3.3.3
      Ping 33.33.33.33
      Ping 223.223.223.223


      R2
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1 dan R2


      R3
      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1 dan R2


      Lab 4. BGP Authentication














      Konfigurasi BGP
      R1(config)#router bgp 101
      R1(config-router)#neighbor 2.2.2.2 password 0 rahasia
      R2(config)#router bgp 101
      R2(config-router)# neighbor 1.1.1.1 password 0 rahasia


      Lab 5. BGP Route Reflector Client












      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)int lo0
      R1(config-if)ip add 1.1.1.1 255.255.255.255

      IGP R1
      R1(config)#ip route 2.2.2.2 255.255.255.255 fa0/0

      Network command and redistribution
      R1(config)#router bgp 123
      R1(config-router)#neighbor 2.2.2.2 remote-as 123
      R1(config-router)#neighbor 2.2.2.2 update-source lo0
      R1(config-router)#net 12.12.12.0 mask 255.255.255.0
      R1(config-router)#net 1.1.1.1 mask 255.255.255.255
      R1(config-router)#redistribute static


      R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int s0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh

      IGP R2
      R2(config)#ip route 1.1.1.1 255.255.255.255 fa0/0
      R2(config)#ip route 3.3.3.3 255.255.255.255 s0/0

      Network command, route reflector and redistribution
      R2(config)#router bgp 123
      R2(config-router)#neighbor 1.1.1.1 remote-as 123
      R2(config-router)#neighbor 1.1.1.1 update-source lo0
      R2(config-router)#neighbor 1.1.1.1 route-reflector-client
      R2(config-router)#neighbor 3.3.3.3 remote-as 123
      R2(config-router)#neighbor 3.3.3.3 update-source lo0
      R2(config-router)#neighbor 3.3.3.3 route-reflector-client
      R2(config-router)#net 12.12.12.0 mask 255.255.255.0
      R2(config-router)#net 23.23.23.0 mask 255.255.255.0
      R2(config-router)#net 2.2.2.2 mask 255.255.255.255
      R2(config-router)#redistribute static


      R3
      R3(config)#int s0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255

      IGP R3
      R3(config)#ip route 2.2.2.2 255.255.255.255 s0/0

      Network command and redistribution
      R3(config)#router bgp 123
      R3(config-router)#neighbor 2.2.2.2 remote-as 123
      R3(config-router)#neighbor 2.2.2.2 update-source lo0
      R3(config-router)#net 23.23.23.0 mask 255.255.255.255
      R3(config-router)#net 3.3.3.3 mask 255.255.255.255
      R3(config-router)#redistribute static

      Sh ip bgp summary
      Sh ip bgp
      Sh ip route bgp
      Ping ke R1,R2,R3


      Lab 6. BGP ATTRIBUT ORIGIN





      Catatan :
      i  = route yang berasal dari BGP (eBGP/iBGP) yang diadvertise melalui perintah network x.x.x.x mask y.y.y.y
      e = route yang berasal dari protocol EGP (saat ini sudah tidak ada protocol tersebut)
      ? = route yang berasal dari protocol lain (static / RIP / OSPF / EIGRP) yang di redistribute ke dalam BGP

      R1 untuk menuju network 2.2.2.2 dan 3.3.3.3 adalah via " 200 i " yang artinya Next AS Path adalah AS 200 dan nilai origin dari routernya adalah i

      R1 untuk menuju network 30.30.30.30/32 dab 33.33.33.33/32 adalah via " 200 ?" yang artinya Next AS Path adalah AS 200 dan nilai origin adalah ?


      Lab 7. BGP ATTRIBUTE COMMUNITY
















      Pada lab ini kita akan belajar tentang BGP Attribute Community
      Cek BGP route di R1 dan R4
      Set community �no-export� di R1 (no-export tidak di advertise ke Ebgp)
      Cek BGP route di R3 dan R4 pastikan network 11.11.11.11/32 sudah tidak ada.
      Set community �no-advertise� di R3 (no-advertise tidak di advertise di Ibgp dan Ebgp)
      Cek BGP Route di R1 dan R4 pastikan network 33.33.33.33/32 sudah tidak ada.
      Set community �local-AS� (di advertise hanya di confederation Ibgp saja).
      Artinya konfigurasi iBGP (R1, R2, dan R3) harus dirubah dari route reflector menjadi confederation.


      R1 (NO-EXPORT)
      access-list 1 permit host 11.11.11.11
      route-map NO-EXPORT
      match ip add 1
      set community no-export
      router bgp 123
      neighbor 2.2.2.2 route-map NO-EXPORT out
      neighbor 2.2.2.2 send-community

      R3 (NO-ADVERTISE)
      Access-list 1 permit host 33.33.33.33
      Route-map NO-ADVERTISE
      Match ip add 1
      Set community no-advertise
      Router bgp 123
      Neighbor 2.2.2.2 route-map NO-ADVERTISE out
      Neighbor 2.2.2.2 send-community


      R1 (LOCAL-AS)
      no router bgp 123
      router bgp 12
      bgp confederation identifiers 123
      network 11.11.11.11 mask 255.255.255.255
      neighbor 12.12.12.2 remote-as 12
      neighbor 12.12.12.2 route-map LOCAL-AS
      neighbor 12.12.12.2 send community

      access-list 2 permit host 11.11.11.11
      route-map LOCAL-AS
      match ip add 2
      set community local-As


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


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



      Lab 8.  BGP PEERS GROUP















      R1

      R1(config)#interface fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#interface lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#interface lo1
      R1(config-if)#ip add 11.11.11.11 255.255.255.255
      R1(config-if)#router eigrp 1
      R1(config-router)#net 12.12.12.1 0.0.0.0
      R1(config-router)#net 1.1.1.1 0.0.0.0
      !
      R1(config)#router bgp 123
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor 2.2.2.2 peer-group INTERNAL
      neighbor 3.3.3.3 peer-group INTERNAL
      network 11.11.11.11 mask 255.255.255.255

      R2

      R2(config)#interface fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int s0/0
      R2(config-if)#ip add 24.24.24.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/1
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config-if)#int lo1
      R2(config-if)#ip add 22.22.22.22 255.255.255.255
      !
      R2(config-if)#router eigrp 1
      R2(config-router)#net 12.12.12.2 0.0.0.0
      R2(config-router)#net 23.23.23.2 0.0.0.0
      R2(config-router)#net 2.2.2.2 0.0.0.0
      R2(config-router)#router bgp 123
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor INTERNAL next-hop-self
      neighbor 1.1.1.1 peer-group INTERNAL
      neighbor 3.3.3.3 peer-group INTERNAL
      neighbor 24.24.24.4 remote-as 4
      network 22.22.22.22 mask 255.255.255.255

      R3

      R3(config)#int fa0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#int lo1
      R3(config-if)#ip add 33.33.33.33 255.255.255.255
      !
      R3(config-if)#router eigrp 1
      R3(config-router)#net 23.23.23.3 0.0.0.0
      R3(config-router)#net 3.3.3.3 0.0.0.0
      router bgp 123
      neighbor INTERNAL peer-group
      neighbor INTERNAL remote-as 123
      neighbor INTERNAL update-source lo0
      neighbor 1.1.1.1 peer-group INTERNAL
      neighbor 2.2.2.2 peer-group INTERNAL
      network 33.33.33.33 mask 255.255.255.255

      R4

      R4(config)#int s0/0
      R4(config-if)#ip add 24.24.24.4 255.255.255.0
      R4(config-if)#no sh
      R4(config-if)#int lo0
      R4(config-if)#ip 4.4.4.4 255.255.255.255
      router bgp 4
      neighbor 24.24.24.2 remote-as 123
      network 4.4.4.4 mask 255.255.255.255


      Lab 9. BGP AGGREGRATOR
















      R4

      int lo1
      ip add 40.1.1.1 255.255.255.255
      int lo2
      ip add 40.2.1.1 255.255.255.255
      int lo3
      ip add 40.3.1.1 255.255.255.255
      int lo4
      ip add 40.4.1.1 255.255.255.255
      int lo5
      ip add 40.5.1.1 255.255.255.255
      int lo6
      ip add 40.6.1.1 255.255.255.255
      router bgp 4
      network 40.1.1.1 mask 255.255.255.255
      network 40.2.1.1 mask 255.255.255.255
      network 40.3.1.1 mask 255.255.255.255
      network 40.4.1.1 mask 255.255.255.255
      network 40.5.1.1 mask 255.255.255.255
      network 40.6.1.1 amsk 255.255.255.255
      aggregate-address 40.0.0.0 255.248.0.0
      aggregate-address 40.0.0.0 255.248.0.0 summary-only


      selanjutnya konfigurasikan aggregate suppress Map di R4



      access-list 1 permit host 40.2.1.1
      access-list 1 permit hsot 40.3.1.1
      access-list 1 permit host 40.4.1.1

      access-list 1 deny any
      route-map BLOK
      match ip address 1
      router bgp 4
      aggregate-address 40.0.0.0 255.248.0.0 suppress-map BLOK


      Lab 10. BGP LOCAL AS






      Router R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#int lo2
      R1(config-if)#ip add 1.1.1.2 255.255.255.255
      R1(config-if)#int lo3
      R1(config-if)#ip add 1.1.1.3 255.255.255.255
      R1(config-if)#router bgp 100
      R1(config-router)#neighbor 12.12.12.2 remote-as 65000
      R1(config-router)#network 1.1.1.1 mask 255.255.255.255
      R1(config-router)#network 1.1.1.2 mask 255.255.255.255
      R1(config-router)#network 1.1.1.3 mask 255.255.255.255


      Router R2
      R2(config)#int fa0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config)#int fa0/1
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int lo0
      R2(config-if)#ip add 2.2.2.2 255.255.255.255
      R2(config)#router bgp 200
      R2(config-router)#neighbor 12.12.12.1 remote-as 100
      R2(config-router)#neighbor 12.12.12.1 local-as 65000
      R2(config-router)#neighbor 23.23.23.3 remote-as 300

      Router R3
      R3(config)#int fa0/0
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config)#router bgp 300
      R3(config-router)#neighbor 23.23.23.2 remote-as 200
      R3(config-router)#network 3.3.3.3 mask 255.255.255.255


      Cek hasilnya routenya di R3







      Konfigurasikan local-as no prepend di router R2
      R2(config-router)router bgp 200
      R2(config-router)neighbor 12.12.12.1 local-as 65000 no-prepend


      Cek kembali hasil route no-prepend pada R3










      Konfigurasikan local-as no-prepend replace-as di R3 serta rubah remote-as R4
      R3(config-router)neighbor 12.12.12.1 local-as 65000 no-prepend replace-as
      R3(config-router)neighbor 23.23.23.3 local-as 65000 no-prepend replace-as

      R4(config)#router bgp 300
      R4(config-router)#neighbor 23.23.23.2 remote-as 65000


      Cek kembali hasil route no-prepend pada R3








      Lab 11. BGP MANIPULASI JALUR

















      R1
      R1(config)#int fa0/0
      R1(config-if)#ip add 13.13.13.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)int s0/0
      R1(config-if)ip add 12.12.12.1 255.255.255.0
      R1(config-if)#no sh
      R1(config-if)#int lo0
      R1(config-if)#ip add 1.1.1.1 255.255.255.255
      R1(config-if)#router eigrp 10
      R1(config-if)#net 12.12.12.1 0.0.0.0
      R1(config-if)#net 13.13.13.1 0.0.0.0
      R1(config)#router bgp 1
      R1(config-router)#neighbor 12.12.12.2 remote-as 23
      R1(config-router)#neighbor 13.13.13.3 remote-as 23
      R1(config-router)#net 1.1.1 mask 255.255.255.255


      R2
      R2(config)#int s0/0
      R2(config-if)#ip add 12.12.12.2 255.255.255.0
      R2(config-if)#no sh
      R2(config-if)#int fa0/0
      R2(config-if)#ip add 23.23.23.2 255.255.255.0
      R2(config-if)#no sh
      R2(config)#router eigrp 10
      R2(config-router)#net 12.12.12.2 0.0.0.0
      R2(config-router)#net 23.23.23.2 0.0.0.0
      R2(config)#router bgp 23
      R2(config-router)#neighbor 12.12.12.1 remote-as 1
      R2(config-router)#neighbor 23.23.23.3 remote-as 23
      R2(config-router)#


      R3
      R3(config)#int fa0/1
      R3(config-if)#ip add 23.23.23.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int fa0/0
      R3(config-if)#ip add 12.12.12.3 255.255.255.0
      R3(config-if)#no sh
      R3(config-if)#int lo0
      R3(config-if)#ip add 3.3.3.3 255.255.255.255
      R3(config-if)#router eigrp 10
      R3(config-if)net 23.23.23.3 0.0.0.0
      R3(config-if)net 12.12.12.2 0.0.0.0
      R3(config)#router bgp 23
      R3(config-router)#neighbor 12.12.12.1 remote-as 1
      R3(config-router)#neighbor 23.23.23.2 remote-as 23
      R3(config-router)#net 3.3.3.3 mask 255.255.255.255


      Lakukan verifikasi pada R1
       
      Terlihat pada console bahwasannya untuk menuju ke network 3.3.3.3/32 ada 2 next hop yaitu 12.12.12.2 dan 13.13.13.3. tanda *> di sebelah kiri menunjukkan bahwa next hop terpilih adalah 13.13.13.3


      Lab 12. BGP MINDAH JALUR BY MED

















      R3
      route-map MED
      set metric 200
      router bgp 23
      neighbor 13.13.13.1 route-map MED out


      verifikasi kembali







      Lab 13. BGP MINDAH JALUR BY AS-PATH

















      R3
      route-map AS
      set as-path prepend 23.23.23.23
      router bgp 23
      neighbor 13.13.13.1 route-map AS out

      BGP dalam hal ini bekerja seperti RIP yakni menggunakan hop count, bedanya adalah pada BGP yang dihitung adalah jumlah AS Number yang dilewati. yang paling sedikit akan dipilih. sehingga agar jalur yang digunakan melalui R2 terlebih dahulu, maka jalur R1 - R3 dibuat seolah-olah melalui AS yang banyak sehingga tidak akan dipilih sebagai jalur utama. pada contoh diatas melewati 23.23.23.23


      Lab 14. BGP MINDAH JALUR BY WEIGHT
















      R1
      route-map WEIGHT permit 10
      set weight 100
      router bgp 1
      neighbor 12.12.12.2 route-map WEIGHT in

       Verifikasi

       
      Nilai weight terbesar dipilih, maka link neighbor menuju R2 dibuat besar yakni menjadi 100, seperti terlihat di jalur menuju 3.3.3.3 yang melalui R2 (12.12.12.2) weight nya bernilai 100, sedangkan yang melalui R3 (13.13.13.3) weight nya lebih rendah yakni 0. Maka jalur ke R2 yang dipilih.


       Lab 15. BGP MINDAH JALUR BY LOCAL-PREFERENCE

















      R1
      route-map LOC_PREF permit 10
      set local-preference 200
      router bgp 1
      neighbor 12.12.12.2 route-map LOC_PREF in

      0 komentar :

      Posting Komentar