You are on page 1of 181

Daftar Isi

Daftar Isi ................................................................................................................................................. 1


LAB 1 : IBGP Peering ............................................................................................................................... 3
LAB 2: IBGP Peering using loopback interfaces ..................................................................................... 8
LAB 3: BGP Authentication................................................................................................................... 12
LAB 4: PEER Groups .............................................................................................................................. 14
LAB 5: Route Reflector ......................................................................................................................... 17
LAB 6 : Route Reflector Using Loopback.............................................................................................. 20
LAB 7 : Route Reflector with Two SERVER for Redudancy.................................................................. 23
LAB 8 : Basic EBGP Configuration & Verify Next-hop Behavior .......................................................... 26
LAB 9 : EBGP Neighbor using Loopbacks (Redudancy)........................................................................ 29
LAB 10 : Verify BGP Synchronization Rule ........................................................................................... 31
LAB 11 : Using Weight Attribute .......................................................................................................... 32
LAB 12 : Weight Attribute using Route-maps...................................................................................... 39
Local Preference Attribute ................................................................................................................... 44
LAB 13 : Using Local Preference ........................................................................................................... 44
LAB 14 : Local Preference Using Route-map ....................................................................................... 49
BGP Path Selection (order of path selection) ....................................................................................... 54
LAB 15 : AS-Path Prepend .................................................................................................................... 55
LAB 16 : Multi Exit Discriminator (Metric)........................................................................................... 60
BGP Summarization.............................................................................................................................. 66
LAB 17 : BGP Summarization (Aggregation) ....................................................................................... 66
BGP Route-Filtering options ................................................................................................................ 80
LAB 18 : BGP Filtering using ACL .......................................................................................................... 80
LAB 19 : BGP Filtering using IP Prefix-lists ........................................................................................... 84
LAB 20 : AS-Path Filtering using Regular Expression .......................................................................... 94
BGP Communities ............................................................................................................................... 108
LAB 21 : Communities Well-Known ................................................................................................... 108
LAB 22 : User-Defined Community .................................................................................................... 117
BGP Advance Options ........................................................................................................................ 127
LAB 23 : BGP Confederation............................................................................................................... 128
LAB 24 : Route Reflector Clusters ...................................................................................................... 133
LAB 25 : BGP Route Dampening......................................................................................................... 141
LAB 26 : Removing Private AS ............................................................................................................ 148
LAB 27 : BGP hide Local-Autonomous System .................................................................................. 154

1
BGP Support for Dual AS configuration for network AS migrations ................................................... 161
LAB 28 : BGP Allowas-in ..................................................................................................................... 163
IPV6 BGP ............................................................................................................................................. 167
LAB 29 : Basic IPV6 IBGP and EBGP Configuration.............................................................................. 167
LAB 30 : IPV6 IBGP & EBGP Advance Configuration........................................................................... 172

2
LAB 1 : IBGP Peering
Topologi yang digunakan

Tujuan LAB:
Mempraktekan cara mengkonfigurasi peers BGP internal (IBGP), yaitu konfigurasi
antar BGP yang mempunyai AS yang sama
Konfigurasi
Konfigurasi IP address sesuai dengan topologi diatas
Konfig IBGP peers pada semua router dengan AS 200
BGP neighbor menggunakan interface fisik
Advertise semua network pada router

R1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.1 YES manual up up
Serial0/0 12.12.12.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 41.41.41.1 YES manual up up

R2#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.1.1.1 YES manual up up
Serial0/0 12.12.12.2 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 23.23.23.2 YES manual up up

3
R3#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 30.1.1.1 YES manual up up
Serial0/0 34.34.34.3 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 23.23.23.3 YES manual up up

R4#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 40.1.1.1 YES manual up up
Serial0/0 34.34.34.4 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 41.41.41.4 YES manual up up

Note :
Untuk mengadvertise network classfull misalnya 10.0.0.0/8 maka tidak butuh
konfigurasi mask pada settingan bgp nya
jika networknya classless maka gunakan mask seperti 11.0.0.0/24
Harus sama mask yang dimasukan pada command bgp dengan yang ada di routing
table

Konfigurasi IBGP
R1(config)#router bgp 200
R1(config-router)#neighbor 12.12.12.2 remote-as 200
R1(config-router)#neighbor 41.41.41.4 remote-as 200
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#network 41.41.41.0 mask 255.255.255.0
R1(config-router)#network 10.1.1.0 mask 255.255.255.0
R1(config-router)#

R2(config)#router bgp 200


R2(config-router)#neighbor 12.12.12.1 remote-as 200
R2(config-router)#neighbor 23.23.23.3 remote-as 200
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 20.1.1.0 mask 255.255.255.0
R2(config-router)#

4
R3(config)#router bgp 200
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#neigh 34.34.34.4 remote-as 200
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#

R4(config)#router bgp 200


R4(config-router)#neigh 34.34.34.3 remote-as 200
R4(config-router)#neigh 41.41.41.1 remote-as 200
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Pastikan sudah muncul log seperti ini


*Mar 1 00:36:04.375: %BGP-5-ADJCHANGE: neighbor 12.12.12.2 Up
R1(config-router)#
*Mar 1 00:38:44.923: %BGP-5-ADJCHANGE: neighbor 41.41.41.4 Up

Verifikasi
R1#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.2 4 200 14 14 8 0 0 00:10:20 3
41.41.41.4 4 200 13 12 8 0 0 00:07:39 3

R3#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
23.23.23.2 4 200 16 16 8 0 0 00:11:45 3
34.34.34.4 4 200 17 15 8 0 0 00:10:43 3

R1#sh ip route bgp


34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 41.41.41.4, 00:12:33
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 12.12.12.2, 00:14:36
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:14:36
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 41.41.41.4, 00:12:31
Tidak ada routing ke network 30.1.1.1

5
R2#sh ip route bgp
34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 00:18:33
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 12.12.12.1, 00:19:40
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [200/0] via 12.12.12.1, 00:19:40
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 00:18:33

Tidak terdapat network menuju 40.1.1.1

BGP Split Horizon rule


Update yang dikirimkan dari satu IBGP neighbor tidak akan dikirimkan ulang ke IBGP
neighbor lainnya.
Hal ini mencegah terjadinya routing loops di AS yang sama

Solution for BGP split horizon rule


1. Full mesh neighborship
Setiap router akan menjadi neighbor semua router lainnya di AS yang sama
2. Gunakan Route Reflector

IBGP Neighbors need not to be directly connected (but they must be reachable to each
router)
Full mesh neighborship
R1(config)#router bgp 200 R3(config)#router bgp 200
R1(config-router)#neigh 23.23.23.3 remote-as 200 R3(config-router)#neigh 12.12.12.1 remote-as 200
R1(config-router)#end R3(config-router)#end

R2(config)#router bgp 200 R4(config)#router bgp 200


R2(config-router)#neigh 34.34.34.4 remote-as 200 R4(config-router)#neigh 23.23.23.2 remote-as 200
R2(config-router)#end R4(config-router)#end

R1#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.2 4 200 48 48 14 0 0 00:15:00 3
23.23.23.3 4 200 11 11 14 0 0 00:06:53 3
41.41.41.4 4 200 49 49 14 0 00 0:15:02 3

6
R3#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 200 13 13 10 0 0 00:08:37 3
23.23.23.2 4 200 50 50 10 0 0 00:16:44 3
34.34.34.4 4 200 50 50 10 0 0 00:16:46 3

Verifikasi routing table


R1#sh ip route bgp R2#sh ip route bgp
34.0.0.0/24 is subnetted, 1 subnets 34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 00:10:42 B 34.34.34.0 [200/0] via 23.23.23.3, 00:19:08
20.0.0.0/24 is subnetted, 1 subnets 40.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 12.12.12.2, 00:18:13 B 40.1.1.0 [200/0] via 34.34.34.4, 00:13:39
23.0.0.0/24 is subnetted, 1 subnets 10.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:18:13 B 10.1.1.0 [200/0] via 12.12.12.1, 00:18:56
40.0.0.0/24 is subnetted, 1 subnets 41.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 41.41.41.4, 00:18:02 B 41.41.41.0 [200/0] via 12.12.12.1, 00:18:56
30.0.0.0/24 is subnetted, 1 subnets 30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 00:10:42 B 30.1.1.0 [200/0] via 23.23.23.3, 00:19:08

R3#sh ip route bgp R4#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets 23.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 00:20:38 B 23.23.23.0 [200/0] via 34.34.34.3, 00:00:02
40.0.0.0/24 is subnetted, 1 subnets 10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 41.41.41.1, 00:22:09
B 40.1.1.0 [200/0] via 34.34.34.4, 00:20:28
12.0.0.0/24 is subnetted, 1 subnets
10.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 41.41.41.1, 00:00:02
B 10.1.1.0 [200/0] via 12.12.12.1, 00:13:07 30.0.0.0/24 is subnetted, 1 subnets
41.0.0.0/24 is subnetted, 1 subnets B 30.1.1.0 [200/0] via 34.34.34.3, 00:22:24
B 41.41.41.0 [200/0] via 12.12.12.1,
00:13:07
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 23.23.23.2,
00:20:38

7
LAB 2: IBGP Peering using loopback interfaces
Topologi

Tujuan Lab :
Konfigurasi IBGP peer menggunakan interface loopback

Konfigurasi
Sebelumnya hapus terlebih dahulu konfigan BGP dari lab sebelumnya
Konfigurasi IBGP AS 200 menggunakan interface loopback sebagai neighbor
Buat interface loopback pada semua router sesuai dengan topologi

Hapus konfigurasi BGP di semua router


R1/R2/R3/R4
RX(config)#no router bgp 200

R1(config)#router bgp 200 R2(config)#router bgp 200


R1(config-router)#neigh 2.2.2.2 remote-as 200 R2(config-router)#neigh 1.1.1.1 remote-as 200
R1(config-router)#neigh 3.3.3.3 remote-as 200 R2(config-router)#neigh 3.3.3.3 remote-as 200
R1(config-router)#neigh 4.4.4.4 remote-as 200 R2(config-router)#neigh 4.4.4.4 remote-as 200
R1(config-router)#net 10.1.1.0 mask 255.255.255.0 R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R1(config-router)# R2(config-router)#

R3(config)#router bgp 200 R4(config)#router bgp 200


R3(config-router)#neigh 1.1.1.1 remote-as 200 R4(config-router)#neigh 1.1.1.1 remote-as 200
R3(config-router)#neigh 2.2.2.2 remote-as 200 R4(config-router)#neigh 2.2.2.2 remote-as 200
R3(config-router)#neigh 4.4.4.4 remote-as 200 R4(config-router)#neigh 3.3.3.3 remote-as 200
R3(config-router)#net 30.1.1.0 mask 255.255.255.0 R4(config-router)#net 40.1.1.0 mask 255.255.255.0
R3(config-router)# R4(config-router)#

8
R1#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 0 0 0 0 0 never Active
3.3.3.3 4 200 0 0 0 0 0 never Active
4.4.4.4 4 200 0 0 0 0 0 never Active

R2#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 0 0 0 0 0 never Active
3.3.3.3 4 200 0 0 0 0 0 never Active
4.4.4.4 4 200 0 0 0 0 0 never Active

Active menunjukan kalau BGP masih mencoba untuk memulai neighborship atau proses
bertetanggaan dengan router lainnya

Troubleshoot. konfigurasikan routing protokol IGP kemudian advertise interface loopback


kedalam IGP tsb, kita akan menggunakan OSPF

R1(config)#router ospf 1 R2(config)#router ospf 1


R1(config-router)#net 12.12.12.0 0.0.0.255 area 0 R2(config-router)#net 12.12.12.0 0.0.0.255 area 0
R1(config-router)#net 41.41.41.0 0.0.0.255 area 0 R2(config-router)#net 23.23.23.0 0.0.0.255 area 0
R1(config-router)#net 10.1.1.0 0.0.0.255 area 0 R2(config-router)#net 20.1.1.0 0.0.0.255 area 0
R1(config-router)#net 1.1.1.1 0.0.0.0 area 0 R2(config-router)#net 2.2.2.2 0.0.0.0 area 0

R3(config)#router ospf 1 R4(config)#router ospf 1


R3(config-router)#net 23.23.23.0 0.0.0.255 area 0 R4(config-router)#net 34.34.34.0 0.0.0.255 area 0
R3(config-router)#net 34.34.34.0 0.0.0.255 area 0 R4(config-router)#net 41.41.41.0 0.0.0.255 area 0
R3(config-router)#net 30.1.1.0 0.0.0.255 area 0 R4(config-router)#net 40.1.1.0 0.0.0.255 area 0
R3(config-router)#net 3.3.3.3 0.0.0.0 area 0 R4(config-router)#net 4.4.4.4 0.0.0.0 area 0

Pastikan terdapat koneksi antar neighbor


R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/7/20 ms

R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/7/20 ms

9
Isu-isu dalam BGP dengan source IP address
Pada saat paket BGP dibuat, maka pada saat kita mengeksekusi command neighbor
<neighbor IP> remote-as AS, maka kita akan membuat statement yang
mendefinisikan destination IP address yang akan dijadikan neighbor si router tsb,
dan Interfaces keluar menuju neighbor akan didefiniskan sebagai source IP address
Nah pada saat packet BGP diterima untuk sesi baru BGP, maka source IP address dari
paket yang diterima akan di compared dengan statement neighbor di settingan BGP
kita
Jika match, maka akan established
Dan jika tidak match maka paket akan ditolak

R1(config)#router bgp 200 R2(config)#router bgp 200


R1(config-router)#neigh 2.2.2.2 update-source loop 0 R2(config-router)#neigh 1.1.1.1 update-source loop 0
R1(config-router)#neigh 3.3.3.3 update-source loop 0 R2(config-router)#neigh 3.3.3.3 update-source loop 0
R1(config-router)#neigh 4.4.4.4 update-source loop 0 R2(config-router)#neigh 4.4.4.4 update-source loop 0
R1(config-router)# R2(config-router)#

R3(config)#router bgp 200 R4(config)#router bgp 200


R3(config-router)#neigh 1.1.1.1 update-source loop 0 R4(config-router)#neigh 1.1.1.1 update-source loop 0
R3(config-router)#neigh 2.2.2.2 update-source loop 0 R4(config-router)#neigh 2.2.2.2 update-source loop 0
R3(config-router)#neigh 4.4.4.4 update-source loop 0 R4(config-router)#neigh 3.3.3.3 update-source loop 0
R3(config-router)# R4(config-router)#

R1#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 177 177 8 0 0 02:52:35 1
3.3.3.3 4 200 28 28 8 0 0 00:23:26 1
4.4.4.4 4 200 28 28 8 0 0 00:23:02 1

R2#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 180 180 8 0 0 02:55:01 1
3.3.3.3 4 200 29 29 8 0 0 00:24:40 1
4.4.4.4 4 200 29 29 8 0 0 00:24:13 1

R3#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 33 33 8 0 0 00:28:18 1
2.2.2.2 4 200 32 32 8 0 0 00:27:05 1
4.4.4.4 4 200 31 31 8 0 0 00:26:01 1

10
R1#sh ip route ospf
34.0.0.0/24 is subnetted, 1 subnets
O 34.34.34.0 [110/128] via 41.41.41.4, 03:06:08, Serial0/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 12.12.12.2, 03:07:15, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/129] via 41.41.41.4, 03:06:08, Serial0/1
[110/129] via 12.12.12.2, 03:06:35, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/65] via 41.41.41.4, 03:05:48, Serial0/1
20.0.0.0/24 is subnetted, 1 subnets
O 20.1.1.0 [110/74] via 12.12.12.2, 03:07:25, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.23.23.0 [110/128] via 12.12.12.2, 03:07:48, Serial0/0
40.0.0.0/24 is subnetted, 1 subnets
O 40.1.1.0 [110/74] via 41.41.41.4, 03:05:58, Serial0/1
30.0.0.0/24 is subnetted, 1 subnets
O 30.1.1.0 [110/138] via 41.41.41.4, 03:06:08, Serial0/1
[110/138] via 12.12.12.2, 03:06:45, Serial0/0

11
Konfigurasi BGP Authentication
BGP support autentikasi MD5
Pada saat autentikasi diaktifkan semua segment tcp yang dikirimkan lewat BGP antar
peers maka akan diverifikasi dan di terima jika autentikasi sukses
Agar autentikasi sukes maka antar harus memiliki pass yang sama
Jika gagal autentikasi, maka neighborship tidak akan bisa dilakukan

LAB 3: BGP Authentication


Topologi

Tujuan lab :
Konfigurasi autentikasi antar peers, dan gunakan password santriidn
Perring akan jalan jika kedua router gunakan BGPv4

R1(config)#router bgp 200 R2(config)#router bgp 200


R1(config-router)#neigh 2.2.2.2 password santriidn R2(config-router)#neigh 1.1.1.1 pass santriidn
R1(config-router)#neigh 3.3.3.3 password santriidn R2(config-router)#neigh 3.3.3.3 pass santriidn
R1(config-router)#neigh 4.4.4.4 password santriidn R2(config-router)#neigh 4.4.4.4 pass santriidn
R1(config-router)#neigh 2.2.2.2 version 4 R2(config-router)#neigh 1.1.1.1 version 4
R1(config-router)#neigh 3.3.3.3 version 4 R2(config-router)#neigh 3.3.3.3 version 4
R1(config-router)#neigh 4.4.4.4 version 4 R2(config-router)#neigh 4.4.4.4 version 4

R3(config)#router bgp 200 R4(config)#router bgp 200


R3(config-router)#neigh 1.1.1.1 password santriidn R4(config-router)#neigh 1.1.1.1 pass santriidn
R3(config-router)#neigh 2.2.2.2 password santriidn R4(config-router)#neigh 2.2.2.2 pass santriidn
R3(config-router)#neigh 4.4.4.4 password santriidn R4(config-router)#neigh 3.3.3.3 pass santriidn
R3(config-router)#neigh 1.1.1.1 version 4 R4(config-router)#neigh 1.1.1.1 version 4
R3(config-router)#neigh 2.2.2.2 version 4 R4(config-router)#neigh 2.2.2.2 version 4
R3(config-router)#neigh 4.4.4.4 version 4 R4(config-router)#neigh 3.3.3.3 version 4

12
R1#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 213 213 8 0 0 03:28:02 1
3.3.3.3 4 200 63 63 8 0 0 00:58:54 1
4.4.4.4 4 200 63 63 8 0 0 00:58:29 1

R2#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 217 217 8 0 0 03:32:04 1
3.3.3.3 4 200 66 66 8 0 0 01:01:43 1
4.4.4.4 4 200 66 66 8 0 0 01:01:17 1

R3#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 68 68 8 0 0 01:03:47 1
2.2.2.2 4 200 67 67 8 0 0 01:02:35 1
4.4.4.4 4 200 66 66 8 0 0 01:01:31 1

R4#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 69 69 8 0 0 01:04:12 1
2.2.2.2 4 200 67 67 8 0 0 01:02:58 1
3.3.3.3 4 200 67 67 8 0 0 01:02:20 1

13
BGP Peer-Groups
Digunakan pada saat router-router yang menjalankan BGP memiliki aturan yang
sama seperti password dsb.
Update yang dilakukan per peer group

LAB 4: PEER Groups


Topologi

Tujuan Lab :
Lakukan peer bgp menggunakan ip address interface loopback di semua router
Konfigurasi autentikasi per peers dan gunakan password santriidn
Autentikasi hanya jalan di BGPv4
Gunakan Peer-Group
Konfigurasi OSPF agar interface loopback di setiap router dapat terkoneksi
satu sama lain
Advertise hanya network LAN di BGP

R1(config)#router ospf 1 R2(config)#router ospf 1


R1(config-router)#net 12.12.12.0 0.0.0.255 area 0 R2(config-router)#net 12.12.12.0 0.0.0.255 area 0
R1(config-router)#net 41.41.41.0 0.0.0.255 area 0 R2(config-router)#net 23.23.23.0 0.0.0.255 area 0
R1(config-router)#net 10.1.1.0 0.0.0.255 area 0 R2(config-router)#net 20.1.1.0 0.0.0.255 area 0
R1(config-router)#net 1.1.1.1 0.0.0.0 area 0 R2(config-router)#net 2.2.2.2 0.0.0.0 area 0

R3(config)#router ospf 1 R4(config)#router ospf 1


R3(config-router)#net 23.23.23.0 0.0.0.255 area 0 R4(config-router)#net 34.34.34.0 0.0.0.255 area 0
R3(config-router)#net 34.34.34.0 0.0.0.255 area 0 R4(config-router)#net 41.41.41.0 0.0.0.255 area 0
R3(config-router)#net 30.1.1.0 0.0.0.255 area 0 R4(config-router)#net 40.1.1.0 0.0.0.255 area 0
R3(config-router)#net 3.3.3.3 0.0.0.0 area 0 R4(config-router)#net 4.4.4.4 0.0.0.0 area 0

14
R1(config)#router bgp 200
R1(config-router)#neighbor CCIEIDN peer-group
R1(config-router)#neighbor CCIEIDN remote-as 200
R1(config-router)#neighbor CCIEIDN update-source loop 0
R1(config-router)#neighbor CCIEIDN version 4
R1(config-router)#neighbor CCIEIDN password santriidn
R1(config-router)#
R1(config-router)#neighbor 2.2.2.2 peer-group CCIEIDN
R1(config-router)#neighbor 3.3.3.3 peer-group CCIEIDN
R1(config-router)#neighbor 4.4.4.4 peer-group CCIEIDN
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neighbor CCIEIDN peer-group
R2(config-router)#neighbor CCIEIDN remote-as 200
R2(config-router)#neighbor CCIEIDN update-sour loop 0
R2(config-router)#neighbor CCIEIDN version 4
R2(config-router)#neighbor CCIEIDN password santriidn
R2(config-router)#
R2(config-router)#neigh 1.1.1.1 peer-group CCIEIDN
R2(config-router)#neigh 3.3.3.3 peer-group CCIEIDN
R2(config-router)#neigh 4.4.4.4 peer-group CCIEIDN
R2(config-router)#net 20.1.1.0 mask 255.255.255.0

R3(config)#router bgp 200


R3(config-router)#neigh CCIEIDN peer-group
R3(config-router)#neigh CCIEIDN remote-as 200
R3(config-router)#neigh CCIEIDN update-source loop 0
R3(config-router)#neigh CCIEIDN version 4
R3(config-router)#neigh CCIEIDN password santriidn
R3(config-router)#
R3(config-router)#neigh 1.1.1.1 peer-group CCIEIDN
R3(config-router)#neigh 2.2.2.2 peer-group CCIEIDN
R3(config-router)#neigh 4.4.4.4 peer-group CCIEIDN
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

15
R4(config)#router bgp 200
R4(config-router)#neigh CCIEIDN peer-group
R4(config-router)#neigh CCIEIDN remote-as 200
R4(config-router)#neigh CCIEIDN update-sour loop 0
R4(config-router)#neigh CCIEIDN version 4
R4(config-router)#neigh CCIEIDN passwo santriidn
R4(config-router)#
R4(config-router)#neigh 1.1.1.1 peer-group CCIEIDN
R4(config-router)#neigh 2.2.2.2 peer-group CCIEIDN
R4(config-router)#neigh 3.3.3.3 peer-group CCIEIDN

R1#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 17 17 8 0 0 00:13:51 1
3.3.3.3 4 200 16 17 8 0 0 00:12:07 1
4.4.4.4 4 200 15 15 8 0 0 00:10:10 1

R1#sh ip bgp
BGP table version is 8, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
r>i20.1.1.0/24 2.2.2.2 0 100 0 i
r>i30.1.1.0/24 3.3.3.3 0 100 0 i
r>i40.1.1.0/24 4.4.4.4 0 100 0 i

16
Route Reflector
Alternative jika skalanya besar,
Mengijinkan router (RR) untuk mengadvertise route yang diterima dari satu IBGP
peer ke IBGP peer lainnya
Client melakukan update ke server
Server update to all the remaining client

Isu
Semua client hanya bisa established dengan satu server
Client tidak akan established dengan client lainnya
Jika ada 2 server maka server established dengan server lainnya dan client

LAB 5: Route Reflector


Topologi

Tujuan LAB
Konfigurasi IBGP peer dengan AS 200
Pastikan setiap router dapat terkoneksi satu sama lain
Jangan gunakan full mesh tetapi gunakan route reflector

R1(config)#router bgp 200 R3(config)#router bgp 200


R1(config-router)#neigh 12.12.12.2 remote-as 200 R3(config-router)#neigh 23.23.23.2 remote-as 200
R1(config-router)#net 10.1.1.0 mask 255.255.255.0 R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R1(config-router)#net 12.12.12.0 mask 255.255.255.0 R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R1(config-router)# R3(config-router)#

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 200
R2(config-router)#neigh 23.23.23.3 remote-as 200
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
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)#

17
Pastikan muncul log seperti ini
R2(config-router)#
*Mar 1 00:13:25.763: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up
R2(config-router)#
*Mar 1 00:13:30.503: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up

Verifikasi
R2#sh ip bgp summ
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 6, main routing table version 6
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 200 21 21 6 0 0 00:17:45 2
23.23.23.3 4 200 21 21 6 0 0 00:17:40 2

R2#sh ip bgp
BGP table version is 6, local router ID is 2.2.2.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
* i12.12.12.0/24 12.12.12.1 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* i23.23.23.0/24 23.23.23.3 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i30.1.1.0/24 23.23.23.3 0 100 0 i

R1#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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* i12.12.12.0/24 12.12.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i20.1.1.0/24 12.12.12.2 0 100 0 i
*>i23.23.23.0/24 12.12.12.2 0 100 0 i

18
R3#sh ip bgp
BGP table version is 5, local router ID is 3.3.3.3
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


*>i12.12.12.0/24 23.23.23.2 0 100 0 i
*>i20.1.1.0/24 23.23.23.2 0 100 0 i
* i23.23.23.0/24 23.23.23.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i

R3 tidak bisa menjangkau rute menuju network 10.1.1.0 di R1 dan juga sebaliknya, ini
dikarenakan adanya mekanisme BGP split horizon, terdapat 2 cara agar bisa mempelajari
rute tsb yaitu
1. Full mesh neighborship (sdah dipraktekan di lab sebelumnya)
2. Route Reflector

Konfigurasi Route Reflector


R2(config)#router bgp 200
R2(config-router)#neigh 12.12.12.1 route-reflector-client
R2(config-router)#neigh 23.23.23.3 route-reflector-client
R2(config-router)#

Log yang akan muncul


*Mar 1 00:55:09.895: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Down RR client config change
*Mar 1 00:55:18.995: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Down RR client config change
R2#
*Mar 1 00:55:39.039: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up
*Mar 1 00:55:39.039: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up

Verifikasi
R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
* i12.12.12.0/24 12.12.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i20.1.1.0/24 12.12.12.2 0 100 0 i
*>i23.23.23.0/24 12.12.12.2 0 100 0 i
*>i30.1.1.0/24 23.23.23.3 0 100 0 i

19
LAB 6 : Route Reflector Using Loopback
Topologi

Tujuan Lab :
Konfigurasi BGP AS 500 di semua router
Neighbor menggunakan interface loopback
Konfigurasi RIPv2 sebagai IGP routingnya
Jika menggunakan dari lab sebelumnya maka hapus dahulu konfigan BGP nya

Di R1/R2/R3
Rx(config)#no router bgp 200
Rx(config)#

Konfigurasi IGP routing


R1(config)#router rip R3(config)#router rip
R1(config-router)#ver 2 R3(config-router)#ver 2
R1(config-router)#no au R3(config-router)#no au
R1(config-router)#net 12.12.12.0 R3(config-router)#net 23.23.23.0
R1(config-router)#net 10.1.1.0 R3(config-router)#net 30.1.1.0
R1(config-router)#net 1.1.1.1 R3(config-router)#net 3.3.3.3
R1(config-router)#end R3(config-router)#end

R2(config)#router rip
R2(config-router)#ver 2
R2(config-router)#no au
R2(config-router)#net 12.12.12.0
R2(config-router)#net 23.23.23.0
R2(config-router)#net 20.1.1.0
R2(config-router)#net 2.2.2.2

20
Konfigurasi IBGP peers menggunakan interface loopback sebagai neighbor
R1(config)#router bgp 200 R3(config)#router bgp 200
R1(config-router)#neigh 2.2.2.2 remote-as 200 R3(config-router)#neigh 2.2.2.2 remote-as 200
R1(config-router)#neigh 2.2.2.2 update-source loop 0 R3(config-router)#neigh 2.2.2.2 update-source loop 0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0 R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R1(config-router)# R3(config-router)#

R2(config)#router bgp 200


R2(config-router)#neigh 1.1.1.1 remote-as 200
R2(config-router)#neigh 1.1.1.1 update-source loop 0
R2(config-router)#neigh 3.3.3.3 remote-as 200
R2(config-router)#neigh 3.3.3.3 update-source loop 0
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R2(config-router)#

Verifikasi
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 200
BGP table version is 4, main routing table version 4
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 7 7 4 0 0 00:03:47 1

R2#sh ip bgp summar


BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 6, main routing table version 6
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 9 9 6 0 0 00:05:08 1
3.3.3.3 4 200 8 8 6 0 0 00:03:37 1

R3#sh ip bgp summ


BGP router identifier 3.3.3.3, local AS number 200
BGP table version is 4, main routing table version 4
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 9 9 4 0 0 00:04:47 1

R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
r>i20.1.1.0/24 2.2.2.2 0 100 0 i

21
R2#sh ip bgp
BGP table version is 6, local router ID is 2.2.2.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


r>i10.1.1.0/24 1.1.1.1 0 100 0 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
r>i30.1.1.0/24 3.3.3.3 0 100 0 i

R3#sh ip bgp
BGP table version is 4, local router ID is 3.3.3.3
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>i20.1.1.0/24 2.2.2.2 0 100 0 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i

Dapat dilihat pada saat menjalankan sh ip bgp R1 tidak mendapatkan network menuju ke
30.1.1.0 dan juga sebaliknya, ini terjadi karena adanya bgp split horizon. Maka dari itu kita
kan mengkonfigurasi Route Reflector di R2

Konfigurasi R2 sebagai RR server dan R1,R2 sebagai RR client


R2(config)#router bgp 200
R2(config-router)#neigh 1.1.1.1 route-reflector-client
R2(config-router)#neigh 3.3.3.3 route-reflector-client
R2(config-router)#
Verifikasi Ulang
R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
r>i20.1.1.0/24 2.2.2.2 0 100 0 i
r>i30.1.1.0/24 3.3.3.3 0 100 0 i

R3#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
r>i10.1.1.0/24 1.1.1.1 0 100 0 i
r>i20.1.1.0/24 2.2.2.2 0 100 0 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
Josss, sekarang sudah ada rute network yang diinginkan

22
LAB 7 : Route Reflector with Two SERVER for Redudancy
Topologi yang digunakan

Tujuan Lab :
Konfigurasi IBGP as 200 di semua router, dan interface loopback sebagai
neighbornya, kemudian advertise network LAN nya
Konfig Router Reflector
o R2/R4 sebagai RR Server
o R1/R3 sebagai RR client
Konfig RIPv2 dan advertise connected interface dan juga loopbacknya

Konfig IGP routing


R1(config)#router rip R2(config)#router rip
R1(config-router)#ver 2 R2(config-router)#ver 2
R1(config-router)#no au R2(config-router)#no au
R1(config-router)#net 12.12.12.0 R2(config-router)#net 12.12.12.0
R1(config-router)#net 41.41.41.0 R2(config-router)#net 23.23.23.0
R1(config-router)#net 10.1.1.0 R2(config-router)#net 20.1.1.0
R1(config-router)#net 1.1.1.1 R2(config-router)#net 2.2.2.2
R1(config-router)# R2(config-router)#

R4(config)#router rip R3(config)#router rip


R4(config-router)#ver 2 R3(config-router)#ver 2
R4(config-router)#no au R3(config-router)#no au
R4(config-router)#net 34.34.34.0 R3(config-router)#net 23.23.23.0
R4(config-router)#net 41.41.41.0 R3(config-router)#net 34.34.34.0
R4(config-router)#net 40.1.1.0 R3(config-router)#net 30.1.1.0
R4(config-router)#net 4.4.4.4 R3(config-router)#net 3.3.3.3
R4(config-router)# R3(config-router)#

23
Konfig BGP
R1 (RR Client)
R1(config)#router bgp 200
R1(config-router)#neigh 2.2.2.2 remote-as 200
R1(config-router)#neigh 2.2.2.2 update-source loop 0
R1(config-router)#neigh 4.4.4.4 remote-as 200
R1(config-router)#neigh 4.4.4.4 update-source loop 0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R3 (RR Client)
R3(config)#router bgp 200
R3(config-router)#neigh 2.2.2.2 remote-as 200
R3(config-router)#neigh 2.2.2.2 update-source loop 0
R3(config-router)#neigh 4.4.4.4 remote-as 200
R3(config-router)#neigh 4.4.4.4 update-source loop 0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R2 (RR Server)
R2(config)#router bgp 200
R2(config-router)#neigh 1.1.1.1 remote-as 200
R2(config-router)#neigh 1.1.1.1 update-source loop 0
R2(config-router)#neigh 1.1.1.1 route-reflector-client

R2(config-router)#neigh 3.3.3.3 remote-as 200


R2(config-router)#neigh 3.3.3.3 update-source loop 0
R2(config-router)#neigh 3.3.3.3 route-reflector-client

R2(config-router)#neigh 4.4.4.4 remote-as 200


R2(config-router)#neigh 4.4.4.4 update-source loop 0
R2(config-router)#neigh 4.4.4.4 route-reflector-client
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R4 (RR Server)
R4(config)#router bgp 200
R4(config-router)#neigh 1.1.1.1 remote-as 200
R4(config-router)#neigh 1.1.1.1 update-source loop 0
R4(config-router)#neigh 1.1.1.1 route-reflector-client

R4(config-router)#neigh 2.2.2.2 remote-as 200


R4(config-router)#neigh 2.2.2.2 update-source loop 0
R4(config-router)#neigh 2.2.2.2 route-reflector-client

R4(config-router)#neigh 3.3.3.3 remote-as 200


R4(config-router)#neigh 3.3.3.3 update-source loop 0
R4(config-router)#neigh 3.3.3.3 route-reflector-client
R4(config-router)#net 40.1.1.0 mask 255.255.255.0
Verifikasi
24
R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 14, main routing table version 14
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 200 27 30 14 0 0 00:17:42 1
3.3.3.3 4 200 27 30 14 0 0 00:17:06 1
4.4.4.4 4 200 21 20 14 0 0 00:05:11 3

R1#sh ip bgp summary


BGP router identifier 1.1.1.1, local AS number 200
BGP table version is 11, main routing table version 11
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 32 29 11 0 0 00:19:32 3
4.4.4.4 4 200 25 18 11 0 0 00:08:11 3

R3#sh ip bgp summary


BGP router identifier 3.3.3.3, local AS number 200
BGP table version is 11, main routing table version 11
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 32 29 11 0 0 00:19:32 3
4.4.4.4 4 200 25 18 11 0 0 00:08:11 3

R1#sh ip bgp
BGP table version is 11, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
r i20.1.1.0/24 2.2.2.2 0 100 0 i
r>i 2.2.2.2 0 100 0 i
r i30.1.1.0/24 3.3.3.3 0 100 0 i
r>i 3.3.3.3 0 100 0 i
r i40.1.1.0/24 4.4.4.4 0 100 0 i
r>i 4.4.4.4 0 100 0 i

25
EBGP
Next-hop dalam BGP
BGP merupakan routing protokol antar AS (AS-by-AS), bukan antar Router (router-
by-router)
Dalam BGP next-hop bukan berarti router berikutnya, tapi IP Address untuk
menjangkau AS berikutnya

When EBGP EBGP Neighbor (next-hop berubah )


When IBGP IBGP neighbor (next-hop tidak berubah)

LAB 8 : Basic EBGP Configuration & Verify Next-hop Behavior

Tujuan Lab :
Belajar mengkonfigurasi BGP peer antar AS (AS 200 dan AS 300)
Konfigurasi IP Add sesuai dengan topologi,
Konfig BGP dengan AS sesuai topologi
Advertise network LAN kedalam BGP
Konfigurasi BGP
R1(config)#router bgp 200 R3(config)#router bgp 300
R1(config-router)#neigh 12.12.12.2 remote-as 200 R3(config-router)#neigh 23.23.23.2 remote-as 200
R1(config-router)#network 10.1.1.0 mask R3(config-router)#net 30.1.1.0 mask 255.255.255.0
255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 200
R2(config-router)#neigh 23.23.23.3 remote-as 300
R2(config-router)#network 20.1.1.0 mask 255.255.255.0
R2(config-router)#

26
Verifikasi
R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 4, main routing table version 4
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 200 10 11 4 0 0 00:05:14 1
23.23.23.3 4 300 9 10 4 0 0 00:04:11 1
R2#sh ip bgp
BGP table version is 4, local router ID is 2.2.2.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
R2#sh ip route bgp
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 12.12.12.1, 00:08:07
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [20/0] via 23.23.23.3, 00:07:03

R1#sh ip bgp
BGP table version is 3, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*>i20.1.1.0/24 12.12.12.2 0 100 0 i
* i30.1.1.0/24 23.23.23.3 0 100 0 300 i
R1#sh ip route bgp
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 12.12.12.2, 00:10:42

Dapat dilihat tidak ada rute menuju network 30.1.1.0 pada routing table R1, karena next-
hop yang digunakan adalah 23.23.23.3. Kita harus merubah next-hop address menjadi
12.12.12.2
R2 akan memberitahu ke R1 jika ingin menuju ke network 30.1.1.0, next-hop nya harus si R2
(12.12.12.2), bukan R3 (23.23.23.3), karena si R1 tidak punya koneksi langsung ke si
23.23.23.3 ini. Maka konfigan nya seprti ini

27
R2
R2(config)#router bgp 200
R2(config-router)#neigh 12.12.12.1 next-hop-self

Verifikasi (lagi)
R1#sh ip bgp
BGP table version is 4, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*>i20.1.1.0/24 12.12.12.2 0 100 0 i
*>i30.1.1.0/24 12.12.12.2 0 100 0 300 i
Nexthop ke network 30.1.1.0 berubah yang tadinya ke 23.23.23.3 menjadi ke 12.12.12.2

R1#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 12.12.12.2, 00:26:07
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 12.12.12.2, 00:05:42
Sekarang sudah ada rute menuju network 30.1.1.0 (LAN R3) di routing table R1. Joss

28
LAB 9 : EBGP Neighbor using Loopbacks (Redudancy)
Topologi

Tujuan Lab :
Konfigurasi EBGP peer antar router dengan AS sesuai dengan topologi
Gunakan interface loopback sebagai neighbor BGP
Konfigurasi static route antar loopback r1 dan r2

Konfigurasi
R1(config)#router bgp 200 R2(config)#router bgp 300
R1(config-router)#neigh 2.2.2.2 remote-as 300 R2(config-router)#neigh 1.1.1.1 remote-as 200
R1(config-router)#neigh 2.2.2.2 update-source loop 0 R2(config-router)#neigh 1.1.1.1 update-source loop 0
R1(config-router)#neigh 2.2.2.2 ebgp-multihop R2(config-router)#neigh 1.1.1.1 ebgp-multihop
R1(config-router)#net 10.1.1.0 mask 255.255.255.0 R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R1(config-router)# R2(config-router)#

BGP neighbor ebgp-multihop command


perintah ini meningkatkan standar satu hop untuk EBGP peer
Hal itu memungkinkan rute ke alamat EBGP loopback (yang akan memiliki hop count
lebih besar dari 1)
EBGP multihop memberitahu tetangga bahwa 2.2.2.2 tidak terhubung secara
langsung tetapa beberapa hop
meningkatkan nilai TTL standar 1-255

29
Verifikasi
R1#sh ip bgp summ
BGP router identifier 1.1.1.1, local AS number 200
BGP table version is 2, main routing table version 2
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 300 0 0 0 0 0 never Active

Terlihat statusnya masih Active, itu berarti R1 masih mencoba menjalin hubungan dengan
R2, tetapi belum berhasil, masih mencoba terus. Sekarang kita akan mengkonfigurasikan
static route agar antar loopback di R1 dan R2 dapat saling terhubung, sebenernya bisa
gunain dynamic routing, tapi biar simple pake static aja

R1(config)#ip route 2.2.2.0 255.255.255.0 12.12.12.2


R1(config)#ip route 2.2.2.0 255.255.255.0 21.21.21.2 10

R2(config)#ip route 1.1.1.0 255.255.255.0 12.12.12.1


R2(config)#ip route 1.1.1.0 255.255.255.0 21.21.21.1 10

Setelah itu pastika BGP sudah beradjacency satu sama lain, ditandai dengan log seperti ini
*Mar 1 02:16:25.271: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up

Verifikasi (lagi)
R1#sh ip bgp summ
BGP router identifier 1.1.1.1, local AS number 200
BGP table version is 3, main routing table version 3
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 300 8 8 3 0 0 00:03:48 1
Sekarang statusnya sudah gk active lagi

R1#sh ip bgp
BGP table version is 3, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 20.1.1.0/24 2.2.2.2 0 0 300 i

30
LAB 10 : Verify BGP Synchronization Rule
Pada saat kita menjalankan BGP pada beberapa router dalam satu AS maka harus
mengkonfigurasi iBGP antara router2 tersbut. Pada cisco router defaultnya BGP mematikan
fitur synchronization. Command no synchronization berfungsi agar pada saat router2
dalam satu AS menjalankan routing protokol IGP seperti OSPF maka command ini
memberitahukan bahwa mereka tidak akan meng-sinkronisasikan iBGP dengan si OSPF.

Topologi

Task :
Konfigurasi BGP peer dan advertise semua interface kedalam BGP
Disable Synchonization Rule

R2(config)#router bgp 100 R3(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 200 R3(config-router)#neigh 13.13.13.1 remote-as 200
R2(config-router)#net 12.12.12.0 mask 255.255.255.0 R3(config-router)#net 13.13.13.0 mask 255.255.255.0
R2(config-router)#net 20.1.1.0 mask 255.255.255.0 R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R2(config-router)#no synch R3(config-router)#no sync
R2(config-router)#no auto R3(config-router)#no auto

R1(config)#router bgp 200


R1(config-router)#neigh 12.12.12.2 remote-as 100
R1(config-router)#neigh 13.13.13.3 remote-as 200
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 13.13.13.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#no sync
R1(config-router)#no auto

31
LAB 11 : Using Weight Attribute
Topologi

Tujuan Lab :
Mengubah jalur, agar R1 menggunakan jalur via R4 untuk menjangkau network2 di
router lainnya, karena pada defaultnya R1 akan menggunakn jalur via R2 karena nilai
AS nya lebih kecil
Konfigurasi :
Konfigurasi iBGP dan eBGP sesuai dengan topologi, dan advertise semua network
yang dimiliki router, gunakan direcrly connected interface untuk iBGP dan eBGP
peer
Merubah nilai weight di R4

32
Konfigurasi BGP
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 300
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#network 41.41.41.0 mask 255.255.255.0
R1(config-router)#network 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 200
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 20.1.1.0 mask 255.255.255.0

R3(config)#router bgp 200


R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#neigh 34.34.34.4 remote-as 300
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R4(config)#router bgp 300


R4(config-router)#neigh 34.34.34.3 remote-as 200
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Verifikasi
R2#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 100 570 566 9 0 0 00:51:32 4
23.23.23.3 4 200 565 570 9 0 0 00:51:44 5

R4#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
34.34.34.3 4 200 567 570 10 0 0 00:53:37 6
41.41.41.1 4 100 574 574 10 0 0 00:53:18 7

33
R4#sh ip bgp
BGP table version is 10, 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


* 10.1.1.0/24 34.34.34.3 0 200 100 i
*> 41.41.41.1 0 0 100 i
* 12.12.12.0/24 34.34.34.3 0 200 i
*> 41.41.41.1 0 0 100 i
*> 20.1.1.0/24 34.34.34.3 0 200 i
* 41.41.41.1 0 100 200 i
* 23.23.23.0/24 41.41.41.1 0 100 200 i
*> 34.34.34.3 0 0 200 i
* 30.1.1.0/24 41.41.41.1 0 100 200 i
*> 34.34.34.3 0 0 200 i
* 34.34.34.0/24 41.41.41.1 0 100 200 i
*> 0.0.0.0 0 32768 i
* 34.34.34.3 0 0 200 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
* 41.41.41.0/24 41.41.41.1 0 0 100 i
*> 0.0.0.0 0 32768 i

R3#sh ip bgp
BGP table version is 10, local router ID is 3.3.3.3
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


* 10.1.1.0/24 34.34.34.4 0 300 100 i
*>i 12.12.12.1 0 100 0 100 i
* 12.12.12.0/24 34.34.34.4 0 300 100 i
*>i 23.23.23.2 0 100 0 i
*>i20.1.1.0/24 23.23.23.2 0 100 0 i
* i23.23.23.0/24 23.23.23.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 0 300 i
*> 41.41.41.0/24 34.34.34.4 0 0 300 i
*i 12.12.12.1 0 100 0 100 i

34
R3#sh ip route bgp
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 00:57:42
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 34.34.34.4, 00:57:42
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 12.12.12.1, 00:57:42
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 34.34.34.4, 00:57:42
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 00:57:42

R2#sh ip bgp
BGP table version is 9, local router ID is 2.2.2.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
*i 23.23.23.3 0 100 0 i
*>i30.1.1.0/24 23.23.23.3 0 100 0 i
*>i34.34.34.0/24 23.23.23.3 0 100 0 i
* 40.1.1.0/24 12.12.12.1 0 100 300 i
*>i 34.34.34.4 0 100 0 300 i
* i41.41.41.0/24 34.34.34.4 0 100 0 300 i
*> 12.12.12.1 0 0 100 i

R2#sh ip route bgp


34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 01:10:20
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 34.34.34.4, 01:10:20
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 12.12.12.1, 01:10:20
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 12.12.12.1, 01:10:20
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 01:10:20

35
Konfigurasi next-hop-self di R2 dan R3
R2(config)#router bgp 200
R2(config-router)#neigh 23.23.23.3 next-hop-self

R3(config)#router bgp 200


R3(config-router)#neigh 23.23.23.2 next-hop-self

Verifikasi (lagi)
R3#sh ip bgp
BGP table version is 11, local router ID is 3.3.3.3
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


* 10.1.1.0/24 34.34.34.4 0 300 100 i
*>i 23.23.23.2 0 100 0 100 i
* 12.12.12.0/24 34.34.34.4 0 300 100 i
*>i 23.23.23.2 0 100 0 i
*>i20.1.1.0/24 23.23.23.2 0 100 0 i
* i23.23.23.0/24 23.23.23.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 0 300 i
*> 41.41.41.0/24 34.34.34.4 0 0 300 i
*i 23.23.23.2 0 100 0 100 i

R3#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 01:17:38
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 34.34.34.4, 01:17:38
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 23.23.23.2, 00:04:13
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 34.34.34.4, 01:17:38
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 01:17:38

36
Selanjutnya kita akan mengkonfigurasi agar R1 menggunakan jalur via R4 untuk menjangkau
network 20.1.1.0 dan 30.1.1.0, karena pada defaultnya R1 akan menggunakan via R2
R1#traceroute 20.1.1.1
Type escape sequence to abort.
Tracing the route to 20.1.1.1
1 12.12.12.2 12 msec 20 msec 0 msec

R1#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
1 12.12.12.2 12 msec 0 msec 4 msec
2 23.23.23.3 [AS 200] 0 msec 4 msec 0 msec

Maka dari itu kita akan meninggikan nilai weight untuk neighbor 41.41.41.4 (R4) di R1
R1(config)#router bgp 100
R1(config-router)#neigh 41.41.41.4 weight 50000
R1(config-router)#end

R1#traceroute 20.1.1.1
Type escape sequence to abort.
Tracing the route to 20.1.1.1
1 41.41.41.4 4 msec 0 msec 4 msec
2 34.34.34.3 [AS 300] 0 msec 4 msec 0 msec
3 23.23.23.2 [AS 200] 4 msec 4 msec 0 msec

R1#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
1 41.41.41.4 4 msec 0 msec 4 msec
2 34.34.34.3 [AS 300] 0 msec 4 msec 4 msec

37
Clearing the BGP Session
Pada saat administrator jaringan merubah konfigan BGP atau ketentuan2 routing
protokol lainnya, maka routing protokol tsb harus direset terlebih dahulu agar
perubahan yang lakukan mengefek.
Maka kita harus melakukan trigger update untuk memastikan perubahan aturan tsb
terealisasi ke jalur2 ke router lainnya
Ada beberapa cara untuk melakuakan trigger update
o Hard Reset (clear ip bgp *)
o Soft Reset (clear ip bgp * soft in/out)

Hard Reset
Router#clear ip bgp *
Reset semua koneksi BGP ke router tersbut
Isi dari Forwarding Tabel BGP terhapus
Dari sesi established ke idle (re-established peering)
Processing the full internet routing table can take a long time, bandwidth, resources
Router# clear ip bgp [neighbor address]
Hanya mereset single neighbor
Sama, sesi nya berubah dari established menjadi idle

Soft Reset
Tidak akan mempengaruhi sesi si BGP
Router# clear ip bgp {*|neighbor-address} [soft]
Lebih simple
Router mengirimkan ulang semua informasi BGP ketetangganya tanpa mereset
koneksi (BGP table)

38
LAB 12 : Weight Attribute using Route-maps
Topologi

Task :
Melanjutkan dari lab sebelumnya, tapi hapus dulu konfigan weight di R1
Kemudian buat interface loopback di R2 sesuai dengan topologi, dan advertise
kedalam bgp

R1(config)#router bgp 100


R1(config-router)#no neigh 41.41.41.4 weight 50000

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

R2(config)#router bgp 200


R2(config-router)#network 12.0.0.0 mask 255.255.255.0
R2(config-router)#network 12.0.1.0 mask 255.255.255.0
R2(config-router)#network 12.0.2.0 mask 255.255.255.0
R2(config-router)#network 12.0.3.0 mask 255.255.255.0

39
R1#sh ip bgp
BGP table version is 13, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.0.0.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 12.0.1.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 12.0.2.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 12.0.3.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
* 20.1.1.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 23.23.23.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 30.1.1.0/24 41.41.41.4 0 300 200 i

R1#sh ip route bgp


--------------------------
B 23.23.23.0 [20/0] via 12.12.12.2, 00:25:00
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 41.41.41.4, 00:25:00
12.0.0.0/24 is subnetted, 5 subnets
B 12.0.0.0 [20/0] via 12.12.12.2, 00:06:30
B 12.0.1.0 [20/0] via 12.12.12.2, 00:05:59
B 12.0.2.0 [20/0] via 12.12.12.2, 00:05:59
B 12.0.3.0 [20/0] via 12.12.12.2, 00:05:59
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [20/0] via 12.12.12.2, 00:25:00

Dapat dilihat R1 defaultnya r1 akan menggunakan jalur via 12.12.12.2 (R2) untuk menuju ke
network 12.0.0.0

40
Selanjutnya kita akan mengkonfigurasi agar jika R1 ingin mengakses network 12.0.0.0 dan
12.0.1.0 yaitu menggunakan jalur via R4

Pertama buat ACL terlebih dahulu


R1(config)#access-list 10 permit 12.0.0.0 0.0.0.255
R1(config)#access-list 10 permit 12.0.1.0 0.0.0.255

Buat Route Map


R1(config)#route-map WEIGHT permit 10
R1(config-route-map)#match ip add 10
R1(config-route-map)#set weight 6000
R1(config-route-map)#exit

R1(config)#route-map WEIGHT permit 30


R1(config-route-map)#end

Setelah itu masukan ke BGP


R1(config)#router bgp 100
R1(config-router)#neighbor 41.41.41.4 route-map WEIGHT in
R1(config-router)#end

R1#clear ip bgp *

41
Verifikasi
R1#sh ip bgp
BGP table version is 17, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 12.0.0.0/24 41.41.41.4 6000 300 200 i
* 12.12.12.2 0 0 200 i
*> 12.0.1.0/24 41.41.41.4 6000 300 200 i
* 12.12.12.2 0 0 200 i
* 12.0.2.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
* 12.0.3.0/24 41.41.41.4 0 300 200 i
*> 12.12.12.2 0 0 200 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
* 41.41.41.4 0 300 200 i

R1#sh ip route bgp


34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [20/0] via 12.12.12.2, 01:14:32
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [20/0] via 12.12.12.2, 01:14:32
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [20/0] via 12.12.12.2, 01:14:32
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 41.41.41.4, 01:14:32
12.0.0.0/24 is subnetted, 5 subnets
B 12.0.0.0 [20/0] via 41.41.41.4, 01:14:32
B 12.0.1.0 [20/0] via 41.41.41.4, 01:14:32
B 12.0.2.0 [20/0] via 12.12.12.2, 01:14:32
B 12.0.3.0 [20/0] via 12.12.12.2, 01:14:32
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [20/0] via 12.12.12.2, 01:14:32

42
R1#traceroute 12.0.0.1

Type escape sequence to abort.


Tracing the route to 12.0.0.1

1 41.41.41.4 16 msec 0 msec 0 msec


2 34.34.34.3 [AS 200] 0 msec 0 msec 0 msec
3 23.23.23.2 [AS 200] 16 msec 0 msec 0 msec

R1#traceroute 12.0.1.1

Type escape sequence to abort.


Tracing the route to 12.0.1.1

1 41.41.41.4 0 msec 16 msec 0 msec


2 34.34.34.3 [AS 200] 0 msec 0 msec 0 msec
3 23.23.23.2 [AS 200] 0 msec 0 msec 0 msec

R1#traceroute 12.0.3.1
Type escape sequence to abort.
Tracing the route to 12.0.3.1
1 12.12.12.2 12 msec 12 msec 0 msec

R1#traceroute 12.0.2.1
Type escape sequence to abort.
Tracing the route to 12.0.2.1
1 12.12.12.2 0 msec 0 msec 0 msec

43
Local Preference Attribute

Mendefinisikan bagaimana traffic data akan keluar dari suatu AS


Jalur dengan nilai Preference tertinggi maka itu yang akan dipilih
Nilai defaultnya adalah 100
Hanya di advertise ke IBGP neighbor

LAB 13 : Using Local Preference

Tujuan Lab :
Mengkonfigurasi local preference di AS 200 agar jika ingin mengakses network di AS
300 harus menggunakan jalur via R2-R1-R4

Konfigurasi :
Masih meggunakan topologi dari lab sebelumnya, tetapi hapus konfigurasi weight attribute
terlebih dahulu, dan pastikan neighbor menggunakn jalur default tanpa attribute apapun

44
Hapus konfigurasi attribute sebelumnya
R1(config)#router bgp 100
R1(config-router)#no neigh 41.41.41.4 route-map WEIGHT in
R1#clear ip bgp *

R1#sh run | s r bgp R2#sh run | s r bgp


router bgp 100 router bgp 200
no synchronization no synchronization
bgp log-neighbor-changes bgp log-neighbor-changes
network 10.1.1.0 mask 255.255.255.0 network 12.0.0.0 mask 255.255.255.0
network 12.12.12.0 mask 255.255.255.0 network 12.0.1.0 mask 255.255.255.0
network 41.41.41.0 mask 255.255.255.0 network 12.0.2.0 mask 255.255.255.0
neighbor 12.12.12.2 remote-as 200 network 12.0.3.0 mask 255.255.255.0
neighbor 41.41.41.4 remote-as 300 network 12.12.12.0 mask 255.255.255.0
no auto-summary network 20.1.1.0 mask 255.255.255.0
network 23.23.23.0 mask 255.255.255.0
neighbor 12.12.12.1 remote-as 100
neighbor 23.23.23.3 remote-as 200
neighbor 23.23.23.3 next-hop-self
no auto-summary
R3#sh run | s r bgp R4#sh run | s r bgp
router bgp 200 router bgp 300
no synchronization no synchronization
bgp log-neighbor-changes bgp log-neighbor-changes
network 23.23.23.0 mask 255.255.255.0 network 34.34.34.0 mask 255.255.255.0
network 30.1.1.0 mask 255.255.255.0 network 40.1.1.0 mask 255.255.255.0
network 34.34.34.0 mask 255.255.255.0 network 41.41.41.0 mask 255.255.255.0
neighbor 23.23.23.2 remote-as 200 neighbor 34.34.34.3 remote-as 200
neighbor 23.23.23.2 next-hop-self neighbor 41.41.41.1 remote-as 100
neighbor 34.34.34.4 remote-as 300 no auto-summary
no auto-summary

Semua router yang berada di AS 200 pada defaultnya akan menggunakan jalur vi R3 untuk
mencapai network di AS 300, nah sekarang kita akan memanipulasi jalurnya menjadi lewat
R2-R1-R4, tetapi jika pada lab sebelumnya menggunakan attribute weight, sekarang kita
akan menggunakan attribute localprefrence

Cek dulu kalo bner jalur defaultnya lewat R3


R2#sh ip bgp
-------------
* 40.1.1.0/24 12.12.12.1 0 100 300 i
*>i 23.23.23.3 0 100 0 300 i
---more---

45
R2#sh ip route bgp
34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 03:00:39
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 23.23.23.3, 00:17:09
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 12.12.12.1, 00:44:10
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 12.12.12.1, 00:44:10
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 03:00:39

R3#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 03:01:37
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 34.34.34.4, 03:01:37
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 23.23.23.2, 00:18:32
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 34.34.34.4, 03:01:37
12.0.0.0/24 is subnetted, 5 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 03:01:37
B 12.0.0.0 [200/0] via 23.23.23.2, 02:43:08
B 12.0.1.0 [200/0] via 23.23.23.2, 02:43:00
B 12.0.2.0 [200/0] via 23.23.23.2, 02:42:53
B 12.0.3.0 [200/0] via 23.23.23.2, 02:42:45

R2#traceroute 40.1.1.1
Type escape sequence to abort.
Tracing the route to 40.1.1.1
1 23.23.23.3 0 msec 0 msec 0 msec
2 34.34.34.4 4 msec 12 msec 0 msec

R3#traceroute 40.1.1.1
Type escape sequence to abort.
Tracing the route to 40.1.1.1
1 34.34.34.4 0 msec 0 msec 0 msec

46
Konfigurasi Local Preference di R2
R2(config)#router bgp 200
R2(config-router)#bgp default local-preference 500
R2(config-router)#do clear ip bgp * soft

Verifikasi
R2#sh ip bgp 40.1.1.1
BGP routing table entry for 40.1.1.0/24, version 11
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
100 300
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, localpref 500, valid, external, best

R3#sh ip bgp 40.1.1.1


BGP routing table entry for 40.1.1.0/24, version 15
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
100 300
23.23.23.2 from 23.23.23.2 (12.0.3.1)
Origin IGP, metric 0, localpref 500, valid, internal, best
300
34.34.34.4 from 34.34.34.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external

R2
R2#sh ip route bgp
34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [20/0] via 12.12.12.1, 01:43:54
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 12.12.12.1, 01:43:54
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 12.12.12.1, 01:43:54
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 12.12.12.1, 01:43:54
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 01:43:54

47
R3
R3#sh ip route bgp
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 01:45:10
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 23.23.23.2, 01:45:10
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 23.23.23.2, 01:45:10
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [200/0] via 23.23.23.2, 01:45:10
12.0.0.0/24 is subnetted, 5 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 01:45:10
B 12.0.0.0 [200/0] via 23.23.23.2, 01:45:10
B 12.0.1.0 [200/0] via 23.23.23.2, 01:45:10
B 12.0.2.0 [200/0] via 23.23.23.2, 01:45:10
B 12.0.3.0 [200/0] via 23.23.23.2, 01:45:10

R3#traceroute 40.1.1.1
Type escape sequence to abort.
Tracing the route to 40.1.1.1
1 23.23.23.2 0 msec 0 msec 0 msec
2 12.12.12.1 0 msec 8 msec 8 msec
3 41.41.41.4 [AS 100] 0 msec 0 msec 0 msec

R2#traceroute 40.1.1.1
Type escape sequence to abort.
Tracing the route to 40.1.1.1
1 12.12.12.1 8 msec 0 msec 0 msec
2 41.41.41.4 [AS 100] 0 msec 4 msec 12 msec

48
LAB 14 : Local Preference Using Route-map
Topologi

Task :
Masih menggunakan konfigurasian yang sama dengan lab sebelumnya
Hanya hapus konfigurasi local preference di R2, kemudian pastikan as 600
menggunakan jalur default untuk menuju network di AS 300
Buat loopback di R4 sesuai dengan topologi, dan advertise kedalam BGP

R2(config)#router bgp 200


R2(config-router)#no bgp default local-preference 500
R2(config-router)#do clear ip bgp * soft

Buat Loopack di R4 kemudian advertise kedalam BGP


R4(config)#router bgp 300
R4(config-router)#network 14.0.0.0 mask 255.255.255.0
R4(config-router)#network 14.0.1.0 mask 255.255.255.0
R4(config-router)#network 14.0.2.0 mask 255.255.255.0
R4(config-router)#network 14.0.3.0 mask 255.255.255.0

49
Verifikasi
R2#sh ip bgp
BGP table version is 33, local router ID is 12.0.3.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*>i14.0.0.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
*>i14.0.1.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
*>i14.0.2.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
*>i14.0.3.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* i23.23.23.0/24 23.23.23.3 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i30.1.1.0/24 23.23.23.3 0 100 0 i
*>i34.34.34.0/24 23.23.23.3 0 100 0 i
* 12.12.12.1 0 100 300 i
*>i40.1.1.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
* i41.41.41.0/24 23.23.23.3 0 100 0 300 i
*> 12.12.12.1 0 0 100 i

Defaultnya R2 akan lewat jalur via R3 untuk sampai ke network 14.x.x.x di R4


R2#sh ip route bgp
------------------------------
14.0.0.0/24 is subnetted, 4 subnets
B 14.0.2.0 [200/0] via 23.23.23.3, 00:04:52
B 14.0.3.0 [200/0] via 23.23.23.3, 00:04:52
B 14.0.0.0 [200/0] via 23.23.23.3, 00:05:22
B 14.0.1.0 [200/0] via 23.23.23.3, 00:04:52
30.0.0.0/24 is subnetted, 1 subnets
-----more------

50
Selanjutnya kita akan mengkonfigurasi agar R2 menggunakan jalur via R1-R4 untuk menuju
network 14.0.0.0 dan 14.0.1.0 kemudian untuk menuju network selain kedua itu akan
menggunakan jalur default (R3)

Konfigurasi route-map
R2(config)#access-list 15 permit 14.0.0.0 0.0.0.255
R2(config)#access-list 15 permit 14.0.1.0 0.0.0.255
R2(config)#
R2(config)#route-map LOCAL permit 10
R2(config-route-map)#match ip add 15
R2(config-route-map)#set local-preference 2000
R2(config-route-map)#exit
R2(config)#
R2(config)#route-map LOCAL permit 20
R2(config-route-map)#exit

Assign route-map ke BGP neighbor R1


R2(config)#router bgp 200
R2(config-router)#neigh 12.12.12.1 route-map LOCAL in
R2(config-router)#end
R2#clear ip bgp * soft

R2#sh ip bgp
BGP table version is 35, local router ID is 12.0.3.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 14.0.0.0/24 12.12.12.1 2000 0 100 300 i
*> 14.0.1.0/24 12.12.12.1 2000 0 100 300 i
*>i14.0.2.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
*>i14.0.3.0/24 23.23.23.3 0 100 0 300 i
* 12.12.12.1 0 100 300 i
-----more-------

51
R2#sh ip route bgp
34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 01:29:43
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 23.23.23.3, 01:29:43
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 12.12.12.1, 03:22:07
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 12.12.12.1, 03:22:07
14.0.0.0/24 is subnetted, 4 subnets
B 14.0.2.0 [200/0] via 23.23.23.3, 00:51:22
B 14.0.3.0 [200/0] via 23.23.23.3, 00:51:22
B 14.0.0.0 [20/0] via 12.12.12.1, 00:37:16
B 14.0.1.0 [20/0] via 12.12.12.1, 00:37:16
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 03:22:07

R3#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 03:22:58
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 34.34.34.4, 01:30:34
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 23.23.23.2, 03:22:58
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 34.34.34.4, 01:30:34
12.0.0.0/24 is subnetted, 5 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 03:22:58
B 12.0.0.0 [200/0] via 23.23.23.2, 03:22:58
B 12.0.1.0 [200/0] via 23.23.23.2, 03:22:58
B 12.0.2.0 [200/0] via 23.23.23.2, 03:22:58
B 12.0.3.0 [200/0] via 23.23.23.2, 03:22:58
14.0.0.0/24 is subnetted, 4 subnets
B 14.0.2.0 [20/0] via 34.34.34.4, 00:52:12
B 14.0.3.0 [20/0] via 34.34.34.4, 00:52:12
B 14.0.0.0 [200/0] via 23.23.23.2, 00:38:07
B 14.0.1.0 [200/0] via 23.23.23.2, 00:38:07

52
Traceroute dari R2
R2#traceroute 14.0.0.1
Type escape sequence to abort.
Tracing the route to 14.0.0.1
1 12.12.12.1 0 msec 0 msec 4 msec
2 41.41.41.4 [AS 100] 12 msec 12 msec 16 msec

R2#traceroute 14.0.2.1
Type escape sequence to abort.
Tracing the route to 14.0.2.1
1 23.23.23.3 0 msec 0 msec 0 msec
2 34.34.34.4 0 msec 12 msec 0 msec

R3
R3#traceroute 14.0.0.1
Type escape sequence to abort.
Tracing the route to 14.0.0.1
1 23.23.23.2 0 msec 0 msec 0 msec
2 12.12.12.1 0 msec 16 msec 0 msec
3 41.41.41.4 [AS 300] 0 msec 0 msec 0 msec

R3#traceroute 14.0.2.1
Type escape sequence to abort.
Tracing the route to 14.0.2.1
1 34.34.34.4 8 msec 0 msec 0 msec
R3#

53
BGP Path Selection (order of path selection)
BGP forwarding table biasanya memiliki beberapa jalur yang bisa digunakan untuk
menuju suatu network
BGP tidak didesain untuk bisa melakukan load balancing
o Pemilihan jalur berdasarkan policy/ attribute yang dipakai
o Pemilihan jalur tidak berdasarkan bandwidth

Order Of Path Selection in BGP


1. Prefer Highest weight (local to router)
2. Prefer Higest local preference (Global within AS)
3. Prefer Route originated by the local router (next-hop = 0.0.0.0)
4. Prefer Shortest AS path
5. Prefer Lowest origin code (IGP<EGP<Incomplete) i > E > ?
6. Prefer Lowest MED (exchanged between AS)
7. Neighbor Type (Prefer eBGP over iBGP )
8. IGP Metric to NEXT_HOP (Smaller value preferred)
9. Prefer Oldest route for EBGP Paths
10. Prefer the Path with the Lowest neighbor BGP router ID
11. Prefer the Path with the lowest neighbor IP address

Catatan
N Valid Next Hop
WLLA Weight, Local Pref, Local Route, AS path
OMNI Origin, MED, Neighbor Type (EBGP over iBGP), IGP metric to next-hop

54
LAB 15 : AS-Path Prepend
Topologi

Task :
Konfigurasi IBGP dan EBGP sesuai dengan topologi
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 100
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#network 41.41.41.0 mask 255.255.255.0
R1(config-router)#network 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 300
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 20.1.1.0 mask 255.255.255.0

R3(config)#router bgp 300


R3(config-router)#neigh 34.34.34.4 remote-as 100
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#network 34.34.34.0 mask 255.255.255.0
R3(config-router)#network 23.23.23.0 mask 255.255.255.0
R3(config-router)#network 30.1.1.0 mask 255.255.255.0

55
R4(config)#router bgp 100
R4(config-router)#neigh 34.34.34.3 remote-as 300
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#network 34.34.34.0 mask 255.255.255.0
R4(config-router)#network 41.41.41.0 mask 255.255.255.0
R4(config-router)#network 40.1.1.0 mask 255.255.255.0

Verifikasi
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 19, main routing table version 19
8 network entries using 960 bytes of memory
13 path entries using 676 bytes of memory
7/4 BGP path/bestpath attribute entries using 868 bytes of memory
4 BGP AS-PATH entries using 96 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 3 (at peak 4) using 96 bytes of memory
BGP using 2696 total bytes of memory
BGP activity 8/0 prefixes, 21/8 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 200 213 216 19 0 0 03:09:58 5
41.41.41.4 4 100 219 210 19 0 0 03:07:38 5

R1#sh ip bgp
---------------------------
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*i 34.34.34.3 0 100 0 300 i
* 30.1.1.0/24 12.12.12.2 0 200 300 i
*>i 34.34.34.3 0 100 0 300 i
* 34.34.34.0/24 12.12.12.2 0 200 300 i
*>i 41.41.41.4 0 100 0 i
*>i40.1.1.0/24 41.41.41.4 0 100 0 i
* i41.41.41.0/24 41.41.41.4 0 100 0 i
*> 0.0.0.0 0 32768 i

56
R3
R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 300
BGP table version is 17, main routing table version 17
8 network entries using 960 bytes of memory
15 path entries using 780 bytes of memory
7/4 BGP path/bestpath attribute entries using 868 bytes of memory
4 BGP AS-PATH entries using 96 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 2736 total bytes of memory
BGP activity 8/0 prefixes, 21/6 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


23.23.23.2 4 200 199 204 17 0 0 03:10:49 6
34.34.34.4 4 100 211 214 17 0 0 03:09:51 6

R3#sh ip bgp
BGP table version is 17, local router ID is 3.3.3.3
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


*> 10.1.1.0/24 34.34.34.4 0 100 i
* 23.23.23.2 0 200 100 i
* 12.12.12.0/24 34.34.34.4 0 100 i
*> 23.23.23.2 0 0 200 i
* 20.1.1.0/24 34.34.34.4 0 100 200 i
*> 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 0 100 i
* 23.23.23.2 0 200 100 i
*> 41.41.41.0/24 34.34.34.4 0 0 100 i
* 23.23.23.2 0 200 100 i
Secara default AS 100 akan exit lewat R4 untuk menuju ke rute network di AS 300 karena
AS 300 merupakan AS terdekat untuk menuju network 30.1.1.0, selanjutnya kita akan
mengkonfigurasi agar AS 100 keluar lewat R1 untuk menuju network 30.1.1.1 yang berada di
AS 300

57
Cek dulu kalo bner router2 di AS 100 bkalan lewat R1-R4-R3
R1#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
1 41.41.41.4 8 msec 4 msec 0 msec
2 34.34.34.3 4 msec 0 msec 4 msec

Konfigurasi route-map
R1(config)#access-list 1 permit 30.1.1.0 0.0.0.255
R1(config)#
R1(config)#route-map CCIEIDN1 permit 10
R1(config-route-map)#match ip add 1
R1(config-route-map)#set local-preference 300
R1(config-route-map)#exit
R1(config)#
R1(config)#route-map CCIEIDN1 permit 20
R1(config-route-map)#exit
R1(config)#
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 route-map CCIEIDN1 in
R1(config-router)#end
R1#clear ip bgp * soft

Cek
R1#sh ip bgp 30.1.1.0
BGP routing table entry for 30.1.1.0/24, version 20
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
200 300
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, localpref 300, valid, external, best

Selanjutnya kita akan akan mengkonfigurasi agar AS 100 agar jika ada traffic dari network
30.1.1.0 ke 10.1.1.0 (traffic sebaliknya) akan menggunakn jalur yang sama pada saat
forwarding yaitu (R1-R2-R3), karena defaulnya si R3 akan tetep pakai jalur lewat R4 untuk
menuju network 10.1.1.1
R3#traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 34.34.34.4 4 msec 4 msec 0 msec
2 41.41.41.1 [AS 100] 8 msec 0 msec 4 msec

58
Konfigurasi route-map dan as-path prepend di R4
R4(config)#access-list 1 permit 10.1.1.0 0.0.0.255

R4(config)#route-map CCIEIDN permit 10


R4(config-route-map)#match ip add 1
R4(config-route-map)#set as-path prepend 100 100 100 100
R4(config-route-map)#exit

R4(config)#route-map CCIEIDN permit 20


R4(config-route-map)#exit

R4(config)#router bgp 100


R4(config-router)#neigh 34.34.34.3 route-map CCIEIDN out
R4(config-router)#end

Pada saat kita mengkonfigurasi command diatas itu berarti R4 akan memberitahu bahwa
untuk mencapai ke network 10.1.1.0 jika lewat si R4 maka akan melewati 5 kali router di AS
100 (100 100 100 100 100), karena bgp akan menggunakan as path terdekat maka R3 akan
menggunakan jalur via R3-R2-R1 , karena hanya melewati AS 200 kemudian langsung AS 100
(AS 200-100)

R3#sh ip bgp 10.1.1.1


BGP routing table entry for 10.1.1.0/24, version 18
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1
100 100 100 100 100
34.34.34.4 from 34.34.34.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200 100
23.23.23.2 from 23.23.23.2 (12.0.3.1)
Origin IGP, localpref 100, valid, external, best

R3#traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1

1 23.23.23.2 8 msec 4 msec 0 msec


2 12.12.12.1 [AS 200] 4 msec 0 msec 4 msec

59
LAB 16 : Multi Exit Discriminator (Metric)
Topologi

Task :
Konfigurasi Basic IBGP dan EBGP peering menggunakn directly connected interfaces
Advertise semua network router
Pastikan next-hop nya adalah next router address
Konfigurasi BGP
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 300
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#network 41.41.41.0 mask 255.255.255.0
R1(config-router)#network 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 200
R2(config-router)#neigh 23.23.23.3 next-hop-self
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 20.1.1.0 mask 255.255.255.0

60
R3(config)#router bgp 200
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#neigh 23.23.23.2 next-hop-self
R3(config-router)#neigh 34.34.34.4 remote-as 300
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R4(config)#router bgp 300


R4(config-router)#neigh 34.34.34.3 remote-as 200
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Verifikasi
R2#sh ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 100 16 16 11 0 0 00:09:00 4
23.23.23.3 4 200 15 17 11 0 0 00:08:04 5

R4#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
34.34.34.3 4 200 15 13 12 0 0 00:05:43 6
41.41.41.1 4 100 14 15 12 0 0 00:06:42 7

R4#sh ip bgp
BGP table version is 12, 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


* 10.1.1.0/24 34.34.34.3 0 200 100 i
*> 41.41.41.1 0 0 100 i
* 12.12.12.0/24 34.34.34.3 0 200 i
*> 41.41.41.1 0 0 100 i
*> 20.1.1.0/24 34.34.34.3 0 200 i
* 41.41.41.1 0 100 200 i
*> 23.23.23.0/24 34.34.34.3 0 0 200 i
* 41.41.41.1 0 100 200 i
*> 30.1.1.0/24 34.34.34.3 0 0 200 i
* 41.41.41.1 0 100 200 i

61
* 34.34.34.0/24 34.34.34.3 0 0 200 i
* 41.41.41.1 0 100 200 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
* 41.41.41.0/24 41.41.41.1 0 0 100 i
*> 0.0.0.0 0 32768 i

R3#sh ip route bgp


20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/0] via 23.23.23.2, 00:10:06
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 34.34.34.4, 00:08:26
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 23.23.23.2, 00:08:01
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [20/0] via 34.34.34.4, 00:08:26
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 23.23.23.2, 00:10:06

Selanjutnya kita akan mengkonfigurasi agar AS 100 menggunakan jalur via R4 (AS 300 )
untuk menjangkau network di AS 200, karena defaultnya R1 bakalan gunain jalur via R2
untuk ke R3 karena langsung (AS 100 AS 200), kalo lewat R4 kan lewat 2 AS (AS 100 AS
300- AS 200) biasa disebut shortest AS-path
Dari AS 100 ke AS 200 lewat AS 300 maka kita akan membesarkan nilai weight di AS 100
yang mengarah ke AS 300

R1(config)#router bgp 100


R1(config-router)#neigh 41.41.41.4 weight 5000
R1(config-router)#do clear ip bgp * soft
R1(config-router)#end
Verifikasi
R1#sh ip bgp 30.1.1.0
BGP routing table entry for 30.1.1.0/24, version 13
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
300 200
41.41.41.4 from 41.41.41.4 (4.4.4.4)
Origin IGP, localpref 100, weight 5000, valid, external, best
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, localpref 100, valid, external

62
R1#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
1 41.41.41.4 12 msec 0 msec 0 msec
2 34.34.34.3 [AS 300] 0 msec 0 msec 0 msec

R1#traceroute 20.1.1.1
Type escape sequence to abort.
Tracing the route to 20.1.1.1
1 41.41.41.4 0 msec 0 msec 0 msec
2 34.34.34.3 [AS 300] 8 msec 8 msec 0 msec
3 23.23.23.2 [AS 200] 0 msec 0 msec 0 msec

Nah sekarang R1 sudah menggunakan jalur via AS 300 untuk menuju network2 di AS 200
Tapi jalur traffic kebalikannya gak sama dari R2 dan R3 gak lewat si R4 (AS 300) karna kita
kan pasang weight nya di R1 , sekarang kita akan buat jalur baliknya sama yaitu lewat R2-R3-
R4, ada beberapa cara
1. Bisa Pakai Local Preference di AS 200 tapi skarang kita gk akan pake ini atau pake
attribute weight karna sudah dilab sebelumnya
2. Modifikasi AS-path, kita bisa gedein AS-path di R1 pas mau advertise ke AS 200 ,
otomatis kalo AS-path nya gede, router2 di AS 200 bkalan milih lewat AS 300
3. Pakai MED, dan ini yang kita akan pake di lab ini, kita akan memodifikasi berdasrkan
metric

Possible Solution using MED :


1. Ensure that both sides AS-path same (prepend R1-R2) and compare MED for external
routes
2. Tell AS 200 to ignore AS-path and use Always MED (Metric) for external routes

R1(config)#route-map CCIEIDN permit 10


R1(config-route-map)#set metric 130
R1(config-route-map)#set as-path prepend 100
R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 route-map CCIEIDN out
R1(config-router)#end

63
Verifikasi di R2
R2#sh ip bgp 10.1.1.0
BGP routing table entry for 10.1.1.0/24, version 13
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
300 100
23.23.23.3 from 23.23.23.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal
100 100
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, metric 130, localpref 100, valid, external, best

R2 masih menggunakan jalur via R1 , maka kita akan menjalankan command bgp always-
compare-med di R2 dan R3

R2/R3
Rx(config)#router bgp 200
Rx(config-router)#bgp always-compare-med
Rx(config-router)#exit

Verifikasi Lagi
R2#sh ip bgp 10.1.1.0
BGP routing table entry for 10.1.1.0/24, version 14
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
300 100
23.23.23.3 from 23.23.23.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
100 100
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, metric 130, localpref 100, valid, external

R3#sh ip bgp 10.1.1.0


BGP routing table entry for 10.1.1.0/24, version 13
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
300 100
34.34.34.4 from 34.34.34.4 (4.4.4.4)
Origin IGP, localpref 100, valid, external, best

64
R2#traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 23.23.23.3 8 msec 8 msec 0 msec
2 34.34.34.4 0 msec 0 msec 0 msec
3 41.41.41.1 [AS 300] 0 msec 16 msec 0 msec
R3#traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
1 34.34.34.4 0 msec 16 msec 0 msec
2 41.41.41.1 [AS 300] 0 msec 0 msec 0 msec
Berhasil, selanjutnya kita akan melakukan lagi tapi tidak menggunakan AS-path Prepending
R1#sh run | s route-map
neighbor 12.12.12.2 route-map CCIEIDN out
route-map CCIEIDN permit 10
set metric 130
set as-path prepend 100
R1(config)#route-map CCIEIDN permit 10
R1(config-route-map)#no set as-path prepend 100
R1(config-route-map)#exit

R1#clear ip bgp * soft


Cek
R2#sh ip bgp 10.1.1.0
BGP routing table entry for 10.1.1.0/24, version 15
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
100
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, metric 130, localpref 100, valid, external, best
Nah loh, balik lagi dia jadi lewat R1 lagi
Selanjutnya kita akan mengkonfigurasi agar AS 200 meng-ignore attribute as-path dan akan
membandingkan nilai MED, kita asumsikan bahwa tidak ada local preference atau weight
yang dipakai di AS 200, jika ada maka MED tidak akan berguna
R2/R3
Rx(config)#router bgp 200
Rx(config-router)# bgp bestpath as-path ignore
Rx(config-router)# bgp always-compare-med

65
BGP Summarization
1. BGP Summarization (Aggregation)
2. BGP Summarizatoin (AS-Set option)
a. Atomic Aggregate Attribute
3. Suppress-maps & Unsuppress-map

LAB 17 : BGP Summarization (Aggregation)


Topologi

Task :
Konfigurasi BGP di R1/R2/R3 sesuai dengan topologi
Advertise loopback di R3 kedalam BGP

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 300
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 20.1.1.0 mask 255.255.255.0

66
R3(config)#router bgp 300
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#net 13.0.0.0 mask 255.255.255.0
R3(config-router)#net 13.0.1.0 mask 255.255.255.0
R3(config-router)#net 13.0.2.0 mask 255.255.255.0
R3(config-router)#net 13.0.3.0 mask 255.255.255.0

Verifikasi
R2#sh ip bgp summary
BGP router identifier 12.0.3.1, local AS number 200
BGP table version is 10, main routing table version 10
9 network entries using 1080 bytes of memory
11 path entries using 572 bytes of memory
4/3 BGP path/bestpath attribute entries using 496 bytes of memory
2 BGP AS-PATH entries using 48 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 2228 total bytes of memory
BGP activity 9/0 prefixes, 11/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 7 10 10 0 0 00:03:08 2
23.23.23.3 4 300 7 10 10 0 0 00:03:08 6

R2#sh ip bgp
BGP table version is 10, local router ID is 12.0.3.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 13.0.0.0/24 23.23.23.3 0 0 300 i
*> 13.0.1.0/24 23.23.23.3 0 0 300 i
*> 13.0.2.0/24 23.23.23.3 0 0 300 i
*> 13.0.3.0/24 23.23.23.3 0 0 300 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i

67
Konfigurasi R3 to Summarize loopback route as 13.0.0.0/22
R2#sh ip bgp | in 13
*> 13.0.0.0/24 23.23.23.3 0 0 300 i
*> 13.0.1.0/24 23.23.23.3 0 0 300 i
*> 13.0.2.0/24 23.23.23.3 0 0 300 i
*> 13.0.3.0/24 23.23.23.3 0 0 300 i

R3(config)#router bgp 300


R3(config-router)#aggregate-address 13.0.0.0 255.255.252.0
R3(config-router)#end

Cek
R3#sh ip bgp | in 13
BGP table version is 11, local router ID is 13.0.3.1
*> 13.0.0.0/24 0.0.0.0 0 32768 i
*> 13.0.0.0/22 0.0.0.0 32768 i
*> 13.0.1.0/24 0.0.0.0 0 32768 i
*> 13.0.2.0/24 0.0.0.0 0 32768 i
*> 13.0.3.0/24 0.0.0.0 0 32768 i

R2#sh ip bgp | in 13
*> 13.0.0.0/24 23.23.23.3 0 0 300 i
*> 13.0.0.0/22 23.23.23.3 0 0 300 i
*> 13.0.1.0/24 23.23.23.3 0 0 300 i
*> 13.0.2.0/24 23.23.23.3 0 0 300 i
*> 13.0.3.0/24 23.23.23.3 0 0 300 i

Command aggregate-address mengadvertise summary route dan juga tetap mengadvertise


individual prefixes juga. Jika kita ingin menghapus (suppress) individual prefixes tersebut dan hanya
mengadvertise summary address saja, maka gunakan command summary-only

R3(config)#router bgp 300


R3(config-router)#aggregate-address 13.0.0.0 255.255.252.0 ?
advertise-map Set condition to advertise attribute
as-set Generate AS set path information
attribute-map Set attributes of aggregate
nlri Nlri aggregate applies to
route-map Set parameters of aggregate
summary-only Filter more specific routes from updates
suppress-map Conditionally filter more specific routes from updates
<cr>
R3(config-router)#aggregate-address 13.0.0.0 255.255.252.0 summary-only

68
R3#sh ip bgp 13.0.0.0/22
BGP routing table entry for 13.0.0.0/22, version 11
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
Local, (aggregated by 300 13.0.3.1)
0.0.0.0 from 0.0.0.0 (13.0.3.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best

Jika tidak menentukan opsi tambahan dari command aggregate diatas, maka
otomatis bgp akan membuat prefix baru dalam table si BGP nya dengan AS_PATH
kosong
Akan terlihat seperti prefix baru, yang berasal dari local AS
Prefix baru otomatis akan mempunyai nilai weight 32768 dan memiliki attribute
spesial yaitu ATOMIC_AGGREGATE
Atomic_aggregate adalah untuk informasi, dan memberitahukan ke BGP lainnya
bahwa prefix ini adalah hasil dari route aggregation dan beberapa informasi dari
prefix aslinya mungkin tidak bisa ditemukan seperti AS_PATH atau attribute lainnya
Bgp juga menambhkan attribute lainnya yaitu AGGREGATOR kepada prefix2 yang di
summarized

R3#sh ip bgp | in 13
BGP table version is 15, local router ID is 13.0.3.1
s> 13.0.0.0/24 0.0.0.0 0 32768 i
*> 13.0.0.0/22 0.0.0.0 32768 i
s> 13.0.1.0/24 0.0.0.0 0 32768 i
s> 13.0.2.0/24 0.0.0.0 0 32768 i
s> 13.0.3.0/24 0.0.0.0 0 32768 i

R2#sh ip bgp | in 13
*> 13.0.0.0/22 23.23.23.3 0 0 300 i
R2#

69
AS_SET options :
Aggregation menyembunyikan informasi dari suatu prefix, seperti misalnya attribute
NEXT_HOP, AS_PATH dan lainnya
Mereka hanya akan dimunculkan di local AS atau router2 yang sama Asnya
Ketika kita mengsummarize suatu address yang dipelajari dari AS lainnya, informasi
yang tersembunyi bisa mengakibatkan
o Suboptimal Routing karena hilangnya informasi mengenai suatu path/jalur
o Routing Loops, karena as-path nya kosong maka bgp loop detection tidak
bekerja dengan baik
Untuk mengatasinya maka kita bisa menggunakan option command AS_PATH

Task :
Masih melanjutkan dari konfigan sebelumnya, tetapi tambahkan satu router kedalam
topologi yang barusan. Kemudian konfigurasi BGP as 400 di R4 dan advertise loopback di R4
kedalam BGP

70
R4(config)#router bgp 400
R4(config-router)#neigh 34.34.34.3 remote-as 300
R4(config-router)#network 34.34.34.0 mask 255.255.255.0
R4(config-router)#network 40.1.1.0 mask 255.255.255.0
R4(config-router)#network 14.0.0.0 mask 255.255.255.0
R4(config-router)#network 14.0.1.0 mask 255.255.255.0
R4(config-router)#network 14.0.2.0 mask 255.255.255.0
R4(config-router)#network 14.0.3.0 mask 255.255.255.0
R4(config-router)#

R3(config)#router bgp 300


R3(config-router)#neigh 34.34.34.4 remote-as 400
R3(config-router)#end

R3#sh ip bgp summary


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
23.23.23.2 4 200 359 356 22 0 0 05:49:07 4
34.34.34.4 4 400 6 10 22 0 0 00:01:25 6

R3#sh ip bgp
BGP table version is 22, local router ID is 13.0.3.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


*> 10.1.1.0/24 23.23.23.2 0 200 100 i
*> 12.12.12.0/24 23.23.23.2 0 0 200 i
s> 13.0.0.0/24 0.0.0.0 0 32768 i
*> 13.0.0.0/22 0.0.0.0 32768 i
s> 13.0.1.0/24 0.0.0.0 0 32768 i
s> 13.0.2.0/24 0.0.0.0 0 32768 i
s> 13.0.3.0/24 0.0.0.0 0 32768 i
*> 14.0.0.0/24 34.34.34.4 0 0 400 i
*> 14.0.1.0/24 34.34.34.4 0 0 400 i
*> 14.0.2.0/24 34.34.34.4 0 0 400 i
*> 14.0.3.0/24 34.34.34.4 0 0 400 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
r> 34.34.34.0/24 34.34.34.4 0 0 400 i
*> 40.1.1.0/24 34.34.34.4 0 0 400 i

71
Selanjutnya konfigurasi R2 agar mengsummarize loopback R4 (14.0.0.0)
R2#sh ip bgp | in 14
*> 14.0.0.0/24 23.23.23.3 0 300 400 i
*> 14.0.1.0/24 23.23.23.3 0 300 400 i
*> 14.0.2.0/24 23.23.23.3 0 300 400 i
*> 14.0.3.0/24 23.23.23.3 0 300 400 i

R2(config)#router bgp 200


R2(config-router)#aggregate-address 14.0.0.0 255.255.252.0 summary-only
R2(config-router)#end

R2#sh ip bgp 14.0.0.0/22


BGP routing table entry for 14.0.0.0/22, version 22
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
Local, (aggregated by 200 12.0.3.1)
0.0.0.0 from 0.0.0.0 (12.0.3.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best

Selanjutnya konfigurasi R2 untuk memberikan informasi AS-path address yang dismmary


R2(config)#router bgp 200
R2(config-router)#aggregate-address 14.0.0.0 255.255.252.0 summary-only as-set
R2(config-router)#end

Verif lagi
R2#sh ip bgp 14.0.0.0/22
BGP routing table entry for 14.0.0.0/22, version 27
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
300 400, (aggregated by 200 12.0.3.1)
0.0.0.0 from 0.0.0.0 (12.0.3.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best

72
Verifikasi AS-set dengan contoh lainnya
Tambahkan R5 pada topologi kemdian koneksikan dengan R1 seperti gambar berikut

R1(config)#router bgp 100


R1(config-router)#neigh 15.15.15.5 remote-as 500
R1(config-router)#network 15.15.15.0 mask 255.255.255.0
R1(config-router)#

R5(config)#router bgp 500


R5(config-router)#neigh 15.15.15.1 remote-as 100
R5(config-router)#net 15.15.15.0 mask 255.255.255.0
R5(config-router)#exit

Task :
Advertise loopback di R2 kedalam BGP
Tambahkan lagi loopback di R4 kemudian advertise juga kedalam BGP

73
R2(config)#router bgp 200
R2(config-router)#net 12.0.0.0 mask 255.255.255.0
R2(config-router)#net 12.0.1.0 mask 255.255.255.0
R2(config-router)#net 12.0.2.0 mask 255.255.255.0
R2(config-router)#net 12.0.3.0 mask 255.255.255.0
R2(config-router)#exit

R4(config)#int loop 10
R4(config-if)#ip add 12.0.10.1 255.255.255.0
R4(config-if)#int loop 11
R4(config-if)#ip add 12.0.11.1 255.255.255.0
R4(config-if)#int loop 12
R4(config-if)#ip add 12.0.12.1 255.255.255.0
R4(config-if)#int loop13
R4(config-if)#ip add 12.0.13.1 255.255.255.0

R4(config)#router bgp 400


R4(config-router)#net 12.0.10.0 mask 255.255.255.0
R4(config-router)#net 12.0.11.0 mask 255.255.255.0
R4(config-router)#net 12.0.12.0 mask 255.255.255.0
R4(config-router)#net 12.0.13.0 mask 255.255.255.0
R4(config-router)#exit

Konfigurasi R1 untuk meng-summarize network 12. (kedalam satu summary address)


sebelum diadvertise ke R5
R2#sh ip bgp | in 12
BGP table version is 36, local router ID is 12.0.3.1
*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
*> 12.0.10.0/24 23.23.23.3 0 300 400 i
*> 12.0.11.0/24 23.23.23.3 0 300 400 i
*> 12.0.12.0/24 23.23.23.3 0 300 400 i
*> 12.0.13.0/24 23.23.23.3 0 300 400 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 15.15.15.0/24 12.12.12.1 0 0 100 i

74
R1#sh ip bgp | in 12
*> 12.0.0.0/24 12.12.12.2 0 0 200 i
*> 12.0.1.0/24 12.12.12.2 0 0 200 i
*> 12.0.2.0/24 12.12.12.2 0 0 200 i
*> 12.0.3.0/24 12.12.12.2 0 0 200 i
*> 12.0.10.0/24 12.12.12.2 0 200 300 400 i
*> 12.0.11.0/24 12.12.12.2 0 200 300 400 i
*> 12.0.12.0/24 12.12.12.2 0 200 300 400 i
*> 12.0.13.0/24 12.12.12.2 0 200 300 400 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 13.0.0.0/22 12.12.12.2 0 200 300 i
*> 14.0.0.0/22 12.12.12.2 0 0 200 300 400 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 400 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i

R1(config)#router bgp 100


R1(config-router)#aggregate-address 12.0.0.0 255.255.240.0 summary-only

R5#sh ip bgp | in 12
*> 12.0.0.0/20 15.15.15.1 0 0 100 i
*> 12.12.12.0/24 15.15.15.1 0 0 100 i

Konfigurasi R1 agar memberikan informasi AS-Path ketika summarize net 12


R1#sh ip bgp | in 12
s> 12.0.0.0/24 12.12.12.2 0 0 200 i
*> 12.0.0.0/20 0.0.0.0 32768 i
s> 12.0.1.0/24 12.12.12.2 0 0 200 i
-----more-----

R1(config)#router bgp 100


R1(config-router)#aggregate-address 12.0.0.0 255.255.240.0 summary-only as-set

R1#sh ip bgp | in 12
s> 12.0.0.0/24 12.12.12.2 0 0 200 i
*> 12.0.0.0/20 0.0.0.0 100 32768 {200,300,400} i
s> 12.0.1.0/24 12.12.12.2 0 0 200 i
-----more-----

75
R1#sh ip bgp 12.0.0.0/20
BGP routing table entry for 12.0.0.0/20, version 46
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
{200,300,400}, (aggregated by 100 1.1.1.1)
0.0.0.0 from 0.0.0.0 (1.1.1.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best

R5#sh ip bgp | in 12
*> 12.0.0.0/20 15.15.15.1 0 0 100 {200,300,400} i
*> 12.12.12.0/24 15.15.15.1 0 0 100 i

Task : BGP Aggregation Using Suppress-map


Advertise loopback interface R1 (net 11. ) melalui redistribusi BGP
Konfigurasi R1 untuk mengadvertise summary address (11.0.0.0/22) bersamaan
dengan spesifik prefix (11.0.0.1/24, 11.0.1.1/24)
Gunakan BGP aggregation with suppress-map

76
R1#sh ip int br | include Loopback
Loopback0 1.1.1.1 YES NVRAM up up
Loopback1 11.0.0.1 YES manual up up
Loopback2 11.0.1.1 YES manual up up
Loopback3 11.0.2.1 YES manual up up
Loopback4 11.0.3.1 YES manual up up

R1(config)#route-map CONNECTED permit 10


R1(config-route-map)#match interface loop 1
R1(config-route-map)#match interface loop 2
R1(config-route-map)#match interface loop 3
R1(config-route-map)#match interface loop 4
R1(config-route-map)#exit
R1(config)#
R1(config)#router bgp 100
R1(config-router)#redistribute connected route-map CONNECTED
R1(config-router)#end

R1#sh ip bgp | in 11
*> 11.0.0.0/24 0.0.0.0 0 32768 ?
*> 11.0.1.0/24 0.0.0.0 0 32768 ?
*> 11.0.2.0/24 0.0.0.0 0 32768 ?
*> 11.0.3.0/24 0.0.0.0 0 32768 ?
s> 12.0.11.0/24 12.12.12.2 0 200 300 400 i

R1(config)#access-list 11 permit 11.0.2.0 0.0.0.255


R1(config)#access-list 11 permit 11.0.3.0 0.0.0.255

R1(config)#route-map SUP permit 10


R1(config-route-map)#match ip add 11
R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#aggregate-address 11.0.0.0 255.255.252.0 suppress-map SUP summary-only

R1#sh ip bgp | in 11
*> 11.0.0.0/24 0.0.0.0 0 32768 ?
*> 11.0.0.0/22 0.0.0.0 32768 i
*> 11.0.1.0/24 0.0.0.0 0 32768 ?
s> 11.0.2.0/24 0.0.0.0 0 32768 ?
s> 11.0.3.0/24 0.0.0.0 0 32768 ?
s> 12.0.11.0/24 12.12.12.2 0 200 300 400 i

77
R2#sh ip bgp | in 11
*> 11.0.0.0/24 12.12.12.1 0 0 100 ?
*> 11.0.0.0/22 12.12.12.1 0 0 100 i
*> 11.0.1.0/24 12.12.12.1 0 0 100 ?
*> 12.0.11.0/24 23.23.23.3 0 300 400 i

R5#sh ip bgp | in 11
*> 11.0.0.0/24 15.15.15.1 0 0 100 ?
*> 11.0.0.0/22 15.15.15.1 0 0 100 i
*> 11.0.1.0/24 15.15.15.1 0 0 100 ?

UNSUPPRESS-MAP:

Task :
Hapus konfigurasi aggregation di lab sebelumnya
Konfigurasi R1 untuk mengadvertise network 11.0.0.0/24 dan 11.0.1.0/24
(unsuppress) dan summary route hanya ke R2
Untuk ke neighbor lainnya, hanya advertise summary route saja, dua network tsb
tidak diadvertise ke router lainnya

R1(config)#no access-list 11
R1(config)#no route-map SUP
R1(config)#router bgp 100
R1(config-router)# no aggregate-address 11.0.0.0 255.255.252.0 suppress-map SUP summary-only

78
R1#sh ip bgp | in 11
*> 11.0.0.0/24 0.0.0.0 0 32768 ?
*> 11.0.1.0/24 0.0.0.0 0 32768 ?
*> 11.0.2.0/24 0.0.0.0 0 32768 ?
*> 11.0.3.0/24 0.0.0.0 0 32768 ?
s> 12.0.11.0/24 12.12.12.2 0 200 300 400 i

R1(config)#ip prefix-list CCIEIDN permit 11.0.0.0/24


R1(config)#ip prefix-list CCIEIDN permit 11.0.1.0/24
R1(config)#
R1(config)#route-map UN_SUP permit 10
R1(config-route-map)#match ip add prefix-list CCIEIDN
R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#aggregate-address 11.0.0.0 255.255.252.0 summary-only
R1(config-router)#neigh 12.12.12.2 unsuppress-map UN_SUP
R1(config-router)#end

R1#sh ip bgp | in 11
s> 11.0.0.0/24 0.0.0.0 0 32768 ?
*> 11.0.0.0/22 0.0.0.0 32768 i
s> 11.0.1.0/24 0.0.0.0 0 32768 ?
s> 11.0.2.0/24 0.0.0.0 0 32768 ?
s> 11.0.3.0/24 0.0.0.0 0 32768 ?
s> 12.0.11.0/24 12.12.12.2 0 200 300 400 i

R1#sh ip bgp neighbors 12.12.12.2 advertised-routes | in 11


s> 11.0.0.0/24 0.0.0.0 0 32768 ?
*> 11.0.0.0/22 0.0.0.0 32768 i
s> 11.0.1.0/24 0.0.0.0 0 32768 ?

R1#sh ip bgp neighbors 15.15.15.5 advertised-routes | in 11


*> 11.0.0.0/22 0.0.0.0 32768 i

R5#sh ip bgp | in 11
*> 11.0.0.0/22 15.15.15.1 0 0 100 i

79
BGP Route-Filtering options
Using Route-maps, prefix-list, ACL, As-path filters using regular Expressions

LAB 18 : BGP Filtering using ACL


Topologi

Task :
Konfigurasi dasar EBGP sesuai dengan topologi
Advertise semua interface yang terkoneksi dengan router

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 400
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 41.41.41.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#

80
R2(config)#router bgp 200
R2(config-router)#neigh 23.23.23.3 remote-as 300
R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#net 23.23.23.0 mask 255.255.255.0
R2(config-router)#net 12.12.12.0 mask 255.255.255.0
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R2(config-router)#

R3(config)#router bgp 300


R3(config-router)#neigh 34.34.34.4 remote-as 400
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R4(config)#router bgp 400


R4(config-router)#neigh 34.34.34.3 remote-as 300
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Verifikasi
R1#sh ip bgp summary
BGP router identifier 11.0.3.1, local AS number 100
BGP table version is 13, main routing table version 13
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.2 4 200 146 147 13 0 0 02:18:54 6
41.41.41.4 4 400 143 142 13 0 0 02:14:46 6

R1#sh ip bgp
BGP table version is 13, local router ID is 11.0.3.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
* 20.1.1.0/24 41.41.41.4 0 400 300 200 i
*> 12.12.12.2 0 0 200 i
* 23.23.23.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 0 200 i

81
* 30.1.1.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 41.41.41.4 0 0 400 i
* 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 41.41.41.4 0 0 400 i
* 12.12.12.2 0 200 300 400 i
* 41.41.41.0/24 41.41.41.4 0 0 400 i
*> 0.0.0.0 0 32768 i

R3#sh ip bgp
BGP table version is 9, local router ID is 13.0.3.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


* 10.1.1.0/24 34.34.34.4 0 400 100 i
*> 23.23.23.2 0 200 100 i
* 12.12.12.0/24 34.34.34.4 0 400 100 i
*> 23.23.23.2 0 0 200 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
* 23.23.23.2 0 0 200 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 0 400 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 0 400 i
* 41.41.41.0/24 23.23.23.2 0 200 100 i
*> 34.34.34.4 0 0 400 i

Selanjutnya kita akan Konfigurasi R1 agar memblok network 20.1.1.0 agar tidak masuk
kedalam routing/BGP table di R1
R1#sh ip bgp 20.1.1.0
BGP routing table entry for 20.1.1.0/24, version 4
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1
400 300 200
41.41.41.4 from 41.41.41.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best

82
Terdapat 2 cara untuk memfilternya kita bisa mengkonfigurasi di R1 atau R2, jika di R1 maka
kita akan memfilter dari arah masuk network tersebut (inbound), jika di R2 maka kita akan
mengkonfigurasi si R2 agar gak advertise network 20.1.1.0 ke R1 atau router lainnya
(outbound). Sekarang kita akan mencoba yang pertama yaitu inbound.

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 distribute-list 20 in
R1(config-router)#neigh 41.41.41.4 distribute-list 20 in
R1(config-router)#do clear ip bgp * soft

Verifikasi di R1
R1#sh ip bgp 20.1.1.0
% Network not in table

R4#sh ip bgp neighbors 41.41.41.1 advertised-routes


BGP table version is 11, local router ID is 14.0.3.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


*> 10.1.1.0/24 41.41.41.1 0 0 100 i
*> 12.12.12.0/24 41.41.41.1 0 0 100 i
*> 20.1.1.0/24 34.34.34.3 0 300 200 i
*> 23.23.23.0/24 34.34.34.3 0 0 300 i
*> 30.1.1.0/24 34.34.34.3 0 0 300 i
*> 34.34.34.0/24 0.0.0.0 0 32768 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

Total number of prefixes 8

R4 mengadvertise network 20.1.1.0 ke R1 tapi R1 menolaknya

83
LAB 19 : BGP Filtering using IP Prefix-lists
Topologi

Task :
Masih menggunakan lab yang dari sebelumnya, tapi hapus konfigan yang
sebelumnya
Tujuan nya masih sama dari lab sebelumnya yaitu memblok net 20.1.1.0
R1(config)#router bgp 100
R1(config-router)#no neigh 12.12.12.2 distribute-list 20 in
R1(config-router)#no neigh 41.41.41.4 distribute-list 20 in
R1(config-router)#do clear ip bgp * soft
R1(config-router)#do sh ip bgp 20.1.1.0
BGP routing table entry for 20.1.1.0/24, version 16
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
400 300 200
41.41.41.4 from 41.41.41.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best

84
Konfigurasi IP Prefix-list
R1(config)#ip prefix-list CCIEIDN deny 20.1.1.0/24
R1(config)#ip prefix-list CCIEIDN permit 0.0.0.0/0 le 32

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 prefix-list CCIEIDN in
R1(config-router)#neigh 41.41.41.4 prefix-list CCIEIDN in
R1(config-router)#end

R1#clear ip bgp * soft


Verifikasi
R1#sh ip bgp 20.1.1.0
% Network not in table

R2#sh ip bgp neighbors 12.12.12.1 advertised-routes | in 20


*> 20.1.1.0/24 0.0.0.0 0 32768 i

R4#sh ip bgp neighbors 41.41.41.1 advertised-routes | in 20


*> 20.1.1.0/24 34.34.34.3 0 300 200 i

Selanjutnya, kita akan coba menggunakan route-map


Untuk mencocokan ip address bisa gunain ACL atau prefix-list. Hapus terlebih dahulu
konfigan prefix-list sebelumnya

R1(config)#no ip prefix-list CCIEIDN deny 20.1.1.0/24


R1(config)#no ip prefix-list CCIEIDN permit 0.0.0.0/0 le 32
R1(config)#router bgp 100
R1(config-router)#no neigh 41.41.41.4 prefix-list CCIEIDN in
R1(config-router)#no neigh 12.12.12.2 prefix-list CCIEIDN in
R1#clear ip bgp * soft

R1#sh ip bgp 20.1.1.0


BGP routing table entry for 20.1.1.0/24, version 19
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
400 300 200
41.41.41.4 from 41.41.41.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best

85
Konfigurasi
R1(config)#access-list 20 permit 20.1.1.0 0.0.0.255
R1(config)#route-map CCIEIDN deny 10
R1(config-route-map)#match ip add 20
R1(config-route-map)#exit

R1(config)#route-map CCIEIDN permit 20


R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 route-map CCIEIDN in
R1(config-router)#neigh 41.41.41.4 route-map CCIEIDN in
R1(config-router)#end

R1#clear ip bgp * soft

R1#sh ip bgp 20.1.1.0


% Network not in table

R2#sh ip bgp neighbors 12.12.12.1 advertised-routes | in 20


*> 20.1.1.0/24 0.0.0.0 0 32768 i
R2 mengadvertise ke R1 tapi R1 menolak

R4#sh ip bgp neighbors 41.41.41.1 advertised-routes | in 20


*> 20.1.1.0/24 34.34.34.3 0 300 200 i
R4 juga advertise network 20.1.1.0 ke R1 tapi R1 menolaknya

Hapus Konfigurasi barusan


R1(config)#no access-list 20
R1(config)#no route-map CCIEIDN deny 10

R1(config)#no route-map CCIEIDN permit 20


R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#no neigh 12.12.12.2 route-map CCIEIDN in
R1(config-router)#no neigh 41.41.41.4 route-map CCIEIDN in
R1(config-router)#end
R1#clear ip bgp * soft

86
Task :
Buat interface loopback di R2 kemudian advertise kedalam BGP
Konfigurasi R1 agar tidak memfilter route network 12.0.0.0/24 dan 12.0.1.0/24 agar
tidak masuk kedalam routing/BGP table

R2#sh ip int br | in 12
Serial0/0 12.12.12.2 YES NVRAM up up
Loopback1 12.0.0.1 YES NVRAM up up
Loopback2 12.0.1.1 YES NVRAM up up
Loopback3 12.0.2.1 YES NVRAM up up
Loopback4 12.0.3.1 YES NVRAM up up

R2(config)#router bgp 200


R2(config-router)#net 12.0.0.0 mask 255.255.255.0
R2(config-router)#net 12.0.1.0 mask 255.255.255.0
R2(config-router)#net 12.0.2.0 mask 255.255.255.0
R2(config-router)#net 12.0.3.0 mask 255.255.255.0

87
R2#sh ip bgp
BGP table version is 14, local router ID is 12.0.3.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
* 34.34.34.0/24 12.12.12.1 0 100 400 i
*> 23.23.23.3 0 0 300 i
* 40.1.1.0/24 12.12.12.1 0 100 400 i
*> 23.23.23.3 0 300 400 i
*> 41.41.41.0/24 12.12.12.1 0 0 100 i
* 23.23.23.3 0 300 400 i

R1#sh ip bgp | in 12.0


* 12.0.0.0/24 41.41.41.4 0 400 300 200 i
* 12.0.1.0/24 41.41.41.4 0 400 300 200 i
* 12.0.2.0/24 41.41.41.4 0 400 300 200 i
* 12.0.3.0/24 41.41.41.4 0 400 300 200 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
R1#

Konfigurasi Prefix-list
R1(config)#ip prefix-list CCIEIDN deny 12.0.0.0/24
R1(config)#ip prefix-list CCIEIDN deny 12.0.1.0/24
R1(config)#ip prefix-list CCIEIDN permit 0.0.0.0/0 le 32

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 prefix-list CCIEIDN in
R1(config-router)#neigh 41.41.41.4 prefix-list CCIEIDN in
R1(config-router)#end
R1#clear ip bgp * soft

88
Verifikasi
R1#sh ip bgp 12.0.0.0
% Network not in table

R1#sh ip bgp 12.0.1.0


% Network not in table

R1#sh ip bgp 12.0.2.0


BGP routing table entry for 12.0.2.0/24, version 41
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
400 300 200
41.41.41.4 from 41.41.41.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best

R1#sh ip bgp 12.0.3.0


BGP routing table entry for 12.0.3.0/24, version 40
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
400 300 200
41.41.41.4 from 41.41.41.4 (14.0.3.1)
Origin IGP, localpref 100, valid, external
200
12.12.12.2 from 12.12.12.2 (12.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Sudah berjalan , #Joss

89
Task Selanjutnya :
Hapus Konfigurasi filtering sebelumnya kemudian
Buat interface loopback di R2 dengan subnetmask sbagai berikut
Loopback 10 172.16.0.1/24
Loopback 11 172.16.1.1/25
Loopback 12 172.16.2.1/26
Loopback 13 172.16.3.1/27
Loopbakc 14 172.16.4.1/28
Loopback 15 172.16.5.1/29
Loopback 16 172.16.6.1/30
Kemudian advertise ke dalam RIPv2 lalu redistribute ke BGP

R2#do sh ip int br | in Loop


Loopback0 2.2.2.2 YES NVRAM up up
Loopback1 12.0.0.1 YES NVRAM up up
Loopback2 12.0.1.1 YES NVRAM up up
Loopback3 12.0.2.1 YES NVRAM up up
Loopback4 12.0.3.1 YES NVRAM up up
Loopback10 172.16.0.1 YES manual up up
Loopback11 172.16.1.1 YES manual up up
Loopback12 172.16.2.1 YES manual up up
Loopback13 172.16.3.1 YES manual up up
Loopback14 172.16.4.1 YES manual up up
Loopback15 172.16.5.1 YES manual up up
Loopback16 172.16.6.1 YES manual up up

90
Konfigurasi RIPv2
R2(config)#router rip
R2(config-router)#ver 2
R2(config-router)#no au
R2(config-router)#net 172.16.0.0
R2(config-router)#exit

R2(config)#router bgp 200


R2(config-router)#redistribute rip
R2(config-router)#exit

R2#sh ip bgp
BGP table version is 20, local router ID is 12.0.3.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 12.0.1.0/24 0.0.0.0 0 32768 i
*> 12.0.2.0/24 0.0.0.0 0 32768 i
*> 12.0.3.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
* 34.34.34.0/24 12.12.12.1 0 100 400 i
*> 23.23.23.3 0 0 300 i
* 40.1.1.0/24 12.12.12.1 0 100 400 i
*> 23.23.23.3 0 300 400 i
* 41.41.41.0/24 23.23.23.3 0 300 400 i
*> 12.12.12.1 0 0 100 i
*> 172.16.0.0/24 0.0.0.0 0 32768 ?
*> 172.16.1.0/25 0.0.0.0 0 32768 ?
*> 172.16.2.0/26 0.0.0.0 0 32768 ?
*> 172.16.3.0/27 0.0.0.0 0 32768 ?
*> 172.16.4.0/28 0.0.0.0 0 32768 ?
*> 172.16.5.0/29 0.0.0.0 0 32768 ?
*> 172.16.6.0/30 0.0.0.0 0 32768 ?

91
Selanjutnya konfigurasi R1 untuk memfilter rute BGP dari bagian subnet 172.16.0.0 dan
hanya memblok rute network dengan subnet antara /27 - /30

Konfigurasi Prefix-list
R1(config)#ip prefix-list CCIEIDN1 deny 172.16.0.0/16 ge 27 le 30
R1(config)#ip prefix-list CCIEIDN1 permit 0.0.0.0/0 le 32
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 prefix-list CCIEIDN1 in
R1(config-router)#end
R1#clear ip bgp * soft

R1#sh ip bgp
BGP table version is 24, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.0.0.0/24 41.41.41.4 0 400 300 200 i
*> 12.12.12.2 0 0 200 i
*> 12.0.1.0/24 12.12.12.2 0 0 200 i
*> 12.0.2.0/24 12.12.12.2 0 0 200 i
*> 12.0.3.0/24 12.12.12.2 0 0 200 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
* 23.23.23.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 0 200 i
* 30.1.1.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 200 300 i
* 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 41.41.41.4 0 0 400 i
* 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.4 0 0 400 i
* 41.41.41.0/24 41.41.41.4 0 0 400 i
*> 0.0.0.0 0 32768 i
* 172.16.0.0/24 41.41.41.4 0 400 300 200 ?
*> 12.12.12.2 0 0 200 ?
* 172.16.1.0/25 41.41.41.4 0 400 300 200 ?
*> 12.12.12.2 0 0 200 ?
* 172.16.2.0/26 41.41.41.4 0 400 300 200 ?
*> 12.12.12.2 0 0 200 ?

92
R1#sh ip bgp 172.16.3.0/27
% Network not in table

R1#sh ip bgp 172.16.4.0/28


% Network not in table

R1#sh ip bgp 172.16.5.0/29


% Network not in table

R1#sh ip bgp 172.16.6.0/30


% Network not in table

93
LAB 20 : AS-Path Filtering using Regular Expression
BGP Regular expressions is used for match based on AS-path information

Char Usage
^ Start Of String
$ End of String
[] Range of characters
- Used to Specify Range (i.e. [0-9])
() Logical Grouping
. Any Single character
* Zero or more instances
+ One or more instance
? Zero or one instance
_ Comma, open or close brace, open or
close parentheses, start or end of
string, or space

Example1
^$ matches an empty AS PATH so it will match all prefixes from the local AS.
^51_ matches prefixes from AS 51 that is directly connected to our AS.
_51_ matches prefixes that transit AS 51.
matches prefixes that originated in AS 51, the $ ensures that its the beginning of the AS
_51$
PATH.
^([0-9]+)_51 matches prefixes from AS 51 where AS 51 is behind one of our directly connected ASes.
^51_([0-9]+) matches prefixes from the clients of directly connected AS 51.
^(51_)+([0- matches prefixes from the clients of directly connected AS 51, where AS 51 might be
9]+) doing AS PATH prepending.
^51_([0- matches prefixes from the clients of directly connected AS 51, where the clients might be
9]+_)+ doing AS PATH prepending.
^\65200\) matches prefixed from confederation peer 65200.

94
LAB
Topologi

Task 1 :
Konfigurasi EBGP kemudian advertise semua interface router sesuai dengan topologi

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 400
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 41.41.41.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 300
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 20.1.1.0 mask 255.255.255.0

95
R3(config)#router bgp 300
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#neigh 34.34.34.4 remote-as 400
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R4(config)#router bgp 400


R4(config-router)#neigh 34.34.34.3 remote-as 300
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Verifikasi
R3#sh ip bgp summ
BGP router identifier 13.0.3.1, local AS number 300
BGP table version is 10, main routing table version 10

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


23.23.23.2 4 200 12 12 10 0 0 00:05:34 5
34.34.34.4 4 400 12 12 10 0 0 00:04:12 6

R1#sh ip bgp summar


BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 10, main routing table version 10

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 200 14 14 10 0 0 00:07:17 6
41.41.41.4 4 400 12 12 10 0 0 00:04:53 5

R1#sh ip bgp
BGP table version is 10, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
* 23.23.23.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 0 200 i

96
* 30.1.1.0/24 41.41.41.4 0 400 300 i
*> 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 41.41.41.4 0 0 400 i
* 12.12.12.2 0 200 300 i
* 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.4 0 0 400 i
* 41.41.41.0/24 41.41.41.4 0 0 400 i
*> 0.0.0.0 0 32768 i

Task 2 :
Konfigurasi R1 agar menerima/mengirim semua prefix hanya lewat/dari R2 saja
(deny from R4)
Gunakan AS-path access-list

R1
R1(config)#ip as-path access-list ?
<1-500> AS path access list number

R1(config)#ip as-path access-list 1 deny ?


LINE A regular-expression to match BGP AS paths. Use "ctrl-v ?" to enter "?"

R1(config)#ip as-path access-list 1 deny .*


R1(config)#
R1(config)#router bgp 100
R1(config-router)#neigh 41.41.41.4 filter-list ?
<1-500> AS path access list

R1(config-router)#neigh 41.41.41.4 filter-list 1 ?


in Filter incoming routes
out Filter outgoing routes

R1(config-router)#neigh 41.41.41.4 filter-list 1 in


R1(config-router)#neigh 41.41.41.4 filter-list 1 out
R1(config-router)#end
R1#clear ip bgp * soft

97
Verifikasi lagi
R1#sh ip bgp
BGP table version is 12, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

R1#sh ip bgp neigh 41.41.41.4 advertised-routes

Total number of prefixes 0

R4#sh ip bgp
BGP table version is 12, local router ID is 14.0.3.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


*> 10.1.1.0/24 34.34.34.3 0 300 200 100 i
*> 12.12.12.0/24 34.34.34.3 0 300 200 i
*> 20.1.1.0/24 34.34.34.3 0 300 200 i
*> 23.23.23.0/24 34.34.34.3 0 0 300 i
*> 30.1.1.0/24 34.34.34.3 0 0 300 i
* 34.34.34.0/24 34.34.34.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

98
Task 3 :
Konfigurasi R1 agar agar memblok semua prefix yang berasal dari AS 300

R1#sh ip bgp
BGP table version is 12, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

R1#sh ip bgp regexp _300$


BGP table version is 12, 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


*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i

R1
R1(config)#ip as-path access-list 10 deny _300$
R1(config)#ip as-path access-list 10 permit .*

R1#sh ip as-path-access-list 10
AS path access list 10
deny _300$
permit .*
Assign ke BGP
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 filter-list 10 in
R1(config-router)#end
R1#clear ip bgp * soft

99
Verifikasi
R1#sh ip bgp
BGP table version is 14, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

R1#sh ip bgp regexp _300$

R1#

Task 4 :
Hapus konfigurasi AS-path sebelumnya
Konfigurasi R1 agar memfilter rute yang berasal dari AS 200

R1(config)#no ip as-path access-list 10


R1(config)#router bgp 100
R1(config-router)#no neigh 12.12.12.2 filter-list 10 in
R1(config-router)#end

R1#clear ip bgp * soft

R1#sh ip bgp regexp _300$


BGP table version is 16, 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


*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i

100
R1#sh ip bgp regexp ^200$
BGP table version is 16, 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


* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i

R1(config)#ip as-path access-list 20 deny ^200$


R1(config)#ip as-path access-list 20 permit .*

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 filter-list 20 in
R1(config-router)#end

R1#clear ip bgp * soft


Verifikasi
R1#sh ip bgp regexp ^200$

R1#

R1#sh ip bgp
BGP table version is 18, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i
Joss.

101
Task 5 : Hapus Konfigurasi as-path sebelumnya
R1(config)#no ip as-path access-list 20

R1(config)#router bgp 100


R1(config-router)#no neigh 12.12.12.2 filter-list 20 in
R1(config-router)#end

R1#clear ip bgp * soft

R1#sh ip bgp
BGP table version is 55, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

R1#sh ip bgp regexp ^200$


BGP table version is 55, 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


* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i

Selanjutnya Konfigurasi R1 untuk menDENY semua route yang bergerak melalui AS 300
R1#sh ip bgp
BGP table version is 55, 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

102
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i
R1#sh ip bgp regexp _300_
BGP table version is 55, 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


*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
Konfigurasi
R1(config)#ip as-path access-list 30 deny _300_
R1(config)#ip as-path access-list 30 permit .*

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 filter-list 30 in
R1(config-router)#end
R1#clear ip bgp * soft
Verifikasi
R1#sh ip bgp regexp _300_

R1#sh ip bgp
BGP table version is 58, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

103
Task 6 :
Hapus Konfigurasi as-path sebelumnya
R1(config)#no ip as-path access-list 30
R1(config)#router bgp 100
R1(config-router)#no neigh 12.12.12.2 filter-list 30 in

R1#clear ip bgp * soft

Kemudian konfigurasi AS-path di R2 agar R2 tidak mengadvertise network local yang


dimilikinya ke R3
R2#sh ip bgp
BGP table version is 22, local router ID is 172.16.6.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
* 12.12.12.1 0 0 100 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
* 23.23.23.3 0 0 300 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
*> 34.34.34.0/24 23.23.23.3 0 0 300 i
*> 40.1.1.0/24 23.23.23.3 0 300 400 i
*> 41.41.41.0/24 12.12.12.1 0 0 100 i
* 23.23.23.3 0 300 400 i

R2#sh ip bgp regexp ^$


BGP table version is 22, local router ID is 172.16.6.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


*> 12.12.12.0/24 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i

104
R2#sh ip bgp neigh 23.23.23.3 advertised-routes
BGP table version is 22, local router ID is 172.16.6.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
*> 34.34.34.0/24 23.23.23.3 0 0 300 i
*> 40.1.1.0/24 23.23.23.3 0 300 400 i
*> 41.41.41.0/24 12.12.12.1 0 0 100 i
prefix yang diadvertise R2 kepada R3

Konfig AS-path
R2(config)#ip as-path access-list 40 deny ^$
R2(config)#ip as-path access-list 40 permit .*

R2(config)#router bgp 200


R2(config-router)#neigh 23.23.23.3 filter-list 40 out
R2(config-router)#do clear ip bgp * soft
R2(config-router)#end
Verifikasi
R2#sh ip bgp neigh 23.23.23.3 advertised-routes
BGP table version is 22, local router ID is 172.16.6.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 41.41.41.0/24 12.12.12.1 0 0 100 i

R3
R3#sh ip bgp
BGP table version is 55, local router ID is 13.0.3.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

105
*> 10.1.1.0/24 23.23.23.2 0 200 100 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 0 400 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 0 400 i
* 41.41.41.0/24 23.23.23.2 0 200 100 i
*> 34.34.34.4 0 0 400 i
R3#
Joss
Prefix local diR2 tidak ada dalam table BGP di R3

Task 7 :
Hapus Konfigurasi as-path sebelumnya
R2(config)#no ip as-path access-list 40 deny ^$

R2(config)#router bgp 200


R2(config-router)#no neigh 23.23.23.3 filter-list 40 out
R2(config-router)#do clear ip bgp * soft
R2(config-router)#end
R2#sh ip bgp neigh 23.23.23.3 advertised-routes
BGP table version is 22, local router ID is 172.16.6.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


*> 10.1.1.0/24 12.12.12.1 0 0 100 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
*> 34.34.34.0/24 23.23.23.3 0 0 300 i
*> 40.1.1.0/24 23.23.23.3 0 300 400 i
*> 41.41.41.0/24 12.12.12.1 0 0 100 i

106
Konfigurasi R1 untuk memblok semua prefix local AS 400 dan bergerak lewat AS 300
R1#sh ip bgp
BGP table version is 61, 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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 12.12.12.2 0 200 300 400 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

Konfig AS-path
R1(config)#ip as-path access-list 50 deny _300_400$
R1(config)#ip as-path access-list 50 permit .*
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 filter-list 50 in
R1(config-router)#do clear ip bgp * soft
R1(config-router)#end

Verifikasi
R1#sh ip bgp regexp _300_400$

R1#
Kosong sodara-sodara
R1#sh ip bgp

Network Next Hop Metric LocPrf Weight Path


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 34.34.34.0/24 12.12.12.2 0 200 300 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i
Gak ada network Local AS 400. Joss!

107
BGP Communities
Well-Known(pre-defined), User-defined

BGP communities digunakan untuk menambahkan beberapa informasi tambahan kepada


suatu prefixes yang akan diadvertise ke router tetangga (BGP neighbor), informasi
tambahan biasanya digunain untuk merekayasa lalu lintas (traffic engineering) atau
kebijakan dynamic routing.
Well Known Communites
Internet : Advertise suatu prefix ke semua BGP neighbor
No-Advertise : Tidak mengadvertise prefix ke BGP neighbor manapun
No-Export : Tidak advertise prefix ke eBGP neighbor manapun, hanya sesama AS saja
Local-AS : Tidak advertise prefix ke luar dari sub-AS (digunakan untuk BGP
confederation )

LAB 21 : Communities Well-Known


Topologi

Task 1 :
Konfigurasi dasar IBGP dan EBGP sesuai dengan topologi, kemudian advertise semua
interface ruter kedalam BGP

108
Konfigurasi BGP
R1(config)#router bgp 123
R1(config-router)#neigh 12.12.12.2 remote-as 123
R1(config-router)#neigh 23.23.23.3 remote-as 123
R1(config-router)#neigh 15.15.15.5 remote-as 500
R1(config-router)#neigh 41.41.41.4 remote-as 400
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 15.15.15.0 mask 255.255.255.0
R1(config-router)#net 41.41.41.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#

R2(config)#router bgp 123


R2(config-router)#neigh 12.12.12.1 remote-as 123
R2(config-router)#neigh 23.23.23.3 remote-as 123
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 20.1.1.0 mask 255.255.255.0
R2(config-router)#

R3(config)#router bgp 123


R3(config-router)#neigh 23.23.23.2 remote-as 123
R3(config-router)#neigh 12.12.12.2 remote-as 123
R3(config-router)#neigh 34.34.34.4 remote-as 400
R3(config-router)#neigh 36.36.36.6 remote-as 600
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 36.36.36.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R4(config)#router bgp 400


R4(config-router)#neigh 41.41.41.1 remote-as 123
R4(config-router)#neigh 34.34.34.3 remote-as 123
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

R5(config)#router bgp 500


R5(config-router)#neigh 15.15.15.1 remote-as 123
R5(config-router)#net 15.15.15.0 mask 255.255.255.0
R5(config-router)#net 50.1.1.0 mask 255.255.255.0
R5(config-router)#net 192.168.5.0

109
R6(config)#router bgp 600
R6(config-router)#neigh 36.36.36.3 remote-as 123
R6(config-router)#net 36.36.36.0 mask 255.255.255.0
R6(config-router)#net 60.1.1.0 mask 255.255.255.0
R6(config-router)#net 192.168.6.0

Konfigurasi next-hop di iBGP


R1(config)#router bgp 123
R1(config-router)#neigh 12.12.12.2 next-hop-self
R1(config-router)#neigh 23.23.23.3 next-hop-self
R1(config-router)#

R3(config)#router bgp 123


R3(config-router)#neigh 23.23.23.2 next-hop-self
R3(config-router)#neigh 12.12.12.1 next-hop-self
R3(config-router)#

Verifikasi
R1#sh ip bgp summ
BGP router identifier 11.0.0.1, local AS number 123
BGP table version is 689, main routing table version 689

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 123 58 200 689 0 0 00:54:59 3
15.15.15.5 4 500 58 253 682 0 0 00:54:57 3
23.23.23.3 4 123 199 221 689 0 0 00:01:00 9
41.41.41.4 4 400 63 253 682 0 0 00:54:58 3

R3#sh ip bgp summary


BGP router identifier 13.0.0.1, local AS number 123
BGP table version is 851, main routing table version 851

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 123 235 245 851 0 0 00:06:18 8
23.23.23.2 4 123 64 227 851 0 0 01:00:13 3
34.34.34.4 4 400 69 284 851 0 0 01:00:16 3
36.36.36.6 4 600 64 284 851 0 0 01:00:13 3

110
Task 2 : BGP Community no-advertise
R5 advertise network 192.168.5.0/24 ke R1 di AS 123
Konfigurasi R5 agar R1 tidak mengadvertise si network 192.168.5.0 yang ada di R5 ke
IBGP neigbor lainnya

R2 dan R3 masih punya rute ke 192.168.5.0 di bgp tablenya


R2#sh ip bgp 192.168.5.0
BGP routing table entry for 192.168.5.0/24, version 19
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
500
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best

R3#sh ip bgp 192.168.5.0


BGP routing table entry for 192.168.5.0/24, version 1040
Paths: (1 available, no best path)
Flag: 0x820
Not advertised to any peer
500
12.12.12.1 (inaccessible) from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal

Konfigurasi
R5(config)#access-list 5 permit 192.168.5.0 0.0.0.255

R5(config)#route-map COMM permit 10


R5(config-route-map)#match ip add 5
R5(config-route-map)#set community no-advertise
R5(config-route-map)#exit

R5(config)#route-map COMM permit 20


R5(config-route-map)#exit

R5(config)#router bgp 500


R5(config-router)#neighbor 15.15.15.1 route-map COMM out
R5(config-router)#end

111
R1#sh ip bgp 192.168.5.0
BGP routing table entry for 192.168.5.0/24, version 12
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1 3
500
15.15.15.5 from 15.15.15.5 (192.168.5.1)
Origin IGP, metric 0, localpref 100, valid, external, best

Community value is not applied on R1


R5 must use the neighbor send-community BGP subcommand, which tells BGP to
include the COMMUNITY PA in the update
Without that command, the update does not even include the COMMUNITY PA

R5(config)#router bgp 500


R5(config-router)#neigh 15.15.15.1 send-community
R5(config-router)#end

R1#sh ip bgp 192.168.5.0


BGP routing table entry for 192.168.5.0/24, version 1383
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer)
Not advertised to any peer
500
15.15.15.5 from 15.15.15.5 (192.168.5.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertise

R2#sh ip bgp 192.168.5.0


% Network not in table

R3#sh ip bgp 192.168.5.0


% Network not in table

112
Task 3 : using BGP NO-EXPORT well known Community Attribute
Secara default R6 mengadvertise network 192.168.6.0/24 ke R3, setelah itu R3
mengadvertise network tersebut ke router R2(iBGP) dan R4(EBGP)
Konfigurasi R6 agar mengadvertise network 192.168.6.0 ke R3 lalu R3 hanya
mengadvertise ke IBGP saja (R2 only)

R3#sh ip bgp 192.168.6.0


BGP routing table entry for 192.168.6.0/24, version 10
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1 3
600
36.36.36.6 from 36.36.36.6 (192.168.6.1)
Origin IGP, metric 0, localpref 100, valid, external, best

R4#sh ip bgp 192.168.6.0


BGP routing table entry for 192.168.6.0/24, version 9
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1
123 600
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, localpref 100, valid, external
123 600
34.34.34.3 from 34.34.34.3 (13.0.0.1)
Origin IGP, localpref 100, valid, external, best

R1#sh ip bgp 192.168.6.0


BGP routing table entry for 192.168.6.0/24, version 349
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
600
23.23.23.3 from 23.23.23.3 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best

113
Konfigurasi
R6(config)#access-list 6 permit 192.168.6.0 0.0.0.255
R6(config)#route-map COM6 permit 10
R6(config-route-map)#match ip add 6
R6(config-route-map)#set community no-export
R6(config-route-map)#exit

R6(config)#route-map COM6 permit 20


R6(config-route-map)#exit

R6(config)#router bgp 600


R6(config-router)#neigh 36.36.36.3 route-map COM6 out
R6(config-router)#neigh 36.36.36.3 send-community
R6(config-router)#end

R6#clear ip bgp * soft

Verifikasi
R3#sh ip bgp 192.168.6.0
BGP routing table entry for 192.168.6.0/24, version 483
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Advertised to update-groups:
3
600
36.36.36.6 from 36.36.36.6 (192.168.6.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-export

R4#sh ip bgp 192.168.6.0


BGP routing table entry for 192.168.6.0/24, version 9
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1
123 600
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, localpref 100, valid, external
123 600
34.34.34.3 from 34.34.34.3 (13.0.0.1)
Origin IGP, localpref 100, valid, external, best

Konfigurasi Community masih belum aktif di R3, output diatas memperlihatkan bawa R4
masih mendapatkan rute ke network 192.168.6.0 dari dua sumber, maka kita harus
mengaktifkakn community no export antara R3=R4

114
R3(config)#router bgp 123
R3(config-router)#neigh 34.34.34.4 send-community
R3(config-router)#do clear ip bgp * soft

Verifikasi lagi
R4#sh ip bgp 192.168.6.0
BGP routing table entry for 192.168.6.0/24, version 21
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
123 600
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, localpref 100, valid, external, best
Nah sekarang R4 dapet rute ke network 192.168.6.0 dari R1 doang, joss, buat pastiin lagi,
coba shutdown interface antara R1-R4, dan pastikan tidak ada rute ke 192.168.6.0 di R4

Task 4 : Hapus Konfigurasi sebelumnya


R6(config)#no access-list 6
R6(config)#no route-map COM6

R6(config)#router bgp 600


R6(config-router)#no neigh 36.36.36.3 route-map COM6 out
R6(config-router)#no neigh 36.36.36.3 send-community
R6(config-router)#end
R6#clear ip bgp * soft

R3(config)#router bgp 123


R3(config-router)#no neigh 34.34.34.4 send-community
R3(config-router)#do clear ip bgp * soft

R4#sh ip bgp 192.168.6.0


BGP routing table entry for 192.168.6.0/24, version 34
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
123 600
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, localpref 100, valid, external
123 600
34.34.34.3 from 34.34.34.3 (13.0.0.1)
Origin IGP, localpref 100, valid, external, best

115
Using LOCAL-AS
Konfigurasi R1 agar mengadvertise network 11.0.0.0/24 hanya ke router2 dalam satu
AS (123)
R1(config)#access-list 11 permit 11.0.0.0 0.0.0.255

R1(config)#route-map COM11 permit 10


R1(config-route-map)#match ip add 11
R1(config-route-map)#set community local-as
R1(config-route-map)#exit

R1(config)#route-map COM11 permit 20


R1(config-route-map)#exit
R1(config)#router bgp 123
R1(config-router)#no network 11.0.0.0 mask 255.255.255.0
R1(config-router)#network 11.0.0.0 mask 255.255.255.0 route-map COM11
R1(config-router)#
R1(config-router)#neigh 12.12.12.2 send-communi
R1(config-router)#end

R2#sh ip bgp 11.0.0.0


BGP routing table entry for 11.0.0.0/24, version 37
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS)
Flag: 0x8A0
Not advertised to any peer
Local
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: local-AS

R1(config)#router bgp 123


R1(config-router)#neigh 23.23.23.3 send-commu
R1(config-router)#end

R3#sh ip bgp 11.0.0.0


BGP routing table entry for 11.0.0.0/24, version 287
Paths: (1 available, no best path)
Flag: 0x820
Not advertised to any peer
Local
12.12.12.1 (inaccessible) from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal
Community: local-AS
R4#sh ip bgp 11.0.0.0 R5#sh ip bgp 11.0.0.0 R6#sh ip bgp 11.0.0.0
% Network not in table % Network not in table % Network not in table

116
LAB 22 : User-Defined Community

Topologi

117
Task :
Konfigurasi OSPF pada AS 200
Konfigurasi IBGP peer menggunakan interface loopback di AS 200
Konfigurasi EBGP peer menggunakn connected interface
Konfigurasi OSPF di AS 200
R2(config)#router ospf 1
R2(config-router)#net 23.23.23.0 0.0.0.255 area 0
R2(config-router)#net 20.1.1.0 0.0.0.255 area 0
R2(config-router)#net 12.0.0.0 0.0.0.255 area 0

R3(config)#router ospf 1
R3(config-router)#net 23.23.23.0 0.0.0.255 area 0
R3(config-router)#net 34.34.34.0 0.0.0.255 area 0
R3(config-router)#net 30.1.1.0 0.0.0.255 area 0
R3(config-router)#net 13.0.0.0 0.0.0.255 area 0

R4(config)#router ospf 1
R4(config-router)#net 34.34.34.0 0.0.0.255 area 0
R4(config-router)#net 40.1.1.0 0.0.0.255 area 0
R4(config-router)#net 14.0.0.0 0.0.0.255 area 0

Konfigurasi BGP
R1 (AS 100)
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 200
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 41.41.41.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#net 11.0.0.0 mask 255.255.255.0
R1(config-router)#net 11.0.1.0 mask 255.255.255.0
R1(config-router)#net 11.0.2.0 mask 255.255.255.0
R1(config-router)#net 11.0.3.0 mask 255.255.255.0
R2 (AS 200)
R2(config)#router bgp 200
R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 13.0.0.1 remote-as 200
R2(config-router)#neigh 13.0.0.1 update-source Loop1
R2(config-router)#neigh 14.0.0.1 remote-as 200
R2(config-router)#neigh 14.0.0.1 update-source Loop1
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 20.1.1.0 mask 255.255.255.0

118
R3 (AS 200)
R3(config)#router bgp 200
R3(config-router)#neigh 12.0.0.1 remote-as 200
R3(config-router)#neigh 12.0.0.1 update-source loop1
R3(config-router)#neigh 14.0.0.1 remote-as 200
R3(config-router)#neigh 14.0.0.1 update-source loop1
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R4 (AS200)
R4(config)#router bgp 200
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#neigh 13.0.0.1 remote-as 200
R4(config-router)#neigh 13.0.0.1 update-source loop1
R4(config-router)#neigh 12.0.0.1 remote-as 200
R4(config-router)#neigh 12.0.0.1 update-source loop1
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0

Verifikasi
R4#sh ip bgp summ
BGP router identifier 14.0.3.1, local AS number 200
BGP table version is 14, main routing table version 14

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.0.0.1 4 200 14 14 14 0 0 00:07:05 5
13.0.0.1 4 200 12 14 14 0 0 00:07:29 3
41.41.41.1 4 100 21 20 14 0 0 00:13:43 4

R2#sh ip bgp summ


BGP router identifier 172.16.6.1, local AS number 200
BGP table version is 16, main routing table version 16

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 86 86 16 0 0 01:18:39 4
13.0.0.1 4 200 13 15 16 0 0 00:08:47 3
14.0.0.1 4 200 15 15 16 0 0 00:08:01 5

119
Task :
Configure R1 to tag 11.0.0.0/24 and 11.0.1.0/24 (loop0 & loop1) interfaces with
community tag 100:10
Configure R1 to tag 11.0.2.0/24 and 11.0.3.0/24 (loop2 & loop3) interfaces with
community tag 100:20
Ensure that R1 should advertise loopbacks to both EBGP neighbor with their
respective community

R1(config)#access-list 11 permit 11.0.0.0 0.0.0.255


R1(config)#access-list 11 permit 11.0.1.0 0.0.0.255
R1(config)#
R1(config)#access-list 22 permit 11.0.2.0 0.0.0.255
R1(config)#access-list 22 permit 11.0.3.0 0.0.0.255
R1(config)#
R1(config)#route-map CCIEIDN permit 10
R1(config-route-map)#match ip add 11
R1(config-route-map)#set community 100:10
R1(config-route-map)#exit
R1(config)#route-map CCIEIDN permit 20
R1(config-route-map)#match ip add 22
R1(config-route-map)#set community 100:20
R1(config-route-map)#exit
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 route-map CCIEIDN out
R1(config-router)#neigh 12.12.12.2 send-community
R1(config-router)#
R1(config-router)#neigh 41.41.41.4 route-map CCIEIDN out
R1(config-router)#neigh 41.41.41.4 send-community
Verifikasi
R2#clear ip bgp * soft
R2#sh ip bgp 11.0.0.0/24
BGP routing table entry for 11.0.0.0/24, version 29
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x880
Advertised to update-groups:
2
100
41.41.41.1 (metric 129) from 14.0.0.1 (14.0.3.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 6553610

120
Di Software cisco IOS versi Release 12.0 dan sebelumnya, kita bisa mengkonfigurasi
community dalam 3 format, yaitu format decimal, hexadecimal, dan AA:NN
Set community 30:20
Set community 0x1E0014
Set community 1966100
Secara default, IOS menggunakan format lama yaitu Decimal. Agar format yang
digunakan/ditampilakn menjadi AA:NN (dimana AA= AS Number NN=2byteNumber) maka
kita harus menjalankan command ip bgp-community new-format di mode global
konfigurasi

R2(config)#ip bgp-community new-format


R2(config)#end

R2#sh ip bgp 11.0.0.0/24


BGP routing table entry for 11.0.0.0/24, version 29
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x880
Advertised to update-groups:
2
100
41.41.41.1 (metric 129) from 14.0.0.1 (14.0.3.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:10

R2#sh ip bgp 11.0.2.0/24


BGP routing table entry for 11.0.2.0/24, version 27
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
100
41.41.41.1 (metric 129) from 14.0.0.1 (14.0.3.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:20

121
R4
R4(config)#ip bgp-community new-format
R4(config)#end
R4#sh ip bgp 11.0.0.0/24
BGP routing table entry for 11.0.0.0/24, version 27
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
100
12.12.12.1 (metric 129) from 12.0.0.1 (172.16.6.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:10

R4#sh ip bgp 11.0.3.0/24


BGP routing table entry for 11.0.3.0/24, version 24
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
100
12.12.12.1 (metric 129) from 12.0.0.1 (172.16.6.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
41.41.41.1 from 41.41.41.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:20

122
Task :
Configure AS 200 to ensure that routes with :
Community tag 100:10 uses R2 as default exit-path
Community tag 100:20 uses R4 as default exit-path
Use Local Preference Attribute

R2(config)#ip community-list 10 permit 100:10

R2(config)#route-map CCIER2 permit 10


R2(config-route-map)#match community 10
R2(config-route-map)#set local-pref 200
R2(config-route-map)#exit
R2(config)#route-map CCIER2 permit 20
R2(config-route-map)#exit
R2(config)#router bgp 200
R2(config-router)#neigh 12.12.12.1 route-map CCIER2 in
R2(config-router)#end

R2#clear ip bgp * soft


Verifikasi
R2#sh ip bgp
BGP table version is 31, local router ID is 172.16.6.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


*> 11.0.0.0/24 12.12.12.1 0 200 0 100 i
*> 11.0.1.0/24 12.12.12.1 0 200 0 100 i
* i11.0.2.0/24 41.41.41.1 0 100 0 100 i
*> 12.12.12.1 0 0 100 i
* i11.0.3.0/24 41.41.41.1 0 100 0 100 i
*> 12.12.12.1 0 0 100 i
*> 12.12.12.0/24 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* i23.23.23.0/24 13.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
r>i30.1.1.0/24 13.0.0.1 0 100 0 i
r i34.34.34.0/24 14.0.0.1 0 100 0 i
r>i 13.0.0.1 0 100 0 i
r>i40.1.1.0/24 14.0.0.1 0 100 0 i
*>i41.41.41.0/24 14.0.0.1 0 100 0 i

123
R2#sh ip bgp 11.0.1.0/24
BGP routing table entry for 11.0.1.0/24, version 30
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
2
100
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 200, valid, external, best
Community: 100:10

R2#sh ip bgp 11.0.2.0/24


BGP routing table entry for 11.0.2.0/24, version 27
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
100
41.41.41.1 (metric 129) from 14.0.0.1 (14.0.3.1)
Origin IGP, metric 0, localpref 100, valid, internal
100
12.12.12.1 from 12.12.12.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 100:20
R3
R3#sh ip bgp
BGP table version is 23, local router ID is 13.0.0.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
*>i11.0.0.0/24 12.12.12.1 0 200 0 100 i
*>i11.0.1.0/24 12.12.12.1 0 200 0 100 i
*>i11.0.2.0/24 41.41.41.1 0 100 0 100 i
*i 12.12.12.1 0 100 0 100 i
*>i11.0.3.0/24 41.41.41.1 0 100 0 100 i
*i 12.12.12.1 0 100 0 100 i
*>i12.12.12.0/24 12.0.0.1 0 100 0 i
r>i20.1.1.0/24 12.0.0.1 0 100 0 i
* i23.23.23.0/24 12.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* i34.34.34.0/24 14.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
r>i40.1.1.0/24 14.0.0.1 0 100 0 i
*>i41.41.41.0/24 14.0.0.1 0 100 0 i

124
Konfig R4
R4(config)#ip community-list standard CCIER4 permit 100:20

R4(config)#route-map CCIER4 permit 10


R4(config-route-map)#match community CCIER4
R4(config-route-map)#set local-pref 250
R4(config-route-map)#exit

R4(config)#router bgp 200


R4(config-router)#neigh 41.41.41.1 route-map CCIER4 in
R4(config-router)#end

R4#sh ip bgp
BGP table version is 31, local router ID is 14.0.3.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


*>i11.0.0.0/24 12.12.12.1 0 200 0 100 i
*>i11.0.1.0/24 12.12.12.1 0 200 0 100 i
*> 11.0.2.0/24 41.41.41.1 0 250 0 100 i
*> 11.0.3.0/24 41.41.41.1 0 250 0 100 i
*>i12.12.12.0/24 12.0.0.1 0 100 0 i
r>i20.1.1.0/24 12.0.0.1 0 100 0 i
r i23.23.23.0/24 12.0.0.1 0 100 0 i
r>i 13.0.0.1 0 100 0 i
r>i30.1.1.0/24 13.0.0.1 0 100 0 i
* i34.34.34.0/24 13.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i

R4#traceroute 11.0.0.1
Type escape sequence to abort.
Tracing the route to 11.0.0.1
1 34.34.34.3 0 msec 0 msec 16 msec
2 23.23.23.2 0 msec 0 msec 0 msec
3 12.12.12.1 0 msec 12 msec 0 msec

R4#traceroute 11.0.2.1
Type escape sequence to abort.
Tracing the route to 11.0.2.1
1 41.41.41.1 4 msec 0 msec 0 msec

125
R3#sh ip bgp
BGP table version is 25, local router ID is 13.0.0.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


*>i11.0.0.0/24 12.12.12.1 0 200 0 100 i
*>i11.0.1.0/24 12.12.12.1 0 200 0 100 i
*>i11.0.2.0/24 41.41.41.1 0 250 0 100 i
*>i11.0.3.0/24 41.41.41.1 0 250 0 100 i
*>i12.12.12.0/24 12.0.0.1 0 100 0 i
r>i20.1.1.0/24 12.0.0.1 0 100 0 i
* i23.23.23.0/24 12.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* i34.34.34.0/24 14.0.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
r>i40.1.1.0/24 14.0.0.1 0 100 0 i
*>i41.41.41.0/24 14.0.0.1 0 100 0 i

R3#traceroute 11.0.0.1
Type escape sequence to abort.
Tracing the route to 11.0.0.1
1 23.23.23.2 16 msec 0 msec 0 msec
2 12.12.12.1 0 msec 0 msec 0 msec

R3#traceroute 11.0.2.1
Type escape sequence to abort.
Tracing the route to 11.0.2.1
1 34.34.34.4 0 msec 0 msec 0 msec
2 41.41.41.1 0 msec 0 msec 16 msec

126
BGP Advance Options
BGP Confederations
Route-reflector Cluster
BGP Dampeing
Remove-Private-AS

BGP Confederations
Seperti yang sudah diketahui IBGP membutuhkan full mesh peering antar router-router
dalam AS tersebut. Contohnya bila dalam satu IBGP terdapat 10 router, maka router2
tersebut harus dikonfigurasi neighbor ke semua router dalam AS tersebut.

Gambar diatas memperlihatkan 6 router yang menjalankan IBGP


Rumus menghitung jumlah peer :
N(N-1)/2
Dalam topologi diatas jadi :
6*(6-1=5)/2 = 15 Peering
Ada 2 cara untuk mengurangi jumlah peer :
Route Reflector
Confederations
Sekarang kita akan membahas Confederations
BGP Confederation membagi satu AS kedalam sub-sub AS untuk menurunkan jumlah
peering. Antar sub-AS kita tetap membutuhkan full-mesh IBGP seperti ebgp

127
LAB 23 : BGP Confederation
Topologi

Task :
Konfigurasi BGP peering menggunakan confederations
R1 di AS 100 peering dengan R2/R4 (EBGP) menggunakan AS utama yaitu AS 200
AS 200 selanjutnya akan dibagi menjadi 2 sub AS yaitu 2300 dan 4000 (lihat topologi)

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 41.41.41.4 remote-as 200
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 41.41.41.0 mask 255.255.255.0
R1(config-router)#end

R2(config)#router bgp 2300


R2(config-router)#bgp confederation identifier 200
R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 2300
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
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

128
R3(config)#router bgp 2300
R3(config-router)#bgp confederation identifier 200
R3(config-router)#bgp confederation peers 4000
R3(config-router)#neigh 23.23.23.2 remote-as 2300
R3(config-router)#neigh 34.34.34.4 remote-as 4000
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 34.34.34.0 mask 255.255.255.0
R3(config-router)#end

R4(config)#router bgp 4000


R4(config-router)#bgp confederation identifier 200
R4(config-router)#bgp confederation peers 2300
R4(config-router)#neigh 34.34.34.3 remote-as 2300
R4(config-router)#neigh 41.41.41.1 remote-as 100
R4(config-router)#net 40.1.1.0 mask 255.255.255.0
R4(config-router)#net 34.34.34.0 mask 255.255.255.0
R4(config-router)#net 41.41.41.0 mask 255.255.255.0
R4(config-router)#end

Verifikasi
R1#sh ip bgp summ
BGP router identifier 11.0.3.1, local AS number 100
BGP table version is 9, main routing table version 9

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 200 44 45 9 0 0 00:36:03 7
41.41.41.4 4 200 37 38 9 0 0 00:30:14 7

R3#sh ip bgp summ


BGP router identifier 13.0.0.1, local AS number 2300
BGP table version is 18, main routing table version 18

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


23.23.23.2 4 2300 40 44 18 0 0 00:33:36 4
34.34.34.4 4 4000 38 39 18 0 0 00:31:22 4

129
R3#sh ip bgp
BGP table version is 18, local router ID is 13.0.0.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


*> 10.1.1.0/24 41.41.41.1 0 100 0 (4000) 100 i
*i 12.12.12.1 0 100 0 100 i
*>i12.12.12.0/24 23.23.23.2 0 100 0 i
*>i20.1.1.0/24 23.23.23.2 0 100 0 i
*> 23.23.23.0/24 0.0.0.0 0 32768 i
*i 23.23.23.2 0 100 0 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
* 34.34.34.0/24 34.34.34.4 0 100 0 (4000) i
*> 0.0.0.0 0 32768 i
*> 40.1.1.0/24 34.34.34.4 0 100 0 (4000) i
*> 41.41.41.0/24 34.34.34.4 0 100 0 (4000) i

R1#sh ip bgp
BGP table version is 9, local router ID is 11.0.3.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 41.41.41.4 0 200 i
* 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
* 20.1.1.0/24 41.41.41.4 0 200 i
*> 12.12.12.2 0 0 200 i
* 23.23.23.0/24 41.41.41.4 0 200 i
*> 12.12.12.2 0 0 200 i
* 30.1.1.0/24 41.41.41.4 0 200 i
*> 12.12.12.2 0 200 i
* 34.34.34.0/24 41.41.41.4 0 0 200 i
*> 12.12.12.2 0 200 i
* 40.1.1.0/24 12.12.12.2 0 200 i
*> 41.41.41.4 0 0 200 i
* 41.41.41.0/24 12.12.12.2 0 200 i
* 41.41.41.4 0 0 200 i
*> 0.0.0.0 0 32768 i

130
R4#sh ip bgp
BGP table version is 14, local router ID is 14.0.3.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


*> 10.1.1.0/24 41.41.41.1 0 0 100 i
*> 12.12.12.0/24 23.23.23.2 0 100 0 (2300) i
* 41.41.41.1 0 0 100 i
*> 20.1.1.0/24 23.23.23.2 0 100 0 (2300) i
*> 23.23.23.0/24 34.34.34.3 0 100 0 (2300) i
*> 30.1.1.0/24 34.34.34.3 0 100 0 (2300) i
*> 34.34.34.0/24 0.0.0.0 0 32768 i
* 34.34.34.3 0 100 0 (2300) i
*> 40.1.1.0/24 0.0.0.0 0 32768 i
*> 41.41.41.0/24 0.0.0.0 0 32768 i
* 41.41.41.1 0 0 100 i

R1#sh ip route bgp


34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [20/0] via 12.12.12.2, 00:38:23
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [20/0] via 12.12.12.2, 00:42:26
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [20/0] via 12.12.12.2, 00:41:56
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [20/0] via 41.41.41.4, 00:36:50
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [20/0] via 12.12.12.2, 00:38:54

R2#sh ip route bgp


34.0.0.0/24 is subnetted, 1 subnets
B 34.34.34.0 [200/0] via 23.23.23.3, 00:39:57
40.0.0.0/24 is subnetted, 1 subnets
B 40.1.1.0 [200/0] via 34.34.34.4, 00:38:16
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 12.12.12.1, 00:44:03
41.0.0.0/24 is subnetted, 1 subnets
B 41.41.41.0 [200/0] via 34.34.34.4, 00:38:16
30.0.0.0/24 is subnetted, 1 subnets
B 30.1.1.0 [200/0] via 23.23.23.3, 00:40:19

131
Task : Verify BGP Local-AS Community Attribute
Konfigurasi R1 agar mengadvertise network 10.1.1.0 ke router2 di sub-AS 2300 dan
tidak mengadvertise network tersebut ke Sub-AS lainnya (AS 4000
Shutdown link antara R1 ke R4 untuk memverfikasi (untuk memastikan bahwa
network 10.1.1.0 tidak datang dari R1-R4 dan juga lewat AS 2300)

R1(config)#int s0/1
R1(config-if)#shutdown

R1(config-if)#access-list 11 permit 10.1.1.0 0.0.0.255


R1(config)#route-map LOCAL permit 10
R1(config-route-map)#match ip add 11
R1(config-route-map)#set community local-AS
R1(config-route-map)#exit

R1(config)#route-map LOCAL permit 20


R1(config-route-map)#exit

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 route-map LOCAL out
R1(config-router)#neigh 12.12.12.2 send-community
R1(config-router)#end

R2#sh ip bgp 10.1.1.0


BGP routing table entry for 10.1.1.0/24, version 14
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS)
Flag: 0x880
Advertised to update-groups:
2
100
12.12.12.1 from 12.12.12.1 (11.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: local-AS

Konfigurasi agar R3 masuk kedalam community Local-AS


R2(config)#router bgp 2300
R2(config-router)#neigh 23.23.23.3 send-community

Setelah itu verifikasi di R3 pastikan terdapat rute ke network 10.1.1.0 dan communitynya
adalah Local AS, dan pastikan R4 tidak memiliki rute ke network 10.1.1.0

132
LAB 24 : Route Reflector Clusters
Route Reflector Clusters
Group RR yang bersifat redundant dan client2 nya
Masing2 Cluster harus mempunyai Cluster ID yang unik/berbeda
Setiap kali rute ter-refleksi, Cluster ID ditambahkan ke Cluster-list dalam BGP
attribute
Rute yang sudah mempunyai Cluster ID local di cluster-list maka tidak akan di
refleksikan
Originator ID
Mekanisme route reflector yang berfungsi untuk mencegah Loop
Setiap kali rute direfleksikan, Router-ID dari IBGP router akan dimasukan kedalam
Originator ID attribute BGP
Router yang menerima Rute IBGP dengan Originator-ID yang sudah diset ke router-id
maka rute tersebut akan ditolak
Route Reflector Rules
Route Reflector rules, membagi transit AS menjadi area2 lebih kecil (disebut cluster)
Masing2 cluster mempunyai route reflector server dan client
Router yang tidak support fungsi route reflector akan bertindak sebagai route
reflector client
IBGP Sessions Rule
Semua client dalam suatu Cluster harus membangun sesi IBGP dengan semua rute
reflector di cluster tersbut
Dibutuhkan IBGP Full mesh antar semua route reflector dalam AS tersbut

133
LAB : Route Reflector Cluster

Task :
Konfigurasi EIGRP 100 pada semua router
R1(config)#router eigrp 100 R2(config)#router eigrp 100 R3(config)#router eigrp 100
R1(config-router)#no auto R2(config-router)#no auto R3(config-router)#no auto
R1(config-router)#net 12.12.12.0 R2(config-router)#net 12.12.12.0 R3(config-router)#net 23.23.23.0
R1(config-router)#net 41.41.41.0 R2(config-router)#net 23.23.23.0 R3(config-router)#net 34.34.34.0
R1(config-router)#net 172.16.15.0 R2(config-router)#net 20.1.1.0 R3(config-router)#net 172.16.36.0
R1(config-router)#net 10.1.1.0 R2(config-router)#net 12.0.0.0 R3(config-router)#net 30.1.1.0
R1(config-router)#net 11.0.0.0 R3(config-router)#net 13.0.0.0
R4(config)#router eigrp 100 R5(config)#router eigrp 100 R6(config)#router eigrp 100
R4(config-router)#no auto R5(config-router)#no auto R6(config-router)#no auto
R4(config-router)#net 34.34.34.0 R5(config-router)#net 172.16.15.0 R6(config-router)#net 172.16.36.0
R4(config-router)#net 41.41.41.0 R5(config-router)#net 50.1.1.0 R6(config-router)#net 60.1.1.0
R4(config-router)#net 40.1.1.0 R5(config-router)#net 15.0.0.0 R6(config-router)#net 16.0.0.0
R4(config-router)#net 14.0.0.0

134
Verifikasi
R1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
2 172.16.15.5 Fa0/0 10 00:10:47 38 228 0 5
1 41.41.41.4 Se0/1 12 00:12:39 28 200 0 36
0 12.12.12.2 Se0/0 13 00:14:15 24 200 0 42

R1#sh ip route eigrp


34.0.0.0/24 is subnetted, 1 subnets
D 34.34.34.0 [90/2681856] via 41.41.41.4, 00:13:24, Serial0/1
16.0.0.0/24 is subnetted, 1 subnets
D 16.0.0.0 [90/2835456] via 41.41.41.4, 00:08:39, Serial0/1
[90/2835456] via 12.12.12.2, 00:08:39, Serial0/0
20.0.0.0/24 is subnetted, 1 subnets
D 20.1.1.0 [90/2195456] via 12.12.12.2, 00:14:44, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
D 23.23.23.0 [90/2681856] via 12.12.12.2, 00:13:24, Serial0/0
172.16.0.0/24 is subnetted, 2 subnets
D 172.16.36.0 [90/2707456] via 41.41.41.4, 00:09:45, Serial0/1
[90/2707456] via 12.12.12.2, 00:09:45, Serial0/0
40.0.0.0/24 is subnetted, 1 subnets
D 40.1.1.0 [90/2195456] via 41.41.41.4, 00:13:16, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
D 12.0.0.0 [90/2297856] via 12.12.12.2, 00:15:00, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
D 13.0.0.0 [90/2809856] via 41.41.41.4, 00:04:29, Serial0/1
[90/2809856] via 12.12.12.2, 00:04:29, Serial0/0
14.0.0.0/24 is subnetted, 1 subnets
D 14.0.0.0 [90/2297856] via 41.41.41.4, 00:13:17, Serial0/1
60.0.0.0/24 is subnetted, 1 subnets
D 60.1.1.0 [90/2733056] via 41.41.41.4, 00:08:10, Serial0/1
[90/2733056] via 12.12.12.2, 00:08:10, Serial0/0
30.0.0.0/24 is subnetted, 1 subnets
D 30.1.1.0 [90/2707456] via 41.41.41.4, 00:09:24, Serial0/1
[90/2707456] via 12.12.12.2, 00:09:24, Serial0/0
15.0.0.0/24 is subnetted, 1 subnets
D 15.0.0.0 [90/409600] via 172.16.15.5, 00:11:33, FastEthernet0/0

135
R3#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
2 172.16.36.6 Fa0/0 10 00:11:25 34 204 0 6
1 34.34.34.4 Se0/0 10 00:15:57 25 200 0 37
0 23.23.23.2 Se0/1 11 00:16:50 43 258 0 41

R3#sh ip route eigrp


16.0.0.0/24 is subnetted, 1 subnets
D 16.0.0.0 [90/409600] via 172.16.36.6, 00:11:45, FastEthernet0/0
20.0.0.0/24 is subnetted, 1 subnets
D 20.1.1.0 [90/2195456] via 23.23.23.2, 00:17:27, Serial0/1
172.16.0.0/24 is subnetted, 2 subnets
D 172.16.15.0 [90/2707456] via 34.34.34.4, 00:15:02, Serial0/0
[90/2707456] via 23.23.23.2, 00:15:02, Serial0/1
40.0.0.0/24 is subnetted, 1 subnets
D 40.1.1.0 [90/2195456] via 34.34.34.4, 00:16:22, Serial0/0
41.0.0.0/24 is subnetted, 1 subnets
D 41.41.41.0 [90/2681856] via 34.34.34.4, 00:16:30, Serial0/0
11.0.0.0/24 is subnetted, 1 subnets
D 11.0.0.0 [90/2809856] via 34.34.34.4, 00:16:31, Serial0/0
[90/2809856] via 23.23.23.2, 00:16:31, Serial0/1
12.0.0.0/24 is subnetted, 2 subnets
D 12.12.12.0 [90/2681856] via 23.23.23.2, 00:16:31, Serial0/1
D 12.0.0.0 [90/2297856] via 23.23.23.2, 00:17:29, Serial0/1
14.0.0.0/24 is subnetted, 1 subnets
D 14.0.0.0 [90/2297856] via 34.34.34.4, 00:16:22, Serial0/0
60.0.0.0/24 is subnetted, 1 subnets
D 60.1.1.0 [90/307200] via 172.16.36.6, 00:11:16, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
D 15.0.0.0 [90/2835456] via 34.34.34.4, 00:14:39, Serial0/0
[90/2835456] via 23.23.23.2, 00:14:39, Serial0/1

136
Task : Konfigurasi IBGP Peering di AS 500
IBGP peering menggunakan interface loopback
R1 harus dikonfigurasi Sebagai RR server untuk client R4 dan R5
R3 sebagai RR server untuk client R6 dan R2
IBGP peering harus ditetapkan hanya antara R1 dan R3 untuk bertukar informasi BGP
antar Cluster
BGP router-id menggunakn interface loopback 0 ( 1x.0.0.0 , x = nomer router)
Advertise hanya interface LAN pada routing BGP untuk memverifikasi

Cluster 1
R1(config)#router bgp 500
R1(config-router)#bgp router-id 11.0.0.1
R1(config-router)#neigh 14.0.0.1 remote-as 500
R1(config-router)#neigh 14.0.0.1 update-source loop 0
R1(config-router)#neigh 14.0.0.1 route-reflector-client
R1(config-router)#neigh 15.0.0.1 remote-as 500
R1(config-router)#neigh 15.0.0.1 update-source loop 0
R1(config-router)#neigh 15.0.0.1 route-reflector-client
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R4(config)#router bgp 500 R5(config)#router bgp 500


R4(config-router)#bgp router-id 14.0.0.1 R5(config-router)#bgp router-id 15.0.0.1
R4(config-router)#neigh 11.0.0.1 remote-as 500 R5(config-router)#neigh 11.0.0.1 remote-as 500
R4(config-router)#neigh 11.0.0.1 update-source loop 0 R5(config-router)#neigh 11.0.0.1 update-source loop 0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0 R5(config-router)#net 50.1.1.0 mask 255.255.255.0

R1#sh ip bgp summ


BGP router identifier 11.0.0.1, local AS number 500
BGP table version is 6, main routing table version 6
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
14.0.0.1 4 500 10 12 6 0 0 00:06:46 1
15.0.0.1 4 500 10 12 6 0 0 00:05:04 1

R1#sh ip bgp
BGP table version is 6, local router ID is 11.0.0.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
r>i40.1.1.0/24 14.0.0.1 0 100 0 i
r>i50.1.1.0/24 15.0.0.1 0 100 0 i

137
Cluster 2
R3(config)#router bgp 500
R3(config-router)#bgp router-id 13.0.0.1
R3(config-router)#neigh 12.0.0.1 remote-as 500
R3(config-router)#neigh 12.0.0.1 update-source loop 0
R3(config-router)#neigh 12.0.0.1 route-reflector-client
R3(config-router)#neigh 16.0.0.1 remote-as 500
R3(config-router)#neigh 16.0.0.1 update-source loop 0
R3(config-router)#neigh 16.0.0.1 route-reflector-client
R3(config-router)#net 30.1.1.0 mask 255.255.255.0

R2(config)#router bgp 500


R2(config-router)#bgp router-id 12.0.0.1
R2(config-router)#neigh 13.0.0.1 remote-as 500
R2(config-router)#neigh 13.0.0.1 update-source loop 0
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R2(config-router)#

R6(config)#router bgp 500


R6(config-router)#bgp router-id 16.0.0.1
R6(config-router)#neigh 13.0.0.1 remote-as 500
R6(config-router)#neigh 13.0.0.1 update-source loop 0
R6(config-router)#net 60.1.1.0 mask 255.255.255.0

R3#sh ip bgp summ


BGP router identifier 13.0.0.1, local AS number 500
BGP table version is 6, main routing table version 6

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.0.0.1 4 500 5 7 6 0 0 00:01:11 1
16.0.0.1 4 500 5 7 6 0 0 00:00:18 1

R3#sh ip bgp
BGP table version is 6, local router ID is 13.0.0.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>i20.1.1.0/24 12.0.0.1 0 100 0 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
r>i60.1.1.0/24 16.0.0.1 0 100 0 i

138
R3#sh ip bgp 60.1.1.0
BGP routing table entry for 60.1.1.0/24, version 6
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Advertised to update-groups:
1
Local, (Received from a RR-client)
16.0.0.1 (metric 409600) from 16.0.0.1 (16.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best

R2#sh ip bgp 60.1.1.0


BGP routing table entry for 60.1.1.0/24, version 6
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Flag: 0x820
Not advertised to any peer
Local
16.0.0.1 (metric 2323456) from 13.0.0.1 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 16.0.0.1, Cluster list: 13.0.0.1

R3(config)#router bgp 500


R3(config-router)#neigh 11.0.0.1 remote-as 500
R3(config-router)#neigh 11.0.0.1 update-source loop 0
R3(config-router)#neigh 11.0.0.1 route-reflector-client
R3(config-router)#ex

R1(config)#router bgp 500


R1(config-router)#neigh 13.0.0.1 remote-as 500
R1(config-router)#neigh 13.0.0.1 update-source loop 0
R1(config-router)#neigh 13.0.0.1 route-reflector-client
R1(config-router)#ex

R1#sh ip bgp
BGP table version is 13, local router ID is 11.0.0.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
r>i20.1.1.0/24 12.0.0.1 0 100 0 i
r>i30.1.1.0/24 13.0.0.1 0 100 0 i
r>i40.1.1.0/24 14.0.0.1 0 100 0 i
r>i50.1.1.0/24 15.0.0.1 0 100 0 i
r>i60.1.1.0/24 16.0.0.1 0 100 0 i

139
R1#sh ip bgp 60.1.1.0
BGP routing table entry for 60.1.1.0/24, version 13
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Flag: 0x820
Advertised to update-groups:
1
Local, (Received from a RR-client)
16.0.0.1 (metric 2835456) from 13.0.0.1 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 16.0.0.1, Cluster list: 13.0.0.1

R5#sh ip bgp 60.1.1.0


BGP routing table entry for 60.1.1.0/24, version 9
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Flag: 0x820
Not advertised to any peer
Local
16.0.0.1 (metric 2861056) from 11.0.0.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 16.0.0.1, Cluster list: 11.0.0.1, 13.0.0.1
Task : Konfigurasi R3 untuk merubah Cluster ID menjadi 30.1.1.1
R3(config)#router bgp 500
R3(config-router)#bgp cluster-id 30.1.1.1
R3(config-router)#end

R2#sh ip bgp 60.1.1.0


BGP routing table entry for 60.1.1.0/24, version 16
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Flag: 0x800
Not advertised to any peer
Local
16.0.0.1 (metric 2323456) from 13.0.0.1 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 16.0.0.1, Cluster list: 30.1.1.1

R5#sh ip bgp 60.1.1.0


BGP routing table entry for 60.1.1.0/24, version 15
Paths: (1 available, best #1, table Default-IP-Routing-Table, RIB-failure(17))
Flag: 0x820
Not advertised to any peer
Local
16.0.0.1 (metric 2861056) from 11.0.0.1 (11.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 16.0.0.1, Cluster list: 11.0.0.1, 30.1.1.1

140
LAB 25 : BGP Route Dampening

141
LAB : Route Dampening

Task :
Konfigurasi IBGP dan EBGP peer sesuai dengan topologi menggunakan connected
interface
Advertise directly connected interface (f0/0 dan Loopback 0)

R1(config)#router bgp 100


R1(config-router)#neigh 12.12.12.2 remote-as 100
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#net 11.0.0.0 mask 255.255.255.0
R1(config-router)#

R2(config)#router bgp 100


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neighbor 12.12.12.1 next-hop-self
R2(config-router)#neigh 23.23.23.3 remote-as 200
R2(config-router)#net 20.1.1.0 mask 255.255.255.0
R2(config-router)#net 12.0.0.0 mask 255.255.255.0

R3(config)#router bgp 200


R3(config-router)#neigh 23.23.23.2 remote-as 100
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#net 13.0.0.0 mask 255.255.255.0
R3(config-router)#

142
R2#sh ip bgp summ
BGP router identifier 12.0.0.1, local AS number 100
BGP table version is 7, main routing table version 7

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 12 15 7 0 0 00:06:38 2
23.23.23.3 4 200 10 11 7 0 0 00:05:20 2

R2#sh ip bgp
BGP table version is 7, local router ID is 12.0.0.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
*>i11.0.0.0/24 12.12.12.1 0 100 0 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 13.0.0.0/24 23.23.23.3 0 0 200 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 200 i

Task : Konfigurasi BGP dampening di R2 untuk semua route yang dipelajari


R2(config)#router bgp 100
R2(config-router)#bgp dampening
R2(config-router)#end
R2#debug ip bgp dampening
BGP dampening debugging is on for address family: IPv4 Unicast
R2#
*Mar 1 00:15:50.451: BGP(0): Created dampening structures with halflife time 15, reuse/suppress
750/2000

R2#sh ip bgp dampening parameters


dampening 15 750 2000 60 (DEFAULT)
Half-life time : 15 mins Decay Time : 2320 secs
Max suppress penalty: 12000 Max suppress time: 60 mins
Suppress penalty : 2000 Reuse penalty : 750

143
R3(config)#int loop 0
R3(config-if)#shutdown
R3(config-if)#no shutdown

R2#sh ip bgp
BGP table version is 8, local router ID is 12.0.0.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
*>i11.0.0.0/24 12.12.12.1 0 100 0 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
h 13.0.0.0/24 23.23.23.3 0 0 200 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 200 i

Status History :
Setelah suatu rute menutup koneksi (mati) maka rute tersebut akan diassign penalty,
dan status dampening dari rute tersebut akan berubah menjadi history
Nilai default penalty adalah 1000
Setiap rute tersbut mati maka nilai penalty akan bertambah dan jika hidup mati akan
terus berkurang
R2#sh ip bgp 13.0.0.0
BGP routing table entry for 13.0.0.0/24, version 9
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
200
23.23.23.3 from 23.23.23.3 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Dampinfo: penalty 819, flapped 1 times in 00:04:19

R2#ping 13.0.0.1 source loopback 0

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 13.0.0.1, timeout is 2 seconds:
Packet sent with a source address of 12.0.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/7/16 ms

144
R3(config-if)#shutdown

R2#sh ip bgp
BGP table version is 12, local router ID is 12.0.0.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
*>i11.0.0.0/24 12.12.12.1 0 100 0 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*d 13.0.0.0/24 23.23.23.3 0 0 200 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 200 i

R1#sh ip bgp
BGP table version is 12, local router ID is 11.0.0.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 11.0.0.0/24 0.0.0.0 0 32768 i
*>i12.0.0.0/24 12.12.12.2 0 100 0 i
*>i20.1.1.0/24 12.12.12.2 0 100 0 i
*>i30.1.1.0/24 12.12.12.2 0 100 0 200 i

Bisa dilihat di R1 sudah tidak ada rute ke network 13.0.0.0, karena diR2 sudah berstatus
damped
R2#sh ip bgp dampening flap-statistics
BGP table version is 12, local router ID is 12.0.0.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 From Flaps Duration Reuse Path


*d 13.0.0.0/24 23.23.23.3 4 00:11:40 00:09:39 200

145
R2#sh ip bgp 13.0.0.0
BGP routing table entry for 13.0.0.0/24, version 12
Paths: (1 available, no best path)
Flag: 0x820
Not advertised to any peer
200, (suppressed due to dampening)
23.23.23.3 from 23.23.23.3 (13.0.0.1)
Origin IGP, metric 0, localpref 100, valid, external
Dampinfo: penalty 3186, flapped 4 times in 00:11:50, reuse in 00:09:29

Task : Konfigurasi R2 untuk mereset dampening statistik


R2#clear ip bgp dampening
Command ini berfungsi untuk membersihkan informasi rute yang terdamped dan me-
unsupress rute yang ter suppress

R2#sh ip bgp
BGP table version is 13, local router ID is 12.0.0.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


*>i10.1.1.0/24 12.12.12.1 0 100 0 i
*>i11.0.0.0/24 12.12.12.1 0 100 0 i
*> 12.0.0.0/24 0.0.0.0 0 32768 i
*> 13.0.0.0/24 23.23.23.3 0 0 200 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 200 i

Task :
Hapus konfigurasi bgp dampening untuk semua rute
Konfigurasi BGP dampening di R2 hanya untuk network 13.0.0.0/24 yang
dipelajarinya dari R3
Atur halftime 2 , max-supresstime 8 , sisanya biarkan default

R2(config)#router bgp 100


R2(config-router)#no bgp dampening

146
R2(config)#access-list 13 permit 13.0.0.0 0.0.0.255
R2(config)#
R2(config)#route-map CCIEIDN permit 10
R2(config-route-map)#match ip add 13
R2(config-route-map)#set dampening 2 ?
<1-20000> penalty to start reusing a route

R2(config-route-map)#set dampening 2 750 ?


<1-20000> penalty to start suppressing a route

R2(config-route-map)#set dampening 2 750 2000 ?


<1-255> Maximum duration to suppress a stable route

R2(config-route-map)#set dampening 2 750 2000 8


R2(config-route-map)#exit

R2(config)#route-map CCIEIDN permit 20


R2(config-route-map)#exit

R2(config)#router bgp 100


R2(config-router)#bgp dampening route-map CCIEIDN

R2#sh ip bgp dampening parameters


dampening 2 750 2000 8 (route-map CCIEIDN 10)
Half-life time : 2 mins Decay Time : 310 secs
Max suppress penalty: 12000 Max suppress time: 8 mins
Suppress penalty : 2000 Reuse penalty : 750

Untuk Verifikasi sama dengan sebelumnya, coba matikan link loopback dan nyalahkan lagi

147
LAB 26 : Removing Private AS
Range Private AS number adalah 64512 - 65535
Sama halnya dengan ip address private, AS private tidak bisa bersifat unik jadi siapa saja bisa
menggunakan Private AS yang sama.
Pada saat ISP akan memforward prefix yang didapatkan dari Private AS maka ISP akan
menghapus private AS tersebut sebelum diforward ke AS lainnya di internet.

Pada jaringan diatas Customer menggunakan Private AS (AS 64512) nah di ISP kita akan
mengkonfigurasi agar router ISP tidak mengadvertise nomer AS customer ke Luar internet.
Nah itu berarti prefix yang tampil di Internet seolah2 didapatkan langsung dari ISP

148
LAB : Remove Private-AS

AS 200

AS 300
Task : Konfigurasi EBGP sesuai dengan topologi, kemudian advertise connected interface
R1(config)#router bgp 65000
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0
R1(config-router)#exit

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 65000
R2(config-router)#neigh 23.23.23.3 remote-as 300
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 20.1.1.0 mask 255.255.255.0

R3(config)#router bgp 300


R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#

R2#sh ip bgp summ


BGP router identifier 12.0.0.1, local AS number 200
BGP table version is 6, main routing table version 6
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 65000 6 8 6 0 0 00:02:58 2
23.23.23.3 4 300 6 8 6 0 0 00:01:51 2

149
R2#sh ip bgp
BGP table version is 6, local router ID is 12.0.0.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


*> 10.1.1.0/24 12.12.12.1 0 0 65000 i
* 12.12.12.0/24 12.12.12.1 0 0 65000 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i

R3#sh ip bgp
BGP table version is 6, local router ID is 13.0.0.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


*> 10.1.1.0/24 23.23.23.2 0 200 65000 i
*> 12.12.12.0/24 23.23.23.2 0 0 200 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i

Task : Konfigurasi R2 agar menghapus Private AS (65000) pada saat diadvertise ke R3


R2(config)#router bgp 200
R2(config-router)#neigh 23.23.23.3 remove-private-as
R2(config-router)#end

R2#clear ip bgp * soft

150
Verifikasi
R3#sh ip bgp
BGP table version is 7, local router ID is 13.0.0.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


*> 10.1.1.0/24 23.23.23.2 0 200 i
*> 12.12.12.0/24 23.23.23.2 0 0 200 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
Terlihat rute menuju network 10.1.1.0 yang berada di R1 seolah2 berada pada R2

Task :
Konfigurasi EBGP peering antar R1-R4 sesuai dengan topologi
Advertise connected interface di R4

AS 200

AS 300

151
R1(config)#router bgp 65000
R1(config-router)#neigh 14.14.14.4 remote-as 400
R1(config-router)#

R4(config)#router bgp 400


R4(config-router)#neigh 14.14.14.1 remote-as 65000
R4(config-router)#net 14.14.14.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0
R4(config-router)#

R4#sh ip bgp summ


BGP router identifier 40.1.1.1, local AS number 400
BGP table version is 8, main routing table version 8

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


14.14.14.1 4 65000 13 10 8 0 0 00:05:47 5

R1#sh ip bgp
BGP table version is 9, local router ID is 12.12.12.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
r> 14.14.14.0/24 14.14.14.4 0 0 400 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 14.14.14.4 0 0 400 i

R2#sh ip bgp
BGP table version is 8, local router ID is 23.23.23.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


*> 10.1.1.0/24 12.12.12.1 0 0 65000 i
* 12.12.12.0/24 12.12.12.1 0 0 65000 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 12.12.12.1 0 65000 400 i

152
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
*> 40.1.1.0/24 12.12.12.1 0 65000 400 i

R3#sh ip bgp
BGP table version is 9, local router ID is 30.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


*> 10.1.1.0/24 23.23.23.2 0 200 i
*> 12.12.12.0/24 23.23.23.2 0 0 200 i
*> 14.14.14.0/24 23.23.23.2 0 200 65000 400 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
*> 40.1.1.0/24 23.23.23.2 0 200 65000 400 i

153
LAB 27 : BGP hide Local-Autonomous System
Fitur ini digunakan pada saat akan melakukan migrasi AS misalkan dari AS 100
menjad AS 200. Saat AS tersebut memiliki lebih dari satu link ke eBGP peering, maka
hal ini mungkin akan memakan waktu banyak pada saat bernegosiasi mengenai
perubahan AS ke tetangganya
Dalam kasus ini maka kita hapus mengkonfigurasi ulang agar router2 tetangganya
menggunakan AS yang baru tapi tetap mengadvertise AS yang lama
Bisa dilakukan dengan menjalankan command neighbor <IP> local-as <OldAS>
Topologi

Task : Konfigurasi EBGP dan advertise semua interface yang terkoneksi di masing2 Router
R1(config)#router bgp 100
R1(config-router)#neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 14.14.14.4 remote-as 400
R1(config-router)#net 14.14.14.0 mask 255.255.255.0
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 200


R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 300
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 20.1.1.0 mask 255.255.255.0

154
R3(config)#router bgp 300
R3(config-router)#neigh 23.23.23.2 remote-as 200
R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#end

R4(config)#router bgp 400


R4(config-router)#neigh 14.14.14.1 remote-as 100
R4(config-router)#net 14.14.14.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0
R4(config-router)#end

Verifikasi
R1#sh ip bgp summary
BGP router identifier 14.14.14.1, local AS number 100
BGP table version is 10, main routing table version 10

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 200 13 11 10 0 0 00:05:30 4
14.14.14.4 4 400 8 12 10 0 0 00:03:04 2

R3#sh ip bgp summary


BGP router identifier 30.1.1.1, local AS number 300
BGP table version is 8, main routing table version 8

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


23.23.23.2 4 200 13 9 8 0 0 00:04:54 6

R3#sh ip bgp
BGP table version is 8, local router ID is 30.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


*> 10.1.1.0/24 23.23.23.2 0 200 100 i
*> 12.12.12.0/24 23.23.23.2 0 0 200 i
*> 14.14.14.0/24 23.23.23.2 0 200 100 i
*> 20.1.1.0/24 23.23.23.2 0 0 200 i
* 23.23.23.0/24 23.23.23.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
*> 40.1.1.0/24 23.23.23.2 0 200 100 400 i

155
Task :
AS 200 is planning untuk berpindah menjadi AS 222, konfigurasi ulang R2 agar
menggunakan AS baru (AS 222)
Jangan ubah konfigurasi di router lainnya

R2#sh run | s bgp


router bgp 200
no synchronization
bgp log-neighbor-changes
network 12.12.12.0 mask 255.255.255.0
network 20.1.1.0 mask 255.255.255.0
network 23.23.23.0 mask 255.255.255.0
neighbor 12.12.12.1 remote-as 100
neighbor 23.23.23.3 remote-as 300
no auto-summary

R2(config)#no router bgp 200


R2(config)#router bgp 222
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 20.1.1.0 mask 255.255.255.0
R2(config-router)#neigh 12.12.12.1 remote-as 100
R2(config-router)#neigh 23.23.23.3 remote-as 300
R2(config-router)#end

R2#sh ip bgp summ


BGP router identifier 23.23.23.2, local AS number 222
BGP table version is 4, main routing table version 4

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 4 4 0 0 0 never Active
23.23.23.3 4 300 2 2 0 0 0 never Active

R2#
*Mar 1 01:26:09.067: %BGP-3-NOTIFICATION: received from neighbor 23.23.23.3 2/2 (peer in
wrong AS) 2 bytes 00DE
R2#
*Mar 1 01:26:22.011: %BGP-3-NOTIFICATION: received from neighbor 12.12.12.1 2/2 (peer in
wrong AS) 2 bytes 00DE

156
R2(config)#router bgp 222
R2(config-router)#neigh 12.12.12.1 local-as 200
R2(config-router)#neigh 23.23.23.3 local-as 200
R2(config-router)#end

*Mar 1 01:27:57.487: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up


R2#
*Mar 1 01:28:04.943: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up

R2#sh ip bgp summary


BGP router identifier 23.23.23.2, local AS number 222
BGP table version is 8, main routing table version 8

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 19 19 8 0 0 00:01:32 4
23.23.23.3 4 300 14 17 8 0 0 00:01:39 2

R1#sh ip bgp
BGP table version is 16, local router ID is 14.14.14.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 222 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 0.0.0.0 0 32768 i
* 14.14.14.4 0 0 400 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 222 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 222 i
*> 30.1.1.0/24 12.12.12.2 0 200 222 200 300 i
*> 40.1.1.0/24 14.14.14.4 0 0 400 i

R4#sh ip bgp
BGP table version is 14, local router ID is 40.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


*> 10.1.1.0/24 14.14.14.1 0 0 100 i
*> 12.12.12.0/24 14.14.14.1 0 0 100 i
* 14.14.14.0/24 14.14.14.1 0 0 100 i

157
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 14.14.14.1 0 100 200 222 i
*> 23.23.23.0/24 14.14.14.1 0 100 200 222 i
*> 30.1.1.0/24 14.14.14.1 0 100 200 222 200 300 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i

R2#sh ip bgp
BGP table version is 8, local router ID is 23.23.23.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


*> 10.1.1.0/24 12.12.12.1 0 0 200 100 i
* 12.12.12.0/24 12.12.12.1 0 0 200 100 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 12.12.12.1 0 0 200 100 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 200 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 200 300 i
*> 40.1.1.0/24 12.12.12.1 0 200 100 400 i

R2(config)#router bgp 222


R2(config-router)#neigh 12.12.12.1 local-as 200 no-prepend
R2(config-router)#neigh 23.23.23.3 local-as 200 no-prepend
R2(config-router)#end

R2#sh ip bgp
BGP table version is 16, local router ID is 23.23.23.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

158
*> 10.1.1.0/24 12.12.12.1 0 0 100 i
* 12.12.12.0/24 12.12.12.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 12.12.12.1 0 0 100 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
* 23.23.23.0/24 23.23.23.3 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 23.23.23.3 0 0 300 i
*> 40.1.1.0/24 12.12.12.1 0 100 400 i

R1#sh ip bgp
BGP table version is 22, local router ID is 14.14.14.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 222 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 0.0.0.0 0 32768 i
* 14.14.14.4 0 0 400 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 222 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 222 i
*> 30.1.1.0/24 12.12.12.2 0 200 222 300 i
*> 40.1.1.0/24 14.14.14.4 0 0 400 i

R4#sh ip bgp
BGP table version is 20, local router ID is 40.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


*> 10.1.1.0/24 14.14.14.1 0 0 100 i
*> 12.12.12.0/24 14.14.14.1 0 0 100 i
* 14.14.14.0/24 14.14.14.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 14.14.14.1 0 100 200 222 i
*> 23.23.23.0/24 14.14.14.1 0 100 200 222 i
*> 30.1.1.0/24 14.14.14.1 0 100 200 222 300 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i

159
R2(config)#router bgp 222
R2(config-router)#neigh 12.12.12.1 local-as 200 no-prepend replace-as
R2(config-router)#neigh 23.23.23.3 local-as 200 no-prepend replace-as

R1#sh ip bgp
BGP table version is 28, local router ID is 14.14.14.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


*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 12.12.12.0/24 12.12.12.2 0 0 200 i
*> 0.0.0.0 0 32768 i
*> 14.14.14.0/24 0.0.0.0 0 32768 i
* 14.14.14.4 0 0 400 i
*> 20.1.1.0/24 12.12.12.2 0 0 200 i
*> 23.23.23.0/24 12.12.12.2 0 0 200 i
*> 30.1.1.0/24 12.12.12.2 0 200 300 i
*> 40.1.1.0/24 14.14.14.4 0 0 400 i

R4#sh ip bgp
BGP table version is 26, local router ID is 40.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


*> 10.1.1.0/24 14.14.14.1 0 0 100 i
*> 12.12.12.0/24 14.14.14.1 0 0 100 i
* 14.14.14.0/24 14.14.14.1 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 14.14.14.1 0 100 200 i
*> 23.23.23.0/24 14.14.14.1 0 100 200 i
*> 30.1.1.0/24 14.14.14.1 0 100 200 300 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i

160
BGP Support for Dual AS configuration for network AS migrations
Memungkinkan pengguna untuk menggabungkan AS sekunder dibawah AS primer
tanpa mengganggu peering sessions
Memungkinkan router tersbut tetap terlihat di external peer sebagai anggota dari
secondary AS selama migrasi AS
Memungkinkan network operator untuk menggabungkan beberapa AS lalu setelah
itu memigrasikan pengguna(customers) ke konfigurasi yang baru tanpa mengganggu
sususan peers yang sudah ada

Task :
Konfigurasi Ulang R2 (AS222) untuk memastikan bahwa jika kita merubah konfigurasi
EBGP peer (R1 dan R3 ) dengan AS yang baru maka tidak meng-effect hubungan
ketetangaan antara R1 & R1/R3
R2(config)#router bgp 222
R2(config-router)#neigh 23.23.23.3 local-as 200 no-prepend replace-as dual-as
R2(config-router)#neigh 12.12.12.1 local-as 200 no-prepend replace-as dual-as

Konfigurasi EBGP sesi peering menggunakan AS yang asli ( AS 222)


R2#sh ip bgp summ
BGP router identifier 23.23.23.2, local AS number 222
BGP table version is 32, main routing table version 32

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 100 76 76 32 0 0 00:01:33 4
23.23.23.3 4 300 61 76 32 0 0 00:01:48 2

R1(config)#router bgp 100


R1(config-router)#no neigh 12.12.12.2 remote-as 200
R1(config-router)#neigh 12.12.12.2 remote-as 222

R1#sh ip bgp summ


BGP router identifier 14.14.14.1, local AS number 100
BGP table version is 41, main routing table version 41

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 222 9 9 41 0 0 00:00:42 3
14.14.14.4 4 400 56 77 41 0 0 00:51:07 2

161
R3(config)#router bgp 300
R3(config-router)#no neigh 23.23.23.2 remote-as 200
R3(config-router)#neigh 23.23.23.2 remote-as 222
R3(config-router)#end

R3#sh ip bgp summary


BGP router identifier 30.1.1.1, local AS number 300
BGP table version is 68, main routing table version 68

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


23.23.23.2 4 222 9 6 68 0 0 00:01:05 6

162
LAB 28 : BGP Allowas-in
Topologi

Konfigurasi BGP
R1(config)#router bgp 500
R1(config-router)#neigh 12.12.12.2 remote-as 500
R1(config-router)#neigh 14.14.14.4 remote-as 1000
R1(config-router)#net 12.12.12.0 mask 255.255.255.0
R1(config-router)#net 14.14.14.0 mask 255.255.255.0
R1(config-router)#net 10.1.1.0 mask 255.255.255.0

R2(config)#router bgp 500


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 20.1.1.0 mask 255.255.255.0
R2(config-router)#neigh 23.23.23.3 remote-as 1000
R2(config-router)#neigh 12.12.12.1 remote-as 500

R3(config)#router bgp 1000


R3(config-router)#net 23.23.23.0 mask 255.255.255.0
R3(config-router)#net 30.1.1.0 mask 255.255.255.0
R3(config-router)#neigh 23.23.23.2 remote-as 500

R4(config)#router bgp 1000


R4(config-router)#net 14.14.14.0 mask 255.255.255.0
R4(config-router)#net 40.1.1.0 mask 255.255.255.0
R4(config-router)#neigh 14.14.14.1 remote-as 500

163
Verifikasi
R1#sh ip bgp summ
BGP router identifier 14.14.14.1, local AS number 500
BGP table version is 8, main routing table version 8

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.2 4 500 14 13 8 0 0 00:08:18 4
14.14.14.4 4 1000 12 15 8 0 0 00:07:11 2

R2#sh ip bgp summary


BGP router identifier 23.23.23.2, local AS number 500
BGP table version is 8, main routing table version 8

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


12.12.12.1 4 500 14 15 8 0 0 00:09:41 4
23.23.23.3 4 1000 15 17 8 0 0 00:09:01 2

R3#sh ip bgp
BGP table version is 7, local router ID is 30.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


*> 10.1.1.0/24 23.23.23.2 0 500 i
*> 12.12.12.0/24 23.23.23.2 0 0 500 i
*> 14.14.14.0/24 23.23.23.2 0 500 i
*> 20.1.1.0/24 23.23.23.2 0 0 500 i
* 23.23.23.0/24 23.23.23.2 0 0 500 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i

Task :
Konfigurasi R3/R4 agar bertukar informasi rute antar mereka tanpa merubah AS
number (BGP allowas-in)
R3#sh ip bgp
BGP table version is 7, local router ID is 30.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


*> 10.1.1.0/24 23.23.23.2 0 500 i
*> 12.12.12.0/24 23.23.23.2 0 0 500 i

164
*> 14.14.14.0/24 23.23.23.2 0 500 i
*> 20.1.1.0/24 23.23.23.2 0 0 500 i
* 23.23.23.0/24 23.23.23.2 0 0 500 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i

R3(config)#router bgp 1000


R3(config-router)#neigh 23.23.23.2 allowas-in
R3(config-router)#end

R3#sh ip bgp
BGP table version is 8, local router ID is 30.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


*> 10.1.1.0/24 23.23.23.2 0 500 i
*> 12.12.12.0/24 23.23.23.2 0 0 500 i
*> 14.14.14.0/24 23.23.23.2 0 500 i
*> 20.1.1.0/24 23.23.23.2 0 0 500 i
* 23.23.23.0/24 23.23.23.2 0 0 500 i
*> 0.0.0.0 0 32768 i
*> 30.1.1.0/24 0.0.0.0 0 32768 i
*> 40.1.1.0/24 23.23.23.2 0 500 1000 i

R4#sh ip bgp
BGP table version is 7, local router ID is 40.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


*> 10.1.1.0/24 14.14.14.1 0 0 500 i
*> 12.12.12.0/24 14.14.14.1 0 0 500 i
* 14.14.14.0/24 14.14.14.1 0 0 500 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 14.14.14.1 0 500 i
*> 23.23.23.0/24 14.14.14.1 0 500 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i

165
R4(config)#router bgp 1000
R4(config-router)#neigh 14.14.14.1 allowas-in
R4(config-router)#end

R4#sh ip bgp
BGP table version is 8, local router ID is 40.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


*> 10.1.1.0/24 14.14.14.1 0 0 500 i
*> 12.12.12.0/24 14.14.14.1 0 0 500 i
* 14.14.14.0/24 14.14.14.1 0 0 500 i
*> 0.0.0.0 0 32768 i
*> 20.1.1.0/24 14.14.14.1 0 500 i
*> 23.23.23.0/24 14.14.14.1 0 500 i
*> 30.1.1.0/24 14.14.14.1 0 500 1000 i
*> 40.1.1.0/24 0.0.0.0 0 32768 i

R4#ping 30.1.1.1 source 40.1.1.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 40.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/12 ms

R4#traceroute 30.1.1.1 source 40.1.1.1


Type escape sequence to abort.
Tracing the route to 30.1.1.1
1 14.14.14.1 8 msec 0 msec 0 msec
2 12.12.12.2 [AS 500] 0 msec 0 msec 0 msec
3 23.23.23.3 [AS 500] 16 msec 0 msec 0 msec

166
IPV6 BGP
BGPv4 telah didesain untuk membawa informasi routing IPv4 saja.
Untuk support 2 atau lebih protokol network layer maka IETF memperkenalkan Multi
Protokol BGP (MP-BGP)
IPv6 BGP menempatkan informasi network layer kedalam attribute Network Layer
Reachable Information (NLRI) dan NEXT_HOP
Attribute NEXT_HOP BGP IPv6 diidentifikasikan dari IPV6 unicat address atau IPV6
local Link address

LAB 29 : Basic IPV6 IBGP and EBGP Configuration


Topologi

Task :
Lakukan pengalamatan IPV6 sesuai dengan topologi
Konfigurasi IBGP dan EBGP peer menggunakan connected interface
Advertise semua interface yang terkoneksi pada router2 tersbut

R1#sh ipv6 int br


FastEthernet0/0 [administratively down/down]
Serial0/0 [up/up]
FE80::C001:1FF:FE70:0
2001:12::1
FastEthernet0/1 [administratively down/down]
Serial0/1 [administratively down/down]
Loopback0 [up/up]
FE80::C001:1FF:FE70:0
2001::1

167
R2#sh ipv6 int br
FastEthernet0/0 [administratively down/down]
Serial0/0 [up/up]
FE80::C002:9FF:FE00:0
2001:12::2
FastEthernet0/1 [administratively down/down]
Serial0/1 [up/up]
FE80::C002:9FF:FE00:0
2001:23::2
Loopback0 [up/up]
FE80::C002:9FF:FE00:0
2001::2

R3#sh ipv6 int br


FastEthernet0/0 [administratively down/down]
Serial0/0 [administratively down/down]
FastEthernet0/1 [administratively down/down]
Serial0/1 [up/up]
FE80::C003:13FF:FEC8:0
2001:23::3
Loopback0 [up/up]
FE80::C003:13FF:FEC8:0
2001::3

Konfigurasi BGP
R1(config)#ipv6 unicast-routing
R1(config)#router bgp 500
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#no bgp default ipv4-unicast
R1(config-router)#neigh 2001:12::2 remote-as 500
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#neigh 2001:12::2 activate
R1(config-router-af)#network 2001:12::/64
R1(config-router-af)#network 2001::1/128
R1(config-router-af)#exit

168
R2(config)#ipv6 unicast-routing
R2(config)#router bgp 500
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#no bgp default ipv4-unicast
R2(config-router)#neigh 2001:12::1 remote-as 500
R2(config-router)#neigh 2001:23::3 remote-as 600
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)#neigh 2001:12::1 activate
R2(config-router-af)#neigh 2001:23::3 activate
R2(config-router-af)#net 2001::2/128
R2(config-router-af)#net 2001:12::/64
R2(config-router-af)#net 2001:23::/64
R2(config-router-af)#exit

R3(config)#ipv6 unicast-routing
R3(config)#router bgp 600
R3(config-router)#bgp router-id 3.3.3.3
R3(config-router)#no bgp default ipv4-unicast
R3(config-router)#neigh 2001:23::2 remote-as 500
R3(config-router)#address-family ipv6 unicast
R3(config-router-af)#neigh 2001:23::2 activate
R3(config-router-af)#net 2001::3/128
R3(config-router-af)#net 2001:23::/64
R3(config-router-af)#end

Pastikan sudah muncul log seperti berikut


R2#
*Mar 1 00:16:51.299: %BGP-5-ADJCHANGE: neighbor 2001:12::1 Up
R2#
*Mar 1 00:16:56.799: %BGP-5-ADJCHANGE: neighbor 2001:23::3 Up

Verifikasi
R2#sh ip bgp ipv6 unicast summary
BGP router identifier 2.2.2.2, local AS number 500
BGP table version is 6, main routing table version 6

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2001:12::1 4 500 9 10 6 0 0 00:05:13 2
2001:23::3 4 600 10 10 6 0 0 00:05:07 2

169
R2#sh ip bgp ipv6 unicast
BGP table version is 6, local router ID is 2.2.2.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


*>i2001::1/128 2001:12::1 0 100 0 i
*> 2001::2/128 :: 0 32768 i
*> 2001::3/128 2001:23::3 0 0 600 i
* i2001:12::/64 2001:12::1 0 100 0 i
*> :: 0 32768 i
* 2001:23::/64 2001:23::3 0 0 600 i
*> :: 0 32768 i

R1#sh ip bgp ipv6 unicast


BGP table version is 6, 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


*> 2001::1/128 :: 0 32768 i
*>i2001::2/128 2001:12::2 0 100 0 i
*>i2001::3/128 2001:23::3 0 100 0 600 i
* i2001:12::/64 2001:12::2 0 100 0 i
*> :: 0 32768 i
*>i2001:23::/64 2001:12::2 0 100 0 i
Task :
Konfigurasi R2 untuk merubah next-hop address menjadi addressnya sendiri pada
saat mengirim update ke router internal (R1)
R1#sh ip bgp ipv6 unicast
BGP table version is 6, 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


*> 2001::1/128 :: 0 32768 i
*>i2001::2/128 2001:12::2 0 100 0 i
*>i2001::3/128 2001:23::3 0 100 0 600 i
* i2001:12::/64 2001:12::2 0 100 0 i
*> :: 0 32768 i
*>i2001:23::/64 2001:12::2 0 100 0 i

170
R2(config)#router bgp 500
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)#neigh 2001:12::1 next-hop-self
R2(config-router-af)#end

R1#sh ip bgp ipv6 unicast


BGP table version is 7, 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


*> 2001::1/128 :: 0 32768 i
*>i2001::2/128 2001:12::2 0 100 0 i
*>i2001::3/128 2001:12::2 0 100 0 600 i
* i2001:12::/64 2001:12::2 0 100 0 i
*> :: 0 32768 i
*>i2001:23::/64 2001:12::2 0 100 0 i
R1#sh ipv6 route bgp
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
B 2001::2/128 [200/0]
via 2001:12::2
B 2001::3/128 [200/0]
via 2001:12::2
B 2001:23::/64 [200/0]
via 2001:12::2
R1#ping 2001::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/2/8 ms

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

171
LAB 30 : IPV6 IBGP & EBGP Advance Configuration
Topologi

Task :
Konfigurasi IPV6 sesuai dengan topologi
Konfigurasi RIPng sebagai protokol IGP dalam AS 500 untuk meyediakan NLRI antar
Loopback
Konfigurasi IBGP dengan ketentuan2 sebagai berikut :
o Jangan menggunakn full mesh tapi gunakan Route Reflector (R2 sebagai
Server dan R1/R3 sebagai client )
o Konfigurasi Autentikasi antar IBGP peer menggunakan password santriidn
o Gunakan Peer Group
Advertise semua interface yang terkoneksi dengan router kedalam BGP

Konfigurasi RIPng di R1/R2/R3


R1(config)#ipv6 unicast-routing R3(config)#ipv6 unicast-routing
R1(config)#ipv6 router rip CCIEIDN R3(config)#ipv6 router rip CCIEIDN
R1(config-rtr)#exit R3(config-rtr)#ex
R1(config)#int s0/0 R3(config)#int s0/1
R1(config-if)#ipv6 rip CCIEIDN enable R3(config-if)#ipv6 rip CCIEIDN enable
R1(config-if)#exit R3(config-if)#ex
R1(config)#int loop 0 R3(config)#int loop0
R1(config-if)#ipv6 rip CCIEIDN enable R3(config-if)#ipv6 rip CCIEIDN enable
R1(config-if)#ex R3(config-if)#exit

172
R2(config)#ipv6 unicast-routing
R2(config)#ipv6 router rip CCIEIDN
R2(config-rtr)#ex
R2(config)#int s0/0
R2(config-if)#ipv6 rip CCIEIDN enable
R2(config-if)#ex
R2(config)#int loop0
R2(config-if)#ipv6 rip CCIEIDN enable
R2(config-if)#ex
R2(config)#int s0/1
R2(config-if)#ipv6 rip CCIEIDN enable
R2(config-if)#

R3#sh ipv6 rout rip


IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
R 2001::1/128 [120/3]
via FE80::C002:9FF:FE00:0, Serial0/1
R 2001::2/128 [120/2]
via FE80::C002:9FF:FE00:0, Serial0/1
R 2001:12::/64 [120/2]
via FE80::C002:9FF:FE00:0, Serial0/1

R1#sh ipv6 route rip


IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
R 2001::2/128 [120/2]
via FE80::C002:9FF:FE00:0, Serial0/0
R 2001::3/128 [120/3]
via FE80::C002:9FF:FE00:0, Serial0/0
R 2001:23::/64 [120/2]
via FE80::C002:9FF:FE00:0, Serial0/0

Tes ping

173
Task
Konfigurasi IBGP dengan ketentuan2 sebagai berikut :
o Jangan menggunakn full mesh tapi gunakan Route Reflector (R2 sebagai
Server dan R1/R3 sebagai client )
o Konfigurasi Autentikasi antar IBGP peer menggunakan password santriidn
o Gunakan Peer Group
R2(config)#router bgp 500
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#no bgp default ipv4-unicast
R2(config-router)#neig CCIEIDN peer-group
R2(config-router)#neig CCIEIDN remote-as 500
R2(config-router)#neig CCIEIDN password santriidn
R2(config-router)#neig CCIEIDN update-source loop0
R2(config-router)#neigh 2001::1 peer-group CCIEIDN
R2(config-router)#neigh 2001::3 peer-group CCIEIDN
R2(config-router)#address-family ipv6
R2(config-router-af)#neigh CCIEIDN route-reflector-client
R2(config-router-af)#neigh 2001::1 activate
R2(config-router-af)#neigh 2001::3 activate
R2(config-router-af)#net 2001::2/128
R2(config-router-af)#net 2001:12::/64
R2(config-router-af)#net 2001:23::/64
R2(config-router-af)#exit-add
R2(config-router)#end

R1(config)#router bgp 500


R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#no bgp default ipv4-unicast
R1(config-router)#neigh CCIEIDN peer-group
R1(config-router)#neigh CCIEIDN remote-as 500
R1(config-router)#neigh CCIEIDN pass santriidn
R1(config-router)#neigh CCIEIDN update-source loop0
R1(config-router)#neigh 2001::2 peer-group CCIEIDN
R1(config-router)#address-fam ipv6
R1(config-router-af)#neigh 2001::2 activate
R1(config-router-af)#net 2001::1/128
R1(config-router-af)#net 2001:12::/64
R1(config-router-af)#exit-ad

174
R3(config)#router bgp 500
R3(config-router)#bgp router-id 3.3.3.3
R3(config-router)#no bgp default ipv4-unicast
R3(config-router)#neigh CCIEIDN peer-group
R3(config-router)#neigh CCIEIDN remote-as 500
R3(config-router)#neigh CCIEIDN pass santriidn
R3(config-router)#neigh CCIEIDN update-source loop0
R3(config-router)#neigh 2001::2 peer-group CCIEIDN
R3(config-router)#address-fam ipv6
R3(config-router-af)#neigh 2001::2 activate
R3(config-router-af)#net 2001::3/128
R3(config-router-af)#net 2001:23::/64
R3(config-router-af)#end

Verifikasi
R2#sh ip bgp ipv6 unicast summary
BGP router identifier 2.2.2.2, local AS number 500
BGP table version is 6, main routing table version 6
5 network entries using 760 bytes of memory
7 path entries using 532 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 1696 total bytes of memory
BGP activity 8/3 prefixes, 10/3 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2001::1 4 500 13 15 6 0 0 00:09:07 2
2001::3 4 500 12 14 6 0 0 00:08:58 2

R2#sh ip bgp ipv6 unicast


BGP table version is 6, local router ID is 2.2.2.2

Network Next Hop Metric LocPrf Weight Path


*>i2001::1/128 2001::1 0 100 0 i
*> 2001::2/128 :: 0 32768 i
*>i2001::3/128 2001::3 0 100 0 i
* i2001:12::/64 2001::1 0 100 0 i
*> :: 0 32768 i
* i2001:23::/64 2001::3 0 100 0 i
*> :: 0 32768 i

175
R1#sh ip bgp ipv6 unicast
BGP table version is 6, 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


*> 2001::1/128 :: 0 32768 i
*>i2001::2/128 2001::2 0 100 0 i
*>i2001::3/128 2001::3 0 100 0 i
* i2001:12::/64 2001::2 0 100 0 i
*> :: 0 32768 i
*>i2001:23::/64 2001::2 0 100 0 i

Task :
Konfigurasi EBGP peering menggunakan interface Loopback 0
Konfigurasi Autentikasi menggunakan pass santriidn
Konfigurasi static route antar loopback 0
Advertise semua interface router kedalam BGP

R4(config)#ipv6 unicast-routing
R4(config)#ipv6 route 2001::1/128 2001:14::1
R4(config)#ipv6 route 2001::3/128 2001:34::3
R4(config)#end

R1(config)#ipv6 route 2001::4/128 2001:14::4


R1(config)#end
R1#ping 2001::4

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 2001::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/2/8 ms
R1#

R3(config)#ipv6 route 2001::4/128 2001:34::4


R3(config)#end

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

176
R3(config)#router bgp 500
R3(config-router)#neigh 2001::4 remote-as 600
R3(config-router)#neigh 2001::4 update-source loop0
R3(config-router)#neigh 2001::4 ebgp-multihop
R3(config-router)#neigh 2001::4 pass santriidn
R3(config-router)#address-family ipv6 unicast
R3(config-router-af)#neigh 2001::4 activate
R3(config-router-af)#net 2001:34::/64
R3(config-router-af)#end

R1(config)#router bgp 500


R1(config-router)#neigh 2001::4 remote-as 600
R1(config-router)#neigh 2001::4 update-source loop0
R1(config-router)#neigh 2001::4 ebgp-multihop
R1(config-router)#neigh 2001::4 pass santriidn
R1(config-router)#address-fam ipv6 unicast
R1(config-router-af)#neigh 2001::4 activate
R1(config-router-af)#net 2001:14::/64
R1(config-router-af)#end

R4(config)#router bgp 600


R4(config-router)#bgp router-id 4.4.4.4
R4(config-router)#no bgp default ipv4-unicast

R4(config-router)#neigh 2001::1 remote-as 500


R4(config-router)#neigh 2001::1 update-source loop0
R4(config-router)#neigh 2001::1 ebgp-multihop
R4(config-router)#neigh 2001::1 pass santriidn
R4(config-router)#
R4(config-router)#neigh 2001::3 remote-as 500
R4(config-router)#neigh 2001::3 update-source loop0
R4(config-router)#neigh 2001::3 ebgp-multihop
R4(config-router)#neigh 2001::3 pass santriidn
R4(config-router)#
R4(config-router)#address-family ipv6 unicast
R4(config-router-af)#neigh 2001::1 activate
R4(config-router-af)#neigh 2001::3 activate
R4(config-router-af)#net 2001::4/128
R4(config-router-af)#net 2001:14::/64
R4(config-router-af)#net 2001:34::/64
R4(config-router-af)#exit
R4(config-router)#end

177
R4#sh ip bgp ipv6 unicast summary
BGP router identifier 4.4.4.4, local AS number 600
BGP table version is 11, main routing table version 11
8 network entries using 1216 bytes of memory
17 path entries using 1292 bytes of memory
4/3 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP AS-PATH entries using 24 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 3060 total bytes of memory
BGP activity 11/3 prefixes, 20/3 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2001::1 4 500 19 20 11 0 0 00:13:16 7
2001::3 4 500 19 20 11 0 0 00:13:23 7

R4#sh ip bgp ipv6 unicast


BGP table version is 11, 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


*> 2001::1/128 2001::1 0 0 500 i
* 2001::3 0 500 i
*> 2001::2/128 2001::1 0 500 i
* 2001::3 0 500 i
*> 2001::3/128 2001::1 0 500 i
* 2001::3 0 0 500 i
*> 2001::4/128 :: 0 32768 i
*> 2001:12::/64 2001::1 0 0 500 i
* 2001::3 0 500 i
*> 2001:14::/64 :: 0 32768 i
* 2001::1 0 0 500 i
* 2001::3 0 500 i
*> 2001:23::/64 2001::1 0 500 i
* 2001::3 0 0 500 i
*> 2001:34::/64 :: 0 32768 i
* 2001::1 0 500 i
* 2001::3 0 0 500 i

178
R1#sh ip bgp ipv6 unicast 2001::4/128
BGP routing table entry for 2001::4/128, version 9
Paths: (1 available, best #1, table Global-IPv6-Table)
Advertised to update-groups:
1
600
2001::4 from 2001::4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external, best

R2#sh ip bgp ipv6 unicast 2001::4/128


BGP routing table entry for 2001::4/128, version 0
Paths: (2 available, no best path)
Not advertised to any peer
600, (Received from a RR-client)
2001::4 (inaccessible) from 2001::3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal
600, (Received from a RR-client)
2001::4 (inaccessible) from 2001::1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal

Task : Konfigurasi R1/R3 agar merubah next-hop pada saat mengadvertise ke IBGP
neighbor
R1#sh run | s bgp
router bgp 500
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor CCIEIDN peer-group
neighbor CCIEIDN remote-as 500
neighbor CCIEIDN password santriidn
neighbor CCIEIDN update-source Loopback0
neighbor 2001::2 peer-group CCIEIDN
neighbor 2001::4 remote-as 600
neighbor 2001::4 ebgp-multihop 255
neighbor 2001::4 password santriidn
neighbor 2001::4 update-source Loopback0
!
address-family ipv6
neighbor 2001::2 activate
neighbor 2001::4 activate
network 2001::1/128
network 2001:12::/64
network 2001:14::/64
exit-address-family

179
R1(config)#router bgp 500
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#neigh CCIEIDN next-hop-self
R1(config-router-af)#end

R3(config)#router bgp 500


R3(config-router)#address-family ipv6 unicast
R3(config-router-af)#neigh CCIEIDN next-hop-self
R3(config-router-af)#end

Verifikasi di R2
R2#sh ip bgp ipv6 unicast 2001::4/128
BGP routing table entry for 2001::4/128, version 9
Paths: (2 available, best #2, table Global-IPv6-Table)
Advertised to update-groups:
1
600, (Received from a RR-client)
2001::3 (metric 2) from 2001::3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal
600, (Received from a RR-client)
2001::1 (metric 2) from 2001::1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best

Task :
Konfigurasi AS 500 agar pada saat router2 di AS tersebut ingin ke luar (AS lain) maka
harus melewati R1

R3#sh ip bgp ipv6 unicast 2001::4/128


BGP routing table entry for 2001::4/128, version 9
Paths: (2 available, best #2, table Global-IPv6-Table)
Advertised to update-groups:
1
600
2001::1 (metric 3) from 2001::2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 1.1.1.1, Cluster list: 2.2.2.2
600
2001::4 from 2001::4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external, best

180
R1(config)#route-map LOCAL permit 10
R1(config-route-map)#set local-preference 200
R1(config-route-map)#exit
R1(config)#router bgp 500
R1(config-router)#address-family ipv6 unicas
R1(config-router-af)#neigh 2001::4 route-map LOCAL in
R1(config-router-af)#exit
R1(config-router)#do clear ip bgp * ipv6 unicast soft

Verifikasi
R2#sh ip bgp ipv6 uni 2001::4/128
BGP routing table entry for 2001::4/128, version 10
Paths: (1 available, best #1, table Global-IPv6-Table)
Advertised to update-groups:
1
600, (Received from a RR-client)
2001::1 (metric 2) from 2001::1 (1.1.1.1)
Origin IGP, metric 0, localpref 200, valid, internal, best

R3#sh ip bgp ipv6 unicast 2001::4/128


BGP routing table entry for 2001::4/128, version 10
Paths: (2 available, best #1, table Global-IPv6-Table)
Advertised to update-groups:
2
600
2001::1 (metric 3) from 2001::2 (2.2.2.2)
Origin IGP, metric 0, localpref 200, valid, internal, best
Originator: 1.1.1.1, Cluster list: 2.2.2.2
600
2001::4 from 2001::4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external
R3#

181

You might also like