Cisco Default Routes
This page will describe default routes and explain how they are configured.
By default, routers learn paths to destinations three different ways:
Static routes – The system administrator manually defines the static routes as the next hop to a destination. Static routes are useful for security and traffic reduction, as no other route is known.
Default routes – The system administrator also manually defines default routes as the path to take when there is no known route to the destination. Default routes keep routing tables shorter. When an entry for a destination network does not exist in a routing table, the packet is sent to the default network.
Dynamic routes – Dynamic routing means that the router learns of paths to destinations by receiving periodic updates from other routers.
The static route is indicated by the following command:
Router(config)#ip route 172.16.1.0 255.255.255.0 220.127.116.11
The ip default-network command establishes a default route in networks using dynamic routing protocols:
Router(config)#ip default-network 192.168.20.0
Generally after the routing table has been set to handle all the networks that must be configured, it is often useful to ensure that all other packets go to a specific location. This is called the default route for the router. One example is a router that connects to the Internet. All the packets that are not defined in the routing table will go to the nominated interface of the default router.
The ip default-network command is usually configured on the routers that connect to a router with a static default route.
Hong Kong 2 and Hong Kong 3 would use Hong Kong 4 as the default gateway. Hong Kong 4 would use interface 192.168.19.2 as its default gateway. Hong Kong 1 would route packets to the Internet for all internal hosts. To allow Hong Kong 1 to route these packets it is necessary to configure a default route as:
HongKong1(config)#ip route 0.0.0.0 0.0.0.0 s0/0
The zeros in the IP address and mask portions of the command represent any destination network with any mask. Default routes are referred to as quad zero routes. In the diagram, the only way Hong Kong 1 can go to the Internet is through interface s0/0.