Multi-protocol label switching (MPLS) adalah arsitektur network yang didefinisikan oleh IETF untuk memadukan mekanisme label swapping di layer 2 dengan routing di layer 3 untuk mempercepat pengiriman paket.

Pada proses forwarding, protokol ini menentukan forwarding berdasarkan label pada paket. Label yang pendek dan berukuran tetap mempercepat proses forwarding dan mempertinggi fleksibilitas pemilihan path. Hasil forwarding adalah network datagram yang bersifat lebih connection-oriented yaitu setiap virtual circuit harus disetup dengan protokol persinyalan sebelum transmisi (proses signaling).

Pada skenario topologi di bawah ini akan dibuat jaringan MPLS antara router PE 1 dan PE 2, dengan kabel serial sebagai jalur utama dan fast ethernet sebagai link backup.

topologi

Petunjuk lab

1. Lakukan konfigurasi IP bebas, untuk lebih mudahnya ikuti saja topologi di atas.

CE1A

interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.0.1 255.255.255.0
clock rate 2000000

CE1B

interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.10.6 255.255.255.0
clock rate 2000000

P1

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
clock rate 2000000
!
interface Serial0/1
ip address 24.24.24.1 255.255.255.0

P2

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.2 255.255.255.0
!
interface FastEthernet0/1
ip address 34.34.34.1 255.255.255.0

PE1

interface FastEthernet0/0
ip address 13.13.13.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.0.2 255.255.255.0
clock rate 2000000
!
interface Serial0/1
ip address 12.12.12.1 255.255.255.0

2. Routing yang digunakan pada seluruh topologi di atas adalah OSPF area 0.

CE1A

router ospf 1
network 5.5.5.5 0.0.0.0 area 0
network 192.168.0.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0

CE1B

router ospf 1
network 6.6.6.6 0.0.0.0 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0

P1

router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 12.12.12.0 0.0.0.255 area 0
network 24.24.24.0 0.0.0.255 area 0

P2

router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 13.13.13.0 0.0.0.255 area 0
network 34.34.34.0 0.0.0.255 area 0

PE1

router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.0 0.0.0.255 area 0
network 13.13.13.0 0.0.0.255 area 0
network 192.168.0.0 0.0.0.255 area 0

PE2

router ospf 1
network 4.4.4.4 0.0.0.0 area 0
network 24.24.24.0 0.0.0.255 area 0
network 34.34.34.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0

3. Pada PE1 dan PE2 konfigurasikan routing BGP.

PE1

router bgp 1
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0

PE2

router bgp 1
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0

4. Aktifkan fungsi MPLS pada PE1, PE2, P1 dan P2.

Router P1

P1(config)#mpls ip

P1(config)#interface Serial0/0/0

P1(config-if)#mpls ip

P1(config)#interface Serial0/0/1

P1(config-if)#mpls ip

Router P2

P2(config)#mpls ip

P2(config)#interface FastEthernet0/0

P2(config-if)#mpls ip

P2(config)#interface FastEthernet0/1

P2(config-if)#mpls ip

Router PE1

PE1(config)#mpls ip

PE1(config)#interface Serial0/0/1

PE1(config-if)#mpls ip

PE1(config)#interface FastEthernet0/0

PE1(config-if)#mpls ip

Router PE2

PE2(config)#mpls ip

PE2(config)#interface Serial0/0/0

PE2(config-if)#mpls ip

PE2(config)#interface FastEthernet0/0

PE2(config-if)#mpls ip

5. Buat IP vrf pada PE1 dan PE2.

PE1

PE1(config)#ip vrf COSTUMER

PE1(config-vrf)#rd 1:1

PE1(config-vrf)#route target both 1:1

PE2

PE2(config)#ip vrf COSTUMER

PE2(config-vrf)#rd 1:1

PE2(config-vrf)#route target both 1:1

6. Masukkan IP vrf forwarding pada interface PE yang menuju CE.

PE1

PE1(config)#interface Serial0/0/0

PE1(config-if)#ip vrf forwarding customer

PE1(config-if)#ip address 192.168.0.2 255.255.255.0

PE2

PE2(config)#interface Serial0/0/1

PE2(config-if)#ip vrf forwarding customer

PE2(config-if)#ip address 192.168.10.5 255.255.255.0

7. Aktifkan fungsi Multiprotocol BGP.

PE1

PE1(config)#router bgp 1

PE1(config-router)#address-family vpnv4

PE1(config-router-af)#neighbor 4.4.4.4 activate

PE2

PE2(config)#router bgp 1

PE2(config-router)#address-family vpnv4

PE2(config-router-af)#neighbor 1.1.1.1 activate

8. Menambahkan routing PE-CE

PE1

PE1(config)#router ospf 100 vrf COSTUMER

PE1(config-router)#redistribute bgp 1 subnets

PE1(config-router)#network 192.168.0.0 0.0.0.255 area 0

PE1(config)#router bgp 1

PE1(config-router)#address-family ipv4 vrf COSTUMER

PE1(config-router-af)#redistribute ospf 100 vrf customer match internal external 1 external 2

PE2

PE2(config)#router ospf 100 vrf customer

PE2(config-router)#redistribute bgp 1 subnets

PE2(config-router)#network 192.168.10.0 0.0.0.255 area 0

PE2(config)#router bgp 1

PE2(config-router)#address-family ipv4 vrf customer

PE2(config-router-af)#redistribute ospf 100 vrf customer match internal external 1 external 2

9. Konfigurasikan default route pada router CE

Router CE1A

CE1A(config)#router ospf 1

CE1A(config-router)#network 0.0.0.0 255.255.255.255 area 0

Router CE1B

CE1B(config)#router ospf 1

CE1B(config-router)#network 0.0.0.0 255.255.255.255 area 0

9. Mengaktifkan Traffic Engineering.

Router P1

P1(config)#mpls traffic-eng tunnels

P1(config)#interface Serial0/0/0

P1(config-if)#mpls traffic-eng tunnels

P1(config)#interface Serial0/0/1

P1(config-if)#mpls traffic-eng tunnels

Router P2

P2(config)#mpls traffic-eng tunnels

P2(config)#interface FastEthernet0/0

P2(config-if)#mpls traffic-eng tunnels

P2(config)#interface FastEthernet0/1

P2(config-if)#mpls traffic-eng tunnels

Router PE1

PE1(config)#mpls traffic-eng tunnels

PE1(config)#interface Serial0/0/1

PE1(config-if)#mpls traffic-eng tunnels

PE1(config)#interface FastEthernet0/0

PE1(config-if)#mpls traffic-eng tunnels

Router PE2

PE2(config)#mpls traffic-eng tunnels

PE2(config)#interface Serial0/0/0

PE2(config-if)#mpls traffic-eng tunnels

PE2(config)#interface FastEthernet0/0

PE2(config-if)#mpls traffic-eng tunnels

10. Mengkonfigurasikan RSVP Bandwidth.

Router P1

P1(config)#interface Serial0/0/0

P1(config-if)#ip rsvp bandwidth 100 100

P1(config)#interface Serial0/0/1

P1(config-if)#ip rsvp bandwidth 100 100

Router P2

P2(config)#interface FastEthernet0/0

P2(config-if)#ip rsvp bandwidth 1000 1000

P2(config)#interface FastEthernet0/1

P2(config-if)#ip rsvp bandwidth 1000 1000

Router PE1

PE1(config)#interface Serial0/0/1

PE1(config-if)#ip rsvp bandwidth 100 100

PE1(config)#interface FastEthernet0/0

PE1(config-if)#ip rsvp bandwidth 1000 1000

Router PE2

PE2(config)#interface Serial0/0/0

PE2(config-if)#ip rsvp bandwidth 100 100

PE2(config)#interface FastEthernet0/0

PE2(config-if)#ip rsvp bandwidth 1000 1000

11. Membuat interface Tunnel pada Head-end Router PE1.

PE1(config)#interface Tunnel0

PE1(config-if)#ip unnumbered Loopback 0

PE1(config-if)#tunnel destination 4.4.4.4

PE1(config-if)#tunnel mode mpls traffic-eng

PE1(config-if)#tunnel mpls traffic-eng priority 1 1

PE1(config-if)#tunnel mpls traffic-eng bandwidth 100

PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit identifier 1

12. Mengaktifkan Tunnel jalur utama untuk OSPF.

PE1(config)#interface Tunnel0

PE1(config-if)#tunnel mpls traffic-eng autoroute announce

13. Mengaktifkan Path untuk jalur utama.

PE1(config)#interface Tunnel0

PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit identifier 1

14. Menentukan jalur untuk Tunnel jalur utama dan jalur kedua.

Router PE1

PE1(config)#ip explicit-path identifier 1

PE1(cfg-ip-expl-path)#next-address 12.12.12.2

PE1(cfg-ip-expl-path)#next-address 24.24.24.2

PE1(cfg-ip-expl-path)#next-address 4.4.4.4

PE1(config)#ip explicit-path identifier 2

PE1(cfg-ip-expl-path)#next-address 13.13.13.2

PE1(cfg-ip-expl-path)#next-address 34.34.34.2

PE1(cfg-ip-expl-path)#next-address 4.4.4.4

15. Mengaktifkan area OSPF untuk Traffic Engineering

Router P1

P1(config)#router ospf 1

P1(config-router)#mpls traffic-eng router-id Loopback0

P1(config-router)#mpls traffic-eng area 0

Router P2

P2(config)#router ospf 1

P2(config-router)#mpls traffic-eng router-id Loopback0

P2(config-router)#mpls traffic-eng area 0

Router PE1

PE1(config)#router ospf 1

PE1(config-router)#mpls traffic-eng router-id Loopback0

PE1(config-router)#mpls traffic-eng area 0

Router PE2

PE2(config)#router ospf 1

PE2(config-router)#mpls traffic-eng router-id Loopback0

PE2(config-router)#mpls traffic-eng area 0

Untuk konfigurasi lengkapnya bisa dilihat pada konfigurasi di bawah ini.

CE1A

interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.0.1 255.255.255.0
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 5.5.5.5 0.0.0.0 area 0
network 192.168.0.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
network 0.0.0.0 255.255.255.255 area 0

CE1B

interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.10.6 255.255.255.0
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 6.6.6.6 0.0.0.0 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
network 0.0.0.0 255.255.255.255 area 0

P1

mpls traffic-eng tunnels

!

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
mpls ip
mpls traffic-eng tunnels
clock rate 2000000
ip rsvp bandwidth 100 100
!
interface Serial0/1
ip address 24.24.24.1 255.255.255.0
mpls ip
mpls traffic-eng tunnels
clock rate 2000000
ip rsvp bandwidth 100 100
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.12.12.0 0.0.0.255 area 0
network 24.24.24.0 0.0.0.255 area 0

P2

mpls traffic-eng tunnels

!

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 13.13.13.2 255.255.255.0
duplex auto
speed auto
mpls ip
mpls traffic-eng tunnels
ip rsvp bandwidth 1000 1000
!
interface FastEthernet0/1
ip address 34.34.34.1 255.255.255.0
duplex auto
speed auto
mpls ip
mpls traffic-eng tunnels
ip rsvp bandwidth 1000 1000
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 13.13.13.0 0.0.0.255 area 0
network 34.34.34.0 0.0.0.255 area 0

PE1

ip vrf COSTUMER
rd 1:1
route-target export 1:1
route-target import 1:1
!
mpls traffic-eng tunnels
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Tunnel0
ip unnumbered Loopback0
tunnel destination 4.4.4.4
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 1 1
tunnel mpls traffic-eng bandwidth 100
tunnel mpls traffic-eng path-option 1 explicit identifier 1
no routing dynamic
!
interface FastEthernet0/0
ip address 13.13.13.1 255.255.255.0
duplex auto
speed auto
mpls ip
mpls traffic-eng tunnels
ip rsvp bandwidth 1000 1000
!
interface Serial0/0
ip vrf forwarding COSTUMER
ip address 192.168.0.2 255.255.255.0
clock rate 2000000
!
interface Serial0/1
ip address 12.12.12.1 255.255.255.0
mpls ip
mpls traffic-eng tunnels
clock rate 2000000
ip rsvp bandwidth 100 100
!
router ospf 100 vrf COSTUMER
log-adjacency-changes
redistribute bgp 1 subnets
network 192.168.0.0 0.0.0.255 area 0
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.0 0.0.0.255 area 0
network 13.13.13.0 0.0.0.255 area 0
network 192.168.0.0 0.0.0.255 area 0
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf COSTUMER
redistribute ospf 100 vrf COSTUMER match internal external 1 external 2
no synchronization
exit-address-family
!
ip explicit-path identifier 1 enable
next-address 12.12.12.2
next-address 24.24.24.2
next-address 4.4.4.4
!
ip explicit-path identifier 2 enable
next-address 13.13.13.2
next-address 34.34.34.2
next-address 4.4.4.4

PE2

ip vrf COSTUMER
rd 1:1
route-target export 1:1
route-target import 1:1
!
mpls traffic-eng tunnels
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 34.34.34.2 255.255.255.0
duplex auto
speed auto
mpls ip
mpls traffic-eng tunnels
ip rsvp bandwidth 1000 1000
!
interface Serial0/0
ip address 24.24.24.2 255.255.255.0
mpls ip
mpls traffic-eng tunnels
clock rate 2000000
ip rsvp bandwidth 100 100
!
interface Serial0/1
ip vrf forwarding COSTUMER
ip address 192.168.10.5 255.255.255.0
clock rate 2000000
!
router ospf 100 vrf COSTUMER
log-adjacency-changes
redistribute bgp 1 subnets
network 192.168.10.0 0.0.0.255 area 0
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 24.24.24.0 0.0.0.255 area 0
network 34.34.34.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
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 COSTUMER
redistribute ospf 100 vrf COSTUMER match internal external 1 external 2
no synchronization
exit-address-family

Lakukan verifikasi sebagai berikut

1. Ping dan traceroute dari PC1 ke PC2, pastikan trafik melalui jalur atas. Yaitu serial yang dijadikan jalur utama.

ping trace pc1 ke pc2

2. Pastikan interface tunnel sudah UP.

tunnels brief

3. Pada verifikasi di bawah terlihat status tunnel sudah UP dan trafik melalu jalur atas yaitu 12.12.12.2, 24.24.24.2

tunnel destination

4. Coba matikan main link yaitu jalur atas dengan mengetikkan perintah

PE2(config)#int s0/0

PE2(config-if)#shutdown

ping pc1 ke pc2 failover

5. Kemudian lakukan traceroute kembali ke PC2

trace pc1 ke pc2 failover

Terlihat jalur telah berpindah ke jalur backup yaitu jalur bawah (fast ethernet), dengan IP 13.13.13.2