12-07-2016 08:51 AM - edited 03-01-2019 03:04 PM
Hi experts,
I need the IOS-XR command equivalent to the IOS command 'ip default-network'.
In IOS, this command is used to set the candidate path for the gateway of last resort.
#sh ip route
---snip---
Gateway of last resort is x.x.x.x to network a.a.a.a
then, in the configuration, add the candidate default-network which is learned from our upstream Transit Provider.
ip default-network a.a.a.a
I need the equivalent IOS-XR command for this 'ip default-network' but unable to located from any IOS-XR routing configuration guide.
Is there any other way to designate the candidate default-network in the IOS-XR?
Cheers.
-Won
12-07-2016 09:24 AM
The cmd 'ip default-network' has a specific use case –and that is when “ip routing” is disabled on the router.
If “ip routing” is enabled you should be using static default route instead.
In XR:
router static
address-family ipv4 unicast
0.0.0.0/0 gig0/0/0/1 10.1.1.1
adam
12-07-2016 10:48 AM
the usage of the cmd:
As having multiple Tier 1 Transit provider connected to us, bare static route is not an efficient way to handle the default path out to Tier1 network. for example, if the Tier 1 provider network impaired, while the direct BGP session with us still up, it will need to be removed from being default path and switch over to other Tier1 provider automatically. the legacy IOS cmd 'ip default-network' provider this function fairly well which the reason i am interested to have in IOS-XR.
I am not sure if this feature has been dropped in IOS-XR.
12-09-2016 12:52 AM
Sorry I was thinking “default-gateway” not “default-network”, my mistake.
I think I see what you are trying to achieve here.
So I assume you have several ISPs advertising you a subset of full internet routing table
And you have selected several networks (each from a different ISP) and you are using these as default-networks
So in case the ISP1 is impaired and is not advertising the specific route (you’re using to generate default-gw) to you via BGP then the next-hop of a gateway of last resort is switched to one of the remaining default-networks (now pointing to different ISP).
But the “default-network” is a legacy approach (it even works only on class-full boundaries).
Best approach would be to ask your Transit providers to advertise a default route to you –their default route “should” be conditionally generated.
But if you’d like to be in control, then you can do something like the below to accomplish the same thing as the “default-network” cmd does:
track 1
type route reachability
route ipv4 100.0.0.0/16
delay up 10
track 2
type route reachability
route ipv4 200.0.0.0/16
delay up 10
router static
address-family ipv4 unicast
0.0.0.0/0 gig0/0/0/1 10.1.1.1
track 1
0.0.0.0/0 gig0/0/0/2 20.1.1.1 200
track 2
adam
12-12-2016 08:49 AM
Adam,
Thanks for the update. Your assumption is correct and your suggested method maybe way to go.
Though the 'track' relevant configuration is more complicate than of the legacy 'default-network' command, i am considering to use 'recursive static route' method instead.
What would be drawbacks of this method compared with the method using the 'track' command?
router static
address-family ipv4 unicast
0.0.0.0/0 100.0.0.0
0.0.0.0/0 200.0.0.0
Thanks,
01-08-2017 03:31 AM
Hi,
depends on your scenario this could be another solution:
route-policy sample-originate if rib-has-route in (10.0.0.0/8 ge 8 le 32) then pass endif end-policy router bgp 2 neighbor 10.0.0.1 remote-as 3 address-family ipv4 unicast default-originate policy sample-originate
http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r6-0/routing/configuration/guide/b_routing_cg60xasr9k/b_routing_cg60xasr9k_chapter_01010.html#con_1117195
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: