Tuesday, 7 May 2013

iBGP Peering Physical

mempelajari bagaimana melakukan konfigurasi peers BGP internal antara dua router dengan AS number sama. peering BGP dapat dikonfigurasikan menggunakan interface physical maupun loopbacknya. yang banyak dipakai adalah menggunakan loopback karena ip loopback ini stabil / tidak akan mati.


R1(config)#int fa0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config)#router bgp 12
R1(config-router)#neighbor 12.12.12.2 remote-as 12
R2(config)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#router bgp 12
R2(config-router)#neighbor 12.12.12.1 remote-as 12

verifikasi
R1(config-router)#do sh ip bgp sum
BGP router identifier 12.12.12.1, local AS number 12
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4    12       3       3        1    0    0 00:00:41        0

pada bagian State/PfxRcd nilainya harus ada walaupun 0, ini bisa dijadikan indikator adjacency berhasil, apabila nilainya active mapun idle berarti masih ada yang salah.

kita coba advertise route ke BGP, kita gunakan loopback
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
kita advertise kan ke BGP AS 12 yang kita konfigurasi
R1(config)#router bgp 12
R1(config-router)#network 1.1.1.1 mask 255.255.255.255
lakukan juga pada router 2
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#router bgp 12
R2(config-router)#network 2.2.2.2 mask 255.255.255.255
verifikasi lagi melalui sh ip bgp summary

R2(config-router)#do sh ip bgp sum
BGP router identifier 12.12.12.2, local AS number 12
BGP table version is 3, main routing table version 3
2 network entries using 240 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 748 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4    12      13      13        3    0    0 00:09:11        1

pada State/PfxRcd nilainya sudah berganti menjadi 1, yang artinya kita sudah mendapat 1 route yang diadvertise melalui BGP dari router lain.

untuk melihat route yang di advertisekan ke BGP, gunakan show ip bgp
R2(config-router)#do sh ip bgp
BGP table version is 3, local router ID is 12.12.12.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
*>i1.1.1.1/32       12.12.12.1               0    100      0 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
sekarang lihat routing tabel
R2(config-router)#do sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
B       1.1.1.1 [200/0] via 12.12.12.1, 00:05:53
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
R2(config-router)#do ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms