[c-nsp] IOS XR BGP default route - prepending AS

Nathan Ward cisco-nsp at daork.net
Wed Apr 20 03:19:23 EDT 2016


Hi,

At first I thought this was because you were seeing the pre-policy routes, but that’s not the case if you’re asking for advertised routes under a neighbour - when I look at advertised routes on ASR9k neighbours where I have prepends in the policy, I see those prepends. You don’t see them if you ask for “route-policy <blah>” though, weirdly.

I can’t see anything wrong with your config - perhaps you can paste the relevant unmodified config, I wonder if your modifications have hidden bugs or something. Note that you left your ASN in anyway, despite doing the MY-AS thing in some places, so, may as well just include it rather than potentially obscuring things ;)

--
Nathan Ward

> On 20/04/2016, at 16:50, Brian Knight <brian.t.knight at gmail.com> wrote:
> 
> 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
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/



More information about the cisco-nsp mailing list