Default route
Encyclopedia
A default route, also known as the gateway of last resort, is the network route used by a router when no other known route exists for a given IP
packet's destination address. All the packets for destinations not known by the router's routing table
are sent to the default route. This route generally leads to another router, which treats the packet the same way: If the route is known, the packet will get forwarded to the known route. If not, the packet is forwarded to the default-route of that router which generally leads to another router. And so on. Each router traversal adds a one-hop distance to the route.
Once the router with a known route to a host destination is reached, the router determines which route
is valid by finding the "most specific match
". The network with the longest subnet mask that matches the destination IP address
wins.
The default route in IPv4
(in CIDR notation
) is 0.0.0.0
/0, often called the quad-zero route. Since the subnet mask given is /0, it effectively specifies no network, and is the "shortest" match possible. A route lookup that doesn't match anything will naturally fall back onto this route. Similarly, in IPv6
the default address is given by ::/0.
Routers in an organization generally point the default route towards the router that has a connection to a network service provider
. This way, packets with destinations outside the organization's local area network (LAN
)—typically to the Internet
, WAN
, or VPN—will be forwarded by the router with the connection to that provider.
Once it is routed outside the network, if that router does not know the route of the destination, it will forward it to its own Default Route, which is usually a router connected to larger number of networks. Similarly, the packet will progress to the Internet backbone. If still no route is known about the destination IP, it is then considered that the network does not exist, and the packet is discarded.
Host devices in an organization generally refer to the default route as a default gateway
which can be, and usually is, a filtration device such as a firewall or Proxy server
.
Internet Protocol
The Internet Protocol is the principal communications protocol used for relaying datagrams across an internetwork using the Internet Protocol Suite...
packet's destination address. All the packets for destinations not known by the router's routing table
Routing table
In computer networking a routing table, or Routing Information Base , is a data table stored in a router or a networked computer that lists the routes to particular network destinations, and in some cases, metrics associated with those routes. The routing table contains information about the...
are sent to the default route. This route generally leads to another router, which treats the packet the same way: If the route is known, the packet will get forwarded to the known route. If not, the packet is forwarded to the default-route of that router which generally leads to another router. And so on. Each router traversal adds a one-hop distance to the route.
Once the router with a known route to a host destination is reached, the router determines which route
Routing
Routing is the process of selecting paths in a network along which to send network traffic. Routing is performed for many kinds of networks, including the telephone network , electronic data networks , and transportation networks...
is valid by finding the "most specific match
Longest prefix match
Longest prefix match refers to an algorithm used by routers in Internet Protocol networking to select an entry from a routing table....
". The network with the longest subnet mask that matches the destination IP address
IP address
An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...
wins.
The default route in IPv4
IPv4
Internet Protocol version 4 is the fourth revision in the development of the Internet Protocol and the first version of the protocol to be widely deployed. Together with IPv6, it is at the core of standards-based internetworking methods of the Internet...
(in CIDR notation
CIDR notation
CIDR notation is a compact specification of an Internet Protocol address and its associated routing prefix. Classless Inter-Domain Routing is an Internet Protocol address allocation and route aggregation methodology used within the Internet addressing architecture that replaced the IPv4 classful...
) is 0.0.0.0
0.0.0.0
In the Internet Protocol version 4 the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non applicable target.To give a special meaning to an otherwise invalid piece of data is an application of in-band signaling....
/0, often called the quad-zero route. Since the subnet mask given is /0, it effectively specifies no network, and is the "shortest" match possible. A route lookup that doesn't match anything will naturally fall back onto this route. Similarly, in IPv6
IPv6
Internet Protocol version 6 is a version of the Internet Protocol . It is designed to succeed the Internet Protocol version 4...
the default address is given by ::/0.
Routers in an organization generally point the default route towards the router that has a connection to a network service provider
Network service provider
A network service provider is a business or organization that sells bandwidth or network access by providing direct backbone access to the Internet and usually access to its network access points...
. This way, packets with destinations outside the organization's local area network (LAN
Län
Län and lääni refer to the administrative divisions used in Sweden and previously in Finland. The provinces of Finland were abolished on January 1, 2010....
)—typically to the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...
, WAN
Wide area network
A wide area network is a telecommunication network that covers a broad area . Business and government entities utilize WANs to relay data among employees, clients, buyers, and suppliers from various geographical locations...
, or VPN—will be forwarded by the router with the connection to that provider.
Once it is routed outside the network, if that router does not know the route of the destination, it will forward it to its own Default Route, which is usually a router connected to larger number of networks. Similarly, the packet will progress to the Internet backbone. If still no route is known about the destination IP, it is then considered that the network does not exist, and the packet is discarded.
Host devices in an organization generally refer to the default route as a default gateway
Default gateway
In computer networking, a gateway is a node on a TCP/IP network that serves as an access point to another network. A default gateway is the node on the computer network that the network software uses when an IP address does not match any other routes in the routing table.In home computing...
which can be, and usually is, a filtration device such as a firewall or Proxy server
Proxy server
In computer networks, a proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server...
.