BGP Next Hop Self

Topologi menggunakan Lab Sebelumnya
Bikin IP Addreess dulu di R1 R2 dan R3

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int lo0
R1(config-if)#1.
*Jul 30 15:13:52.116: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#int e0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#no ip add 12.12.12.1 255.255.255.0
R1(config-if)# ip add 21.21.21.1 255.255.255.0 
R1(config-if)#int e0/1
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int e0/0
R1(config-if)#no shut
R1(config-if)#exit


R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int lo0
R2(config-if)#ip add
*Jul 30 15:16:35.366: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int e0/0
R2(config-if)#ip add 21.21.21.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#ip add 21.21.21.2 255.255.255.0
*Jul 30 15:17:15.000: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
R2(config-if)#ip add 21.21.21.2 255.255.255.0
*Jul 30 15:17:16.007: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
R2(config-if)#int e0/1                     
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shut


R2(config-if)#int s2/1
R2(config-if)#ip add 23.23.23.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s2/0
R2(config-if)#ip add 32.32.32.1 255.255.255.0
R2(config-if)#no shut


kemudian advertise semua network ke RIPv2

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no au
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
R1(config-router)#network 21.0.0.0
R1(config-router)#exit

R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no au
R2(config-router)#network 2.0.0.0
R2(config-router)#network 12.0.0.0
R2(config-router)#network 21.0.0.0
R2(config-router)#network 23.0.0.0
R2(config-router)#network 32.0.0.0
R2(config-router)#exit


R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no au
R3(config-router)#network 3.0.0.0
R3(config-router)#network 23.0.0.0
R3(config-router)#network 32.0.0.0
R3(config-router)#exit
R3(config)#exit


konfigurasi IBGP dan EBGP di R1  R2 dan R3 beserta next hop self yang mengarah
ke R1 (1.1.1.1)


R1(config)#router bgp 100
R1(config-router)#neighbor 2.2.2.2 remote-as 100
R1(config-router)#neighbor 2.2.2.2 update-source lo0
R1(config-router)#


R2(config)#router bgp 100
R2(config-router)#neighbor 1.1.1.1 remote-as 100
R2(config-router)#neighbor 1.1.1.1 update-source lo0
R2(config-router)#
*Jul 30 15:28:13.435: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R2(config-router)#do sh ip bgp
R2(config-router)#neighbor 3.3.3.3 remote-as 200
R2(config-router)#neighbor 3.3.3.3 update-source lo0
R2(config-router)#neighbor 3.3.3.3 ebgp-multihop   
R2(config-router)#neigh 1.1.1.1 next-hop-self

R3(config)#router bgp 200
R3(config-router)#neighbor 2.2.2.2 remote-as 100
R3(config-router)#neighbor 2.2.2.2 update-source lo0
R3(config-router)#neighbor 2.2.2.2 ebgp-multihop   

Bikin IP Loopback untuk testing di R1 R2 dan R3

R1(config)#int lo1
R1(config-if)#ip add 1
R1(config-if)#ip add 11.11.11.11 255.255.255.255

R2(config)#int lo1
R2(config-if)#ip add 1
R2(config-if)#ip add 13.13.13.13 255.255.255.255

R3(config)#int lo1
R3(config-if)#ip add 1
R3(config-if)#ip add 33.33.33.33 255.255.255.255

kemudian advertise network loopback yang bru ke BGP

R1(config)#router bgp 100
R1(config-router)#network 11.11.11.11 mask 255.255.255.255

R2(config)#router bgp 100
R2(config-router)#network 13.13.13.13 mask 255.255.255.255

R3(config)#router bgp 200
R3(config-router)#network 33.33.33.33 mask 255.255.255.255

lihat hasilnya di R1, apapun network yang berasal dari R3 seolah olah berasal
dari R2

R1(config-if)#do sh ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      13.0.0.0/32 is subnetted, 1 subnets
B        13.13.13.13 [200/0] via 2.2.2.2, 00:00:35
      33.0.0.0/32 is subnetted, 1 subnets
B        33.33.33.33 [200/0] via 2.2.2.2, 00:06:39
R1(config-if)#

sampai sini berhasil yah

Leave a Reply