IP Connectivity

A router has a static default route via 10.1.1.1 and an OSPF-learned default route via 10.2.2.2, and the interface toward 10.1.1.1 goes down. What does show ip route then report for the gateway of last resort?

Show the answer

Correct answerB. Set to 10.2.2.2, because the OSPF default becomes the best remaining route to 0.0.0.0/0

AWhy not this: A less-preferred route to the same prefix is installed as soon as the better one disappears.

BWhy this is right: With the static default gone, the OSPF default is the only 0.0.0.0/0 route left and becomes the gateway of last resort.

CWhy not this: Dynamic protocols can supply a default route, and its next hop then becomes the gateway of last resort.

DWhy not this: A static route is withdrawn when its exit interface goes down, so 10.1.1.1 cannot remain the gateway.

While the static default (AD 1) is in the table it wins over the OSPF default (AD 110). When its interface fails, the static route is removed and the OSPF default is the best remaining 0.0.0.0/0 route. Static routes are removed when their exit interface goes down.