cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
3578
Views
0
Helpful
5
Replies

IOS-XR command equivalent to IOS command 'ip default-network'

Won Lee
Level 1
Level 1

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

5 Replies 5

Adam Vitkovsky
Level 3
Level 3

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

adam

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.

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

adam

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,

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

Best Regards Please rate all helpful posts and close solved questions