Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Router (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Forwarding == {{Further|Routing|IP routing}} 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 a [[layer-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 the [[layer-2]] data link frame for the outgoing interface indicated in the table entry. A router typically does not look into the packet payload,<ref>{{Cite web|title=Packet Forwarding and Routing on IPv4 Networks - System Administration Guide: IP Services|url=https://docs.oracle.com/cd/E23823_01/html/816-4554/gcvjj.html|access-date=2021-03-25|website=docs.oracle.com}}</ref> 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 the [[State (computer science)|state]] information associated with individual packets.<ref>{{cite web|last1=Roberts|first1=Lawrence|title=The Next Generation of IP - Flow Routing|url=http://www.packet.cc/files/FlowPaper/NextGenerationofIP-FlowRouting.htm|access-date=22 February 2015|date=22 July 2003|url-status=live|archive-url=https://web.archive.org/web/20150404030549/http://www.packet.cc/files/FlowPaper/NextGenerationofIP-FlowRouting.htm|archive-date=4 April 2015}}</ref> Once a packet is forwarded, the router does not retain any historical information about the packet.{{efn|In some router implementations, the forwarding action can increment a counter associated with the routing table entry for the collection of statistical data.}} The routing table itself can contain information derived from a variety of sources, such as a [[default route|default]] or [[static route]]s that are configured manually, or dynamic entries from [[routing protocol]]s 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 the [[Internet service provider]]. The default route can be manually configured (as a static route); learned by dynamic routing protocols; or be obtained by [[DHCP]].{{efn|A router can serve as a DHCP client or as a DHCP server.}}<ref>{{cite web|author=David Davis|title=Cisco administration 101: What you need to know about default routes|url=http://www.techrepublic.com/article/cisco-administration-101-what-you-need-to-know-about-default-routes|date=April 19, 2007|url-status=bot: unknown|archive-url=https://web.archive.org/web/20140625042508/http://www.techrepublic.com/article/cisco-administration-101-what-you-need-to-know-about-default-routes/|archive-date=June 25, 2014|access-date=June 5, 2014}}</ref> 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.<ref>{{cite book|author=Diane Teare|title=Implementing Cisco IP Routing (ROUTE): Foundation Learning Guide|pages=330β334|publisher=[[Cisco Press]]|date=March 2013}}</ref> 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 are [[tail drop]], [[random early detection]] (RED), and [[weighted 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 dependent on the type of traffic. Another function a router performs is [[traffic classification]] and deciding which packet should be processed first. This is managed through [[Quality of service|QoS]], which is critical when [[Voice over IP]] is deployed, so as not to introduce excessive [[Latency (audio)|latency]].<ref>{{Cite book |last=Donahue |first=Gary A. |url=https://books.google.com/books?id=VqebAgAAQBAJ&dq=Network+Warrior+Voice+over+IP+is+a+udp&pg=PA419 |title=Network Warrior |date=2007-06-21 |publisher="O'Reilly Media, Inc." |isbn=978-0-596-10151-0 |language=en}}</ref> Yet another function a router performs is called [[policy-based routing]] where special rules are constructed to override the rules derived from the routing table when a packet forwarding decision is made.<ref>{{cite book|author=Diane Teare|title=Implementing Cisco IP-Routing (ROUTE): Foundation Learning Guide|pages=330β334|publisher=[[Cisco Press]]|date=March 2013|chapter=Chapter 5: Implementing Path Control}}</ref> Some of the functions may be performed through an [[application-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.<ref>{{Cite book |last1=Schudel |first1=Gregg |url=https://books.google.com/books?id=DZT7I2U58UoC&dq=that+cannot+be+handled+by+an+ASIC&pg=PT93 |title=Router Security Strategies: Securing IP Network Traffic Planes |last2=Smith |first2=David |date=2007-12-29 |publisher=Pearson Education |isbn=978-0-13-279673-6 |language=en}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)