Selasa, 02 Mei 2017

Lab 139 - Inter-AS MPLS VPN - Option B (VPNv4 Between ASBR)

Pada postingan sebelumnya kita telah membahas Inter-AS MPLS VPN - Option A. Selanjutnya pada lab ini kita akan membahas Inter-AS MPLS VPN - Option B.

Jika pada Option A, kita tidak menjalankan MPLS antar service provider. Namun jika menggunakan Option B, maka kita juga akan menjalankan MPLS antar service provider.
Nantinya antar R4 dan R5 juga akan dikonfigurasikan MPLS.

Diasumsikan kita telah mengkonfigurasi seperti pada postingan selanjutnya ya.. jika belum, silahkan menuju postingan sebelumnya terlebih dahulu.

Pada lab ini kita akan melanjutkan konfigurasi dari lab selanjutnya. Pertama kita hapus dulu koneksi antar R4 dan R5.
R4(config)#no ip vrf A R4(config)#no int e0/1.45
R5(config)#no ip vrf B R5(config)#no int e0/0.45
Sekarang kita konfigurasikan addressing antar R4 dan R5. kali ini kita perlu membuat vrf ya
R4(config)#int e0/1 R4(config-if)#no sh R4(config-if)#ip add 45.45.45.4 255.255.255.0
R5(config)#int e0/0 R5(config-if)#no sh R5(config-if)#ip add 45.45.45.5 255.255.255.0
Selanjutnya kita konfigurasikan VPNv4 antar R4 dan R5
R4(config-if)#router bgp 100 R4(config-router)#nei 45.45.45.5 remote-as 200 R4(config-router)#address-family vpnv4 R4(config-router-af)#nei 45.45.45.5 activate
R5(config)#router bgp 200 R5(config-router)#nei 45.45.45.4 remote-as 100 R5(config-router)#address-family vpnv4 R5(config-router-af)#nei 45.45.45.4 activate
Pada lab ini kita akan menggunakan BGP untuk memforward MPLS label (kita tidak menggunakan LDP), untuk itu kita harus mengaktifkan mpls bgp forwarding seperti berikut
R4(config-router-af)#int e0/1 R4(config-if)#mpls bgp forwarding
R5(config-router)#int e0/0 R5(config-if)#mpls bgp forwarding
Sekarang kita coba tabel routing BGP di R4 dan R5
R4(config)#do sh ip bgp vpnv4 all R4(config)#
R5(config)#do sh ip bgp vpnv4 all R5(config)#
Perhatikan bahwa saat ini R4 dan R5 tidak memiliki tabel routing sama sekali. Kenapa bisa seperti ini? karena kita tidak membuat vrf pada R4 dan R5.

Untuk mengatasi masalah ini, kita bisa menggunakan 2 cara. cara pertama yaitu dengan membuat vrf dan mengimport seluruh VRF. berarti R4 harus mengimport 100:10 dan juga 200:20, begitu juga dengan R5 juga harus mengimport 100:10 dan 200:200.. tentu saja cara ini akan sangat panjang jika kita memiliki banyak vrf.

Solusi kedua adalah dengan menggunakan perintah no bgp default route-target filter seperti berikut
R4(config)#router bgp 100 R4(config-router)#no bgp default route-target filter
R5(config)#router bgp 200 R5(config-router)#no bgp default route-target filter
Sekarang coba kita cek lagi tabel routing BGP di R4 dan R5
R4(config-router)#do sh ip bgp vpnv4 all BGP table version is 16, 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, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 *>i 1.1.1.1/32 2.2.2.2 0 100 0 10 i Route Distinguisher: 200:20 *> 8.8.8.8/32 45.45.45.5 0 200 20 i
R5(config-router)#do sh ip bgp vpnv4 all BGP table version is 15, local router ID is 5.5.5.5 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 *> 1.1.1.1/32 45.45.45.4 0 100 10 i Route Distinguisher: 200:20 *>i 8.8.8.8/32 7.7.7.7 0 100 0 20 i
Perhatikan bahwa saat ini R4 dan R5 sudah memiliki tabel routing BGP tentang customer A dan customer B.

Sekarang kita coba cek di masing-masing PE,
R2(config-vrf)#do sh ip bgp vpnv4 all 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, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 (default for vrf A) *> 1.1.1.1/32 12.12.12.1 0 0 10 i
Perhatikan bahwa PE di Service Provider 1 (R2) masih belum memiliki route menuju customer B. kita coba lihat PE di Service Provider 2
R7(config-vrf)#do sh ip bgp vpnv4 all BGP table version is 9, local router ID is 7.7.7.7 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 200:20 (default for vrf B) *> 8.8.8.8/32 78.78.78.8 0 0 20 i
Perhatikan bahwa PE di service provider 2 (R7) juga masih belum punya route menuju customer A.

Kenapa demikian? Hal ini dikarenakan PE di Service Provider 1 mengexport route-target 100:10, sedangkan PE di Service Provider 2 belum mengimport route-target tersebut. Begitu juga dengan PE di Service Provider 2 yang mengexport route-target 200:20 dan PE di service provider 1 belum mengimport route-target tersebut.

Oke kita lakukan konfigurasi berikut
R2(config)#ip vrf A R2(config-vrf)#route-target import 200:20
Konfigurasi diatas digunakan oleh PE Service Provider 1 untuk mengimport route dari customer B. kita lihat hasilnya
R2(config-vrf)#do sh ip bgp vpnv4 all 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, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 (default for vrf A) *> 1.1.1.1/32 12.12.12.1 0 0 10 i * i 8.8.8.8/32 45.45.45.5 0 100 0 200 20 i Route Distinguisher: 200:20 * i 8.8.8.8/32 45.45.45.5 0 100 0 200 20 i
Perhatikan bahwa hasilnya sudah ada, selanjutnya kita lakukan di PE Service Provider 2.
R7(config)#ip vrf B R7(config-vrf)#route-target import 100:10
Kita lihat hasilnya
R7(config-vrf)#do sh ip bgp vpnv4 all BGP table version is 9, local router ID is 7.7.7.7 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 * i 1.1.1.1/32 45.45.45.4 0 100 0 100 10 i Route Distinguisher: 200:20 (default for vrf B) * i 1.1.1.1/32 45.45.45.4 0 100 0 100 10 i *> 8.8.8.8/32 78.78.78.8 0 0 20 i
Perhatikan bahwa saat ini masing-masing PE sudah memiliki tabel routing BGP yang lengkap.

Tapi tunggu dulu, R2 memang sudah mengenai 8.8.8.8, tapi route nya masih belum best. perhatikan bahwa tidak ada symbol > pada route tersebut. Untuk mengatasi hal tersebut kita bisa mengkonfigurasikan next-hop-self di ASBR seperti berikut
R4(config)#router bgp 100 R4(config-router)#address-family vpnv4 R4(config-router-af)#nei 2.2.2.2 next-hop-self
Kita coba lihat lagi di PE
R2(config-vrf)#do sh ip bgp vpnv4 all BGP table version is 11, 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, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 (default for vrf A) *> 1.1.1.1/32 12.12.12.1 0 0 10 i *>i 8.8.8.8/32 4.4.4.4 0 100 0 200 20 i Route Distinguisher: 200:20 *>i 8.8.8.8/32 4.4.4.4 0 100 0 200 20 i
Perhatikan bahwa saat ini route-nya sudah best. selanjutnya kita lakukan di R5
R5(config)#router bgp 200 R5(config-router)#address-family vpnv4 R5(config-router-af)#nei 7.7.7.7 next-hop-self
Kita coba lihat hasilnya di R7
R7(config-vrf)#do sh ip bgp vpnv4 all BGP table version is 11, local router ID is 7.7.7.7 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:10 *>i 1.1.1.1/32 5.5.5.5 0 100 0 100 10 i Route Distinguisher: 200:20 (default for vrf B) *>i 1.1.1.1/32 5.5.5.5 0 100 0 100 10 i *> 8.8.8.8/32 78.78.78.8 0 0 20 i
Perhatikan bahwa saat ini jalurnya sudah best. Terahir kita coba lihat di sisi customer
R1#sh ip rou ... Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 8.0.0.0/32 is subnetted, 1 subnets B 8.8.8.8 [20/0] via 12.12.12.2, 00:02:25 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.12.12.0/24 is directly connected, Ethernet0/0 L 12.12.12.1/32 is directly connected, Ethernet0/0
R8#sh ip route ... Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets B 1.1.1.1 [20/0] via 78.78.78.7, 00:01:52 8.0.0.0/32 is subnetted, 1 subnets C 8.8.8.8 is directly connected, Loopback0 78.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 78.78.78.0/24 is directly connected, Ethernet0/0 L 78.78.78.8/32 is directly connected, Ethernet0/0
Perhatikan bahwa saat ini customer 1 sudah punya tabel routing tentang customer 2, begitu juga dengan customer 2 juga sudah punya tabel routing tentang customer 1.

Kita coba lakukan ping
R1#ping 8.8.8.8 sou lo0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 8.8.8.8, 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 = 2/2/3 ms
Oke hasilnya sukses!!.. coba kita lakukan traceroute
R1#trace 8.8.8.8 sou lo0 Type escape sequence to abort. Tracing the route to 8.8.8.8 VRF info: (vrf in name/id, vrf out name/id) 1 12.12.12.2 1 msec 0 msec 0 msec 2 23.23.23.3 [MPLS: Labels 18/22 Exp 0] 2 msec 1 msec 2 msec 3 34.34.34.4 [MPLS: Label 22 Exp 0] 1 msec 1 msec 1 msec 4 45.45.45.5 [MPLS: Label 18 Exp 0] 2 msec 2 msec 1 msec 5 56.56.56.6 [MPLS: Labels 16/20 Exp 0] 1 msec 2 msec 1 msec 6 78.78.78.7 [MPLS: Label 20 Exp 0] 2 msec 1 msec 1 msec 7 78.78.78.8 1 msec 1 msec 2 msec
Perhatikan bahwa saat ini paket nya sudah berlabel. Jika Anda ingat, pada Option A, saat paket melewati 45.45.45.5, paket tersebut tidak berlabel. perhatikan hasil trace route saat menggunakan option A berikut
R1#trace 8.8.8.8 sou lo0 Type escape sequence to abort. Tracing the route to 8.8.8.8 VRF info: (vrf in name/id, vrf out name/id) 1 12.12.12.2 1 msec 5 msec 1 msec 2 23.23.23.3 [MPLS: Labels 18/16 Exp 0] 1 msec 1 msec 0 msec 3 45.45.45.4 [MPLS: Label 16 Exp 0] 0 msec 0 msec 1 msec 4 45.45.45.5 1 msec 1 msec 1 msec 5 56.56.56.6 [MPLS: Labels 16/20 Exp 0] 2 msec 1 msec 2 msec 6 78.78.78.7 [MPLS: Label 20 Exp 0] 1 msec 2 msec 1 msec 7 78.78.78.8 2 msec 1 msec 2 msec
Oke.. sudah tau bedanya kan?

Perhatikan ilustrasi berikut
R4(config-router-af)#do sh ip bgp vpnv4 all 8.8.8.8 BGP routing table entry for 200:20:8.8.8.8/32, version 15 Paths: (1 available, best #1, no table) Advertised to update-groups: 6 Refresh Epoch 4 200 20 45.45.45.5 from 45.45.45.5 (5.5.5.5) Origin IGP, localpref 100, valid, external, best Extended Community: RT:200:20 mpls labels in/out 22/18
Perhatikan bahwa saat paket keluar dari ASBR, paket tersebut akan diberikan label kembali. bandingkan dengan hasil show pada Option A berikut
R4(config)#do sh ip bgp vpnv4 all 8.8.8.8 BGP routing table entry for 100:10:8.8.8.8/32, version 8 Paths: (1 available, best #1, table A) Advertised to update-groups: 3 Refresh Epoch 1 200 20 45.45.45.5 from 45.45.45.5 (5.5.5.5) Origin IGP, localpref 100, valid, external, best Extended Community: RT:100:10 mpls labels in/out 16/nolabel
Oke.. sudah tau bedanya kan? sampai disini dulu yaa.. semoga bermanfaat.. semoga segera ada kesempatan untuk nulis lagi ya.. hehe

Like the Post? Do share with your Friends.

Tidak ada komentar:

Posting Komentar

Komentar

FeedBack

Jika Anda merasa terbantu dengan artikel dari Coretan Bocah IT, silahkan berlangganan GRATIS via email. Dengan begitu, Anda akan mendapat kiriman artikel setiap ada artikel baru yang terbit di Coretan Bocah IT

Masukkan Email :

IconIconIconFollow Me on Pinterest