External BGP with Cisco


Harus tau apa itu External BGP dan Internal BGP

Saya juga masih belum paham teorinya, tapi seperti nya Lab di bawah ini masuk ke dalam kategori External BGP karna setiap peer lawannya menggunakan AS Number yang berbeda, dan disini masih dasar sekali karna disini tidak dilakukan manipulasi prefix (prefix filter)


>> Lanjut lagi, pertama adalah settingan interface adalah sebagai berikut:
Router Core (R2)
interface FastEthernet0/0
 ip address 182.23.172.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 182.23.173.1 255.255.255.0
 duplex auto
 speed auto
!

Router Dist sisi Kiri (R1) 
interface FastEthernet0/0
 ip address 182.23.172.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 103.16.223.1 255.255.255.0
 duplex auto
 speed auto
!
Router Dist sisi Kanan (R3) 
interface FastEthernet0/0
 ip address 182.23.173.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 103.51.131.1 255.255.255.0
 duplex auto
 speed auto
!

Router Cust sisi Kiri (R4)
interface FastEthernet0/0
 ip address 103.16.223.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 103.28.21.1 255.255.255.0
 duplex auto
 speed auto
!
Router Cust sisi Kanan (R5)
interface FastEthernet0/0
 ip address 103.51.131.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 103.31.157.1 255.255.255.0
 duplex auto
 speed auto
!

Untuk konfigurasi interface sama seperti biasanya tidak ada yang berbeda, kita tidak menggunakan IP Loopback dalam Lab kali ini

>>> Next Setting BGP dari Router Core ke Router Dist
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 182.23.172.0 mask 255.255.255.0
 network 182.23.173.0 mask 255.255.255.0
 neighbor 182.23.172.2 remote-as 5001
 neighbor 182.23.172.2 update-source FastEthernet0/0
 neighbor 182.23.172.2 soft-reconfiguration inbound
 neighbor 182.23.173.2 remote-as 5002
 neighbor 182.23.173.2 update-source FastEthernet0/1
 neighbor 182.23.173.2 soft-reconfiguration inbound
 no auto-summary
!

>>> Dan dari sisi Router Dist nya ke router core
Router Dist R1, disini kita meng-advertise IP 103.16.223.0/24 ke Router Core
router bgp 5001
 no synchronization
 bgp log-neighbor-changes
 network 103.16.223.0 mask 255.255.255.0
 neighbor 182.23.172.1 remote-as 100
 neighbor 182.23.172.1 update-source FastEthernet0/0
 neighbor 182.23.172.1 soft-reconfiguration inbound
 no auto-summary
!
Router Dist R3, disini kita meng-advertise IP 103.51.131.0/24 ke Router Core
router bgp 5002
 no synchronization
 bgp log-neighbor-changes
 network 103.51.131.0 mask 255.255.255.0
 neighbor 182.23.173.1 remote-as 100
 neighbor 182.23.173.1 update-source FastEthernet0/0
 neighbor 182.23.173.1 soft-reconfiguration inbound
 no auto-summary
!

>>> Lalu kita buat peer dari Router Dist ke Router Cust menggunakan IP yang sudah di advertise sebelumnya ke Router Core
Router Dist (R1)
router bgp 5001
neighbor 103.16.223.2 remote-as 7778
 neighbor 103.16.223.2 update-source FastEthernet0/1
 neighbor 103.16.223.2 soft-reconfiguration inbound
Router Dist (R3)
router bgp 5002
neighbor 103.51.131.2 remote-as 6668
 neighbor 103.51.131.2 update-source FastEthernet0/1
 neighbor 103.51.131.2 soft-reconfiguration inbound

>>> Lalu kita buat Peer di Router Cust nya, jangan lupa untuk advertise IP dibawahnya
Router Cust Kiri (R4)
router bgp 7778
 no synchronization
 bgp log-neighbor-changes
 network 103.28.21.0 mask 255.255.255.0
 neighbor 103.16.223.1 remote-as 5001
 neighbor 103.16.223.1 update-source FastEthernet0/0
 neighbor 103.16.223.1 soft-reconfiguration inbound
 no auto-summary
!
Router Cust Kanan (R5)
router bgp 6668
 no synchronization
 bgp log-neighbor-changes
 network 103.31.157.0 mask 255.255.255.0
 neighbor 103.51.131.1 remote-as 5002
 neighbor 103.51.131.1 update-source FastEthernet0/0
 neighbor 103.51.131.1 soft-reconfiguration inbound
 no auto-summary
!

>> Sekarang kita lihat peer dari Router Cust hingga ke Router Core
RO-CUST-R4#sh ip bgp sum | beg Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
103.16.223.1    4  5001      27      23        8    0    0 00:19:16        5

>>  Melihat prefix yang Router Cust lemparkan / advertise-kan ke atas (Router Dist)
RO-CUST-R4#sh ip bgp nei 103.16.223.1 advertised-routes
BGP table version is 8, local router ID is 103.28.21.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
*> 103.28.21.0/24   0.0.0.0                  0         32768 i

Total number of prefixes 1

>> Melihat prefix yang diterima dari router atas nya (Ro Dist), disini kita menggunakan full route, tidak menggunakan default originate, jadi prefix nya diterima semua yang ada pada routing table bgp nya
RO-CUST-R4#sh ip bgp nei 103.16.223.1 received-routes
BGP table version is 8, local router ID is 103.28.21.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
r> 103.16.223.0/24  103.16.223.1             0             0 5001 i
*> 103.31.157.0/24  103.16.223.1                           0 5001 100 5002 6668 i
*> 103.51.131.0/24  103.16.223.1                           0 5001 100 5002 i
*> 182.23.172.0/24  103.16.223.1                           0 5001 100 i
*> 182.23.173.0/24  103.16.223.1                           0 5001 100 i

Total number of prefixes 5

>> Cek route nya, sama dengan received-routes biasanya
RO-CUST-R4#sh ip bgp nei 103.16.223.1 routes
BGP table version is 8, local router ID is 103.28.21.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
r> 103.16.223.0/24  103.16.223.1             0             0 5001 i
*> 103.31.157.0/24  103.16.223.1                           0 5001 100 5002 6668 i
*> 103.51.131.0/24  103.16.223.1                           0 5001 100 5002 i
*> 182.23.172.0/24  103.16.223.1                           0 5001 100 i
*> 182.23.173.0/24  103.16.223.1                           0 5001 100 i

Total number of prefixes 5

Berikut hasil akhir trace nya



Berikut perbedaan dari Router Dist terkait prefix BGP nya
RO-DIST-R1#sh ip bgp sum | beg Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
103.16.223.2    4  7778      32      36        8    0    0 00:28:59        1
182.23.172.1    4   100      37      37        8    0    0 00:29:01        4

RO-DIST-R1#sh ip bgp nei 103.16.223.2 received-routes
BGP table version is 8, local router ID is 182.23.172.2
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
*> 103.28.21.0/24   103.16.223.2             0             0 7778 i

Total number of prefixes 1

RO-DIST-R1#sh ip bgp nei 103.16.223.2 advertised-routes
BGP table version is 8, local router ID is 182.23.172.2
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
*> 103.16.223.0/24  0.0.0.0                  0         32768 i
*> 103.28.21.0/24   103.16.223.2             0             0 7778 i
*> 103.31.157.0/24  182.23.172.1                           0 100 5002 6668 i
*> 103.51.131.0/24  182.23.172.1                           0 100 5002 i
r> 182.23.172.0/24  182.23.172.1             0             0 100 i
*> 182.23.173.0/24  182.23.172.1             0             0 100 i

Total number of prefixes 6
RO-DIST-01#sh ip bgp nei 182.23.172.1 advertised-routes
BGP table version is 8, local router ID is 182.23.172.2
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
*> 103.16.223.0/24  0.0.0.0                  0         32768 i
*> 103.28.21.0/24   103.16.223.2             0             0 7778 i
*> 103.31.157.0/24  182.23.172.1                           0 100 5002 6668 i
*> 103.51.131.0/24  182.23.172.1                           0 100 5002 i
r> 182.23.172.0/24  182.23.172.1             0             0 100 i
*> 182.23.173.0/24  182.23.172.1             0             0 100 i

Total number of prefixes 6

RO-DIST-R1#sh ip bgp nei 182.23.172.1 received-routes
BGP table version is 8, local router ID is 182.23.172.2
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
*> 103.31.157.0/24  182.23.172.1                           0 100 5002 6668 i
*> 103.51.131.0/24  182.23.172.1                           0 100 5002 i
r> 182.23.172.0/24  182.23.172.1             0             0 100 i
*> 182.23.173.0/24  182.23.172.1             0             0 100 i

Total number of prefixes 4

Have fun with BGP ^_^


Keterangan

 neighbor 182.23.173.2 remote-as 5002
>> Membuat Peer BGP

 neighbor 182.23.173.2 update-source FastEthernet0/1
>> Mendefinisikan source interface

 neighbor 182.23.173.2 soft-reconfiguration inbound
>> Supaya peer lawan dapat melihat prefix yang diterima/dilempar, atau supaya auto refresh (mungkin ahahaha)

Related Posts:

0 Response to "External BGP with Cisco"

Posting Komentar