MPLS L3VPN Konfigurasi OSPF Sham Link

Routing protocol OSPF secara default dalam pemilihan jalur terbaiknya lebih mengutamakan jalur pada Area yang sama dibandingkan dengan jalur yang berasal dari luar OSPF, hal ini akan menjadi masalah ketika kita membuat jaringan MPLS L3VPN yang menggunakan Routing protocol OSPF. Contohnya seperti topologi dibawah ini :
Router CE R4 memiliki 2 jalur, yang satunya lewat R1 dan yang satunya lagi lewat R5 (backdoor), karena R5 berada di area yang sama, sedangkan R1 merupakan jalur eksternal, R4 akan lebih memilih ke jalur R5 dibandingkan melewati jalur VPN MPLS yang ada di R1.

Untuk mengatasi masalah seperti ini kita buat sebuah jalur Sham-link antara R1 dan R3, agar jalur VPN MPLS lebih diprioritaskan dibandingkan jalur backdoor yang dimiliki oleh R4. Saya contohkan konfigurasi dibawah ini :

Virtual Routing and Forwarding

Kita buat VRF pada Router PE dan kemudian terapkan pada Interface yang terhubung dengan Router CE.

    R1

    Pertama kita buat VRF-nya terlebih dahulu, kemudian tentukan RD dan RT-nya.
    R1(config)#ip vrf Dark
    R1(config-vrf)#rd 10:1
    R1(config-vrf)#route-tar bot 10:1
    R1(config-vrf)#exi
    
    Lalu terapkan pada Interface yang terhubung dengan Router CE.
    R1(config)#int e0/1
    R1(config-if)#ip vrf for Dark
    R1(config-if)#ip add 10.10.10.1 255.255.255.0
    R1(config-if)#no sh
    R1(config-if)#exi
    

    R3

    R3(config)#ip vrf Dark   
    R3(config-vrf)#rd 10:1       
    R3(config-vrf)#route-tar bo 10:1
    R3(config-vrf)#exi
    R3(config)#int e0/1
    R3(config-if)#ip vrf for Dark
    R3(config-if)#ip add 20.20.20.1 255.255.255.0
    R3(config-if)#no sh
    R3(config-if)#exi
    

IP Addressing & MPLS LDP

Kita konfigurasi IP Addressing pada tiap interface Router, dan MPLS LDP pada Router yang berada di MPLS Backbone.

    R1

    R1(config)#int lo0
    R1(config-if)#ip add 1.1.1.1 255.255.255.255
    R1(config-if)#exi
    R1(config)#int e0/0
    R1(config-if)#ip add 12.12.12.1 255.255.255.0
    R1(config-if)#mpls ip
    R1(config-if)#no sh
    R1(config-if)#exi
    

    R2

    R2(config)#int lo0
    R2(config-if)#ip add 2.2.2.2 255.255.255.255
    R2(config-if)#exi
    R2(config)#int e0/0
    R2(config-if)#ip add 12.12.12.2 255.255.255.0
    R2(config-if)#mpls ip
    R2(config-if)#no sh
    R2(config-if)#exi
    R2(config)#int e0/1
    R2(config-if)#ip add 23.23.23.2 255.255.255.0
    R2(config-if)#mpls ip
    R2(config-if)#no sh
    R2(config-if)#exi
    

    R3

    R3(config)#int lo0
    R3(config-if)#ip add 3.3.3.3 255.255.255.255
    R3(config-if)#exi
    R3(config)#int e0/0
    R3(config-if)#ip add 23.23.23.3 255.255.255.0
    R3(config-if)#mpls ip
    R3(config-if)#no sh
    R3(config-if)#exi
    

    R4

    R4(config)#int lo0
    R4(config-if)#ip add 4.4.4.4 255.255.255.255
    R4(config-if)#exi
    R4(config)#int e0/0
    R4(config-if)#ip add 10.10.10.2 255.255.255.0
    R4(config-if)#no sh
    R4(config-if)#exi
    R4(config)#int s2/0
    R4(config-if)#ip add 45.45.45.4 255.255.255.0
    R4(config-if)#no sh
    R4(config-if)#exi
    

    R5

    R5(config)#int lo0
    R5(config-if)#ip add 5.5.5.5 255.255.255.255
    R5(config-if)#exi
    R5(config)#int e0/0
    R5(config-if)#ip add 20.20.20.2 255.255.255.0
    R5(config-if)#no sh
    R5(config-if)#exi
    R5(config)#int s2/0
    R5(config-if)#ip add 45.45.45.5 255.255.255.0
    R5(config-if)#no sh
    R5(config-if)#exi
    

Routing EIGRP

Konfigurasi Routing EIGRP pada MPLS Backbone.

    R1

    R1(config)#router eigrp 10
    R1(config-router)#no auto-summ
    R1(config-router)#net 1.1.1.1 0.0.0.0
    R1(config-router)#net 12.12.12.0 0.0.0.255
    R1(config-router)#exi
    

    R2

    R2(config)#router eigrp 10
    R2(config-router)#no auto-summ
    R2(config-router)#net 2.2.2.2 0.0.0.0
    R2(config-router)#net 23.23.23.0 0.0.0.255
    R2(config-router)#net 12.12.12.0 0.0.0.255
    R2(config-router)#exi
    

    R3

    R3(config)#router eigrp 10
    R3(config-router)#no auto-summ
    R3(config-router)#net 3.3.3.3 0.0.0.0
    R3(config-router)#net 23.23.23.0 0.0.0.255
    R3(config-router)#exi
    

Multi Protocol BGP

Konfigurasi MP BGP untuk membentuk jalur VPNv4 antar Router PE.

    R1

    R1(config)#router bgp 10
    R1(config-router)#no sync
    R1(config-router)#neighbor 3.3.3.3 remote-as 10
    R1(config-router)#neighbor 3.3.3.3 update-so lo0
    R1(config-router)#address-fam vpnv4
    R1(config-router-af)#neighbor 3.3.3.3 act
    R1(config-router-af)#exi
    R1(config-router)#address-fam ipv4 vrf Dark
    R1(config-router-af)#redistribute vrf Dark ospf 10 met 10
    R1(config-router-af)#exi
    R1(config-router)#ex
    

    R3

    R3(config)#router bgp 10
    R3(config-router)#no sync
    R3(config-router)#neighbor 1.1.1.1 remote-as 10
    R3(config-router)#neighbor 1.1.1.1 update-so lo0
    R3(config-router)#address-fam vpnv4
    R3(config-router-af)#neighbor 1.1.1.1 act
    R3(config-router-af)#exi
    R3(config-router)#address-fam ipv4 vrf Dark
    R3(config-router-af)#redistribute vrf Dark ospf 10 met 10
    R3(config-router-af)#exi
    

OSPF CE&PE

Kita aktifkan OSPF agar antar Router CE dan PE dapat saling berkomunikasi.

    R1

    R1(config)#router ospf 10 vrf Dark
    R1(config-router)#net 10.10.10.0 0.0.0.255 area 0
    R1(config-router)#exi
    

    R3

    R3(config)#router ospf 10 vrf Dark
    R3(config-router)#net 20.20.20.0 0.0.0.255 ar 0
    R3(config-router)#exi
    

    R4

    R4(config)#router ospf 10
    R4(config-router)#net 0.0.0.0 0.0.0.0 ar 0
    R4(config-router)#exi
    

    R5

    R5(config)#router ospf 10
    R5(config-router)#net 0.0.0.0 0.0.0.0 ar 0
    R5(config-router)#exi
    
Kemudian kita lihat pada Routing table salah satu Router CE dan apa hasilnya.
R4#sh ip ro
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      5.0.0.0/32 is subnetted, 1 subnets
O        5.5.5.5 [110/65] via 45.45.45.5, 00:01:52, Serial2/0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.10.10.0/24 is directly connected, Ethernet0/0
L        10.10.10.2/32 is directly connected, Ethernet0/0
      20.0.0.0/24 is subnetted, 1 subnets
O        20.20.20.0 [110/74] via 45.45.45.5, 00:01:42, Serial2/0
      45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        45.45.45.0/24 is directly connected, Serial2/0
L        45.45.45.4/32 is directly connected, Serial2/0
Terlihat Router CE R4 lebih memilih jalur link di Interface Serial atau jalur backdoor, dibandingkan dengan jalur MPLS L3VPN yang kita bentuk. Agar traffic teralihkan ke jalur MPLS L3VPN, kita harus mengkonfigurasi Sham link pada R1 dan R3.

OSPF Sham-Link

Kita buat sebuah jalur sham-link OSPF antara Router PE, agar dipilih menjadi jalur utama meskipun jalur eksternal.

    R1

    Pertama kita buat interface loopback baru pada Router ini, dan masukan dalam VRF Router CE.
    R1(config)#int lo1
    R1(config-if)#ip vrf for Dark                     
    R1(config-if)#ip add 100.100.100.1 255.255.255.255
    R1(config-if)#exi
    Kemudian konfigurasi OSPF Shamlink tentukan IP Address loopback Router PE R1 dan R3.
    R1(config)#router ospf 10 vrf Dark
    R1(config-router)#area 0 sham-link 100.100.100.1 100.100.100.3
    R1(config-router)#exi
    

    R3

    R3(config)#int lo1        
    R3(config-if)#ip vrf for Dark
    R3(config-if)#ip add 100.100.100.3 255.255.255.255
    R3(config-if)#exi
    R3(config)#router ospf 10 vrf Dark
    R3(config-router)#area 0 sham-link 100.100.100.3 100.100.100.1
    R3(config-router)#exi
    
    Kemudian cek konektifitas Sham-link apakah sudah UP.
    R3(config)#do sh ip ospf sham-links 
    Sham Link OSPF_SL0 to address 100.100.100.1 is up
    Area 0 source address 100.100.100.3
      Run as demand circuit
      DoNotAge LSA allowed. Cost of using 1 State POINT_TO_POINT,
      Timer intervals configured, Hello 10, Dead 40, Wait 40,
        Hello due in 00:00:06
        Adjacency State FULL (Hello suppressed)
        Index 1/2/2, retransmission queue length 0, number of retransmission 0
        First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
        Last retransmission scan length is 0, maximum is 0
        Last retransmission scan time is 0 msec, maximum is 0 msec
    
Kemudian kita lihat lagi Routing table pada Router CE apakah sudah mengalami perubahan.
R4#sh ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      5.0.0.0/32 is subnetted, 1 subnets
O        5.5.5.5 [110/22] via 10.10.10.1, 00:03:17, Ethernet0/0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.10.10.0/24 is directly connected, Ethernet0/0
L        10.10.10.2/32 is directly connected, Ethernet0/0
      20.0.0.0/24 is subnetted, 1 subnets
O        20.20.20.0 [110/21] via 10.10.10.1, 00:03:17, Ethernet0/0
      45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        45.45.45.0/24 is directly connected, Serial2/0
L        45.45.45.4/32 is directly connected, Serial2/0
Kita bisa lihat jalur sudah berubah mengarah ke MPLS Backbone kembali.

Komentar