Routers perform thetraffic directing functions on the Internet. A router is connected to two or more data lines from differentIP networks. When a data packet comes in on a line, the router reads thenetwork address information in the packet header to determine the ultimate destination. Then, using information in itsrouting table orrouting policy, it directs the packet to the next network on its journey. A data packet is forwarded from one router to another through aninternetwork until it reaches its destinationnode.[5]
The most familiar type ofIP routers arehome and small office routers that forwardIP packets between the home computers and the Internet. More sophisticated routers, such as enterprise routers, connect large business or ISP networks to powerfulcore routers that forward data at high speed along theoptical fiber lines of theInternet backbone.
The idea for a router (called agateway at the time) initially came about through an international group of computer networking researchers called theInternational Network Working Group (INWG).[14] These gateway devices were different from most previouspacket switching schemes in two ways. First, they connected dissimilar kinds of networks, such asserial lines andlocal area networks. Second, they wereconnectionless devices, which had no role in assuring that traffic was delivered reliably, leaving that function entirely to thehosts.[15] This particular idea, theend-to-end principle, was contained in the work of Donald Davies.[16][17]
The concept was explored in practice by various groups, with the intention to produce a working system forinternetworking. There were three notable contemporaneous programs. The first was an implementation directed byLouis Pouzin of theCYCLADES network, which was designed and developed during 1972-3.[18][19][20] The second was a program atXerox PARC to explore new networking technologies, which produced thePARC Universal Packet system. Some time after early 1974, the first Xerox routers became operational. Due to corporate intellectual property concerns, it received little attention outside Xerox for years.[21][22] The third was aDARPA-initiated program, which began during 1973-4. This drew on the work of the other two programs,[23] expanded significantly, and went on to create theTCP/IP architecture in use today.[24][25]University College London (UCL) provided a gateway betweenBritish research groups and the ARPANET from 1973 until the late 1980s, latterly usingSATNET.[26][27][28]
The first true IP router was developed byGinny Travers atBBN, as part of that DARPA-initiated effort, during 1975–1976.[29][30] By the end of 1976, threePDP-11-based routers were in service in the experimental prototype Internet.[31] Mike Brecia, Ginny Travers, and Bob Hinden received theIEEE Internet Award for early IP routers in 2008.[32]
The first multiprotocol routers were independently created by staff researchers atMIT andStanford in 1981 and both were also based on PDP-11s. Stanford's router program was led byWilliam Yeager and MIT's byNoel Chiappa.[33][34][35][36] Virtually all networking now uses TCP/IP, but multiprotocol routers are still manufactured. They were important in the early stages of the growth of computer networking when protocols other than TCP/IP were in use. Modern routers that handle both IPv4 and IPv6 are multiprotocol but are simpler devices than those that process AppleTalk, DECnet, IPX, and Xerox protocols.
From the mid-1970s and in the 1980s, general-purposeminicomputers served as routers. Modern high-speed routers arenetwork processors or highly specialized computers with extrahardware acceleration added to speed both common routing functions, such as packet forwarding, and specialized functions such asIPsec encryption. There is substantial use ofLinux andUnix software-based machines, runningopen source routing code, for research and other applications. TheCisco IOS operating system was independently designed. Major router operating systems, such asJunos andNX-OS, are extensively modified versions of Unix software.
When multiple routers are used in interconnected networks, the routers can exchange information about destination addresses using arouting protocol. Each router builds up arouting table, a list of routes, between two computer systems on the interconnected networks.[37][38]
The software that runs the router is composed of two functional processing units that operate simultaneously, calledplanes:[39]
Control plane: A router maintains a routing table that lists which route should be used to forward a data packet, and through which physical interface connection. It does this using internal pre-configured directives, calledstatic routes, or by learning routesdynamically using a routing protocol. Static and dynamic routes are stored in the routing table. The control-plane logic then strips non-essential directives from the table and builds aforwarding information base (FIB) to be used by the forwarding plane.
Forwarding plane: This unit forwards the data packets between incoming and outgoing interface connections. It reads theheader of each packet as it comes in, matches the destination to entries in the FIB supplied by the control plane, and directs the packet to the outgoing network specified in the FIB.
A home or small officeDSL router showing thetelephone socket(left, white) to connect it to the internet usingADSL, andEthernet jacks(right, yellow) to connect it to home computers and printersA carrier class router with10G/40G/100G interfaces and redundant processor/power/fan modules
A router may have interfaces for multiple types ofphysical layer connections, such as copper cables,fiber optic, orwireless transmission. It can also support multiplenetwork layer transmission standards. Each network interface is used to enable data packets to be forwarded from one transmission system to another. Routers may also be used to connect two or more logical groups of computer devices known assubnets, each with a uniquenetwork prefix.
Routers may provide connectivity within enterprises, between enterprises and the Internet, or betweeninternet service providers' (ISPs') networks; they are also responsible for directing data between different networks.[40] The largest routers (such as theCisco CRS-1 orJuniper PTX) interconnect the various ISPs, or may be used in large enterprise networks.[41] Smaller routers usually provide connectivity for typical home and office networks.
All sizes of routers may be found inside enterprises.[42] The most powerful routers are usually found in ISPs, academic and research facilities. Large businesses may also need more powerful routers to cope with ever-increasing demands ofintranet data traffic. Ahierarchical internetworking model for interconnecting routers in large networks is in common use.[43] Some routers can connect toData service units forT1 connections[44][45][46] via serial ports.[47][48]
Access routers, includingsmall office/home office (SOHO) models, are located at home and customer sites such as branch offices that do not needhierarchical routing of their own. Typically, they are optimized for low cost. Some SOHO routers are capable of running alternative free Linux-based firmware likeTomato,OpenWrt, orDD-WRT.[49]
Distribution routers aggregate traffic from multiple access routers. Distribution routers are often responsible for enforcing quality of service across awide area network (WAN), so they may have considerable memory installed, multiple WAN interface connections, and substantial onboard data processing routines. They may also provide connectivity to groups of file servers or other external networks.[50]
In enterprises, acore router may provide acollapsed backbone interconnecting the distribution tier routers from multiple buildings of a campus, or large enterprise locations. They tend to be optimized for high bandwidth but lack some of the features of edge routers.[51]
External networks must be carefully considered as part of the overall security strategy of the local network. A router may include afirewall,VPN handling, and other security functions, or they may be handled by separate devices. Routers also commonly performnetwork address translation, which restricts connections initiated from external connections but is not recognized as a security feature by all experts.[52] Some experts argue thatopen source routers are more secure and reliable thanclosed source routers because errors and potentially exploitablevulnerabilities are more likely to be discovered and addressed in an open-source environment.[53][54]
Routers are also often distinguished on the basis of the network in which they operate. A router in alocal area network (LAN) of a single organization is called aninterior router. A router that is operated in theInternet backbone is described asexterior router. While a router that connects a LAN with the Internet or awide area network (WAN) is called aborder router, orgateway router.[55]
Routers intended for ISP and major enterprise connectivity usually exchange routing information using theBorder Gateway Protocol (BGP).RFC4098 defines the types of BGP routers according to their functions:[56]
Edge router or inter-AS border router: Placed at the edge of an ISP network, where the router is used to peer with the upstream IP transit providers, bilateral peers throughIXP, private peering (or even settlement-free peering) throughPrivate Network Interconnect (PNI) via the extensive use ofExterior Border Gateway Protocol (eBGP).[57]
Provider Router (P): A Provider router is also called atransit-router, it sits in aMultiprotocol Label Switching (MPLS) network and is responsible for establishing label-switched paths between the PE routers.[58]
Provider edge router (PE): An MPLS-specific router in the network's access layer that interconnects with customer edge routers to provide layer 2 or layer 3 VPN services.[58]
Customer edge router (CE): Located at the edge of the subscriber's network, it interconnects with the PE router for L2VPN services, or direct layer 3 IP hand-off in the case ofDedicated Internet Access, if IP Transit services are provided through an MPLS core, the CE peers with the PE using eBGP with the public ASNs of each respective network. In the case of L3VPN services, the CE can exchange routes with the PE using eBGP. It is commonly used in both service provider and enterprise ordata center organizations.[58]
Core router: Resides within an Autonomous System as a backbone to carry traffic between edge routers.[59]
Within an ISP: In the ISP's autonomous system, a router uses internal BGP to communicate with other ISP edge routers, otherintranet core routers, or the ISP's intranet provider border routers.
Internet backbone: The Internet no longer has a clearly identifiable backbone, unlike its predecessor networks. Seedefault-free zone (DFZ). The major ISPs' system routers make up what could be considered to be the current Internet backbone core.[60] ISPs operate all four types of the BGP routers described here. An ISP core router is used to interconnect its edge and border routers. Core routers may also have specialized functions invirtual private networks based on a combination of BGP andMultiprotocol Label Switching protocols.[61]
Port forwarding: In some networks that rely on legacy IPv4 and NAT, routers (often labeled as NAT boxes) are also used forport forwarding configuration between RFC 1918 address space and their publicly assigned IPv4 address.[42]
Voice, data, fax, and video processing routers: Commonly referred to asaccess servers orgateways, these devices are used to route and process voice, data, video and fax traffic on the Internet. Since 2005, most long-distance phone calls have been processed asIP traffic (VOIP) through a voice gateway. Use of access server-type routers expanded with the advent of the Internet, first with dial-up access and another resurgence with voice phone service.
Larger networks commonly usemultilayer switches, with layer-3 devices being used to simply interconnect multiple subnets within the same security zone, and higher-layer switches whenfiltering,translation,load balancing, or other higher-level functions are required, especially between zones.
Wi-Fi routers combine the functions of a router with those of awireless access point. They are typically devices with a small form factor, operating on the standard electric power supply for residential use. Connected to the Internet as offered by anInternet service provider, they provide Internet access through awireless network for home or office use.
The main purpose of a router is to connect multiple networks and forward packets destined either for directly attached networks or more remote networks. A router is considered alayer-3 device because its primary forwarding decision is based on the information in the layer-3 IP packet, specifically the destination IP address. When a router receives a packet, it searches its routing table to find the best match between the destination IP address of the packet and one of the addresses in the routing table. Once a match is found, the packet is encapsulated in thelayer-2 data link frame for the outgoing interface indicated in the table entry. A router typically does not look into the packet payload,[62] but only at the layer-3 addresses to make a forwarding decision, plus optionally other information in the header for hints on, for example,quality of service (QoS). For pure IP forwarding, a router is designed to minimize thestate information associated with individual packets.[63] Once a packet is forwarded, the router does not retain any historical information about the packet.[b]
The routing table itself can contain information derived from a variety of sources, such as adefault orstatic routes that are configured manually, or dynamic entries fromrouting protocols where the router learns routes from other routers. A default route is one that is used to route all traffic whose destination does not otherwise appear in the routing table; it is common – even necessary – in small networks, such as a home or small business, where the default route simply sends all non-local traffic to theInternet service provider. The default route can be manually configured (as a static route); learned by dynamic routing protocols; or be obtained byDHCP.[c][64]
A router can run more than one routing protocol at a time, particularly if it serves as an autonomous system border router between parts of a network that run different routing protocols; if it does so, then redistribution may be used (usually selectively) to share information between the different protocols running on the same router.[65]
Besides deciding to which interface a packet is forwarded, which is handled primarily via the routing table, a router also has to manage congestion when packets arrive at a rate higher than the router can process. Three policies commonly used aretail drop,random early detection (RED), andweighted random early detection (WRED). Tail drop is the simplest and most easily implemented: the router simply drops new incoming packets once buffer space in the router is exhausted. RED probabilistically drops datagrams early when the queue exceeds a pre-configured portion of the buffer, until reaching a pre-determined maximum, when it drops all incoming packets, thus reverting to tail drop. WRED can be configured to drop packets more readily depending on the type of traffic.
Another function a router performs istraffic classification and deciding which packet should be processed first. This is managed throughQoS, which is critical whenVoice over IP is deployed, so as not to introduce excessivelatency.[66]
Yet another function a router performs is calledpolicy-based routing, where special rules are constructed to override the rules derived from the routing table when a packet forwarding decision is made.[67]
Some of the functions may be performed through anapplication-specific integrated circuit (ASIC) to avoid the overhead of scheduling CPU time to process the packets. Others may have to be performed through the CPU as these packets need special attention that cannot be handled by an ASIC.[68]
^In some router implementations, the forwarding action can increment a counter associated with the routing table entry for the collection of statistical data.
^A router can serve as a DHCP client or as a DHCP server.
^Roberts, Dr. Lawrence G. (May 1995)."The ARPANET & Computer Networks".Archived from the original on 24 March 2016. Retrieved13 April 2016.Then in June 1966, Davies wrote a second internal paper, "Proposal for a Digital Communication Network" In which he coined the word packet,- a small sub part of the message the user wants to send, and also introduced the concept of aninterface computer to sit between the user equipment and the packet network.
^John S, Quarterman; Josiah C, Hoskins (1986)."Notable computer networks".Communications of the ACM.29 (10):932–971.doi:10.1145/6617.6618.S2CID25341056.The first packet-switching network was implemented at the National Physical Laboratories in the United Kingdom. It was quickly followed by the ARPANET in 1969.
^Scantlebury, Roger (2001).A Brief History of the NPL Network. Symposium of the Institution of Analysts & Programmers 2001. Archived fromthe original on 2003-08-07. Retrieved2024-06-13.The system first went 'live' early in 1969
^Haughney Dare-Bryan, Christine (June 22, 2023).Computer Freaks (Podcast). Chapter Two: In the Air. Inc. Magazine. 35:55 minutes in.Leonard Kleinrock: Donald Davies ... did make a single node packet switch before ARPA did
^Davies, Shanks, Heart, Barker, Despres, Detwiler and Riml, "Report of Subgroup 1 on Communication System", INWG Note No. 1.
^Edmondson-Yurkanan, Chris (2007)."SIGCOMM's archaeological journey into networking's past".Communications of the ACM.50 (5):63–68.doi:10.1145/1230819.1230840.ISSN0001-0782.INWG#1: Report of Subgroup 1 on Communication System Requirements by Davies, Shanks, Heart, Barker, Despres, Detwiler, and Riml. They wrote: "It was agreed that interworking between packet switching networks should not add complications to the hosts, considering that networks will probably be different and thus gateways between networks will be required. These gateways should be as uncomplicated as possible, whilst allowing as much freedom as possible for the design of individual networks." INWG#1 clarified that gateways and simplicity were accepted concepts when INWG was formed.
^Davies, Donald; Bartlett, Keith; Scantlebury, Roger; Wilkinson, Peter (October 1967).A Digital Communication Network for Computers Giving Rapid Response at remote Terminals(PDF). ACM Symposium on Operating Systems Principles.Archived(PDF) from the original on 2022-10-10. Retrieved2020-09-15.It is thought that all users of the network will provide themselves with some kind of error control and that without difficulty this could be made to show up a missing packet. Because of this, loss of packets, if it is sufficiently rare, can be tolerated.
^Pelkey, James."8.3 CYCLADES Network and Louis Pouzin 1971–1972".Entrepreneurial Capitalism and Innovation: A History of Computer Communications 1968–1988.The inspiration for datagrams had two sources. One was Donald Davies' studies. He had done some simulation of datagram networks, although he had not built any, and it looked technically viable. The second inspiration was I like things simple. I didn't see any real technical motivation to overlay two levels of end-to-end protocols. I thought one was enough.
^Green, Lelia (2010).The internet: an introduction to new media. Berg new media series. Berg. p. 31.ISBN978-1-84788-299-8.OCLC504280762.The original ARPANET design had made data integrity part of the IMP's store-and-forward role, but Cyclades end-to-end protocol greatly simplified the packet switching operations of the network. ... The idea was to adopt several principles from Cyclades and invert the ARPANET model to minimise international differences.
^Bennett, Richard (September 2009)."Designed for Change: End-to-End Arguments, Internet Innovation, and the Net Neutrality Debate"(PDF). Information Technology and Innovation Foundation. pp. 7, 9, 11. Retrieved11 September 2017.Two significant packet networks preceded the TCP/IP Internet: ARPANET and CYCLADES. The designers of the Internet borrowed heavily from these systems, especially CYCLADES ... The first end-to-end research network was CYCLADES, designed by Louis Pouzin at IRIA in France with the support of BBN's Dave Walden and Alex McKenzie and deployed beginning in 1972.
^David Boggs, John Shoch, Edward Taft, Robert Metcalfe,"Pup: An Internetwork Architecture", IEEE Transactions on Communications, Volume 28, Issue 4, April 1980, pp. 612- 624.
^Cerf, V.; Kahn, R. (1974)."A Protocol for Packet Network Intercommunication"(PDF).IEEE Transactions on Communications.22 (5):637–648.Bibcode:1974ITCom..22..637C.doi:10.1109/TCOM.1974.1092259.ISSN1558-0857.The authors wish to thank a number of colleagues for helpful comments during early discussions of international network protocols, especially R. Metcalfe, R. Scantlebury, D. Walden, and H. Zimmerman; D. Davies and L. Pouzin who constructively commented on the fragmentation and accounting issues; and S. Crocker who commented on the creation and destruction of associations.
^Ethics and the Internet. January 1989.doi:10.17487/RFC1087.RFC1087.At great human and economic cost, resources drawn from the U.S. Government, industry and the academic community have been assembled into a collection of interconnected networks called the Internet.
^30 Years of RFCs. 7 April 1999.doi:10.17487/RFC2555.RFC2555.Reflections - Joyce K. Reynolds: A very long time ago when I was dabbling in IP network number and protocol parameter assignments with Jon Postel, gateways were still "dumb", the Exterior Gateway Protocol (EGP) was in its infancy and TOPS-20 was in its heyday.
^"What Is Routing?".Cisco. 2022-04-10. Retrieved2024-03-25.Routing tables can be created manually and "learned" by software as it observes network traffic, or they can be built according torouting protocols.