HARI 4 : BGP
*********
Lab 1 – Konfigurasi Dasar iBGP Peering
Lab 2 – iBGP Peering – Loopback
Lab 3 – eBGP Peering
Lab 4 – eBGP Peering – Loopback – eBGP Multihop
Lab 5 – BGP Next-Hop-Self
Lab 6 – BGP Authentication
Lab 7 – BGP Route Reflector
Lab 8 – BGP Confederation
Lab 9 – BGP Attribute (weight)
Lab 10 – BGP Attribute (MED)
Lab 11 – BGP Mindah Jalur – MED
Lab 12 – BGP Mindah Jalur – AS Path
Lab 13 – BGP Mindah Jalur – Weight
Lab 14 – BGP Mindah Jalur – Local Preference
Lab 15 – BGP Multihoming – ISP Sama
Lab 16 – BGP Multihoming – ISP Berbeda
**********
| BGP Attribut | ||
| Well known( all vendor) | - Mandatory ( pasti ada ) | - AS Apath- Next-Hop ( AS )- Origin ( I , E dan ? ) |
| - Discresenery ( ada jika di config ) | - Local pref : nilai default 100- utomic Agregate ( Summarrize) | |
| Optional | - Transitif : jika tidak dikenali tetap dilewatkan | - Aggregator- Community ( No-export , No-Advertise, Internet , Local AS) |
| - Non transitif : jka tidak dikenali, maka atribut di blok | - MED- Originator- Cluster-ID | |
| Urutan pemilihan Jalur(cisco) | - Highest Weight-Highest Local Preference-Route originated by the local router- AS Path terpendek- Lowest Origin code ( IGP < EGP)-Lowest MED from other AS-EBGP over IBGP- The Path through the closest IGP Neighbour- Oldest route for EBGP- Path with the lowest Neighbour BGP Router ID-Path with the lowest Neighbour IP |
LAB 1 iBGP peering
SKENARIO : konfigurasi paling dasar di BGP untuk membentuk koneksi dengan peer yang satu AS.
Note : command network di BGP hanya untuk advertise network , untuk konek dengan peer/ membentuk adjecency menggunakan command neighbor.
R1
interface Loopback1
ip address 1.1.1.1 255.255.255.255
R1(config-router)#do sh run int f0/0
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
R1(config-router)#do sh run | s bgp
router bgp 12
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 12
no auto-summary
R2
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
R2(config-router)#do sh run | s bgp
router bgp 12
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 12
no auto-summary
Verifikasi
R2(config-router)#do sh ip bgp sum
BGP router identifier 12.12.12.2, local AS number 12
….
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.1 4 12 8 7 2 0 0 00:04:45 1
R2(config-router)#do sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 12.12.12.1, 00:03:07
R2(config-router)#do ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/107/164 ms
R2(config-router)#
Neighbor sudah dikenali dan ping loopback ( advertise network ) lancar.
***********************
LAB 2 Peering iBgp Loopback
SKENARIO : Peering iBgp memaki interface loopback, bukaninerface phsycal.
Note : Jalan diatas IGP , IGP harus convergence dulu agar masing2 loopback reachable satu sama lain.
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Loopback1
ip address 11.11.11.11 255.255.255.255
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
router bgp 12
no synchronization
bgp log-neighbor-changes
network 22.22.22.22 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 update-source loopback 0
no auto-summary
router rip
net 1.0.0.0
net 11.0.0.0
version 2
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback 1
ip address 22.22.22.22 255.255.255.255
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
router bgp 12
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 12
neighbor 1.1.1.1 update-sorce loopback 0
no auto-summary
router rip
net 2.0.0.0
net 12.0.0.0
version 2
Verifikasi
R1#sh ip route 2.2.2.2
Routing entry for 2.0.0.0/8
Known via “rip”, distance 120, metric 1
Redistributing via rip
Last update from 12.12.12.2 on FastEthernet0/0, 00:00:05 ago
Routing Descriptor Blocks:
* 12.12.12.2, from 12.12.12.2, 00:00:05 ago, via FastEthernet0/0
Route metric is 1, traffic share count is 1
R1#sh ip route 22.22.22.22
% Network not in table
R1#ping 22.22.22.22
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)
R1#
R1#ping 22.22.22.22
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/88/152 ms
R1#sh ip route 2.2.2.2
Routing entry for 2.0.0.0/8
Known via “rip”, distance 120, metric 1
Redistributing via rip
Last update from 12.12.12.2 on FastEthernet0/0, 00:00:28 ago
Routing Descriptor Blocks:
* 12.12.12.2, from 12.12.12.2, 00:00:28 ago, via FastEthernet0/0
Route metric is 1, traffic share count is 1
R1#sh ip route 22.22.22.22
Routing entry for 22.22.22.22/32
Known via “bgp 12″, distance 200, metric 0, type internal
Last update from 2.2.2.2 00:00:23 ago
Routing Descriptor Blocks:
* 2.2.2.2, from 2.2.2.2, 00:00:23 ago
Route metric is 0, traffic share count is 1
AS Hops 0
R1#sh ip bgp
BGP table version is 3, local router ID is 11.11.11.11
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.11.11.11/32 0.0.0.0 0 32768 i
*>i22.22.22.22/32 2.2.2.2 0 100 0 i
R1#sh ip route bgp
22.0.0.0/32 is subnetted, 1 subnets
B 22.22.22.22 [200/0] via 2.2.2.2, 00:00:43
***********************
LAB 3 eBGP Peering
SKENARIO : Peering dengan lawan yang memiliki AS number berlainan
Note : peer harus directly connect | syarat mutlak
R2
router bgp 12
no synchronization
bgp log-neighbor-changes
network 12.12.12.0 mask 255.255.255.0
network 23.23.23.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 23.23.23.3 remote-as 3
no auto-summaryrouter rip
ver 2
network 12.0.0.0
network 23.0.0.0
no auto
R3
router bgp 3
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.0
neighbor 23.23.23.2 remote-as 100
update source lo 0
no auto-summaryrouter rip
ver 2
network 23.0.0.0
no auto
Verifikasi :
R2(config-if)#do sh run | s bgp
router bgp 12
no synchronization
bgp log-neighbor-changes
network 22.22.22.22 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 12
neighbor 23.23.23.3 remote-as 3
no auto-summary
R2(config-if)#do sh run int s0/0
interface Serial0/0
ip address 23.23.23.2 255.255.255.0
R3
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
R3(config-if)#do sh run | s bgp
router bgp 3
no synchronization
bgp log-neighbor-changes
network 3.3.3.3
neighbor 23.23.23.2 remote-as 12
no auto-summary
Verifikasi
R3#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 0 percent (0/2)
R3#ping 22.22.22.22
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/58/148 ms
R3#ping 11.11.11.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)
R3#sh ip bgp
BGP table version is 3, 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
*> 11.11.11.11/32 23.23.23.2 0 12 i
*> 22.22.22.22/32 23.23.23.2 0 0 12 i
R3#sh ip bgp sum
BGP router identifier 3.3.3.3, local AS number 3
BGP table version is 3, main routing table version 3
2 network entries using 240 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
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
BGP using 740 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
23.23.23.2 4 12 8 6 3 0 0 00:02:38 2
R3#sh ip route bgp
22.0.0.0/32 is subnetted, 1 subnets
B 22.22.22.22 [20/0] via 23.23.23.2, 00:02:49
11.0.0.0/32 is subnetted, 1 subnets
B 11.11.11.11 [20/0] via 23.23.23.2, 00:02:49
Belum bisa ping R1 yang beda AS / tidak full mesh , butuh nex-hop-self ( di lab selanjutnya)
**************************************
LAB 4 EBGP – loopback – eBGP Multihop
SKenario/Note : koneksi untuk eBgp yang tidak directly connected solusinya adalah dengan menggunakan eBGP Multihop
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback1
ip address 22.22.22.22 255.255.255.255
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
interface Serial0/0
ip address 23.23.23.2 255.255.255.0
clock rate 2000000
router rip
version 2
network 2.0.0.0
network 12.0.0.0
router bgp 12
no synchronization
bgp log-neighbor-changes
network 12.12.12.0 mask 255.255.255.0
network 23.23.23.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 12
neighbor 1.1.1.1 update-source Loopback0
neighbor 3.3.3.3 remote-as 3
neighbor 3.3.3.3 ebgp-multihop
neighbor 3.3.3.3 update-source Loopback0
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface Loopback1
ip address 33.33.33.33 255.255.255.255
Serial0/0
ip address 23.23.23.3 255.255.255.0
router bgp 3
no synchronization
bgp log-neighbor-changes
network 23.23.23.0 mask 255.255.255.0
network 32.32.32.0 mask 255.255.255.0
network 33.33.33.33 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
ip forward-protocol nd
router rip
net 23.0.0.0
Verifikasi
R3
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
*> 11.11.11.11/32 2.2.2.2 0 12 i
*> 22.22.22.22/32 2.2.2.2 0 0 12 i
*> 33.33.33.33/32 0.0.0.0 0 32768 i
R3#sh ip bgp sum
BGP router identifier 3.3.3.3, local AS number 3
BGP table version is 10, main routing table version 10
3 network entries using 360 bytes of memory
3 path entries using 156 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 1068 total bytes of memory
BGP activity 6/3 prefixes, 6/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 12 15 14 10 0 0 00:09:07 2
R3#sh ip route bgp
22.0.0.0/32 is subnetted, 1 subnets
B 22.22.22.22 [20/0] via 2.2.2.2, 00:09:11
11.0.0.0/32 is subnetted, 1 subnets
B 11.11.11.11 [20/0] via 2.2.2.2, 00:09:11
R3#sh run | s bgp
router bgp 3
no synchronization
bgp log-neighbor-changes
network 33.33.33.33 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 ebgp-multihop 255
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
R2#sh ip bgp
BGP table version is 4, local router ID is 22.22.22.22
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.11.11.11/32 1.1.1.1 0 100 0 i
*> 22.22.22.22/32 0.0.0.0 0 32768 i
*> 33.33.33.33/32 3.3.3.3 0 0 3 i
R2#sh ip bgp sum
BGP router identifier 22.22.22.22, local AS number 12
BGP table version is 4, main routing table version 4
3 network entries using 360 bytes of memory
3 path entries using 156 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 3 (at peak 3) using 96 bytes of memory
BGP using 1132 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 12 25 26 4 0 0 00:21:38 1
3.3.3.3 4 3 13 14 4 0 0 00:08:25 1
****************
LAB 5 – BGP Next –Hop Self
neighbor 1.1.1.1 next-hop-self
LAB 8 CONFIDERATION
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
interface FastEthernet0/1
ip address 14.14.14.1 255.255.255.0
!
router bgp 12001
bgp log-neighbor-changes
bgp confederation identifier 12
bgp confederation peers 12002
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 12002
neighbor 14.14.14.4 remote-as 12001
neighbor 14.14.14.4 next-hop-selfR2 :
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/0
ip address 25.25.25.2 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
!
router bgp 12002
bgp log-neighbor-changes
bgp confederation identifier 12
bgp confederation peers 12001 12003
network 2.2.2.2 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 12001
neighbor 23.23.23.3 remote-as 12003
neighbor 25.25.25.5 remote-as 12002
neighbor 25.25.25.5 next-hop-selfR3:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
!
interface Serial0/0
ip address 36.36.36.3 255.255.255.0
!
router bgp 12003
bgp log-neighbor-changes
bgp confederation identifier 12
bgp confederation peers 12002
network 3.3.3.3 mask 255.255.255.255
neighbor 23.23.23.2 remote-as 12002
neighbor 36.36.36.6 remote-as 3R4 :
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 14.14.14.4 255.255.255.0
!
router bgp 12001
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 12
network 4.4.4.4 mask 255.255.255.255
neighbor 14.14.14.1 remote-as 12001R5 :
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Serial0/0
ip address 25.25.25.5 255.255.255.0
!
router bgp 12002
bgp log-neighbor-changes
bgp confederation identifier 12
network 5.5.5.5 mask 255.255.255.255
neighbor 25.25.25.2 remote-as 12002
R6 :
interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface Serial0/0
ip address 36.36.36.6 255.255.255.0
!
router bgp 3
network 6.6.6.6 mask 255.255.255.255
neighbor 36.36.36.3 remote-as 12
Verifikasi
R4>ping 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/120/252 ms
R4>sh ip route 6.6.6.6
Routing entry for 6.6.6.6/32
Known via “bgp 12001″, distance 200, metric 0
Tag 12002, type internal
Last update from 36.36.36.6 00:04:23 ago
Routing Descriptor Blocks:
* 36.36.36.6, from 14.14.14.1, 00:04:23 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 12002
R4>trace
R4>traceroute 6.6.6.6
Type escape sequence to abort.
Tracing the route to 6.6.6.6
1 14.14.14.1 68 msec 120 msec 12 msec
2 12.12.12.2 32 msec 48 msec 28 msec
3 23.23.23.3 [AS 12002] 72 msec 20 msec 36 msec
4 36.36.36.6 [AS 12003] 96 msec * 152 msec
R4>sh ip route 6.6.6.6
Routing entry for 6.6.6.6/32
Known via “bgp 12001″, distance 200, metric 0
Tag 12002, type internal
Last update from 36.36.36.6 00:04:54 ago
Routing Descriptor Blocks:
* 36.36.36.6, from 14.14.14.1, 00:04:54 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 12002
R4>
R1
R1#sh ip route bgp
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 12.12.12.2, 00:06:14
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [200/0] via 23.23.23.3, 00:06:14
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [200/0] via 14.14.14.4, 00:06:23
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/0] via 25.25.25.5, 00:06:09
36.0.0.0/24 is subnetted, 1 subnets
B 36.36.36.0 [200/0] via 23.23.23.3, 00:06:14
6.0.0.0/32 is subnetted, 1 subnets
B 6.6.6.6 [200/0] via 36.36.36.6, 00:05:43
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:06:14
25.0.0.0/24 is subnetted, 1 subnets
B 25.25.25.0 [200/0] via 12.12.12.2, 00:06:14
R4#sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 14.14.14.1, 00:07:05
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 12.12.12.2, 00:06:55
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [200/0] via 23.23.23.3, 00:06:55
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/0] via 25.25.25.5, 00:06:50
36.0.0.0/24 is subnetted, 1 subnets
B 36.36.36.0 [200/0] via 23.23.23.3, 00:06:55
6.0.0.0/32 is subnetted, 1 subnets
B 6.6.6.6 [200/0] via 36.36.36.6, 00:06:25
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:06:55
25.0.0.0/24 is subnetted, 1 subnets
B 25.25.25.0 [200/0] via 12.12.12.2, 00:06:55
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 14.14.14.1, 00:07:05
R4#sh ip bgp sum
BGP router identifier 4.4.4.4, local AS number 12001
BGP table version is 12, main routing table version 12
11 network entries using 1320 bytes of memory
12 path entries using 624 bytes of memory
6/5 BGP path/bestpath attribute entries using 744 bytes of memory
3 BGP AS-PATH entries using 72 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 2792 total bytes of memory
BGP activity 11/0 prefixes, 12/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
14.14.14.1 4 12001 15 11 12 0 0 00:07:50 10
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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 12.12.12.2 0 100 0 (12002) i
*> 3.3.3.3/32 23.23.23.3 0 100 0 (12002 12003) i
*>i4.4.4.4/32 14.14.14.4 0 100 0 i
*> 5.5.5.5/32 25.25.25.5 0 100 0 (12002) i
*> 6.6.6.6/32 36.36.36.6 0 100 0 (12002 12003) 6 i
* 12.12.12.0/24 12.12.12.2 0 100 0 (12002) i
*> 0.0.0.0 0 32768 i
* i14.14.14.0/24 14.14.14.4 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 23.23.23.0/24 12.12.12.2 0 100 0 (12002) i
*> 25.25.25.0/24 12.12.12.2 0 100 0 (12002) i
*> 36.36.36.0/24 23.23.23.3 0 100 0 (12002 12003) i
R1#sh ip route
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 12.12.12.2, 00:06:08
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [200/0] via 23.23.23.3, 00:06:08
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [200/0] via 14.14.14.4, 00:06:17
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/0] via 25.25.25.5, 00:06:03
36.0.0.0/24 is subnetted, 1 subnets
B 36.36.36.0 [200/0] via 23.23.23.3, 00:06:08
6.0.0.0/32 is subnetted, 1 subnets
B 6.6.6.6 [200/0] via 36.36.36.6, 00:05:38
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:06:09
25.0.0.0/24 is subnetted, 1 subnets
B 25.25.25.0 [200/0] via 12.12.12.2, 00:06:09
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
14.0.0.0/24 is subnetted, 1 subnets
C 14.14.14.0 is directly connected, FastEthernet0/1
R1#sh ip route bgp
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 12.12.12.2, 00:06:14
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [200/0] via 23.23.23.3, 00:06:14
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [200/0] via 14.14.14.4, 00:06:23
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/0] via 25.25.25.5, 00:06:09
36.0.0.0/24 is subnetted, 1 subnets
B 36.36.36.0 [200/0] via 23.23.23.3, 00:06:14
6.0.0.0/32 is subnetted, 1 subnets
B 6.6.6.6 [200/0] via 36.36.36.6, 00:05:43
23.0.0.0/24 is subnetted, 1 subnets
B 23.23.23.0 [200/0] via 12.12.12.2, 00:06:14
25.0.0.0/24 is subnetted, 1 subnets
B 25.25.25.0 [200/0] via 12.12.12.2, 00:06:14
R1#
R1#sh ip bgp sum
BGP router identifier 1.1.1.1, local AS number 12001
BGP table version is 12, main routing table version 12
11 network entries using 1320 bytes of memory
13 path entries using 676 bytes of memory
6/5 BGP path/bestpath attribute entries using 744 bytes of memory
3 BGP AS-PATH entries using 72 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 3) using 96 bytes of memory
BGP using 2908 total bytes of memory
BGP activity 11/0 prefixes, 13/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.2 4 12002 16 12 12 0 0 00:07:09 8
14.14.14.4 4 12001 11 15 12 0 0 00:07:13 2
***********************
LAB 9 BGP Attribute ( ORIGIN )
| - I : iBGP |
| - e : dari eGP (sudah tidak ada) |
| - ? : berasal dari redistribute protocol yang lain |
Skenario : mengetahui jenis origin
R1 :
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router bgp 100
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 200R2 :
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/0
ip address 23.23.23.2 255.255.255.0
!
router bgp 200
network 2.2.2.2 mask 255.255.255.255
redistribute static
neighbor 12.12.12.1 remote-as 100
neighbor 23.23.23.3 remote-as 200R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
ip address 33.33.33.33 255.255.255.255
!
interface Loopback2
ip address 30.30.30.30 255.255.255.255
!
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
!
router eigrp 1
network 33.33.33.33 0.0.0.0
!
router bgp 200
network 3.3.3.3 mask 255.255.255.255
redistribute eigrp 1
neighbor 23.23.23.2 remote-as 200
verifikasi
R1(config-router)#redistribute static
R1(config-router)#do 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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 3.3.3.3/32 12.12.12.2 0 23 i
*> 13.13.13.3 0 0 23 i
*> 100.100.100.0/24 0.0.0.0 0 32768 ?
LAB 13 – BGP Local AS
Skenario : konfigur BGP AS Lokal
Note : peer yang di konfig BGP Lokal AS akan menganggan bahwa AS number peernya tersebut bernilai lain ( 65000 misalnya ) sedangkan peer lainnya yang tidak diberi atribut Local AS akan melihat AS number peer tersebut sebagai AS number sebenarnya.
R1
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 1.1.1.2 mask 255.255.255.255
network 1.1.1.3 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 65000
no auto-summary
R2
router bgp 200
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 100
neighbor 12.12.12.1 local-as 65000
neighbor 23.23.23.3 remote-as 300
no auto-summary
R3
R3(config-router)#do sh run | s bgp
router bgp 300
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 23.23.23.2 remote-as 200
no auto-summary
VERIFIKASI
R1(config-if)#do sh ip bgp
BGP table version is 34, local router ID is 1.1.1.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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 1.1.1.2/32 0.0.0.0 0 32768 i
*> 1.1.1.3/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 12.12.12.2 0 0 65000 200 i
*> 3.3.3.3/32 12.12.12.2 0 65000 200 300 i
R3(config-router)#do sh ip bgp
BGP table version is 39, 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
*> 1.1.1.1/32 23.23.23.2 0 200 65000 100 i
*> 1.1.1.2/32 23.23.23.2 0 200 65000 100 i
*> 1.1.1.3/32 23.23.23.2 0 200 65000 100 i
*> 2.2.2.2/32 23.23.23.2 0 0 200 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
R3(config-router)#do ping 1.1.1.1 so lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/77/184 ms
R3(config-router)#
Lokal-AS no prepend
R1(config-if)#do sh ip bgp
BGP table version is 38, local router ID is 1.1.1.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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 1.1.1.2/32 0.0.0.0 0 32768 i
*> 1.1.1.3/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 12.12.12.2 0 0 65000 200 i
*> 3.3.3.3/32 12.12.12.2 0 65000 200 300 i
R3(config-router)#do sh ip bgp
BGP table version is 45, 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
( 6500 tidak tampak)
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 23.23.23.2 0 200 100 i
*> 1.1.1.2/32 23.23.23.2 0 200 100 i
*> 1.1.1.3/32 23.23.23.2 0 200 100 i
*> 2.2.2.2/32 23.23.23.2 0 0 200 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
no-prepend replace-as
router bgp 200
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 100
neighbor 12.12.12.1 local-as 65000 no-prepend replace-as
neighbor 23.23.23.3 remote-as 300
neighbor 23.23.23.3 local-as 65000 no-prepend replace-as
no auto-summary
AS 200 sudah benar2 tidak tampak ( tergantikan)
R1
R1(config-if)#do sh ip bgp
BGP table version is 44, local router ID is 1.1.1.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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 1.1.1.2/32 0.0.0.0 0 32768 i
*> 1.1.1.3/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 12.12.12.2 0 0 65000 i
*> 3.3.3.3/32 12.12.12.2 0 65000 300 i
R1(config-if)#do ping 3.3.3.3 so lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/61/132 ms
R1(config-if)#
R3
R3(config-router)#do sh ip bgp
BGP table version is 59, 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
*> 1.1.1.1/32 23.23.23.2 0 65000 100 i
*> 1.1.1.2/32 23.23.23.2 0 65000 100 i
*> 1.1.1.3/32 23.23.23.2 0 65000 100 i
*> 2.2.2.2/32 23.23.23.2 0 0 65000 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
R3(config-router)#
****************************
LAb 15 BGP Attribute ( Weight)
| Attribute | Arah | Traffic flow affected |
| Weight | Inbound | Outbond |
| Local Preference | Inbound | Outbond |
| AS-Path | Outbond | Inbound |
| MED | Outbond | Inbound |
Verifikasi
Sebelum
R1#clear ip bgp * soft
R1#sh ip bgp 45.45.45.5
BGP routing table entry for 45.45.45.0/24, version 17
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0×840
Advertised to update-groups:
1 2
34
14.14.14.4 from 14.14.14.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external, best
34
23.23.23.3 from 12.12.12.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, internal
R1#trace 45.45.45.5
Type escape sequence to abort.
Tracing the route to 45.45.45.5
1 14.14.14.4 112 msec 92 msec 4 msec
2 45.45.45.5 [AS 34] 64 msec * 124 msec
Sesudah
R1(config)#router bgp 12
R1(config-router)#neighbor 12.12.12.2 route-map WEIGHT in
R1(config-router)#
—-
R1(config-router)#do sh ip bgp 45.45.45.5
BGP routing table entry for 45.45.45.0/24, version 23
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0×840
Advertised to update-groups:
1
34
14.14.14.4 from 14.14.14.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external
34
23.23.23.3 from 12.12.12.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, weight 100, valid, internal, best
—-
R1(config-router)#do trace 45.45.45.5
Type escape sequence to abort.
Tracing the route to 45.45.45.5
1 14.14.14.4 120 msec 28 msec 32 msec
2 45.45.45.5 [AS 34] 116 msec * 128 msec
R1(config-router)#do clear ip bgp * soft
R1(config-router)#do trace 45.45.45.5
Type escape sequence to abort.
Tracing the route to 45.45.45.5
1 12.12.12.2 88 msec 64 msec 12 msec
2 23.23.23.3 72 msec 0 msec 4 msec
3 34.34.34.4 [AS 34] 44 msec 168 msec 16 msec
4 45.45.45.5 [AS 34] 76 msec * 148 msec
Dari Router Ujung :
R6>trace 45.45.45.5
Type escape sequence to abort.
Tracing the route to 45.45.45.5
1 *
10.10.10.1 88 msec 76 msec
2 12.12.12.2 20 msec 36 msec 8 msec
3 23.23.23.3 60 msec 56 msec 32 msec
4 34.34.34.4 64 msec 52 msec 44 msec
5 45.45.45.5 148 msec * 156 msec
*************************
LAB 17 BGP MANIPULASI JALUR
Verifikasi :
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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 3.3.3.3/32 12.12.12.2 0 23 i
*> 13.13.13.3 0 0 23 I >> jalur yang dipilih untuk ke 3.3.3.3
R1#sh ip bgp 3.3.3.3
BGP routing table entry for 3.3.3.3/32, version 3
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0×820
Advertised to update-groups:
1
23
12.12.12.2 from 12.12.12.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external
23
13.13.13.3 from 13.13.13.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, external, best
R1#trace 3.3.3.3 so lo 0
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1 13.13.13.3 96 msec * 48 msec
*********************
LAB 18 – BGP Mindah Jalur – MED
SKenario : Mindahjalur pake MED , karena tipikal MED applynya di arah out, maka untuk pemindahan ini di apply di router Ujung ( tujuan)
Note : command : set metric 200
R3(config)#route-map MED
R3(config-route-map)#set Metric 200
Verifikasi :
Sebelumnya lewat 13.13.13.1 jadi ke 12.12.12.2
R1#trace 3.3.3.3 so lo 0
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1 12.12.12.2 60 msec 100 msec 0 msec
2 23.23.23.3 60 msec * 68 msec
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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 3.3.3.3/32 12.12.12.2 0 23 I >> lewat sini
* 13.13.13.3 200 0 23 i
************************
Lab 19 – BGP Mindah Jalur – AS Path
Skenario : mengasumsikan path seperti HOP, semakin panjang jalur AS path-nya semakin kurang prefer untuk dipilih jalur routing.
R3(config-router)#neigh 13.13.13.1 route-map AS out
R3(config-router)#route-map AS
R3(config-route-map)#set as-p
R3(config-route-map)#set as-path prepend 23 ?
<1-65535> AS number
<cr>
R3(config-route-map)#set as-path prepend 23 23 23 23
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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 3.3.3.3/32 12.12.12.2 0 23 i
* 13.13.13.3 0 0 23 23 23 23 23 I > AS terlalu panjang
R1#
R1#ping 3.3.3.3 so lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/84/140 ms
R1#trace 3.3.3.3 so 1.1.1.1
Type escape sequence to abort.
Tracing the route to 3.3.3.3
1 12.12.12.2 60 msec 16 msec 20 msec
2 23.23.23.3 72 msec * 24 msec
********************
LAB 22 – BGP Multihoming – ISP Sama
SKenario : Multihoming untuk satu AS number
Note : Menggunakan Metrik/MED , Weight , AS path
Defaultnya Main Backup, bukan load sharing.
*************************************
LAB 23 BGP Multihoming 2 ISP Berbeda
SKenario : Multihoming beda AS
Note : command untuk Load balance : bgp best-path multipath-relax
VERIFIKASI
R1
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1292 total bytes of memory
BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.12.12.2 4 2 17 17 4 0 0 00:03:56 2
13.13.13.3 4 3 13 12 4 0 0 00:06:26 1
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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 12.12.12.2 0 0 2 i
* 4.4.4.4/32 13.13.13.3 0 3 4 i
*> 12.12.12.2 0 2 4 i
R1#trace 4.4.4.4 so lo 0
Type escape sequence to abort.
Tracing the route to 4.4.4.4
1 12.12.12.2 100 msec 152 msec 0 msec
2 24.24.24.4 100 msec * 164 msec






