Minggu, 24 April 2011

MPLS + OSPF + SHAMLINK



Berikut konfigurasi jika ingin menggunakan OSPF disisi cust:
istilah SHAMLINK digunakan jika kita memiliki network ospf cros juga directly connected, maka ospf di CE akan prefer ke Intra-area daripada Inter-area (yg sebelumnya dapet dari MPLS):

Lihat gambar, R1 sebelumnya mendapatkan network 10.45.0.0/24 itu dari ospf MPLS, tetapi setelah di konfigure OSPF area yang sama antara R1 dan R5 maka R1 melihat network 10.45.0.0/24 tidak lagi melalui mpls tetapi melalui R5(ospf yang Intra-area).
Shamlink berfungsi untuk mengubah ini menjadi semula.

contoh tahap-tahap shamplink :

R2(config)#int loop 100
R2(config-if)#ip vrf forwarding Vrf1
R2(config-if)#ip address 11.11.11.2 255.255.255.255
R2(config-if)#router bgp 24
R2(config-router)#address-family ipv4 vrf Vrf1
R2(config-router-af)#network 11.11.11.2 mask 255.255.255.255
R2(config-router-af)#exit
R2(config-router)#router ospf 1 vrf Vrf1
R2(config-router)#area 1 sham-link 11.11.11.2 11.11.11.4 cost 5

R4(config)#int loop 100
R4(config-if)#ip vrf forwarding Vrf1
R4(config-if)#ip address 11.11.11.4 255.255.255.255
R4(config-if)#router bgp 24
R4(config-router)#address-family ipv4 vrf Vrf1
R4(config-router-af)#network 11.11.11.4 mask 255.255.255.255
R4(config-router-af)#exit
R4(config-router)#router ospf 1 vrf Vrf1
R4(config-router)#area 1 sham-link 11.11.11.4 11.11.11.2 cost 5
%OSPF-5-ADJCHG: Process 1, Nbr 10.12.0.2 on OSPF_SL0 from LOADING to FULL, Loading Done


Configuration :

PE1
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
ip vrf BTN
rd 12:2
route-target export 12:2
route-target import 12:2
!
ip vrf NIAGA
rd 12:1
route-target export 12:1
route-target import 12:1
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
mpls label protocol ldp
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback100
ip vrf forwarding BTN
ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding BTN
ip address 16.16.16.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip vrf forwarding NIAGA
ip address 15.15.15.1 255.255.255.0
speed auto
half-duplex
!
router eigrp 12
auto-summary
!
address-family ipv4 vrf NIAGA
redistribute bgp 12 metric 1 1 1 1 1
network 15.15.15.1 0.0.0.0
no auto-summary
autonomous-system 1
exit-address-family
!
router ospf 12 vrf BTN
log-adjacency-changes
area 0 sham-link 11.11.11.11 11.11.11.12
redistribute bgp 12 subnets
network 16.16.16.1 0.0.0.0 area 0
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.1 0.0.0.0 area 0
!
router rip
version 2
!
address-family ipv4 vrf BTN
redistribute bgp 12 metric transparent
network 16.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 12
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf NIAGA
redistribute connected
redistribute eigrp 1
no synchronization
exit-address-family
!
address-family ipv4 vrf BTN
redistribute connected
redistribute ospf 12 vrf BTN match internal external 1 external 2
redistribute rip
no synchronization
network 11.11.11.11 mask 255.255.255.255
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
mpls ldp router-id Loopback0
!
!
control-plane
!

PE2
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
ip vrf BTN
rd 12:2
route-target export 12:2
route-target import 12:2
!
ip vrf NIAGA
rd 12:1
route-target export 12:1
route-target import 12:1
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
mpls label protocol ldp
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback100
ip vrf forwarding BTN
ip address 11.11.11.12 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding NIAGA
ip address 23.23.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip vrf forwarding BTN
ip address 24.24.24.2 255.255.255.0
duplex auto
speed auto
!
router eigrp 12
auto-summary
!
address-family ipv4 vrf NIAGA
redistribute bgp 12 metric 1 1 1 1 1
network 23.23.23.2 0.0.0.0
no auto-summary
autonomous-system 1
exit-address-family
!
router ospf 12 vrf BTN
log-adjacency-changes
area 0 sham-link 11.11.11.12 11.11.11.11
redistribute bgp 12 subnets
network 24.24.24.2 0.0.0.0 area 0
!
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.12.12.2 0.0.0.0 area 0
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf BTN
redistribute bgp 12 metric transparent
network 24.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 12
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 12
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 NIAGA
redistribute connected
redistribute eigrp 1
no synchronization
exit-address-family
!
address-family ipv4 vrf BTN
redistribute connected
redistribute ospf 12 vrf BTN match internal external 1 external 2
redistribute rip
no synchronization
network 11.11.11.12 mask 255.255.255.255
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp run
!
!
mpls ldp router-id Loopback0
!
!
control-plane

di show di CE sebelum pakai Shamlink:


Gateway of last resort is not set

16.0.0.0/24 is subnetted, 1 subnets
C 16.16.16.0 is directly connected, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O 24.24.24.0 [110/20] via 46.46.46.4, 00:06:16, FastEthernet0/1----> melalui intra-area, bukan MPLS
46.0.0.0/24 is subnetted, 1 subnets
C 46.46.46.0 is directly connected, FastEthernet0/1

Gateway of last resort is not set

16.0.0.0/24 is subnetted, 1 subnets
C 16.16.16.0 is directly connected, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O 24.24.24.0 [110/12] via 16.16.16.1, 00:13:59, FastEthernet0/0---> sudah melalui MPLS
11.0.0.0/32 is subnetted, 2 subnets
O E2 11.11.11.11 [110/1] via 16.16.16.1, 00:13:59, FastEthernet0/0
O E2 11.11.11.12 [110/1] via 16.16.16.1, 00:13:59, FastEthernet0/0
46.0.0.0/24 is subnetted, 1 subnets
C 46.46.46.0 is directly connected, FastEthernet0/1
BTN-JAKARTA#

Tidak ada komentar: