Lab 4. MPLS & L3VPN Menggunakan Static Routing
Router 2-PE
Konfigurasi IP Address dan aktifkan MPLS di interface
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 23.23.23.2 255.255.255.0
mpls ip
!
Konfigurasi LDP di Router 2 - PE
mpls label protocol ldp
!
mpls ldp router-id Loopback0 force
!
Konfigurasi OSPF di Router 2 -PE
router ospf 1
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 23.23.23.2 0.0.0.0 area 0
!
Verifikasi OSPF di Router 2 - PE
R2-PE#sh ip route ospf
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
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 23.23.23.3, 00:47:47, Ethernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/21] via 23.23.23.3, 00:47:37, Ethernet0/0
34.0.0.0/24 is subnetted, 1 subnets
O 34.34.34.0 [110/20] via 23.23.23.3, 00:47:37, Ethernet0/0
R2-PE#
Router 3 - P
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 23.23.23.3 255.255.255.0
mpls ip
!
interface Ethernet0/1
ip address 34.34.34.3 255.255.255.0
mpls ip
!
Konfigurasi LDP di Router 3 - P
mpls label protocol ldp
!
mpls ldp router-id Loopback0 force
!
Konfigurasi OSPF di Router 3 - P
router ospf 1
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 23.23.23.3 0.0.0.0 area 0
network 34.34.34.3 0.0.0.0 area 0
!
Verifikasi OSPF di Router 3 - P
R3-P#sh ip route ospf
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
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 23.23.23.2, 00:48:56, Ethernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/11] via 34.34.34.4, 00:48:46, Ethernet0/1
R3-P#
Router 4 -PE
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
ip address 34.34.34.4 255.255.255.0
mpls ip
!
Konfigurasi LDP di Router 4 - PE
mpls label protocol ldp
!
mpls ldp router-id Loopback0 force
!
Konfigurasi OSPF di Router 4 - PE
router ospf 1
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0
network 34.34.34.4 0.0.0.0 area 0
!
Verifikasi OSPF di Router 4 - PE
R4-PE#sh ip route ospf
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
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/21] via 34.34.34.3, 00:50:33, Ethernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 34.34.34.3, 00:50:33, Ethernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.23.23.0 [110/20] via 34.34.34.3, 00:50:33, Ethernet0/0
R4-PE#
Setelah di pastikan R2 - PE , R3 - P dan R4 - PE semuanya dapat terhubung
dengan baik melalui network OSPF selanjutnya konfigurasi BGP dan MP-BGP
di R2 -PE dan R4 - PE, yaitu untuk membuat jaringan VPN dan melewatkan
VRF (Virtual Router Forwarding) antara CE dan PE serta PE dan PE.
di Router 2 -PE
Mengaktifkan BGP dan MP-BGP
router bgp 234
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 234
neighbor 4.4.4.4 update-source Loopback0
!
address-family ipv4
neighbor 4.4.4.4 activate
exit-address-family
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
di Router 4 - PE
Mengaktifkan BGP dan MP-BGP
router bgp 234
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 234
neighbor 2.2.2.2 update-source Loopback0
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
Di Router 2 - PE
Konfigurasi VRF dengan nama cr2 serta rd dan route-target export dan import
ip vrf cr2
rd 1:10
route-target export 1:100
route-target import 1:100
!
Konfigurasi Static Routing dari Router 2 - PE ke Router cr2
ip route vrf cr2 1.1.1.1 255.255.255.255 12.12.12.1
!
Di Router 4 - PE
Konfigurasi VRF dengan nama cr4 serta rd dan route-target export dan import
ip vrf cr4
rd 1:20
route-target export 1:100
route-target import 1:100
!
Konfigurasikan Static Routing dari Router 4 - PE ke Router cr4
ip route vrf cr4 5.5.5.5 255.255.255.255 45.45.45.5
!
Di Router CR2
Konfigurasikan IP Address dan default routing static ke Router 2 - PE
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 12.12.12.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 12.12.12.2
!
Di Router CR4
Konfigurasikan IP Address dan default routing static ke Router 4 - PE
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip address 45.45.45.5 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 45.45.45.4
!
Verifikasi Routing static di CR2
CR2#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 12.12.12.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 12.12.12.2
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
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
CR2#
Verifikasi Routing statik di CR4
CR4#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 45.45.45.4 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 45.45.45.4
5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected, Loopback0
45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 45.45.45.0/24 is directly connected, Ethernet0/0
L 45.45.45.5/32 is directly connected, Ethernet0/0
CR4#
Sekarang router 2 PE dan CR2 bisa terhbung, serta R4-PE dan CR4 bisa terhubung
selanjutnya kita konfigurasi agar Router 2-PE dapat menghubungkan VRF CR2 ke
Router 4-PE dan sebaliknya juga, Router 4-PE dapat menghbungkan VRF CR4 ke
Router 2-PE, serta CR2 dan CR4 bisa saling terhubung.
caranya yaitu meredistribute routing static dan interface connected ke MP-BGP
Router 2-PE
router bgp 234
address-family ipv4 vrf cr2
redistribute connected
redistribute static
exit-address-family
!
Router 4-PE
router bgp 234
address-family ipv4 vrf cr4
redistribute connected
redistribute static
exit-address-family
!
Selanjutnya Verifikasi Konfigurasi MP-BGP
R4-PE#sh ip bgp vpnv4 all summary | b Nei
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 234 97 97 9 0 0 01:23:16 2
R4-PE#
R2-PE#sh ip bgp vpnv4 all summary | b Neig
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 234 98 98 7 0 0 01:24:06 2
R2-PE#
verifikasi ip vrf cr2 di Router 2-PE
R2-PE#sh ip vrf detail
VRF cr2 (VRF Id = 1); default RD 1:10; default VPNID <not set>
Old CLI format, supports IPv4 only
Flags: 0xC
Interfaces:
Et0/1
Address family ipv4 unicast (Table ID = 0x1):
Flags: 0x0
Export VPN route-target communities
RT:1:100
Import VPN route-target communities
RT:1:100
No import route-map
No global export route-map
No export route-map
VRF label distribution protocol: not configured
VRF label allocation mode: per-prefix
R2-PE#
Verifikasi ip vrf di Router 4-PE
R4-PE#sh ip vrf detail
VRF cr4 (VRF Id = 1); default RD 1:20; default VPNID <not set>
Old CLI format, supports IPv4 only
Flags: 0xC
Interfaces:
Et0/1
Address family ipv4 unicast (Table ID = 0x1):
Flags: 0x0
Export VPN route-target communities
RT:1:100
Import VPN route-target communities
RT:1:100
No import route-map
No global export route-map
No export route-map
VRF label distribution protocol: not configured
VRF label allocation mode: per-prefix
R4-PE#
Verifikasi Static Routenya sudah masuk ke dalam routing tiap vrf
R4-PE#sh ip vrf cr4 | b Gate
R4-PE#sh ip route vrf cr4 | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 2.2.2.2, 01:26:04
5.0.0.0/32 is subnetted, 1 subnets
S 5.5.5.5 [1/0] via 45.45.45.5
12.0.0.0/24 is subnetted, 1 subnets
B 12.12.12.0 [200/0] via 2.2.2.2, 01:18:39
45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 45.45.45.0/24 is directly connected, Ethernet0/1
L 45.45.45.4/32 is directly connected, Ethernet0/1
R4-PE#
R2-PE#sh ip route vrf cr2 | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 12.12.12.1
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/0] via 4.4.4.4, 01:26:57
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.12.12.0/24 is directly connected, Ethernet0/1
L 12.12.12.2/32 is directly connected, Ethernet0/1
45.0.0.0/24 is subnetted, 1 subnets
B 45.45.45.0 [200/0] via 4.4.4.4, 01:22:33
R2-PE#
Verifikasi rute vpnv4 di Router 2 - PE
R2-PE#sh ip bgp vpnv4 all | b Net
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:10 (default for vrf cr2)
*> 1.1.1.1/32 12.12.12.1 0 32768 ?
*>i 5.5.5.5/32 4.4.4.4 0 100 0 ?
*> 12.12.12.0/24 0.0.0.0 0 32768 ?
*>i 45.45.45.0/24 4.4.4.4 0 100 0 ?
Route Distinguisher: 1:20
*>i 5.5.5.5/32 4.4.4.4 0 100 0 ?
*>i 45.45.45.0/24 4.4.4.4 0 100 0 ?
R2-PE#
R4-PE#sh ip bgp vpnv4 all | b Net
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:10
*>i 1.1.1.1/32 2.2.2.2 0 100 0 ?
*>i 12.12.12.0/24 2.2.2.2 0 100 0 ?
Route Distinguisher: 1:20 (default for vrf cr4)
*>i 1.1.1.1/32 2.2.2.2 0 100 0 ?
*> 5.5.5.5/32 45.45.45.5 0 32768 ?
*>i 12.12.12.0/24 2.2.2.2 0 100 0 ?
*> 45.45.45.0/24 0.0.0.0 0 32768 ?
R4-PE#
Terlihat semua rute sudah terdaftar semuanyanya selanjutnya tes ping dari
CR2 ke CR4 menggunakan IP Loopback begitupun sebaliknya
CR2#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/6/11 ms
CR2#
CR4#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/5/9 ms
CR4#
Alhamdulillah mantabb mas brooo, konek semua yah.
Selesei
Salam Ngoprek