In
computer networking
A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
, the default route is a configuration of the
Internet Protocol
The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet.
IP ...
(IP) that establishes a forwarding rule for
packets when no specific address of a next-hop host is available from the
routing table or other routing mechanisms.
The default route is generally the address of another router, which treats the packet the same way: if a route matches, the packet is forwarded accordingly, otherwise the packet is forwarded to the default route of that router. The route evaluation process in each router uses the
longest prefix match method to obtain the most specific route. The network with the longest
subnet mask or network prefix that matches the destination
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
is the next-hop network gateway. The process repeats until a packet is delivered to the destination host, or earlier along the route, when a router has no default route available and cannot route the packet otherwise. In the latter case, the packet is dropped and an
ICMP ''Destination Unreachable'' message may be returned.
Each router traversal counts as one hop in the distance calculation for the transmission path.
The device to which the default route points is often called the
default gateway
A default gateway is the node in a computer network using the Internet protocol suite that serves as the forwarding host ( router) to other networks when no other route specification matches the destination IP address of a packet.
Role
A gatew ...
, and it often carries out other functions such as packet filtering,
firewalling, or
proxy server operations.
The default route in
Internet Protocol Version 4 (IPv4) is designated as the zero address, in
CIDR notation
Classless Inter-Domain Routing (CIDR ) is a method for allocating IP addresses for IP routing. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous classful network addressing architecture on the Internet. Its goal ...
.
Similarly, in
IPv6
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
, the default route is specified by . The subnet mask is specified as , which effectively specifies all networks and is the shortest match possible. A route lookup that does not match any other rule falls back to this route.
In the highest-level segment of a network, administrators generally point the default route for a given host towards the router that has a connection to a
network service provider. Therefore, packets with destinations outside the organization's
LAN, typically destinations on the
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
or a
wide area network, are forwarded to the router with the connection to that provider.
References
{{reflist
Internet architecture
Routing