Default Routes

Earlier chapters showed how a default route could be used for branch office connectivity. A default route can also be used when connecting to the Internet to represent all the routes in the Internet. Let’s say that TraderMary established a connection from NewYork2, Serial2 (line 45) to an Internet service provider (ISP). A static default route is also installed on NewYork2 (line 47), pointing to the ISP.

NewYork2 is configured as in line 46 to source a default route. The keyword always implies that the default route must be originated whether or not the default route is up. metric-value is the metric to associate with the default route (the default for this field is 10). Note that this redistribution of a default route into OSPF makes NewYork2 an ASBR. The keyword metric-type can be set to 1 or 2 to specify whether the default route is external type 1 or 2 (the default is 2).

    hostname NewYork2
    !
45  interface Serial2      
    description Connection to the ISP
    ip address 146.146.1.1 255.255.255.0
    !
    router ospf 10
    network 172.16.0.0 0.0.255.255 area 0
46  default-information originate always metric-value 20 metric-type 1
    !
47  ip route 0.0.0.0 0.0.0.0 interface serial2

Since the keyword always was specified, the default route will not disappear from the OSPF routing table if Serial2 (the link to the ISP) is down. If TraderMary has two (or more) routers connecting to ISPs and each router announced a default route into OSPF, do not use the always keyword -- if one ISP connection ...

Get IP Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.