ip default-network

To select a network as a candidate route for computing the gateway of last resort, use the ip default-network global configuration command. To remove a route, use the no form of this command.

ip default-network network-number
no ip default-network network-number
Syntax Description

network-number

Number of the network.

Default

If the router has a directly connected interface onto the specified network, the dynamic routing protocols running on that router will generate (or source) a default route. For RIP, this is flagged as the pseudonetwork 0.0.0.0; for IGRP, it is the network itself, flagged as an exterior route.

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.0.

The Cisco IOS software uses both administrative distance and metric information to determine the default route. Multiple ip default-network commands can be given. All candidate default routes, both static (that is, flagged by ip default-network) and dynamic, appear in the routing table preceded by an asterisk.

If the IP routing table indicates that the specified network number is subnetted and a non-zero subnet number is specified, then the system will automatically configure a static summary route. This static summary route is configured instead of a default network. The effect of the static summary route is to cause traffic destined for subnets that are not explicitly listed in the IP routing table to be routed using the specified subnet.

Examples

The following example defines a static route to network 10.0.0.0 as the static default route:

ip route 10.0.0.0 255.0.0.0 131.108.3.4
ip default-network 10.0.0.0

If the following command was issued on a router not connected to network 129.140.0.0, the software might choose the path to that network as a default route when the network appeared in the routing table:

ip default-network 129.140.0.0