Order a domain here
Routing is a core concept of the Internet and many other networks. Routing provides the means of forwarding logically addressed packets from their local subnetwork toward their ultimate destination. In large networks, packets may pass through many intermediary destinations before reaching their destination. Routing occurs at layer 3 of the OSI seven-layer model.
Hubs and switches move data on the local network, while the router has an awareness of the neighboring routers. See the router article for a description of the hardware technology and manufacturers of routers. The rest of this article describes routing in a hardware-independent way.
Knowing where to send packets requires a knowledge of the structure of the network. In small networks, routing can be very simple, and is often configured by hand. In large networks the topology of the network can become complex, and may change constantly, making the problem of constructing the routing tables very complex.
As routers can only recalculate the best routes very slowly relative to the rate of arrival of packets, routers keep a routing table that maintains a record of only the best possible routes to certain network destinations and the routing metrics associated with those routes.
Routing protocols facilitate the exchange of routing information between networks, allowing routers to build routing tables dynamically. Traditional IP routing stays simple because it uses next-hop routing where the router only needs to consider where it sends the packet, and does not need to consider the subsequent path of the packet on the remaining hops.
Although this dynamic routing can become very complex, it makes the Internet very flexible, and has allowed it to grow in size by more than eight orders of magnitude over the last thirty(?) years since adopting IP in 1983.
Routing algorithms use two basic techologies:
- telling the world who your neighbors are: link-state routing protocols such as OSPF
- telling your neighbors what the world looks like: distance-vector routing protocols such as RIP
A routing metric consists of any value used by routing algorithms to determine whether one route is superior to another. Metrics can cover such information as bandwidth, delay, hop count, path cost, load, MTU, reliability, and communication cost. The routing table stores only the best possible routes, while link-state or topological databases may store all other information.
Depending on the relationship of the router relative to other autonomous systems, various classes of routing protocols exist:
- Ad hoc network routing protocols appear in networks with no or little infrastructure. For a list of a couple of the proposed protocols, see the Ad hoc protocol list
- Interior Gateway Protocols (IGPs) exchange routing information within a single autonomous system. Common examples include:
- IGRP/EIGRP (Interior Gateway Routing Protocol/ Enhanced IGRP)
- OSPF (Open Shortest Path First)
- RIP (Routing Information Protocol)
- IS-IS (Intermediate System to Intermediate System)
- Exterior Gateway Protocols (EGPs) route between separate autonomous systems. EGPs include:
- EGP (the original Exterior Gateway Protocol used to connect to the former Internet backbone network -- now obsolete)
- BGP (Border Gateway Protocol: at version BGPv4 as of 2002)
Topics for further discussion:
- Classless inter-domain routing (CIDR)
- Routing policy
- MPLS routing
- wormhole routing
- ATM routing
- Routing in the PSTN
- "Hot-potato routing"
- "Cold-potato routing"
- Mathematical complexity of routing with multiple metrics
- and hence the problem of Quality of Service in routing
- Router (includes a list of manufacturers)
- NAT (Network Address Translation)
- IP spoofing (Security)