LAB · LAB Mikrotik Series · Mikrotik · Networking · Pesantren Networkers

Lab 43. BGP AS Removal

Bismillah

Kalai sebelumnya kita membahas Lab 42. BGP Community using for Routing Policy sekarang kita akan membahas BGP AS Removal. BGP AS Removal adalah sebuah fitur yang akan membuat as privat tidak akan terbaca oleh jaringan internet. AS privat yang dapat kita gunakan adalah 64512 sampai dengan 65535.

Selection_239.png

dengan topologi diatas kita akan membuat router router R4 yang beradap pada AS400 tidak akan mengetahui adanya AS 64512 yang akan dibaca dengan AS 130. berikut ini konfigurasi yang akan kita lakukan pada routing BGP ini

Konfigurasi ip address

ip address router R1

[admin@R1] > /ip address
add address=12.12.12.1/24 interface=ether1 
add address=14.14.14.1/24 interface=ether2 
add address=1.1.1.1 interface=lo network=1.1.1.1

ip address router R2

[admin@R2] > /ip address
add address=12.12.12.2/24 interface=ether1 network=12.12.12.0
add address=23.23.23.2/24 interface=ether2 network=23.23.23.0
add address=2.2.2.2 interface=lo network=2.2.2.2

ip address router R3

[admin@R3] > /ip address
add address=23.23.23.3/24 interface=ether1
add address=34.34.34.3/24 interface=ether2 
add address=3.3.3.3 interface=lo

ip address router R4

[admin@R4] > /ip address
add address=34.34.34.4/24 interface=ether1 
add address=14.14.14.4/24 interface=ether2 
add address=4.4.4.4 interface=lo network=4.4.4.4

Konfigurasi routing BGP

routing BGP router R1

[admin@R1] > routing bgp instance set default as=130 redistribute-connected=yes
[admin@R1] > /routing bgp peer
add name=peer1 remote-address=14.14.14.4 remote-as=400
add name=peer3 remote-address=12.12.12.2

routing BGP router R2

[admin@R2] > routing bgp instance set default as=64512 redistribute-connected=yes
[admin@R2] > /routing bgp peer
add name=peer1 remote-address=12.12.12.1 remote-as=130
add name=peer2 remote-address=23.23.23.3 remote-as=130

routing BGP router R3

[admin@R3] > routing bgp instance set default as=130 redistribute-connected=yes
[admin@R3] > /routing bgp peer
add name=peer2 remote-address=23.23.23.2 reote-as=200
add name=peer3 remote-address=34.34.34.4 remote-as=400

routing BGP router R4

[admin@R4] > routing bgp instance set default as=400 redistribute-connected=yes
[admin@R4] >/routing bgp peer
add name=peer1 remote-address=14.14.14.1 remote-as=130
add name=peer2 remote-address=34.34.34.3 remote-as=130

Konfigurasi BGP AS removal

Sekarang barulah kita konfigurasi ke BGP remove AS privat tapi sebelum itu kita akan melihat as-path dari router R4 untuk menuju 2.2.2.2

[admin@R4] > ip route print detail where dst-address=2.2.2.2/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=2.2.2.2/32 gateway=14.14.14.1 gateway-status=14.14.14.1 reachable via  ether2 distance=20 
        scope=40 target-scope=10 bgp-as-path="130,64512" bgp-origin=incomplete received-from=peer1 

 1  Db  dst-address=2.2.2.2/32 gateway=34.34.34.3 gateway-status=34.34.34.3 reachable via  ether1 distance=20 
        scope=40 target-scope=10 bgp-as-path="130,64512" bgp-origin=incomplete received-from=peer2

Nah, kedua rute mengunakan as path yaitu 130 baru kemudian 64512. oleh karena itu kita akan menyembunyikan as privat yaitu 64512. dan  akan dibaca sebagai as 130. berikut konfigurasi yang ditambahkan

[admin@R1] > routing bgp peer print detail where remote-as=400
Flags: X - disabled, E - established 
 0 E name="peer1" instance=default remote-address=14.14.14.4 remote-as=400 tcp-md5-key="" 
     nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter="" 
     address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no 
[admin@R1] > routing bgp peer set peer1 remove-private-as=yes
[admin@R3] > routing bgp peer print detail where remote-as=400
Flags: X - disabled, E - established 
 0 E name="peer3" instance=default remote-address=34.34.34.4 remote-as=400 tcp-md5-key="" 
     nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter="" 
     address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no 
[admin@R3] > routing bgp peer set peer3 remove-private-as=yes

Sekarang periksa table routing yang menuju ip 2.2.2.2

[admin@R4] > ip route print detail where dst-address=2.2.2.2/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=2.2.2.2/32 gateway=14.14.14.1 gateway-status=14.14.14.1 reachable via  ether2 distance=20 
        scope=40 target-scope=10 bgp-as-path="130" bgp-origin=incomplete received-from=peer1 
 1  Db  dst-address=2.2.2.2/32 gateway=34.34.34.3 gateway-status=34.34.34.3 reachable via  ether1 distance=20 
        scope=40 target-scope=10 bgp-as-path="130" bgp-origin=incomplete received-from=peer2

Sekarang router dari router R4 hanya membaca adanya satu as yaitu as 130. oke selesai dengan konfigurasi BGP AS removal malam ini. besok insyaAllah saya lanjutkan dengan jelis lab yang lain.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s