Sebenarnya kita sudah menggunakan routing ospf pada vpn di postingan saya yg berjudul mpls traffing engineering, kali ini saya akan membuatnya lebih simple agar lebih mudah dipahami.

Langsung saja, topologinya ada di bawah ini. Dan kita akan menerapkannya pada network bank BRI.

topologi

Petunjuk LAB

1. Untuk MPLS backbone masih menggunakan topologi dan konfigurasi pada artikel sebelumnya yaitu MPLS VPN, silahkan lihat disini

2. Konfigurasi routing BGP pada PE1 dan PE2, lalu redistribute ke BGP yg sudah dikonfigurasi sebelumnya.

Router PE1

router ospf 100 vrf bri.kiri
redistribute bgp 65000 subnets         (agar network classfull dan classless semuanya bisa redistribute, karena apabila tanpa “subnets” hanya network classfull saja yg di redistribute)
network 192.168.0.1 0.0.0.0 area 0

router 65000

address-family ipv4 vrf bri.kiri
redistribute ospf 100 vrf bri.kiri match internal external 1 external 2       (agar tipe OSPF yang diredistribute ke BGP adalah hanya OSPF tipe internal saja, jadi yg ada pada routing tabel hanya “O IA” saja)

Router PE2

router ospf 100 vrf bri.kanan
redistribute bgp 65000 subnets
network 192.168.0.5 0.0.0.0 area 0

router 65000

address-family ipv4 vrf bri.kanan
redistribute ospf 100 vrf bri.kanan match internal external 1 external 2

3. Konfigurasi IP addess dan routing BGP pada router BCA.KIRI dan BCA.KANAN

Router R4 BRI.KIRI

conf r4

Router BRI.KANAN

conf r5

Verifikasi

Ping dari BRI kiri ke BRI kanan dan ke PE1 dan PE2

PING R4

Lakukan traceroute pastikan jalurnya menggunakan jalur mpls.

tracer r5

Lihat routing tabelnya, pastikan sudah menggunakan routing OSPF.

sh ip route r5

Berikut ini hasil bila dilakukan show run di tiap routernya.

Router PE1

ip vrf bca.kiri
rd 65000:2
route-target export 65000:2
route-target import 65000:2
!
ip vrf bri.kiri
rd 65000:1
route-target export 65000:1
route-target import 65000:1
!
interface Loopback0
ip address 10.10.10.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding bri.kiri
ip address 192.168.0.1 255.255.255.252
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.10.1 255.255.255.252
mpls ip
clock rate 2000000
!
interface FastEthernet0/1
ip vrf forwarding bca.kiri
ip address 192.168.0.1 255.255.255.252
duplex auto
speed auto
!
router ospf 100 vrf bri.kiri
log-adjacency-changes
redistribute bgp 65000 subnets
network 192.168.0.1 0.0.0.0 area 0
!
router ospf 1
log-adjacency-changes
network 10.10.10.1 0.0.0.0 area 0
network 192.168.10.1 0.0.0.0 area 0
!
router bgp 65000
no synchronization
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 65000
neighbor 10.10.10.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.10.10.2 activate
neighbor 10.10.10.2 send-community extended
exit-address-family
!
address-family ipv4 vrf bri.kiri
redistribute ospf 100 vrf bri.kiri match internal external 1 external 2
no synchronization
exit-address-family

Router P

interface Loopback0
ip address 10.10.10.10 255.255.255.255
!
interface Serial0/0
ip address 192.168.10.2 255.255.255.252
mpls ip
clock rate 2000000
!
interface Serial0/1
ip address 192.168.20.1 255.255.255.252
mpls ip
clock rate 2000000
!
router ospf 1
mpls ldp autoconfig
log-adjacency-changes
network 10.10.10.10 0.0.0.0 area 0
network 192.168.10.2 0.0.0.0 area 0
network 192.168.20.1 0.0.0.0 area 0

Router PE2

ip vrf bca.kanan
rd 65000:2
route-target export 65000:2
route-target import 65000:2
!
ip vrf bri.kanan
rd 65000:1
route-target export 65000:1
route-target import 65000:1
!
interface Loopback0
ip address 10.10.10.2 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding bri.kanan
ip address 192.168.0.5 255.255.255.252
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.20.2 255.255.255.252
mpls ip
clock rate 2000000
!
interface FastEthernet0/1
ip vrf forwarding bca.kanan
ip address 192.168.0.5 255.255.255.252
duplex auto
speed auto
!
router ospf 100 vrf bri.kanan
log-adjacency-changes
redistribute bgp 65000 subnets
network 192.168.0.5 0.0.0.0 area 0
!
router ospf 1
log-adjacency-changes
network 10.10.10.2 0.0.0.0 area 0
network 192.168.20.2 0.0.0.0 area 0
!
router bgp 65000
no synchronization
bgp log-neighbor-changes
neighbor 10.10.10.1 remote-as 65000
neighbor 10.10.10.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.10.10.1 activate
neighbor 10.10.10.1 send-community extended
exit-address-family
!
address-family ipv4 vrf bri.kanan
redistribute ospf 100 vrf bri.kanan match internal external 1 external 2
no synchronization
exit-address-family

R4 BRI KIRI

interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0

R5 BRI KANAN

interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.6 255.255.255.252
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0