MPLS BGP PE-CE and AS-override
The AS override feature allows a provider edge (PE) router to change the private autonomous system (AS) number used by a customer edge (CE) device on an external BGP (EBGP) session running on a VPN routing and forwarding (VRF) access link. The private AS number is changed to the PE AS number. Another CE device connected to another PE device sees the EBGP route coming from the first site with an AS path of provider-ASN provider-ASN, instead of provider-ASN site1-ASN. This allows enterprise networks to use the same private ASN on all sites.
AS-override work in the opposite direction as to which its applied, it tells the PE the override the AS when passing the routes to the CE(Customer)
On R1 we see there are no routes learned for 5.5.5.0 subnet
Now lets configure AS-override on R2
R2(config-router-af)#neighbor 12.1.1.1 as-override
R2(config-router-af)#neighbor 12.1.1.1 route-map SOO in
R2(config)#route-map SOO permit 10
R2(config-route-map)#set extcommunity soo 11:55






R2 Config:
ip vrf CUST1
rd 1:5
route-target export 1:5
route-target import 1:5
!interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip vrf forwarding CUST1
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 10
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community both
exit-address-family
!
address-family ipv4 vrf CUST1
neighbor 12.1.1.1 remote-as 65001
neighbor 12.1.1.1 activate
neighbor 12.1.1.1 as-override
neighbor 12.1.1.1 route-map SOO in
no synchronization
exit-address-family
!
route-map SOO permit 10
set extcommunity soo 11:55
R3 Config:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 34.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
R4 Config:
ip vrf CUST1
rd 1:5
route-target export 1:5
route-target import 1:5
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding CUST1
ip address 45.1.1.4 255.255.255.0
duplex auto
speed auto
!
router ospf 10
log-adjacency-changes
network 4.4.4.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
exit-address-family
!
address-family ipv4 vrf CUST1
neighbor 45.1.1.5 remote-as 65001
neighbor 45.1.1.5 activate
neighbor 45.1.1.5 as-override
neighbor 45.1.1.5 route-map SOO in
no synchronization
exit-address-family
!
route-map SOO permit 10
set extcommunity soo 11:55
R1 Config:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 15.1.1.1 255.255.255.0
duplex auto
speed auto
!
router eigrp 10
redistribute bgp 65001 metric 1 1 1 1 1
passive-interface default
no passive-interface FastEthernet0/1
network 15.1.1.0 0.0.0.255
auto-summary
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 100
no auto-summary
R5 Config:
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
ip address 45.1.1.5 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 15.1.1.5 255.255.255.0
duplex auto
speed auto
!
router eigrp 10
redistribute bgp 65001 metric 1 1 1 1 1
passive-interface default
no passive-interface FastEthernet0/1
network 15.1.1.0 0.0.0.255
auto-summary
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0
neighbor 45.1.1.4 remote-as 100
no auto-summary

The AS override feature allows a provider edge (PE) router to change the private autonomous system (AS) number used by a customer edge (CE) device on an external BGP (EBGP) session running on a VPN routing and forwarding (VRF) access link. The private AS number is changed to the PE AS number. Another CE device connected to another PE device sees the EBGP route coming from the first site with an AS path of provider-ASN provider-ASN, instead of provider-ASN site1-ASN. This allows enterprise networks to use the same private ASN on all sites.
AS-override work in the opposite direction as to which its applied, it tells the PE the override the AS when passing the routes to the CE(Customer)
On R1 we see there are no routes learned for 5.5.5.0 subnet
R2(config-router-af)#neighbor 12.1.1.1 as-override
R2(config-router-af)#neighbor 12.1.1.1 route-map SOO in
R2(config)#route-map SOO permit 10
R2(config-route-map)#set extcommunity soo 11:55
R2 Config:
ip vrf CUST1
rd 1:5
route-target export 1:5
route-target import 1:5
!interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip vrf forwarding CUST1
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 10
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community both
exit-address-family
!
address-family ipv4 vrf CUST1
neighbor 12.1.1.1 remote-as 65001
neighbor 12.1.1.1 activate
neighbor 12.1.1.1 as-override
neighbor 12.1.1.1 route-map SOO in
no synchronization
exit-address-family
!
route-map SOO permit 10
set extcommunity soo 11:55
R3 Config:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 34.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
R4 Config:
ip vrf CUST1
rd 1:5
route-target export 1:5
route-target import 1:5
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding CUST1
ip address 45.1.1.4 255.255.255.0
duplex auto
speed auto
!
router ospf 10
log-adjacency-changes
network 4.4.4.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
exit-address-family
!
address-family ipv4 vrf CUST1
neighbor 45.1.1.5 remote-as 65001
neighbor 45.1.1.5 activate
neighbor 45.1.1.5 as-override
neighbor 45.1.1.5 route-map SOO in
no synchronization
exit-address-family
!
route-map SOO permit 10
set extcommunity soo 11:55
R1 Config:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 15.1.1.1 255.255.255.0
duplex auto
speed auto
!
router eigrp 10
redistribute bgp 65001 metric 1 1 1 1 1
passive-interface default
no passive-interface FastEthernet0/1
network 15.1.1.0 0.0.0.255
auto-summary
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 100
no auto-summary
R5 Config:
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
ip address 45.1.1.5 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 15.1.1.5 255.255.255.0
duplex auto
speed auto
!
router eigrp 10
redistribute bgp 65001 metric 1 1 1 1 1
passive-interface default
no passive-interface FastEthernet0/1
network 15.1.1.0 0.0.0.255
auto-summary
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0
neighbor 45.1.1.4 remote-as 100
no auto-summary
No comments:
Post a Comment