Track the DHCP default route

Cisco has recently published a series of documents describing how you can connect a SOHO site to two ISPs. According to the timestamps on the documents, it took them a few days more than a year to publish a configuration that's almost identical to the one I've described in the IP Corner article “Small-site multihoming” … which can only mean that my configuration was close to optimal :)

Their configuration also includes a nice trick: the ip dhcp client route track number command is a convenient replacement for a static default route with the track option if one of the upstream interfaces uses DHCP and the router generates the default route based on DHCP replies.

6 comments:

  1. Ivan:
    We've run across what seems an odd anomaly. When configuring an interface address as DHCP, the address, mask, and DNS options operate correctly but the route table updates only after the initial zero crossing of the 'next timer fires after' value. Occasionally, this timer starts at values of more than 30 minutes.

    Have you seen this situation?

    ReplyDelete
    Replies
    1. I just experienced the same with a Cisco 1900 with IOS 15.3.3M1. When the router would boot up the default gateway would either not be set or set to 0.0.0.0.

      Delete
  2. Looks like a bug to me. Try your luck with bug navigator, maybe you'll get a hit; otherwise you should open a case with Cisco TAC.

    ReplyDelete
  3. it seems that the track option can't be configured when configuring a static route for a DHCP next hop. i.e. can't do "ip route 0.0.0.0 0.0.0.0 fas0/1 dhcp track 123". Using a 2811 with IOS 12.4.11 advancedIP... does it exist in any IOS?

    ReplyDelete
  4. I fought this trying to use a static route. I got it working with a floating route in the interface.

    interface FastEthernet0
    ip dhcp client route track 101
    ip address dhcp client-id FastEthernet0
    ip virtual-reassembly
    ....

    interface FastEthernet1
    ip dhcp client route track 102
    ip address dhcp client-id FastEthernet1
    ip virtual-reassembly
    ....

    ReplyDelete
  5. To setup the route for tracking with dhcp use this:

    conf t
    int fastethernet 0
    ip dhcp client route track 101
    ...
    int fastethernet 1
    ip dhcp client route track 102
    ...

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.