MPLS L3 VPN With Allowas-in and AS-Override
MPLS L3 VPN
(Allowas-in and AS-Override)
Topology :
Lab kali ini
kita memiliki 7 router yang akan dikonfigurasi OSPF, IBGP, EBGP, MPLS.
- OSPF Sebagai routing protocol underlay yang akan menghungkan 3 router (PE1, P, PE2).
- IBGP sebagai routing protocol yang akan membawa traffic VPNv4 dari PE1 to PE2 via OSPF.
- EBGP routing protocol sebagai penghubung antar AS 1 dan AS 10 agar antar Customer dapat terkoneksi.
- MPLS sebagai Overlay yang akan menandai setiap traffic dengan Label LDP (Label distribution protocol) ketika traffic melewati interface yang telah kita konfigurasi sebagai MPLS.
Initial Configuration all router :
P :
hostname P
Int lo0
Ip add 15.15.15.15 255.255.255.255
Int e0/0
ip add 172.0.10.1 255.255.255.0
no shutdown
exit
Int e0/1
ip add 172.0.20.1 255.255.255.0
no shutdown
exit
PE1 :
hostname PE1
Int lo0
ip add 10.10.10.10 255.255.255.255
Int e0/0
ip add 172.0.10.2 255.255.255.0
no shutdown
exit
PE2 :
hostname PE2
int lo0
Ip add 16.16.16.16 255.255.255.255
int e0/1
ip add 172.0.20.2 255.255.255.0
no shutdown
exit
CE17:
hostname CE17
Int lo0
ip add 17.17.17.17 255.255.255.255
exit
Int e0/1
ip add 10.10.1.1 255.255.255.0
no shutdown
exit
CE18:
hostname CE18
Int lo0
ip add 18.18.18.18 255.255.255.255
exit
Int e0/2
ip add 10.10.1.2 255.255.255.0
no shutdown
exit
CE19:
hostname CE19
Int lo0
ip add 19.19.19.19 255.255.255.255
exit
Int e0/0
ip add 10.10.2.1 255.255.255.0
no shutdown
exit
CE20:
hostname CE20
Int lo0
ip add 20.20.20.20 255.255.255.255
exit
Int e0/2
ip add 10.10.2.2 255.255.255.0
no shutdown
exit
Configuration IGP and LDP :
P :
Router ospf 10
Network 15.15.15.15 0.0.0.0 area 0
Network 172.0.10.0 0.0.0.3 area 0
Network 172.0.20.0 0.0.0.3 area 0
Int e0/0
mpls ip
Exit
Int e0/1
mpls ip
exit
PE1 :
Router ospf 10
Network 10.10.10.10 0.0.0.0 area 0
Network 172.0.10.0 0.0.0.3 area 0
Exit
Int e0/0
mpls ip
exit
PE2 :
Router ospf 10
Network 16.16.16.16 0.0.0.0 area 0
Network 172.0.20.0 0.0.0.3 area 0
exit
Int e0/1
mpls ip
exit
Configuration VRF on the PE router :
PE1 :
Ip vrf CUS-A
Rd 1:1
Route-target both 1:1
Exit
Ip vrf CUS-B
Rd 2:2
Route-target both 2:2
Int e0/1
Ip vrf forwarding CUS-A
Ip add 10.10.1.254 255.255.255.0
Exit
Int e0/2
Ip vrf forwarding CUS-B
Ip add 10.10.1.254 255.255.255.0
exit
PE2 :
Ip vrf CUS-C
Rd 1:1
Route-target both 1:1
exit
Ip vrf CUS-D
Rd 2:2
Route-target both 2:2
exit
Int e0/0
Ip vrf forwarding CUS-A
Ip add 10.10.2.254 255.255.255.0
exit
Int e0/2
Ip vrf forwarding CUS-B
Ip add 10.10.2.254 255.255.255.0
exit
Verify connection on Router PE to CE
Configuration IBGP on Router PE :
PE1 :
Router bgp 1
Network 10.10.10.10 mask 255.255.255.255
Neighbor 16.16.16.16 remote-as 1
Neighbor 16.16.16.16 update-source loopback0
Address-family vpnv4
Neighbor 16.16.16.16 activate
PE2 :
Router bgp 1
Network 16.16.16.16 mask 255.255.255.255
Neighbor 10.10.10.10 remote-as 1
Neighbor 10.10.10.10 update-source loopback0
Address-family vpnv4
Neighbor 10.10.10.10 activate
Configuration EBGP on PE and CE
CE17 :
Router bgp 10
Network 17.17.17.17 mask 255.255.255.255
Neighbor 10.10.1.254 remote-as 1
exit
CE18 :
Router bgp 20
Network 18.18.18.18 mask 255.255.255.255
Neighbor 10.10.1.254 remote-as 1
exit
CE19 :
Router bgp 30
Network 19.19.19.19 mask 255.255.255.255
Neighbor 10.10.2.254 remote-as 1
exit
CE20 :
Router bgp 40
Network 20.20.20.20 mask 255.255.255.255
Neighbor 10.10.2.254 remote-as 1
exit
PE1 :
Router bgp 1
Network 10.10.10.10 mask 255.255.255.255
address-family ipv4 vrf CUS-A
Neighbor 10.10.1.1 remote-as 10
exit-address-family
address-family ipv4 vrf CUS-B
Neighbor 10.10.1.254 remote-as 20
exit
PE2 :
Router bgp 1
Network 16.16.16.16 mask 255.255.255.255
address-family ipv4 vrf CUS-C
Neighbor 10.10.2.1 remote-as 30
exit-address-family
address-family ipv4 vrf CUS-D
Neighbor 10.10.2.2 remote-as 40
exit-address-family
exit
VERIFICATION :
CE17 :
CE18 :
CE19 :
CE20 :
PE1 :
PE2 :
Test Connection CE to CE
CE17 to CE19 :
CE18 to CE20 :
Hasil dari traceroute di kotak merah
gambar diatas bahwa paket dari CE17 dan 18 to CE19 dan CE20 ditandai oleh PE1 sebagai
traffic mpls telah berhasil dan traffic paket telah sampai ke CE lain dengan
mechanism MP-BGP yang berfungsi untuk share information dari VRF.
Configuration all router :
P :
!
hostname P
!
interface Loopback0
ip address 15.15.15.15
255.255.255.255
!
interface Ethernet0/0
ip address 172.0.10.1
255.255.255.252
mpls ip
!
interface Ethernet0/1
ip address 172.0.20.1
255.255.255.252
mpls ip
!
router ospf 10
network 15.15.15.15
0.0.0.0 area 0
network 172.0.10.0
0.0.0.3 area 0
network 172.0.20.0
0.0.0.3 area 0
!
end
PE1 :
!
hostname PE1
!
ip vrf CUS-A
rd 1:1
route-target export 1:1
route-target import 1:1
!
ip vrf CUS-B
rd 2:2
route-target export 2:2
route-target import 2:2
!
interface Loopback0
ip address 10.10.10.10
255.255.255.255
!
interface Ethernet0/0
ip address 172.0.10.2
255.255.255.252
mpls ip
!
interface Ethernet0/1
ip vrf forwarding CUS-A
ip address 10.10.1.254
255.255.255.0
!
interface Ethernet0/2
ip vrf forwarding CUS-B
ip address 10.10.1.254
255.255.255.0
!
router ospf 10
network 10.10.10.10
0.0.0.0 area 0
network 172.0.10.0
0.0.0.3 area 0
!
router bgp 1
bgp log-neighbor-changes
network 10.10.10.10 mask
255.255.255.255
neighbor 16.16.16.16 remote-as 1
neighbor 16.16.16.16 update-source Loopback0
!
address-family vpnv4
neighbor 20.20.20.20
activate
neighbor 20.20.20.20
send-community extended
exit-address-family
!
address-family ipv4 vrf
CUS-A
neighbor 10.10.1.1
remote-as 10
neighbor 10.10.1.1
activate
exit-address-family
!
address-family ipv4 vrf
CUS-B
neighbor 10.10.1.2
remote-as 20
neighbor 10.10.1.2
activate
exit-address-family
!
end
PE2 :
!
hostname PE2
!
ip vrf CUS-C
rd 1:1
route-target export 1:1
route-target import 1:1
!
ip vrf CUS-D
rd 2:2
route-target export 2:2
route-target import 2:2
!
interface Loopback0
ip address 16.16.16.16 255.255.255.255
!
interface Ethernet0/0
ip vrf forwarding CUS-C
ip address 10.10.2.254
255.255.255.0
!
interface Ethernet0/1
ip address 172.0.20.2
255.255.255.252
mpls ip
!
interface Ethernet0/2
ip vrf forwarding CUS-D
ip address 10.10.2.254
255.255.255.0
!
router ospf 10
network 16.16.16.16 0.0.0.0 area 0
network 172.0.20.0
0.0.0.3 area 0
!
router bgp 1
bgp log-neighbor-changes
network 16.16.16.16 mask
255.255.255.255
neighbor 10.10.10.10
remote-as 1
neighbor 10.10.10.10
update-source Loopback0
!
address-family vpnv4
neighbor 10.10.10.10
activate
neighbor 10.10.10.10
send-community extended
exit-address-family
!
address-family ipv4 vrf
CUS-C
neighbor 10.10.2.1
remote-as 30
neighbor 10.10.2.1
activate
exit-address-family
!
address-family ipv4 vrf
CUS-D
neighbor 10.10.2.2
remote-as 40
neighbor 10.10.2.2
activate
exit-address-family
!
end
CE17 :
!
hostname CE17
!
!
interface Loopback0
ip address 17.17.17.17
255.255.255.255
!
interface Ethernet0/1
ip address 10.10.1.1
255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 17.17.17.17 mask
255.255.255.255
neighbor 10.10.1.254
remote-as 1
!
end
CE18 :
!
hostname CE18
!
!
interface Loopback0
ip address 18.18.18.18
255.255.255.255
!
interface Ethernet0/2
ip address 10.10.1.2
255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 18.18.18.18 mask
255.255.255.255
neighbor 10.10.1.254
remote-as 1
!
end
CE19 :
!
hostname CE19
!
!
interface Loopback0
ip address 19.19.19.19
255.255.255.255
!
interface Ethernet0/0
ip address 10.10.2.1
255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 19.19.19.19 mask
255.255.255.255
neighbor 10.10.2.254
remote-as 1
!
end
CE20 :
!
hostname CE20
!
!
interface Loopback0
ip address 20.20.20.20
255.255.255.255
!
interface Ethernet0/2
ip address 10.10.2.2 255.255.255.0
!
router bgp 10
bgp log-neighbor-changes
network 20.20.20.20 mask
255.255.255.255
neighbor 10.10.1.254
remote-as 1
!
end
Thankss
Syawal Adhitya
ALLOWAS-IN
Dengan topoology yang sama, bagaimana jika antar Customer memeiliki AS yang sama, CUS-B dan CUS-D with AS20, by default route tersebut akan di drop jika customer D memilki ASN yang sama, Karena ketika PE1 menerima sebuah packet dari CUS-B packet tersebut akan di tag dengan CUS-B ASN, Output BGP :
CE18# BGP(0): 10.10.1.254 rcv UPDATE about 20.20.20.20/32 -- DENIED due to: ASPATH contains our own AS;
Ada 2 cara untuk resolve probelem ini :
- Menggunakan Allow-in command ini direlease untuk memungkinkan BGP di site lain untuk inject update. Feature ini hanya dapat digunakan untuk eBGP Peers.
- Menggunakan AS-Override berfungsi untuk replace ASN Customer dengan menggunakan ASN SP (Service Provider).
Sebelum Configure Allowas-in kita ubah terlebih dahulu CUS-D menjadi AS20 :
CE20 :
no router bgp 10
router bgp 20
network 20.20.20.20 mask 255.255.255.255
neighbor 10.10.2.254 remote-as 1
exit
Configure Allowas-in :
CE18 :
router bgp 20
neighbor 10.10.1.254 allowas-in
exit
CE20 :
router bgp 20
neighbor 10.10.2.254 allowas-in
exit
end
Verification :
CE18 :
CE20 :
bisa dilihat gambar diatas command sh ip bgp Prefix CE20 (20.20.20.20) sekarang telah dipelajari oleh CE18 dan begitupun sebaliknya dari CE20 to CE18.
AS-Override
Masih topology yang sama, disini kita coba memakai AS-Override yang berfungsi untuk replace nomor AS CUS-B dengan
menjadi AS PE1, So may be it is not known by CUS-D.
Let’s remove priviously config on CE router :
CE18 :
router bgp 20
no neighbor 10.10.1.254 allowas-in
exit
CE20 :
router bgp 20
no neighbor 10.10.2.254 allowas-in
exit
Verify BGP tidak memiliki koneksi antar loopbak antar CE B dan D :
CE18 :
CE20 :
Configure AS-Override on Router PE :
PE1 :
router bgp 1
address-family ipv4 vrf CUS-B
neighbor 10.10.1.2 as-override
exit
PE2 :
router bgp 1
address-family ipv4 vrf CUS-D
neighbor 10.10.2.2 as-override
exit
Verify BGP ASN telah berubah dari AS20 to AS1
BEFORE
CE18 & CE20:
AFTER
CE18 & CE20 :
Capture After config AS-Override Router CE18 telah mempelajari prefix dari CE20 (20.20.20.20) with AS1,
So Router PE telah replace AS20 to AS1 then disend to CE18, begitupun sebaliknya dari CE20 telah mempelajari
prefix dari CE18 (18.18.18.18) with AS1.
Thankss
Syawal adhitya
Komentar
Posting Komentar