cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1055
Views
5
Helpful
4
Replies

Prepend only default route 0.0.0.0/0

Crowley262
Level 1
Level 1

I thought this would work to prepend only the default route 0.0.0.0/0 but it ended up prepending everything. On an IOS XR platform 

 

conf t
!
prefix-set PREPEND_CUST
0.0.0.0/0
end-set
!
route-policy CUST_PREPEND_AS
if destination in PREPEND_CUST then
prepend as-path most-recent 4
else
pass
endif
end-policy
!

 

Set this on the bgp route-policy outbound 

Any help is appreciated, thanks

4 Replies 4

Hello,

 

I somewhere recall the the below syntax is possible as well, can you give that a try ?

 

route-policy CUST_PREPEND_AS
if destination in (0.0.0.0/0) then
prepend as-path most-recent 4
else
pass
endif
end-policy

Hello

May i ask why is there a requirement to prepend a default route, can you elaborate on your topology a little bit more if applicable.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Customer would like to prefer a default route from another network they have. Use this one as secondary for internet traffic.

I opened a Cisco TAC case on this and this is what they provided as a solution. He showed me it working in the LAB environment. Just an FYI

 


prefix-set XXXX
0.0.0.0/0
end-set

 

route-policy PASS
if destination in XXXX then
prepend as-path 12345 4
else
pass
endif
end-policy