Exploring the quirks of Network Engineering
Scenario
This comparison shows an MPLS Inter-AS Option C setup as follows:
This setup shows both the ASBRs and the Route Reflectors with the following conditions:
For more information on how Inter-AS options work, including Option C, see this document.
IOS Config – ASBR
hostname ASBR1
!
mpls label range 1000 1999
mpls ldp label
allocate global host-routes
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface GigabitEthernet1.122
encapsulation dot1Q 122
ip address 10.1.22.1 255.255.255.0
mpls bgp forwarding
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes detail
redistribute bgp 100 subnets
passive-interface Loopback0
mpls ldp sync
mpls ldp autoconfig
!
router bgp 100
bgp router-id 1.1.1.1
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 5.5.5.5 remote-as 100
neighbor 5.5.5.5 update-source Loopback0
neighbor 10.1.22.22 remote-as 200
!
address-family ipv4
network 1.1.1.1 mask 255.255.255.255
network 2.2.2.2 mask 255.255.255.255
network 3.3.3.3 mask 255.255.255.255
network 5.5.5.5 mask 255.255.255.255
neighbor 10.1.22.22 activate
neighbor 10.1.22.22 route-map MATCH_LOOPBACKS out
neighbor 10.1.22.22 send-label
exit-address-family
!
address-family vpnv4
neighbor 5.5.5.5 activate
neighbor 5.5.5.5 send-community extended
neighbor 5.5.5.5 next-hop-self
exit-address-family
!
!
ip prefix-list MATCH_LOOPBACKS seq 5 permit 1.1.1.1/32
ip prefix-list MATCH_LOOPBACKS seq 10 permit 2.2.2.2/32
ip prefix-list MATCH_LOOPBACKS seq 15 permit 3.3.3.3/32
ip prefix-list MATCH_LOOPBACKS seq 20 permit 5.5.5.5/32
!
route-map MATCH_LOOPBACKS permit 10
match ip address prefix-list MATCH_LOOPBACKS
set mpls-label
!
mpls ldp router-id Loopback0
!
IOS Config – Route Reflector
hostname RR1
!
router bgp 100
bgp router-id 5.5.5.5
template peer-policy IBGP_PEER
route-reflector-client
exit-peer-policy
!
template peer-session IBGP_PEER
remote-as 100
update-source Loopback0
exit-peer-session
!
bgp log-neighbor-changes
neighbor 1.1.1.1 inherit peer-session IBGP_PEER
neighbor 2.2.2.2 inherit peer-session IBGP_PEER
neighbor 20.20.20.20 remote-as 200
neighbor 20.20.20.20 ebgp-multihop 255
neighbor 20.20.20.20 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 1.1.1.1 inherit peer-policy IBGP_PEER
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
neighbor 2.2.2.2 inherit peer-policy IBGP_PEER
neighbor 20.20.20.20 activate
neighbor 20.20.20.20 send-community extended
neighbor 20.20.20.20 next-hop-unchanged
exit-address-family
!
XR Config – ASBR
hostname ASBR1
!
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0.122
ipv4 address 10.1.22.1 255.255.255.0
encapsulation dot1q 122
!
prefix-set LOOPBACKS
1.1.1.1,
2.2.2.2,
3.3.3.3,
5.5.5.5
end-set
!
route-policy FROM_REMOTE_AS
pass
end-policy
!
route-policy MATCH_LOOPBACKS
if destination in LOOPBACKS then
pass
else
drop
endif
end-policy
!
! XR devices cannot label switch to a next-hop
! that is not learned via a /32 host. Hence the
! need for a static route here.
router static
address-family ipv4 unicast
10.1.22.22/32 GigabitEthernet0/0/0/0.122
!
!
router ospf 1
log adjacency changes detail
router-id 1.1.1.1
redistribute bgp 100
area 0
mpls ldp sync
mpls ldp auto-config
interface Loopback0
passive enable
!
interface GigabitEthernet0/0/0/0.13
!
!
router bgp 100
bgp router-id 1.1.1.1
address-family ipv4 unicast
network 1.1.1.1/32
network 2.2.2.2/32
network 3.3.3.3/32
network 5.5.5.5/32
allocate-label all
!
address-family vpnv4 unicast
!
neighbor 10.1.22.22
remote-as 200
address-family ipv4 labeled-unicast
route-policy FROM_REMOTE_AS in
route-policy MATCH_LOOPBACKS out
!
!
neighbor 5.5.5.5
remote-as 100
update-source Loopback0
address-family vpnv4 unicast
next-hop-self
!
!
!
mpls ldp
router-id 1.1.1.1
address-family ipv4
label
local
allocate for host-routes
!
!
!
!
mpls label range table 0 16000 16999
!
XR Config – Router Reflector
hostname RR1
!
router bgp 100
bgp router-id 5.5.5.5
address-family vpnv4 unicast
!
neighbor-group IBGP_PEERS
remote-as 100
update-source Loopback0
address-family vpnv4 unicast
route-reflector-client
!
!
neighbor 20.20.20.20
remote-as 200
ebgp-multihop 255
update-source Loopback0
address-family vpnv4 unicast
route-policy PASS in
route-policy PASS out
next-hop-unchanged
!
!
neighbor 1.1.1.1
use neighbor-group IBGP_PEERS
address-family vpnv4 unicast
!
!
neighbor 2.2.2.2
use neighbor-group IBGP_PEERS
address-family vpnv4 unicast
!
!
!
You must be logged in to post a comment.