[c-nsp] IOS XR BGP default route - prepending AS
Brian Knight
brian.t.knight at gmail.com
Wed Apr 20 02:50:44 EDT 2016
At $DAYJOB we use MPLS VPNs from other carriers to provide Internet access
to customers connected to these VPNs. There is always a primary path for
outbound access, plus one or more backup paths. I am trying to configure a
backup path, but can't seem to set AS path prepending on the default route
we announce to the MPLS VPN.
This is our first time configuring these types of MPLS VPNs on IOS XR.
I've got a config that looks a little something like this:
--------
route-policy BACKUP-IN
apply IPV4-RESERVED-DENY
apply IPV4-DEFAULT-DENY
# For backup, localpref = 350
#
set local-preference 350
set community BGP-SITECODE additive
end-policy
route-policy BACKUP-OUT
# For backup, prepend = 2
#
# Announce only default route
if destination in (0.0.0.0/0) then
prepend as-path MY-AS 2
set community BGP-SITECODE
else
drop
endif
end-policy
router bgp 53828
neighbor THEIR-IP
remote-as THEIR-AS
address-family ipv4 unicast
default-originate
route-policy BACKUP-IN in
route-policy BACKUP-OUT out
send-community-ebgp
send-extended-community-ebgp
soft-reconfig inbound
maximum-prefix 500 80 restart 1
--------
The config originates a default route towards THEIR-IP, which is expected.
But the default route that is generated is apparently not influenced by the
BACKUP-OUT policy (prepend MY-AS 2 times).
RP/0/8/CPU0:AR1.ATL1#sh bgp ipv4 u nei THEIR-IP adv
Wed Apr 20 01:00:39.545 CDT
Network Next Hop From AS Path
0.0.0.0/0 0.0.0.0 Local i
What's the simplest way to prepend AS path on a default route advertised to
a single peer?
A few sources suggest adding a default route to Null0 in our Internet
routing table and advertising it through redistribution, or enter a
"network 0.0.0.0/0" command in the BGP address-family, both of which can be
influenced by route policies. Neither of those options sound particularly
simple to me.
I have also tried the following to no avail:
---------
route-policy DEFAULT-BACKUP-OUT
prepend as-path 53828 2
set community BGP-SITECODE
end-policy
router bgp 53828
neighbor THEIR-IP
address-family ipv4 unicast
default-originate route-policy DEFAULT-BACKUP-OUT
---------
I'd be grateful for any insight.
Thanks,
-Brian Knight
More information about the cisco-nsp
mailing list