Skip to main content

BGP Dual Homing – ISP sama

 LAB 11. BGP Dual Homing – ISP sama





BGP Dualhoming yaitu Dua Link ke ISP yang sama dengan fitur sebagai berikut

a. Main-Backup Mode

b. Load Sharing Mode

Sedangkan BGP multihoming yaitu Dua Link ke ISP yang berbeda dengan fitur :

a. Main-Backup Mode

b. Load Sharing Mode


 R1(config)#int g1/0

R1(config-if)#ip add 12.12.12.1 255.255.255.0 R1(config-if)#no shutdown

R1(config)#int g2/0

R1(config-if)#ip add 13.13.13.1 255.255.255.0 R1(config-if)#no shutdown

R1(config)#int loopback 0

R1(config-if)#ip add 1.1.1.1 255.255.255.255

R1(config-if)#router bgp 1

R1(config-router)#neighbor 12.12.12.2 remote-as 23

R1(config-router)#neighbor 13.13.13.3 remote-as 23

R1(config-router)#network 1.1.1.1 mask 255.255.255.255


R2(config)#int g2/0

R2(config-if)#ip add 12.12.12.2 255.255.255.0 R2(config-if)#no shutdown

R2(config-if)#int f0/0

R2(config-if)#ip add 23.23.23.2 255.255.255.0 R2(config-if)#no shutdown

R2(config-if)#int g1/0

R2(config-if)#ip add 24.24.24.2 255.255.255.0 R2(config-if)#no shutdown

R2(config)#int lo0

R2(config-if)#ip add 2.2.2.2 255.255.255.255

R2(config-if)#router bgp 23

R2(config-router)#neighbor 12.12.12.1 remote-as 1

R2(config-router)#neighbor 23.23.23.3 remote-as 23

R2(config-router)#neighbor 24.24.24.4 remote-as 4

R2(config-router)#network 2.2.2.2 mask 255.255.255.255

R2(config-router)#neighbor 23.23.23.3 next-hop-self

R3(config)#int g1/0

R3(config-if)#ip add 13.13.13.3 255.255.255.0 R3(config-if)#no shutdown

R3(config)#int f0/0

R3(config-if)#ip add 23.23.23.3 255.255.255.0 R3(config-if)#no shutdown

R3(config-if)#exit R3(config)#int g2/0

R3(config-if)#ip add 34.34.34.3 255.255.255.0 R3(config-if)#no shutdown

R3(config)#router bgp 23

R3(config-router)#neighbor 13.13.13.1 remote-as 1

R3(config-router)#neighbor 23.23.23.2 remote-as 23

R3(config-router)#neighbor 34.34.34.4 remote-as 4

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

R4(config)#int g1/0

R4(config-if)#ip add 24.24.24.4 255.255.255.0 R4(config-if)#no shutdown

R4(config)#int g2/0

R4(config-if)#ip add 34.34.34.4 255.255.255.0 R4(config-if)#no shutdown

R4(config)#int lo0

R4(config-if)#ip add 4.4.4.4 255.255.255.255

R4(config)#router bgp 4

R4(config-router)#neighbor 24.24.24.2 remote-as 23 R4(config-router)#neighbor 34.34.34.3 remote-as 23s

 

R4(config-router)#network 4.4.4.4 mask 255.255.255.255



R1(config)#do show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 1.1.1.1/32 0.0.0.0 0 32768 i

* 2.2.2.2/32 13.13.13.3 0 23 i

*> 12.12.12.2 0 0 23 i

* 4.4.4.4/32 13.13.13.3 0 23 4 i

*> 12.12.12.2 0 23 4 i


Kesimpulannya, walaupun sudah menggunakan 2 link, namun tetap saja hanya

1    link    yang    digunakan.    Sekarang  kita   akan shutdown   port int s0/0 (12.12.12.1/24) sehingga paket tidak lagi melalui R2.




R1(config)#int g1/0

R1(config-if)#shutdown



R1(config)#do sh ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 1.1.1.1/32 0.0.0.0 0 32768 i

*> 4.4.4.4/32 13.13.13.3 0 23 4 i


R1(config)#do show ip route

 bgp 4.0.0.0/32 is subnetted, 1 subnets

B 4.4.4.4 [20/0] via 13.13.13.3, 00:03:06




R1(config)#int g1/0

R1(config-if)#no sh


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

*> 1.1.1.1/32 0.0.0.0 0 32768 i

* 4.4.4.4/32 12.12.12.2 0 23 4 i

*> 13.13.13.3 0 23 4 i


R1#sh ip route bgp

4.0.0.0/32 is subnetted, 1 subnets

B 4.4.4.4 [20/0] via 13.13.13.3, 00:32:17


Ternyata hasilnya menarik, tidak mau otomatis pindah ke R2 lagi. Agar memastikan link ke R2 menjadi main link, maka kita konfigurasikan attribute weight.



R1(config)#route-map WEIGHT R1(config-route-map)#set weight 100

R1(config-route-map)#exit

R1(config)#router bgp 1

R1(config-router)#neighbor 12.12.12.2 route-map WEIGHT in R1(config-router)#exit

R1(config)#do clear ip bgp *


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

*> 4.4.4.4/32 12.12.12.2 100 23 4 i

* 13.13.13.3 0 23 4 i


R1#sh ip route bgp

4.0.0.0/32 is subnetted, 1 subnets

B 4.4.4.4 [20/0] via 12.12.12.2, 00:02:09


Terlihat sekarang linknya melalui R2 kembali. Kemudian kita tes lagi shutdown interface ke R2.



R1(config)#int g1/0

R1(config-if)#shutdown


R1(config)#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

*> 4.4.4.4/32 13.13.13.3 0 23 4 i



R1(config)#do sh ip route 

bgp 4.0.0.0/32 is subnetted, 1 subnets

B 4.4.4.4 [20/0] via 12.12.12.2, 00:00:02








Comments

Popular posts from this blog

Konfigurasi Event OSPF Adjacency (Email)

  Konfigurasi Event OSPF Adjacency (Email) LAB INI LANJUTAN SAMA SEPERTI LAB SEBELUM SEBELUMNYA Selain event syslog tadi kita juga bisa memanfaatkan EEM ini untuk mengirimkan informasi ke email kita, misalnya OSPF kita down maka, router kita otomatis akan mengirimkan debug ospf ke email kita. Untuk topology masih sama. KONFIG R1 R1(config)#event manager applet OSPF_DOWN R1(config-applet)#event syslog pattern "Nbr 2.2.2.2 on FastEthernet0/0 from FULL to DOWN" R1(config-applet)#action 1.0 cli command "enable" R1(config-applet)#action 2.0 cli command "debug ip ospf adj" R1(config-applet)#action 3.0 mail server "smtp.gmail.com" to "uuqeili@gmail.com" from "R1@idn.id" subject "OSPF IS DOWN" body "Please fix OSPF" R1(config-applet)#exit Untuk Pengecekkan, kita bisa coba debug aja,  dan hapus EEM interface down,  Dan kita bisa lihat di email kita apa hasilnyaa... selesai

Remote SPAN ( RSPAN )

  Remote SPAN  ( RSPAN ) Assalamualaikum temen - temen... kembali lagi di blogg saya, dan terimakasih telah berkunjung ke blogg saya, di blogg kali ini saya akan memberikan materi lab mengenai Remote Span  ( RSPAN ). Karena ini adalah blog lanjutan, jadi saya akan mengkonfigurasi yang hanya ada pada blog ini saja, bagi temen - temen ingin melihat konfigurasi sebelumnya ataupun blog sebelumnya mengenai BELAJAR CCNP, bisa cek link dibawah ini : https://bit.ly/37DxJrX TOPOLOGI =  SW-1 SW-1(config)#vlan 100 SW-1(config-vlan)#name RSPAN SW-1(config-vlan)#exit SW-1(config)# SW-1(config)#int e0/1 SW-1(config-if)#sw trunk encap dot1q SW-1(config-if)#sw mode tru SW-1(config-if)#exit SW-1(config)# SW-1(config)#monitor session 1 source vlan 10 SW-1(config)#monitor session 1 destination remote vlan 100 SW-2 SW-2(config)#vlan 10 SW-2(config-vlan)#name PC SW-2(config-vlan)#int e0/1 SW-2(config-if)#sw mod acc SW-2(config-if)#sw acc vlan 10 SW-2(config-if)#exit SW-2(config)# SW-2(co...

Backup config with paramiko

  Backup config with paramiko Backup konfigurasi merupakan pekerjaan yang sangat penting. Agar jika pada saat melakukan konfigurasi terjadi masalah, kita bisa mengembalikan konfigurasi device ke kondisi semula. Tentu saja akan sangat merepotkan jika kita harus melakukan backup konfigurasi pada 100 device. Untuk melakukan pekerjaan tersebut, kita bisa menggunakan python. Ada banyak cara yang bisa kita gunakan untuk backup konfigurasi device menggunakan python, salah satunya menggunakan paramiko. Kita akan mencoba membuat script python menggunakan paramiko untuk backup konfigurasi router. Masih pakai topology dan konfigurasi yang tadi. Ubuntu root@NetworkAutomation-1:~# cp paramiko1.py backup.py root@NetworkAutomation-1:~# nano backup.py root@NetworkAutomation-1:~# cat backup.py import paramiko import time ip_address = "192.168.10.2" username = "cisco" password = "cisco123" ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.Aut...