T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 1 | 70
MPLS
MPLS Dasar & MPLS L3-VPN
Author
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 2 | 70
Daftar Isi
1. MPLS Dasar ... 5 2. MPLS VPN Konsep ... 27 3. MPLS VPN Dasar ... 38
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 3 | 70
Kata Pengantar
Ebook MPLS ini kita berikan secara free dengan tujuan untuk kemajuan kita bersama dan tentunya demi kemajuan IT Network di NKRI ini, dan tujuan lain adalah karena sudah seringnya tertundanya buku kita yang lain yaitu Cisco CCNP RS yang banyak orang yang menunggu buku tersebut dan bisa juga dibilang dengan adanya buku ini untuk menebus kesalahan kita yang belum bisa terbitnya buku Cisco CCNP RS, mohon maaf atas ketelatan tersebut
Tak lupa aku mengucapkan kepada keluarga kecilku, kepada anakku Nurfathimah Nushratun Mufidah yang mulai beranjak besar serta Muhammad Azri Dzaki yang terbitnya free workbook ini bertepatan dengan hari ulang tahun jagoanku yang ke-2 pada tanggal 3 September (3 Sept 2016) yang baru sembuh dari sakitnya, semoga kami semua selalu di hujani dengan kesehatan, kesejahteraan serta dinaungi keberkahan agar bisa membawa manfaat bagi kita semua, tak lupa juga buat kawan kawan seperjuanganku yang telah membantu melakukan pengecekan terhadap buku ini terimakasih pak Rendra Towidjojo, pak Robi Kasamuddin, pak Mohammad Afdhal Jauhari. Yang telah membantu projek projek ku selama ini aa Eza (Faisal Reza), mas(ter) Ramelan, mas(ter) Fathur Ridho, mas(ter) Akrom serta pak bos Aditya Vhisnu. Yang telah membantu dalam mengembangkan Putra putri bangsa ini mbah Suro Dhemit selaku punggawa BLC Telkom Klaten, sukses terus mbah dan sehat selalu yaaaa demi memajukan kemampuan Putra putri bangsa kita ini
Aku mengucapkan terima kasih juga buat groups whatsapp yang telah memberikan inspirasi, terimakasih para member “Group Guru-guru TKJ Best-Path”, “WA Group TNS BPN”, Group Diskusi FORTIMA”. Terima kasih juga kepada anak anakku yang lagi berada “diruang waktu dan jiwa” yang lagi mempersiapkan diri agar siyap bersaing dan “bertarung” di kancah dunia per-network-an, semoga mereka telah siyap dan bisa mengangkat orang tua mereka serta sekolahnya, semangat terus anak anak mondok BPN “BPN Never Stop Ngoprek”. Mohon maaf jika ada nama yang tidak aku sebutkan
Kita akui buku ini masih jauh dari kata sempurna karena untuk belajar MPLS kudu tau tentang routing protocol IGP (RIP, EIGRP, OSPF,IS-IS) serta EGP (BGP), mohon doakan kami agar bisa terus berkarya dan bisa memberikan manfaat buat kita semua
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 5 | 70
MPLS (Multi Protocol Label Switching)
1. MPLS Dasar
Syarat untuk membangun MPLS ada 4, diantaranya adalah
1. Mengaktifkan CEF (Cisco Express Forwarding), tetapi secara default fitur ini sudah aktif 2. Memasang IGP (Interior Gateway Protocol), bisa menggunakan apapun yang penting
bisa komunikasi ke semua router yang menjalankan MPLS 3. Mengaktifkan MPLS itu sendiri di global konfig dan di interface
4. Men-setting MTU tetapi untuk pilihan ini tidak wajib, minimal tidak wajib pada saat kita nge-lab
Mari kita langsung praktekan untuk membangun MPLS area dari dasar
Untuk membangun MPLS ini kita aktifkan dulu routing protocol, disini kita menggunakan routing protokolnya OSPF, masukkan konfig berikut ini ke dalam router R1
hostname R1 ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 ! router ospf 10 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 192.168.12.1 0.0.0.0 area 0 End
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 6 | 70
Masukkan konfig berikut ini ke dalam R2 hostname R2 ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 interface FastEthernet0/1 ip address 192.168.23.2 255.255.255.0 ! router ospf 10 network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 network 192.168.23.2 0.0.0.0 area 0 End
Masukkan konfig berikut ini ke dalam R3 hostname R3 ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/1 ip address 192.168.23.3 255.255.255.0 ! router ospf 10 network 3.3.3.3 0.0.0.0 area 0 network 192.168.23.3 0.0.0.0 area 0 End
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 7 | 70
Cek dari R1 apakah sudah terlihat ip loopback R2 & R3 ?
Terlihat dari hasil routing di R1 sudah bisa melihat loopback R2 &R3, selanjutnya kita tinggal aktifkan saja MPLS nya
Masukkan konfig berikut ini untuk aktifkan MPLS di R1 ip cef ! mpls label protocol ldp mpls ip ! interface FastEthernet0/0 mpls ip End
Masukkan konfig berikut ini untuk aktifkan MPLS di R2 ip cef ! mpls label protocol ldp mpls ip ! interface FastEthernet0/0 mpls ip ! interface FastEthernet0/1 mpls ip end
Masukkan konfig berikut untuk aktifkan MPLS di R3 ip cef
!
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 8 | 70 mpls ip ! interface FastEthernet0/1 mpls ip end
Terlihat di konfig untuk MPLS ada ip cef tetapi untuk konfig tersebut secara default sudah aktif, untuk melakukan pengetesan apakah CEF sudah aktif apa belum bisa dicoba dengan
menampilkan CEF Table dengan perintah sh ip cef. Berikut ini hasil dari IP CEF
Untuk MPLS IP di global konfig umumnya sudah diaktifkan juga secara default dan untuk MPLS setiap interface yang menjalankan MPLS harus di aktifkan juga. MPLS membutuhkan suatu protocol untuk mendistribusikan label dan porotkol tersebut adalah LDP, protocol label distribusi ada 2 yaitu TDP & LDP, defaultnya adalah LDP.
Kita bisa melihat interface mana saja yang mengaktifkan MPLS dan protocol label distribusi menggunakan protocol apa dengan perintah sh mpls interface
Selanjutnya bisa di lihat apakah router yang menjalankan MPLS sudah saling mengenali tetangganya apa belum bisa menggunakan perintah sh mpls ldp neighbor
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 9 | 70
Terlihat dari hasil perintah di atas terdapat ada 2 peer neighbor dari R2, yaitu ke LDP-ID 1.1.1.1 & ke LDP-ID 3.3.3.3 sedangkan LDP-ID kita adalah 2.2.2.2
Secara default LDP-ID memilih ip loopback tertinggi, kita juga bisa mendefiniskan mo menggunakan LDP-ID berapa dengan menggunakan perintah mpls ldp router-id <interface
fisikal> <force>
Perintah force digunakan jika MPLS kita sudah terbentuk dan kita memaksa router untuk merubah LDP-ID nya, tetapi jika MPLS belum terbentuk kita bisa menggunakan perintah tersebut tanpa menggunakan force
Untuk melihat LDP-ID dan juga melihat MPLS tetangganya bisa juga menggunakan perintah sh
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 10 | 70
Di IGP memiliki routing table, begitupun di MPLS juga ada label table yang bisa di lihat dengan perintah sh mpls forwarding-table
Terlihat disana untuk menuju ke ip loopback R3 3.3.3.3/32 di R1 akan menggunakan label 16 dan di lempar ke router MPLS tetangganya R1 yang lewat interface Fa0/0 yaitu R2, di R2 akan menggunakan label 16 juga, ada baiknya lakukan perintah yang sama untuk di R2 & di R3. Untuk melakukan manajemen penggunaan label agar bisa melihat labelnya bisa menggunakan perintah mpls label range <label awal> <label akhir>
Tetapi routernya harus di reload dahulu, ada baiknya melakukan perencanaan terlebih dahulu sebelum implement MPLS, apakah mau menggunakan perintah mpls label range apa tidak Kita juga bisa melihat path dari tujuan kita akan melewati router MPLS yang mana saja, dengan perintah sh mpls ldp bindings jika ingin spesifik bisa menambahkan ip tujuan dan dilanjutkan detil
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 11 | 70
Selanjutnya untuk melakukan verifikasi kita bisa melakukan ping ke semua loopback di semua router, ping disini untuk melakukan verifikasi IGP
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 12 | 70
Dan ternyata berhasil, anda bisa lakukan hal yang sama untuk R2 & R3, selanjutnya yaqinkan bahwa semua router di MPLS area bisa ping mpls
Terlihat bahwa kita tidak bisa mpls ke diri kita sendiri, selain verifikasi ping MPLS kita juga bisa verifikasi traceroute MPLS, anda juga bisa lakukan hal yang sama untuk R2 & R3
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 13 | 70
Terlihat traceroute ke semua ip loopback di semua router dan kita tidak bisa traceroute ke dirinya sendiri, anda juga bisa lakukan hal yang sama untuk R2 & R3
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 14 | 70
Berikut ini adalah konfig full (sh run) untuk semua router dari MPLS Dasar R1#sh run
Building configuration...
Current configuration : 1305 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ! mpls label protocol ldp
multilink bundle-name authenticated ! ! ! ! ! ! ! ! ! !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 15 | 70 ! ! ! ! ! ! ! ! ! ! ! ! archive log config hidekeys ! ! ip tcp synwait-time 5 ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto mpls ip ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 16 | 70 shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router ospf 10 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 192.168.12.1 0.0.0.0 area 0 ! ! ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! ! ! ! ! ! control-plane ! ! ! ! ! !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 17 | 70 ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end R1#
Dan berikut ini sh run dari R2 R2
R2#sh run
Building configuration...
Current configuration : 1365 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 18 | 70
!
no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ! mpls label protocol ldp
multilink bundle-name authenticated ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! archive log config hidekeys
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 19 | 70 ! ip tcp synwait-time 5 ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto mpls ip ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 ip address 192.168.23.2 255.255.255.0 duplex auto speed auto mpls ip ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router ospf 10
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 20 | 70 log-adjacency-changes network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 network 192.168.23.2 0.0.0.0 area 0 ! ! ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 21 | 70
end R2#
Dan berikut ini sh run dari R3 R3
R3#sh run
Building configuration...
Current configuration : 1305 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ! mpls label protocol ldp
multilink bundle-name authenticated !
! !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 22 | 70 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! archive log config hidekeys ! ! ip tcp synwait-time 5 ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 23 | 70 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 ip address 192.168.23.3 255.255.255.0 duplex auto speed auto mpls ip ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router ospf 10 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 0 network 192.168.23.3 0.0.0.0 area 0 ! ! ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! ! ! ! ! !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 24 | 70 control-plane ! ! ! ! ! ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end R3#
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 27 | 70
Sebelum masuk ke materi MPLS VPN ada baiknya kita telaah lebih dalam apa sih yang dimaksud dengan VPN di dalam MPLS, dan kenapa di sebut VPN
Disebut VPN disini karena si MPLS dianggap transparent jadi ujung dengan ujung router bisa saling komunikasi langsung, kita langsung praktek dengan menggunakan topologi yang sudah ada, tetapi disini kita akan menggunakan iBGP dengan ASN 10 yang dipasang di R1 & R3 Pasang konfig iBGP di R1
router bgp 10
neighbor 192.168.23.3 remote-as 10 end
Pasang konfig iBGP di R3 router bgp 10
neighbor 192.168.12.1 remote-as 10 end
Cek di R1 atau di R3 dengan perintah sh ip bgp summary
Jika kolom State/PfxRcd terdapat angka berarti sudah betul, selanjutnya lakukan advertise di R1 dengan membuat ip loopback baru
interface Loopback10 ip address 10.10.10.10 255.255.255.255 ! router bgp 10 network 10.10.10.10 mask 255.255.255.255 end
Kita sudah advertise ip interface loopback10 di R1 lalu selanjutnya cek di R3 apakah dia sudah nerima hasil advertise-nya dengan perintah sh ip bgp
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 28 | 70
Ternyata sudah dapat dan hasilnya best sesuai yang diinginkan, selanjutnya kita cek apakah ip tersebut sudah masuk ke dalam routing table R3 kah ?
Terlihat IP-nya sudah ada di dalam di routing table, selanjutnya kita ping dari R3 ke ip loopback10 R1, apakah bisa ?
Ternyata hasilnya unreachable, kita cek dengan traceroute, mentok dimanakah gerangan errornya
Ternyata mentoknya di IP 192.168.23.2 dan IP tersebut di miliki oleh R2, sekarang kita cek di R2 apakah ada routing ke 10.10.10.10 ?
Nnahhh ternyata Network not in table, jika dari R3 ingin ping ke R1 solusinya adalah router yang di antara R3 & R1 harus memiliki routing juga dan cara untuk mendapatkan routing di R2, ada 2 cara diantaranya
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 29 | 70
yang sudah di redistribusi, atau
2. Si R2 pasang static route untuk prefix 10.10.10.10 ke arah R1
Terjadi sangat ribet kan cara seperti itu, atau kita bisa juga menggunakan tunneling antar R1 & R3 lalu buat ulang BGP neighbor lewat jalur tunneling, sekarang kita bikin tunneling dari R1 ke R3
Buat interface tunnel di R1 interface Tunnel0
ip address 192.168.13.1 255.255.255.0 tunnel source Loopback0
tunnel destination 3.3.3.3 end
Buat interface tunnel di R3 interface Tunnel0
ip address 192.168.13.3 255.255.255.0 tunnel source Loopback0
tunnel destination 1.1.1.1 end
Untuk melakukan verifikasi interface tunnel ini kita bisa cek dengan melihat apakah interface-nya status-interface-nya up up, bisa cek dengan menggunakan perintah sh interface tunnel 0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 30 | 70
Yaqinkan bahwa baris Tunnel0 is up, line protocol is up, selanjutnya bisa dilakukan pengecekan routing table apakah sudah via tunnel apa belum
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 31 | 70
di R1 & R3
Matikan BGP neighbor existing dan aktifkan peer baru ke R3, pasang di R1 router bgp 10
neighbor 192.168.23.3 shutdown neighbor 192.168.13.3 remote-as 10 end
Matikan BGP neighbor existing dan aktifkan peer baru ke R1, pasang di R3 router bgp 10
neighbor 192.168.12.1 shutdown neighbor 192.168.13.1 remote-as 10 end
Cek apakah BGP peer sudah established ? cek dengan perintah sh ip bgp summary Cek peering status di R1
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 32 | 70
Ternyata di R3 juga sudah established dan di R3 juga sudah nerima 1 prefix dari R1, kita cek apakah prefix ip-nya
Ternyata prefix IP 10.10.10.10 sudah nampil seperti hal sebelumnya, tetapi apakah IP tersebut sudah bisa di ping dari R3 kah ?
Sebelum ping kita cek di routing table terlebih dahulu, akan lewat manakah nantinya jalur ping ke 10.10.10.10
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 33 | 70
Tunnel0 berarti nantinya prefix 10.10.10.10 jalur ping-nya akan lewat Tunnel0, sekarang kita cek
Ping IP 10.10.10.10 dari R3
Ayeeee….. sudah bisa ping sekarang ke ping 10.10.10.10 yang sebelumnya tidak bisa, karena yang sebelumnya tidak bisa karena di lempar ke R2 dan R2 gak tau jalur untuk menuju ke 10.10.10.10, sekarang sudah bisa karena lewat Tunnel
Nahhh sekarang masuk ke MPLS yang dibilang kenapa dibilang MPLS-VPN, kita hapus terlebih dahulu interface tunnel dan peer BGP lewat tunnel
Hapus int tunnel 0 dan peer BGP ke R3, lalu akifkan BGP peer yang tadi di shutdown, lakukan di R1 no int tun 0 router bgp 10 no neighbor 192.168.13.3 remote-as 10 no neighbor 192.168.23.3 shutdown end
Hapus int tunnel 0 dan peer BGP ke R1, lakukan di R3 no int tun 0
router bgp 10
no neighbor 192.168.13.1 remote-as 10 no neighbor 192.168.12.1 shutdown end
Selanjutnya setelah kita aktifkan kembali yang tadi kita shutdown akan terdapat pop-up
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 34 | 70
Sekarang kita cek routing table di R3 apakah ada di list untuk ip 10.10.10.10
Nahh ternyata sudah ada, kita coba cek ping apakah sudah bisa
Waduh, ternyata masih lom bisa ping juga nih  kita coba ping menggunakan source
Ternyata gagal juga, kita cek label di R2 ada apakah gerangan di sana
Hhmm….ternyata labelnya hanya bisa membaca untuk IP 3.3.3.3 & 1.1.1.1 saja, kalo gitu kita ganti BGP peer di R1 & R3 menggunakan loopback saja, jangan menggunakan ip interface fisikal Di R1, buang peer yang lama dan pasang peer yang baru yang menggunakan loopback
router bgp 10
no neighbor 192.168.23.3
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 35 | 70
end
Di R3, buang peer yang lama dan pasang peer yang baru yang menggunakan loopback router bgp 10
no neighbor 192.168.12.1
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 update-source Loopback0 end
Di R3, cek status BGP peer
Ternyata sudah established, selanjutnya cek BGP Table-nya
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 36 | 70
Ternyata prefix IP 10.10.10.10 didapat dari 1.1.1.1 dan IP tersebut di miliki oleh R1 dan ip tersebut terdaftar di labelnya R2, sekarang kita coba test ping
Alhamdulillah, sekarang sudah bisa dan berhasil
Dan itulah kesimpulannya kenapa disebut MPLS-VPN, pengertian VPN disini sendiri jalur yang di lewatin seakan akan lewat tunnel dan tunnel itu sendiri menggunakan label dan label tersebut dibuat oleh si MPLS 
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 38 | 70
3. MPLS VPN Dasar
Setelah kita berhasil memahami asal usul tentang MPLS VPN selanjutnya kita akan melanjutkan dengan konfig dari MPLS VPN
Selanjutnya kita akan menggunakan topologi seperti ini
Untuk membangun MPLS-VPN ini kita mulai dari membangun router yang berada di wilayah MPLS Area yang dimulai membuat core MPLS terlebih dahulu, kita mulai pemasangan konfig di router P-01 hostname P-01 ! ip cef ! mpls label range 200 299 mpls label protocol ldp
mpls ldp router-id Loopback0 force ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Loopback20 ip address 20.20.20.20 255.255.255.255 !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 39 | 70 ip address 192.168.12.2 255.255.255.0 mpls ip ! interface FastEthernet0/1 ip address 192.168.23.2 255.255.255.0 ip ospf network point-to-point
mpls ip ! router ospf 10 network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 network 192.168.23.2 0.0.0.0 area 0 ! End
Pasang konfig core MPLS di PE-01 hostname PE-01 ! ip cef ! ! mpls label range 100 199 mpls label protocol ldp
mpls ldp router-id Loopback0 force ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Loopback10 ip address 10.10.10.10 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 mpls ip ! router ospf 10 network 1.1.1.1 0.0.0.0 area 0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 40 | 70 network 192.168.12.1 0.0.0.0 area 0 ! router bgp 65000 network 10.10.10.10 mask 255.255.255.255 neighbor 3.3.3.3 remote-as 65000
neighbor 3.3.3.3 update-source Loopback0 !
End
Pasang konfig di core MPLS PE-02 hostname PE-02 ! ip cef ! mpls label range 300 399 mpls label protocol ldp mpls ldp router-id Loopback0 ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Loopback30 ip address 30.30.30.30 255.255.255.255 ! interface FastEthernet0/1 ip address 192.168.23.3 255.255.255.0 ip ospf network point-to-point
mpls ip ! router ospf 10 network 3.3.3.3 0.0.0.0 area 0 network 192.168.23.3 0.0.0.0 area 0 ! router bgp 65000 neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0 no auto-summary
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 41 | 70
Goal dari konfig ini adalah kita bisa ping MPLS antar PE & juga kita bisa ping prefix IP 10.10.10.10 yang sudah di advertise oleh PE-01
Cek apakah IP Loopback PE-01 bisa di ping MPLS dari PE-02 karena IP Loopback 0 di PE-01 digunakan sebagai LDP-ID
Jika sudah berhasil selanjutnya cek IP yang sudah di advertise BGP di PE-01
Ternyata ada dan selanjutnya cek di routing table
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 42 | 70
Berhasil dan ternyata jalur BGP Tunneling via MPLS sudah berhasil, selanjutnya pasang VRF di masing-masing PE serta MP-BGP
Pemasangan konfig MPLS-VPN di PE-01 hostname PE-01 ! ip vrf Client-01 rd 65000:10 route-target export 65000:10 route-target import 65000:10 ! ip vrf Client-02 rd 65000:11 route-target export 65000:11 route-target import 65000:11 ! interface FastEthernet0/1
description to Corporate Client 01 ip vrf forwarding Client-01
ip address 192.168.46.1 255.255.255.0 !
interface FastEthernet1/0
description to Corporate Client 02 ip vrf forwarding Client-02
ip address 192.168.46.1 255.255.255.252 !
router ospf 11 vrf Client-02 redistribute bgp 65000 subnets network 192.168.46.1 0.0.0.0 area 0 ! router bgp 65000 ! address-family vpnv4 neighbor 3.3.3.3 activate
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 43 | 70
!
address-family ipv4 vrf Client-02 redistribute connected
redistribute ospf 11 vrf Client-02 match internal external 1 external 2 exit-address-family
!
address-family ipv4 vrf Client-01 redistribute connected redistribute static exit-address-family ! ip route vrf Client-01 4.4.4.4 255.255.255.255 192.168.46.2 ip route vrf Client-01 46.46.46.46 255.255.255.255 192.168.46.2 ! end
Pemasangan konfig MPLS-VPN di PE-02 hostname PE-02 ! ip vrf Client-01 rd 65000:10 route-target export 65000:10 route-target import 65000:10 ! ip vrf Client-02 rd 65000:11 route-target export 65000:11 route-target import 65000:11 ! interface FastEthernet0/0 ip vrf forwarding Client-01 ip address 192.168.57.1 255.255.255.252 ! interface FastEthernet1/0 ip vrf forwarding Client-02 ip address 192.168.57.1 255.255.255.252 !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 44 | 70
router eigrp 100 auto-summary !
address-family ipv4 vrf Client-02
redistribute bgp 65000 metric 1 1 1 1 1 network 192.168.57.1 0.0.0.0 no auto-summary autonomous-system 100 exit-address-family ! router rip version 2 no auto-summary !
address-family ipv4 vrf Client-01 redistribute bgp 65000 metric 1 network 192.168.57.0 no auto-summary version 2 exit-address-family ! router bgp 65000 ! address-family vpnv4 neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended exit-address-family
!
address-family ipv4 vrf Client-02 redistribute connected
redistribute eigrp 100 exit-address-family !
address-family ipv4 vrf Client-01 redistribute connected
redistribute rip exit-address-family !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 45 | 70
Client-01 & Client-02, pemasangan konfig di CE tidak ada konfig MPLS-nya melainkan hanya konfig router biasa saja
Pasang konfig MPLS CE di R4 untuk Client-01, di R4 menggunakan static route jadi kita cukup menggunakan default-route saja
hostname R4 ! ip cef ! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ! interface Loopback46 ip address 46.46.46.46 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.46.2 255.255.255.252 ip route 0.0.0.0 0.0.0.0 192.168.46.1 ! end
Pasang konfig MPLS CE di R5 untuk Client-01, di R5 menggunakan routing protocol RIP hostname R5 ! interface Loopback0 ip address 5.5.5.5 255.255.255.255 ! interface Loopback57 ip address 57.57.57.57 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.57.2 255.255.255.252 ! router rip version 2 network 5.0.0.0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 46 | 70 network 57.0.0.0 network 192.168.57.0 no auto-summary ! end
Karena di PE sudah dibuatkan interface vrf dan juga routingnya yang sudah di redistribusikan ke MP-BGP jadi kita bisa cek routing table di R5 karena menggunakan routing protocol dynamic
Terlihat di R5 sudah bisa membaca IP Loopback yang di pasang di R4, selanjutnya kita coba ping IP Loopback R4 4.4.4.4
Terlihat di R5 bisa ping ke R4 dan terlihat berhenti di IP 192.168.46.2 kepunyaannya R4 Lakukan hal serupa untuk IP Loopback R4 46.46.46.46
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 47 | 70
Sama seperti IP Loopback R4 yang 4.4.4.4 ternyata perlakuannya untuk 46.46.46.46 juga sama dan berhasil
Selanjutnya anda bisa coba lakukan verifikasi dari R4 ke R5 !!!!! Kita pasang CE untuk Client-02, pasang konfig untuk R6
hostname R6 ! interface Loopback0 ip address 6.6.6.6 255.255.255.255 ! interface Loopback46 ip address 46.46.46.46 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.46.2 255.255.255.252 ! router ospf 10 log-adjacency-changes network 6.6.6.6 0.0.0.0 area 0 network 46.46.46.46 0.0.0.0 area 0 network 192.168.46.2 0.0.0.0 area 0 ! end
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 48 | 70 hostname R7 ! interface Loopback0 ip address 7.7.7.7 255.255.255.255 ! interface Loopback57 ip address 57.57.57.57 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.57.2 255.255.255.252 ! router eigrp 100 network 7.7.7.7 0.0.0.0 network 57.57.57.57 0.0.0.0 network 192.168.57.2 0.0.0.0 no auto-summary ! end Lakukan verifikasi di R6
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 49 | 70
Ping ke 7.7.7.7 & 57.57.57.57 telah berhasil di lakukan
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 50 | 70
Berikut ini adalah sh run dari semua router Hasil sh run dari P-01
P-01#sh run
Building configuration...
Current configuration : 1522 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname P-01 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! no ip domain lookup ! mpls label range 200 299 mpls label protocol ldp
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Loopback20
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 51 | 70 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto mpls ip ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 ip address 192.168.23.2 255.255.255.0 ip ospf network point-to-point
duplex auto speed auto mpls ip ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router ospf 10 log-adjacency-changes network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 network 192.168.23.2 0.0.0.0 area 0 ! no ip http server no ip http secure-server
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 52 | 70
!
no cdp log mismatch duplex !
mpls ldp router-id Loopback0 force ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! end P-01#
Hasil sh run dari PE-01 PE-01#sh run
Building configuration...
Current configuration : 2645 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname PE-01 ! boot-start-marker boot-end-marker !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 53 | 70
memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! ip vrf Client-01 rd 65000:10 route-target export 65000:10 route-target import 65000:10 ! ip vrf Client-02 rd 65000:11 route-target export 65000:11 route-target import 65000:11 ! no ip domain lookup ! mpls label range 100 199 mpls label protocol ldp
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Loopback10 ip address 10.10.10.10 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto mpls ip
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 54 | 70 ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1
description to Corporate Client 01 ip vrf forwarding Client-01 ip address 192.168.46.1 255.255.255.0 duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0
description to Corporate Client 02 ip vrf forwarding Client-02
ip address 192.168.46.1 255.255.255.252 duplex auto
speed auto !
router ospf 11 vrf Client-02 log-adjacency-changes redistribute bgp 65000 subnets network 192.168.46.1 0.0.0.0 area 0 ! router ospf 10 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 192.168.12.1 0.0.0.0 area 0 ! router bgp 65000 no synchronization bgp log-neighbor-changes network 10.10.10.10 mask 255.255.255.255
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 55 | 70
neighbor 3.3.3.3 update-source Loopback0 no auto-summary
!
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended exit-address-family
!
address-family ipv4 vrf Client-02 redistribute connected
redistribute ospf 11 vrf Client-02 match internal external 1 external 2
no synchronization exit-address-family !
address-family ipv4 vrf Client-01 redistribute connected redistribute static no synchronization exit-address-family ! ip route vrf Client-01 4.4.4.4 255.255.255.255 192.168.46.2 ip route vrf Client-01 46.46.46.46 255.255.255.255 192.168.46.2 ! no ip http server no ip http secure-server !
no cdp log mismatch duplex !
mpls ldp router-id Loopback0 force ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 56 | 70 privilege level 15 logging synchronous line vty 0 4 login ! end PE-01#
Hasil sh run dari PE-02 PE-02#sh run
Building configuration...
Current configuration : 2654 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname PE-02 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef ! ip vrf Client-01 rd 65000:10 route-target export 65000:10 route-target import 65000:10 ! ip vrf Client-02 rd 65000:11 route-target export 65000:11
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 57 | 70 ! no ip domain lookup ! mpls label range 300 399 mpls label protocol ldp
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Loopback30 ip address 30.30.30.30 255.255.255.255 ! interface FastEthernet0/0 ip vrf forwarding Client-01 ip address 192.168.57.1 255.255.255.252 duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 ip address 192.168.23.3 255.255.255.0 ip ospf network point-to-point
duplex auto speed auto mpls ip !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 58 | 70 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 ip vrf forwarding Client-02 ip address 192.168.57.1 255.255.255.252 duplex auto speed auto ! router eigrp 100 auto-summary !
address-family ipv4 vrf Client-02
redistribute bgp 65000 metric 1 1 1 1 1 network 192.168.57.1 0.0.0.0 no auto-summary autonomous-system 100 exit-address-family ! router ospf 10 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 0 network 192.168.23.3 0.0.0.0 area 0 ! router rip version 2 no auto-summary !
address-family ipv4 vrf Client-01 redistribute bgp 65000 metric 1 network 192.168.57.0 no auto-summary version 2 exit-address-family ! router bgp 65000 no synchronization bgp log-neighbor-changes
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 59 | 70
neighbor 1.1.1.1 update-source Loopback0 no auto-summary
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended exit-address-family
!
address-family ipv4 vrf Client-02 redistribute connected
redistribute eigrp 100 no synchronization exit-address-family !
address-family ipv4 vrf Client-01 redistribute connected redistribute rip no synchronization exit-address-family ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! mpls ldp router-id Loopback0 ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 60 | 70 login ! ! end PE-02#
Hasil sh run dari R4 R4#sh run
Building configuration...
Current configuration : 1266 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R4 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef
!
no ip domain lookup !
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 61 | 70 ip address 4.4.4.4 255.255.255.255 ! interface Loopback46 ip address 46.46.46.46 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.46.2 255.255.255.252 duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! ip route 0.0.0.0 0.0.0.0 192.168.46.1 ! no ip http server no ip http secure-server !
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 62 | 70 ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! end R4#
Hasil sh run dari R5 R5#sh run
Building configuration...
Current configuration : 1326 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R5 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 63 | 70
no ip domain lookup !
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 ! interface Loopback0 ip address 5.5.5.5 255.255.255.255 ! interface Loopback57 ip address 57.57.57.57 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.57.2 255.255.255.252 duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 64 | 70 no ip address shutdown duplex auto speed auto ! router rip version 2 network 5.0.0.0 network 57.0.0.0 network 192.168.57.0 no auto-summary ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! end R5#
Hasil sh run dari R6 R6#sh run
Building configuration...
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 65 | 70
!
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R6 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef
!
no ip domain lookup !
multilink bundle-name authenticated ! archive log config hidekeys ! ip tcp synwait-time 5 ! interface Loopback0 ip address 6.6.6.6 255.255.255.255 ! interface Loopback46 ip address 46.46.46.46 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.46.2 255.255.255.252 duplex auto speed auto ! interface Serial0/0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 66 | 70 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router ospf 10 log-adjacency-changes network 6.6.6.6 0.0.0.0 area 0 network 46.46.46.46 0.0.0.0 area 0 network 192.168.46.2 0.0.0.0 area 0 ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 67 | 70 privilege level 15 logging synchronous line vty 0 4 login ! end R6#
Hasil sh run dari R7 R7#sh run
Building configuration...
Current configuration : 1348 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R7 ! boot-start-marker boot-end-marker ! no aaa new-model memory-size iomem 5
no ip icmp rate-limit unreachable ip cef
!
no ip domain lookup !
multilink bundle-name authenticated !
archive log config hidekeys
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 68 | 70 ! ip tcp synwait-time 5 ! interface Loopback0 ip address 7.7.7.7 255.255.255.255 ! interface Loopback57 ip address 57.57.57.57 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.57.2 255.255.255.252 duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 no ip address shutdown duplex auto speed auto ! router eigrp 100 network 7.7.7.7 0.0.0.0 network 57.57.57.57 0.0.0.0
T I D A K U N T U K D I P E R J U A L B E L I K A N | H a l a m a n 69 | 70 no auto-summary ! no ip http server no ip http secure-server !
no cdp log mismatch duplex ! control-plane ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! end R7#