RFC 1716

Towards Requirements for IP Routers

๐Ÿ“… published November 1994, from ietf

RFC 1716: Towards Requirements for IP Routers ๐ŸŽ€

okay bestie, this one is a November 1994 RFC from the Network Working Group ๐ŸŒธ It's titled Towards Requirements for IP Routers, and it's written by P. Almquist (listed as Author, Consultant) with F. Kastenholz as Editor, from FTP Software, Inc. ๐Ÿ’œ

Its category is Informational, which means it's here to share info with the Internet community ๐Ÿงš The header doesn't list anything it obsoletes or updates, so it's a solo little gem โœจ


Status of This Memo โœจ

This memo provides information for the Internet community. ๐Ÿฆ‹ It does not specify an Internet standard of any kind, so think of it as useful reading, not a rulebook ๐Ÿ“– Distribution of this memo is unlimited, so share it with your whole group chat ๐Ÿ’…


Table of Contents ๐Ÿ’–

Here's the full roadmap of the doc, sections and all. The list keeps going in the next part, so stay tuned ๐Ÿซถ

0.  PREFACE .......................................................    1
1.  INTRODUCTION ..................................................    2
1.1  Reading this Document ........................................    4
1.1.1  Organization ...............................................    4
1.1.2  Requirements ...............................................    5
1.1.3  Compliance .................................................    6
1.2  Relationships to Other Standards .............................    7
1.3  General Considerations .......................................    8
1.3.1  Continuing Internet Evolution ..............................    8
1.3.2  Robustness Principle .......................................    9
1.3.3  Error Logging ..............................................    9
1.3.4  Configuration ..............................................   10
1.4  Algorithms ...................................................   11
2.  INTERNET ARCHITECTURE .........................................   13
2.1  Introduction .................................................   13
2.2  Elements of the Architecture .................................   14
2.2.1  Protocol Layering ..........................................   14
2.2.2  Networks ...................................................   16
2.2.3  Routers ....................................................   17
2.2.4  Autonomous Systems .........................................   18
2.2.5  Addresses and Subnets ......................................   18
2.2.6  IP Multicasting ............................................   20
2.2.7  Unnumbered Lines and Networks and Subnets ..................   20
2.2.8  Notable Oddities ...........................................   22
2.2.8.1  Embedded Routers .........................................   22
2.2.8.2  Transparent Routers ......................................   23
2.3  Router Characteristics .......................................   24
2.4  Architectural Assumptions ....................................   27
3.  LINK LAYER ....................................................   29
3.1  INTRODUCTION .................................................   29
3.2  LINK/INTERNET LAYER INTERFACE ................................   29
3.3  SPECIFIC ISSUES ..............................................   30
3.3.1  Trailer Encapsulation ......................................   30
3.3.2  Address Resolution Protocol - ARP ..........................   31
3.3.3  Ethernet and 802.3 Coexistence .............................   31
3.3.4  Maximum Transmission Unit - MTU ............................   31
3.3.5  Point-to-Point Protocol - PPP ..............................   32
3.3.5.1  Introduction .............................................   32
3.3.5.2  Link Control Protocol (LCP) Options ......................   33
3.3.5.3  IP Control Protocol (ICP) Options ........................   34
3.3.6  Interface Testing ..........................................   35
4.  INTERNET LAYER - PROTOCOLS ....................................   36
4.1  INTRODUCTION .................................................   36
4.2  INTERNET PROTOCOL - IP .......................................   36
4.2.1  INTRODUCTION ...............................................   36
4.2.2  PROTOCOL WALK-THROUGH ......................................   37
4.2.2.1  Options: RFC-791 Section 3.2 .............................   37
4.2.2.2  Addresses in Options: RFC-791 Section 3.1 ................   40
4.2.2.3  Unused IP Header Bits: RFC-791 Section 3.1 ...............   40
4.2.2.4  Type of Service: RFC-791 Section 3.1 .....................   41
4.2.2.5  Header Checksum: RFC-791 Section 3.1 .....................   41
4.2.2.6  Unrecognized Header Options: RFC-791 Section 3.1 .........   41
4.2.2.7  Fragmentation: RFC-791 Section 3.2 .......................   42
4.2.2.8  Reassembly: RFC-791 Section 3.2 ..........................   43
4.2.2.9  Time to Live: RFC-791 Section 3.2 ........................   43
4.2.2.10  Multi-subnet Broadcasts: RFC-922 ........................   43
4.2.2.11  Addressing: RFC-791 Section 3.2 .........................   43
4.2.3  SPECIFIC ISSUES ............................................   47
4.2.3.1  IP Broadcast Addresses ...................................   47
4.2.3.2  IP Multicasting ..........................................   48
4.2.3.3  Path MTU Discovery .......................................   48
4.2.3.4  Subnetting ...............................................   49
4.3  INTERNET CONTROL MESSAGE PROTOCOL - ICMP .....................   50
4.3.1  INTRODUCTION ...............................................   50
4.3.2  GENERAL ISSUES .............................................   50
4.3.2.1  Unknown Message Types ....................................   50
4.3.2.2  ICMP Message TTL .........................................   51
4.3.2.3  Original Message Header ..................................   51
4.3.2.4  ICMP Message Source Address ..............................   51
4.3.2.5  TOS and Precedence .......................................   51
4.3.2.6  Source Route .............................................   52
4.3.2.7  When Not to Send ICMP Errors .............................   53
4.3.2.8  Rate Limiting ............................................   54
4.3.3  SPECIFIC ISSUES ............................................   55
4.3.3.1  Destination Unreachable ..................................   55
4.3.3.2  Redirect .................................................   55
4.3.3.3  Source Quench ............................................   56
4.3.3.4  Time Exceeded ............................................   56
4.3.3.5  Parameter Problem ........................................   57
4.3.3.6  Echo Request/Reply .......................................   57
4.3.3.7  Information Request/Reply ................................   58
4.3.3.8  Timestamp and Timestamp Reply ............................   58
4.3.3.9  Address Mask Request/Reply ...............................   59
4.3.3.10  Router Advertisement and Solicitations ..................   61
4.4  INTERNET GROUP MANAGEMENT PROTOCOL - IGMP ....................   61
5.  INTERNET LAYER - FORWARDING ...................................   62
5.1  INTRODUCTION .................................................   62
5.2  FORWARDING WALK-THROUGH ......................................   62
5.2.1  Forwarding Algorithm .......................................   62
5.2.1.1  General ..................................................   63
5.2.1.2  Unicast ..................................................   64
5.2.1.3  Multicast ................................................   65
5.2.2  IP Header Validation .......................................   66
5.2.3  Local Delivery Decision ....................................   68
5.2.4  Determining the Next Hop Address ...........................   70
5.2.4.1  Immediate Destination Address ............................   71
5.2.4.2  Local/Remote Decision ....................................   71
5.2.4.3  Next Hop Address .........................................   72
5.2.4.4  Administrative Preference ................................   77
5.2.4.6  Load Splitting ...........................................   78
5.2.5  Unused IP Header Bits: RFC-791 Section 3.1 .................   79
5.2.6  Fragmentation and Reassembly: RFC-791 Section 3.2 ..........   79
5.2.7  Internet Control Message Protocol - ICMP ...................   80
5.2.7.1  Destination Unreachable ..................................   80
5.2.7.2  Redirect .................................................   82
5.2.7.3  Time Exceeded ............................................   84
5.2.8  INTERNET GROUP MANAGEMENT PROTOCOL - IGMP ..................   84
5.3  SPECIFIC ISSUES ..............................................   84
5.3.1  Time to Live (TTL) .........................................   84
5.3.2  Type of Service (TOS) ......................................   85
5.3.3  IP Precedence ..............................................   87
5.3.3.1  Precedence-Ordered Queue Service .........................   88
5.3.3.2  Lower Layer Precedence Mappings ..........................   88
5.3.3.3  Precedence Handling For All Routers ......................   89
5.3.4  Forwarding of Link Layer Broadcasts ........................   92
5.3.5  Forwarding of Internet Layer Broadcasts ....................   92
5.3.5.1  Limited Broadcasts .......................................   94
5.3.5.2  Net-directed Broadcasts ..................................   94
5.3.5.3  All-subnets-directed Broadcasts ..........................   95
5.3.5.4  Subnet-directed Broadcasts ...............................   97
5.3.6  Congestion Control .........................................   97
5.3.7  Martian Address Filtering ..................................   99
5.3.8  Source Address Validation ..................................   99
5.3.9  Packet Filtering and Access Lists ..........................  100
5.3.10  Multicast Routing .........................................  101
5.3.11  Controls on Forwarding ....................................  101
5.3.12  State Changes .............................................  101
5.3.12.1  When a Router Ceases Forwarding .........................  102
5.3.12.2  When a Router Starts Forwarding .........................  102
5.3.12.3  When an Interface Fails or is Disabled ..................  103
5.3.12.4  When an Interface is Enabled ............................  103
5.3.13  IP Options ................................................  103
5.3.13.1  Unrecognized Options ....................................  103
5.3.13.2  Security Option .........................................  104
5.3.13.3  Stream Identifier Option ................................  104
5.3.13.4  Source Route Options ....................................  104
5.3.13.5  Record Route Option .....................................  104
5.3.13.6  Timestamp Option ........................................  105
6.  TRANSPORT LAYER ...............................................  106
6.1  USER DATAGRAM PROTOCOL - UDP .................................  106
6.2  TRANSMISSION CONTROL PROTOCOL - TCP ..........................  106
7.  APPLICATION LAYER - ROUTING PROTOCOLS .........................  109
7.1  INTRODUCTION .................................................  109
7.1.1  Routing Security Considerations ............................  109
7.1.2  Precedence .................................................  110
7.2  INTERIOR GATEWAY PROTOCOLS ...................................  110
7.2.1  INTRODUCTION ...............................................  110
7.2.2  OPEN SHORTEST PATH FIRST - OSPF ............................  111
7.2.2.1  Introduction .............................................  111
7.2.2.2  Specific Issues ..........................................  111
7.2.2.3  New Version of OSPF ......................................  112
7.2.3  INTERMEDIATE SYSTEM TO INTERMEDIATE SYSTEM -  DUAL  IS-IS
     ..............................................................  112
7.2.4  ROUTING INFORMATION PROTOCOL - RIP .........................  113
7.2.4.1  Introduction .............................................  113
7.2.4.2  Protocol Walk-Through ....................................  113
7.2.4.3  Specific Issues ..........................................  118
7.2.5  GATEWAY TO GATEWAY PROTOCOL - GGP ..........................  119
7.3  EXTERIOR GATEWAY PROTOCOLS ...................................  119
7.3.1  INTRODUCTION ...............................................  119
7.3.2  BORDER GATEWAY PROTOCOL - BGP ..............................  120
7.3.2.1  Introduction .............................................  120
7.3.2.2  Protocol Walk-through ....................................  120
7.3.3  EXTERIOR GATEWAY PROTOCOL - EGP ............................  121
7.3.3.1  Introduction .............................................  121
7.3.3.2  Protocol Walk-through ....................................  122
7.3.4  INTER-AS ROUTING WITHOUT AN EXTERIOR PROTOCOL ..............  124
7.4  STATIC ROUTING ...............................................  125
7.5  FILTERING OF ROUTING INFORMATION .............................  127
7.5.1  Route Validation ...........................................  127
7.5.2  Basic Route Filtering ......................................  127
7.5.3  Advanced Route Filtering ...................................  128
7.6  INTER-ROUTING-PROTOCOL INFORMATION EXCHANGE ..................  129
8.  APPLICATION LAYER - NETWORK MANAGEMENT PROTOCOLS ..............  131
8.1  The Simple Network Management Protocol - SNMP ................  131
8.1.1  SNMP Protocol Elements .....................................  131
8.2  Community Table ..............................................  132
8.3  Standard MIBS ................................................  133
8.4  Vendor Specific MIBS .........................................  134
8.5  Saving Changes ...............................................  135
9.  APPLICATION LAYER - MISCELLANEOUS PROTOCOLS ...................  137
9.1  BOOTP ........................................................  137
9.1.1  Introduction ...............................................  137
9.1.2  BOOTP Relay Agents .........................................  137
10.  OPERATIONS AND MAINTENANCE ...................................  139
10.1  Introduction ................................................  139
10.2  Router Initialization .......................................  140
10.2.1  Minimum Router Configuration ..............................  140
10.2.2  Address and Address Mask Initialization ...................  141
10.2.3  Network Booting using BOOTP and TFTP ......................  142
10.3  Operation and Maintenance ...................................  143
10.3.1  Introduction ..............................................  143
10.3.2  Out Of Band Access ........................................  144
10.3.2  Router O&M Functions ......................................  144
10.3.2.1  Maintenance - Hardware Diagnosis ........................  144
10.3.2.2  Control - Dumping and Rebooting .........................  145
10.3.2.3  Control - Configuring the Router ........................  145
10.3.2.4  Netbooting of System Software ...........................  146
10.3.2.5  Detecting and responding to misconfiguration ............  146
10.3.2.6  Minimizing Disruption ...................................  147
10.3.2.7  Control - Troubleshooting Problems ......................  148
10.4  Security Considerations .....................................  149
10.4.1  Auditing and Audit Trails .................................  149
10.4.2  Configuration Control .....................................  150
11.  REFERENCES ...................................................  152
APPENDIX  A. REQUIREMENTS FOR SOURCE-ROUTING HOSTS ................  162
APPENDIX  B. GLOSSARY .............................................  164
APPENDIX  C. FUTURE DIRECTIONS ....................................  169
APPENDIX D.  Multicast Routing Protocols ..........................  172
D.1  Introduction .................................................  172
D.2  Distance Vector Multicast Routing Protocol - DVMRP ...........  172
D.3  Multicast Extensions to OSPF - MOSPF .........................  173
APPENDIX E  Additional Next-Hop Selection Algorithms ..............  174
E.1. Some Historical Perspective ..................................  174
E.2. Additional Pruning Rules .....................................  176
E.3  Some Route Lookup Algorithms .................................  177
E.3.1 The Revised Classic Algorithm ...............................  178
E.3.2 The Variant Router Requirements Algorithm ...................  179
E.3.3 The OSPF Algorithm ..........................................  179
E.3.4 The Integrated IS-IS Algorithm ..............................  180
Security Considerations ...........................................  182
Acknowledgments ...................................................  183
Editor's Address ..................................................  186

0. PREFACE ๐ŸŽ€

okay so this doc is basically a snapshot of what the Router Requirements working group was up to as of November 1991 ๐Ÿซถ by then the group had pretty much finished the job. there were a couple of final technical things still to nail down, plus a ton of editing to do before it was publication-ready, and unfortunately none of that actually got finished ๐Ÿ˜ญ

so at the request of the Internet Area Director, the current editor grabbed the last draft and went full detective mode. they checked the mailing list archives, meeting minutes, notes, and chatted with other working group members, then glowed the whole thing up into its current form ๐Ÿ’… the editor did four main things:

  1. Deleted all the parenthetical material (like editor's comments). The useful stuff got turned into DISCUSSION sections, and the rest got deleted.
  2. Completed the tasks listed in the last draft's To be Done sections. As part of this, a new "to be done" list was made and included as an appendix to the current document.
  3. Rolled Philip Almquist's "Ruminations on the Next Hop" and "Ruminations on Route Leaking" into this document. These represent significant work and should be kept.
  4. Fulfilled the last intents of the working group as determined from the archival material.

the goal here was to make it publishable as an Historical RFC, so all the serious work that went into this document would be preserved โœจ it's giving legacy ๐Ÿงš

the content and form of this document are, in large part, thanks to the working group's chair and the document's original editor and author, Philip Almquist. honestly, without his efforts this document would not exist ๐Ÿซถ๐Ÿ’œ


1. INTRODUCTION ๐Ÿฆ‹

okay so the big goal of this work is to replace RFC-1009, Requirements for Internet Gateways ([INTRO:1]), with a brand new document ๐ŸŒธ

this memo is an intermediate step toward that goal. it defines and discusses requirements for devices that do the network layer forwarding function of the Internet protocol suite. the Internet community usually calls these devices IP routers or just routers, while the OSI community calls them intermediate systems. a lot of older Internet documents call them gateways, but that name has mostly fallen out of favor, mainly so nobody mixes them up with application gateways ๐Ÿ™ˆ

an IP router is different from other packet switching devices because a router examines the IP protocol header as part of the switching process. it generally has to modify the IP header and strip off and replace the Link Layer framing ๐Ÿ“

the authors of this memo recognize, as should its readers, that many routers support multiple protocol suites, and that support for multiple protocol suites will be required in increasingly large parts of the Internet in the future ๐Ÿ’… this memo, however, does not try to specify Internet requirements for protocol suites other than TCP/IP.

this document lists the standard protocols that a router connected to the Internet must use, and it pulls in the RFCs and other documents describing the current specifications for those protocols by reference. it also fixes errors in the referenced documents and adds extra discussion and guidance for an implementor ๐Ÿ‘‘

for each protocol, this final version of the memo also has an explicit set of requirements, recommendations, and options. the reader must understand that the list of requirements in this memo is incomplete by itself. the complete set of requirements for an Internet protocol router is mainly defined in the standard protocol specification documents, with the corrections, amendments, and supplements from this memo layered on top โœจ

this memo should be read alongside the Requirements for Internet Hosts RFCs ([INTRO:2] and [INTRO:3]). Internet hosts and routers must both be capable of originating IP datagrams and receiving IP datagrams destined for them. the major difference between Internet hosts and routers is that routers are required to implement forwarding algorithms, while Internet hosts do not require forwarding capabilities. any Internet host acting as a router must adhere to the requirements in the final version of this memo ๐Ÿงš

the goal of open system interconnection dictates that routers must function correctly as Internet hosts when necessary, so this memo gives guidelines for those situations. for simplicity and easier document updates, this memo tries to avoid overlapping host discussions with [INTRO:2] and [INTRO:3], and it pulls in the relevant host requirements from those documents by reference. in some cases, the requirements stated in [INTRO:2] and [INTRO:3] are superseded by the final version of this document ๐Ÿ’œ

a good-faith implementation of the protocols, built after careful reading of the RFCs, with some interaction with the Internet technical community, and following good communications software engineering practices, should differ from this memo's requirements only in minor ways ๐ŸŒˆ so in lots of cases the requirements here are already stated or implied in the standard protocol documents, which makes including them kind of redundant. they're included anyway because some past implementation made the wrong choice and caused problems with interoperability, performance, and/or robustness ๐Ÿ˜ญ

this memo includes lots of discussion and explanation of its requirements and recommendations, because a simple list of requirements would be dangerous, for three reasons:

  • some required features are more important than others, and some features are optional.
  • some features are critical in some applications of routers but irrelevant in others.
  • there may be valid reasons why particular vendor products designed for restricted contexts might choose to use different specifications.

however, the specifications of this memo must be followed to meet the general goal of arbitrary router interoperation across the diversity and complexity of the Internet. most current implementations fail to meet these requirements in various ways, some minor and some major, but this specification is the ideal we need to move toward ๐Ÿ’–

these requirements are based on the current level of Internet architecture. this memo will be updated as required to provide additional clarifications, or to include more information in areas where specifications are still evolving ๐Ÿฆ‹

1.1. Reading this Document

1.1.1 Organization

Okay so this memo copies the layered setup from [INTRO:2] and [INTRO:3] ๐Ÿ’…. Chapter 2 covers the layers of the Internet architecture, and Chapter 3 is the Link Layer ๐Ÿ”—. Chapters 4 and 5 are all about Internet Layer protocols and forwarding algorithms ๐Ÿงš. Chapter 6 is the Transport Layer. Upper layer stuff gets split three ways: Chapter 7 covers the protocols routers use to swap routing information with each other, Chapter 8 is network management, and Chapter 9 is the other upper layer protocols ๐ŸŒธ. The last chapter is operations and maintenance features. This layout was picked for simplicity, clarity, and to match the Host Requirements RFCs, which is just iconic of it ๐Ÿ‘‘. The appendices have a bibliography, a glossary, and some conjectures about where router standards are headed ๐Ÿ”ฎ.

Now, in describing the requirements, we assume an implementation strictly mirrors the layering of the protocols. BUT honestly, strict layering is an imperfect model, both for the protocol suite and for the recommended implementation approaches ๐Ÿ™ˆ. Protocols in different layers interact in complex and sometimes subtle ways, and particular functions often involve multiple layers. There are lots of design choices in an implementation, and many of them involve creative breaking of strict layering ๐ŸŽจ. Every implementor is urged to read [INTRO:4] and [INTRO:5], no excuses bestie ๐Ÿ“š.

In general, each major section of this memo is organized into the following subsections:

  1. Introduction
  2. Protocol Walk-Through - considers the protocol specification documents section-by-section, correcting errors, stating requirements that may be ambiguous or ill-defined, and providing further clarification or explanation โœจ.
  3. Specific Issues - discusses protocol design and implementation issues that were not included in the walk-through ๐Ÿฆ‹.

Under many of the individual topics in this memo, there is parenthetical material labeled DISCUSSION or IMPLEMENTATION. This material is intended to give a justification, clarification, or explanation to the requirements text right before it ๐Ÿ’–. The implementation material contains suggested approaches that an implementor may want to consider. The DISCUSSION and IMPLEMENTATION sections are not part of the standard, so don't treat them as rules ๐Ÿ™Œ.

1.1.2 Requirements

In this memo, the words that define the significance of each particular requirement are capitalized. These words are:

  • MUST: This word means that the item is an absolute requirement of the specification.
  • MUST IMPLEMENT: This phrase means that this specification requires that the item be implemented, but does not require that it be enabled by default.
  • MUST NOT: This phrase means that the item is an absolute prohibition of the specification ๐Ÿšซ.
  • SHOULD: This word means that there may exist valid reasons in particular circumstances to ignore this item, but the full implications should be understood and the case carefully weighed before choosing a different course.
  • SHOULD IMPLEMENT: This phrase is similar in meaning to SHOULD, but is used when we recommend that a particular feature be provided, without necessarily recommending that it be enabled by default.
  • SHOULD NOT: This phrase means that there may exist valid reasons in particular circumstances when the described behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.
  • MAY: This word means that this item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because it enhances the product, for example. Another vendor may omit the same item ๐ŸŒˆ.

1.1.3 Compliance

Some requirements apply to all routers. Other requirements only apply to routers that implement particular features or protocols. In the following paragraphs, Relevant refers to the union of the requirements that apply to all routers and the set of requirements that apply to a particular router because of the features and protocols it has implemented ๐Ÿงฉ.

Not all Relevant requirements are stated directly in this memo, so don't panic if you can't find one ๐Ÿ˜ญ. Various parts of this memo incorporate by reference sections of the Host Requirements specification, [INTRO:2] and [INTRO:3]. For purposes of determining compliance with this memo, it does not matter whether a Relevant requirement is stated directly in this memo or merely incorporated by reference from one of those documents. Same vibes either way ๐Ÿ’….

An implementation is said to be conditionally compliant if it satisfies all of the Relevant MUST, MUST IMPLEMENT, and MUST NOT requirements. An implementation is said to be unconditionally compliant if it is conditionally compliant and also satisfies all of the Relevant SHOULD, SHOULD IMPLEMENT, and SHOULD NOT requirements ๐Ÿ‘‘. An implementation is not compliant if it is not conditionally compliant (i.e., it fails to satisfy one or more of the Relevant MUST, MUST IMPLEMENT, or MUST NOT requirements).

For any of the SHOULD and SHOULD NOT requirements, a router may provide a configuration option that causes the router to act other than as specified by the requirement. Having such a configuration option does not void a router's claim to unconditional compliance, as long as the option has a default setting and leaving the option at its default setting causes the router to operate in a manner that conforms to the requirement ๐ŸŽ€.

Likewise, routers may provide, except where this memo explicitly prohibits it, options that cause them to violate MUST or MUST NOT requirements. A router that provides such options is compliant (either fully or conditionally) if and only if each such option has a default setting that causes the router to conform to the requirements of this memo. Please note that the authors, although aware of market realities, strongly recommend against providing such options. Requirements are labeled MUST or MUST NOT because experts in the field have judged them to be particularly important to interoperability or proper functioning in the Internet. Vendors should weigh carefully the customer support costs of providing options that violate those rules ๐Ÿ’€.

Real talk: those MUST and MUST NOT options are a big nope from the authors, even if the market is asking for them ๐Ÿ™ˆ.

Of course, this memo is not a complete specification of an IP router. It is closer to what the OSI world calls a profile โœจ. For example, this memo requires that a number of protocols be implemented. Although most of the contents of their protocol specifications are not repeated in this memo, implementors are still required to implement the protocols according to those specifications ๐Ÿฆ‹.

1.2 Relationships to Other Standards

There are several reference documents of interest when checking the current status of protocol specifications and standardization ๐Ÿ”:

  • INTERNET OFFICIAL PROTOCOL STANDARDS: This document describes the Internet standards process and lists the standards status of the protocols. As of this writing, the current version of this document is STD 1, RFC 1610, [ARCH:7]. This document is periodically re-issued. You should always consult an RFC repository and use the latest version of this document.
  • Assigned Numbers: This document lists the assigned values of the parameters used in the various protocols. For example, IP protocol codes, TCP port numbers, Telnet Option Codes, ARP hardware types, and Terminal Type names ๐ŸŒธ. As of this writing, the current version of this document is STD 2, RFC 1700, [INTRO:7]. This document is periodically re-issued. You should always consult an RFC repository and use the latest version of this document.
  • Host Requirements: This pair of documents reviews the specifications that apply to hosts and supplies guidance and clarification for any ambiguities. Note that these requirements also apply to routers, except where otherwise specified in this memo. As of this writing (December, 1993), the current versions of these documents are RFC 1122 and RFC 1123, (STD 3) [INTRO:2], and [INTRO:3] respectively.
  • Router Requirements (formerly Gateway Requirements): This memo ๐ŸŽ€.

Note that these documents are revised and updated at different times. In case of differences between them, the most recent must prevail, so always check the newest one ๐Ÿงš.

These and other Internet protocol documents may be obtained from the:

The InterNIC
DS.INTERNIC.NET
InterNIC Directory and Database Service

+1 (800) 444-4345 or +1 (619) 445-4600

info@internic.net

1.3 General Considerations

There are several important lessons that vendors of Internet software have learned, and a new vendor should consider them seriously ๐Ÿ’–.

1.3.1 Continuing Internet Evolution

The enormous growth of the Internet has revealed problems of management and scaling in a large datagram-based packet communication system ๐Ÿ“ˆ. These problems are being addressed, and as a result there will be continuing evolution of the specifications described in this memo. New routing protocols, algorithms, and architectures are constantly being developed, and new and additional internet-layer protocols are constantly being devised too ๐ŸŒˆ. Because routers play such a crucial role in the Internet, and because the number of routers deployed is much smaller than the number of hosts, vendors should expect that router standards will continue to evolve much more quickly than host standards. These changes will be carefully planned and controlled, since there is extensive participation in this planning by the vendors and by the organizations responsible for operating the networks ๐Ÿซถ.

Development, evolution, and revision are characteristic of computer network protocols today, and this situation will persist for some years. A vendor who develops computer communications software for the Internet protocol suite (or any other protocol suite!) and then fails to maintain and update that software for changing specifications is going to leave a trail of unhappy customers ๐Ÿ˜ญ. The Internet is a large communication network, and its users are in constant contact through it. Experience has shown that knowledge of deficiencies in vendor software propagates quickly through the Internet technical community. So yeah, don't be that vendor ๐Ÿ’€โœจ.

1.3.2 Robustness Principle โœจ

okay bestie, this is the one everyone quotes ๐Ÿ’… At every layer of the protocols there is a general rule (from [TRANS:2] by Jon Postel) whose application can lead to enormous benefits in robustness and interoperability ๐Ÿ”ฅ:

Be conservative in what you do,
be liberal in what you accept from others.

Software should be written to deal with every conceivable error, no matter how unlikely ๐Ÿ’€. Sooner or later a packet will come in with that particular combination of errors and attributes, and unless the software is prepared, chaos can ensue ๐Ÿ˜ญ. In general, it is best to assume that the network is filled with malevolent entities that will send packets designed to have the worst possible effect ๐Ÿ™ˆ. This assumption will lead to suitably protective design. The most serious problems in the Internet have been caused by unforeseen mechanisms triggered by low probability events; mere human malice would never have taken so devious a course! ๐ŸŒˆ

Adaptability to change must be designed into all levels of router software ๐Ÿฆ‹. As a simple example, consider a protocol specification that contains an enumeration of values for a particular header field - e.g., a type field, a port number, or an error code; this enumeration must be assumed to be incomplete. If the protocol specification defines four possible error codes, the software must not break when a fifth code shows up. An undefined code might be logged, but it must not cause a failure.

The second part of the principle is almost as important ๐Ÿ‘‘: software on hosts or other routers may contain deficiencies that make it unwise to exploit legal but obscure protocol features. It is unwise to stray far from the obvious and simple, lest untoward effects result elsewhere. A corollary of this is watch out for misbehaving hosts; router software should be prepared to survive in the presence of misbehaving hosts. An important function of routers in the Internet is to limit the amount of disruption such hosts can inflict on the shared communication facility. main character energy for routers, honestly ๐Ÿ’œ

1.3.3 Error Logging ๐Ÿงš

The Internet includes a great variety of systems, each implementing many protocols and protocol layers, and some of these contain bugs and misfeatures in their Internet protocol software ๐Ÿ™ƒ. As a result of complexity, diversity, and distribution of function, the diagnosis of problems is often very difficult ๐Ÿ˜ฉ.

Problem diagnosis will be aided if routers include a carefully designed facility for logging erroneous or strange events ๐ŸŽ€. It is important to include as much diagnostic information as possible when an error is logged. In particular, it is often useful to record the header(s) of a packet that caused an error. However, care must be taken to ensure that error logging does not consume prohibitive amounts of resources or otherwise interfere with the operation of the router. don't let the logs eat the router, fr

There is a tendency for abnormal but harmless protocol events to overflow error logging files; this can be avoided by using a circular log, or by enabling logging only while diagnosing a known failure. It may be useful to filter and count duplicate successive messages. One strategy that seems to work well is to both:

  • Always count abnormalities and make such counts accessible through the management protocol (see Chapter 8); and
  • Allow the logging of a great variety of events to be selectively enabled. For example, it might useful to be able to log everything or to log everything for host X.

This topic is further discussed in [MGT:5] ๐ŸŒธ.

1.3.4 Configuration ๐Ÿ“

In an ideal world, routers would be easy to configure, and perhaps even entirely self-configuring ๐Ÿฅบ. However, practical experience in the real world suggests that this is an impossible goal, and that in fact many attempts by vendors to make configuration easy actually cause customers more grief than they prevent ๐Ÿ˜ค. As an extreme example, a router designed to come up and start routing packets without requiring any configuration information at all would almost certainly choose some incorrect parameter, possibly causing serious problems on any networks unfortunate enough to be connected to it. ๐Ÿ’€

Often this memo requires that a parameter be a configurable option. There are several reasons for this. In a few cases there currently is some uncertainty or disagreement about the best value and it may be necessary to update the recommended value in the future. In other cases, the value really depends on external factors - e.g., the distribution of its communication load, or the speeds and topology of nearby networks - and self-tuning algorithms are unavailable and may be insufficient. In some cases, configurability is needed because of administrative requirements.

Finally, some configuration options are required to communicate with obsolete or incorrect implementations of the protocols, distributed without sources, that persist in many parts of the Internet ๐Ÿ•ฐ๏ธ. To make correct systems coexist with these faulty systems, administrators must occasionally misconfigure the correct systems. This problem will correct itself gradually as the faulty systems are retired, but cannot be ignored by vendors.

When we say that a parameter must be configurable, we do not intend to require that its value be explicitly read from a configuration file at every boot time. For many parameters, there is one value that is appropriate for all but the most unusual situations. In such cases, it is quite reasonable that the parameter default to that value if not explicitly set โœจ.

This memo requires a particular value for such defaults in some cases. The choice of default is a sensitive issue when the configuration item controls accommodation of existing, faulty, systems. If the Internet is to converge successfully to complete interoperability, the default values built into implementations must implement the official protocol, not misconfigurations to accommodate faulty implementations. Although marketing considerations have led some vendors to choose misconfiguration defaults, we urge vendors to choose defaults that will conform to the standard ๐Ÿซถ.

Finally, we note that a vendor needs to provide adequate documentation on all configuration parameters, their limits and effects ๐Ÿ“–.

1.4 Algorithms ๐Ÿงฎ

In several places in this memo, specific algorithms that a router ought to follow are specified. These algorithms are not, per se, required of the router. A router need not implement each algorithm as it is written in this document. Rather, an implementation must present a behavior to the external world that is the same as a strict, literal, implementation of the specified algorithm.

Algorithms are described in a manner that differs from the way a good implementor would implement them. For expository purposes, a style that emphasizes conciseness, clarity, and independence from implementation details has been chosen. A good implementor will choose algorithms and implementation methods which produce the same results as these algorithms, but may be more efficient or less general.

We note that the art of efficient router implementation is outside of the scope of this memo ๐Ÿฆ‹.

2. INTERNET ARCHITECTURE ๐Ÿ›๏ธ

This chapter does not contain any requirements. However, it does contain useful background information on the general architecture of the Internet and of routers ๐ŸŒˆ.

General background and discussion on the Internet architecture and supporting protocol suite can be found in the DDN Protocol Handbook [ARCH:1]; for background see for example [ARCH:2], [ARCH:3], and [ARCH:4]. The Internet architecture and protocols are also covered in an ever-growing number of textbooks, such as [ARCH:5] and [ARCH:6] ๐Ÿ“š.

2.1 Introduction ๐Ÿ’–

The Internet system consists of a number of interconnected packet networks supporting communication among host computers using the Internet protocols. These protocols include the Internet Protocol (IP), the Internet Control Message Protocol (ICMP), the Internet Group Management Protocol (IGMP), and a variety transport and application protocols that depend upon them. As was described in Section [1.2], the Internet Engineering Steering Group periodically releases an Official Protocols memo listing all of the Internet protocols ๐Ÿ—‚๏ธ.

All Internet protocols use IP as the basic data transport mechanism. IP is a datagram, or connectionless, internetwork service and includes provision for addressing, type-of-service specification, fragmentation and reassembly, and security ๐Ÿ”. ICMP and IGMP are considered integral parts of IP, although they are architecturally layered upon IP. ICMP provides error reporting, flow control, first-hop router redirection, and other maintenance and control functions. IGMP provides the mechanisms by which hosts and routers can join and leave IP multicast groups ๐ŸŽถ.

Reliable data delivery is provided in the Internet protocol suite by Transport Layer protocols such as the Transmission Control Protocol (TCP), which provides end-end retransmission, resequencing and connection control. Transport Layer connectionless service is provided by the User Datagram Protocol (UDP) (the chill sibling, lol) ๐Ÿซง.

2.2 Elements of the Architecture ๐Ÿงฉ

2.2.1. Protocol Layering โœจ

okay so, to communicate using the Internet system, a host has to implement the layered set of protocols that make up the Internet protocol suite ๐Ÿ’…. A host typically must implement at least one protocol from each layer ๐Ÿซถ.

Here are the protocol layers in the Internet architecture, per [ARCH:7] ๐ŸŒˆ:

  • Application Layer ๐Ÿฆ‹ The Application Layer is the top layer of the Internet protocol suite. The Internet suite doesn't subdivide it any further, although some application layer protocols do have some internal sub-layering ๐ŸŽ€. The Application Layer in the Internet suite basically combines the jobs of the top two layers of the OSI Reference Model, Presentation and Application [ARCH:8] ๐Ÿ’œ. It also picks up some of the stuff the OSI Reference Model gives to its Session Layer ๐Ÿงš.

We split application layer protocols into two categories: user protocols, which serve users directly, and support protocols, which handle common system functions ๐Ÿ“. The most common Internet user protocols are:

  • Telnet (remote login)
  • FTP (file transfer)
  • SMTP (electronic mail delivery)

There are a bunch of other standardized user protocols, plus lots of private ones ๐Ÿ’….

Support protocols handle host name mapping, booting, and management. That includes SNMP, BOOTP, TFTP, the Domain Name System (DNS) protocol, and a variety of routing protocols ๐Ÿ”ฅ.

Application Layer protocols that matter to routers get covered in chapters 7, 8, and 9 of this memo ๐Ÿ‘‘.

  • Transport Layer ๐Ÿš€ The Transport Layer provides end-to-end communication services. It's roughly the same as the Transport Layer in the OSI Reference Model, except it also takes on some of OSI's Session Layer establishment and destruction functions โœจ.

There are two primary Transport Layer protocols right now:

  • Transmission Control Protocol (TCP)
  • User Datagram Protocol (UDP)

TCP is a reliable connection-oriented transport service. It gives you end-to-end reliability, resequencing, and flow control ๐Ÿ’–. UDP is a connectionless (datagram) transport service ๐Ÿฆ‹. Other transport protocols have been developed by the research community, and the set of official Internet transport protocols may be expanded in the future ๐ŸŒธ.

Transport Layer protocols that matter to routers are covered in Chapter 6 ๐Ÿงš.

  • Internet Layer ๐ŸŒ All Internet transport protocols use the Internet Protocol (IP) to carry data from source host to destination host. IP is a connectionless, or datagram, internetwork service, and it gives no end-to-end delivery guarantees ๐Ÿ˜ญ. IP datagrams may arrive at the destination host damaged, duplicated, out of order, or not at all ๐Ÿ’€. The layers above IP are responsible for reliable delivery when it's needed ๐Ÿซถ. The IP protocol includes provision for addressing, type-of-service specification, fragmentation and reassembly, and security ๐Ÿ”.

The datagram, or connectionless, nature of IP is a fundamental and characteristic feature of the Internet architecture. It's giving foundation, bestie ๐Ÿ‘‘.

The Internet Control Message Protocol (ICMP) is a control protocol that's considered an integral part of IP. It's architecturally layered upon IP, meaning it uses IP to carry its data end-to-end ๐Ÿ™ˆ. ICMP provides error reporting, congestion reporting, and first-hop router redirection โญ.

The Internet Group Management Protocol (IGMP) is an Internet layer protocol used for establishing dynamic host groups for IP multicasting ๐ŸŒˆ.

The Internet layer protocols IP, ICMP, and IGMP are discussed in chapter 4 ๐Ÿ’œ.

  • Link Layer ๐Ÿ”— To communicate on its directly-connected network, a host has to implement the communication protocol used to interface with that network. We call this a Link Layer protocol ๐Ÿ’….

Some older Internet documents call this layer the Network Layer, but it's not the same as the Network Layer in the OSI Reference Model ๐Ÿ™ˆ.

This layer contains everything below the Internet Layer ๐Ÿงš.

Protocols in this layer are generally outside the scope of Internet standardization. The Internet intentionally uses existing standards whenever possible ๐Ÿ“. So Internet Link Layer standards usually only address address resolution and the rules for transmitting IP packets over specific Link Layer protocols ๐ŸŒธ. Internet Link Layer standards are discussed in chapter 3 โœจ.

2.2.2. Networks ๐ŸŒ

The constituent networks of the Internet system are only required to provide packet (connectionless) transport. According to the IP service specification, datagrams can be delivered out of order, be lost or duplicated, and/or contain errors ๐Ÿ˜ญ.

For reasonable performance of the protocols that use IP (e.g., TCP), the loss rate of the network should be very low ๐Ÿฅบ. In networks that provide connection-oriented service, the extra reliability from virtual circuits boosts the end-end robustness of the system. It isn't necessary for Internet operation, though ๐Ÿ’….

Constituent networks can generally be split into two classes ๐Ÿฆ‹:

  • Local-Area Networks (LANs) LANs can have a variety of designs. In general, a LAN covers a small geographical area (e.g., a single building or plant site) and provides high bandwidth with low delays ๐Ÿš€. LANs may be passive (similar to Ethernet) or active (such as ATM) ๐Ÿ”ฅ.
  • Wide-Area Networks (WANs) Geographically-dispersed hosts and LANs are interconnected by wide-area networks, also called long-haul networks ๐ŸŒ. These networks may have a complex internal structure of lines and packet-switches, or they may be as simple as point-to-point lines ๐ŸŒˆ.

2.2.3. Routers ๐Ÿ‘‘

In the Internet model, constituent networks are connected together by IP datagram forwarders, which are called routers or IP routers. In this document, every use of the term router is equivalent to IP router ๐Ÿ’–. Many older Internet documents call routers gateways ๐Ÿ™ˆ.

Historically, routers have been built with packet-switching software running on a general-purpose CPU. However, custom hardware is getting cheaper to develop, and higher throughput is required, but special-purpose hardware is becoming increasingly common โšก. This specification applies to routers no matter how they're implemented ๐Ÿซถ.

A router is connected to two or more networks, and it appears to each of these networks as a connected host. So it has (at least) one physical interface and (at least) one IP address on each of the connected networks. (This ignores the concept of un-numbered links, which is discussed in section [2.2.7].) ๐Ÿง  Forwarding an IP datagram generally requires the router to choose the address of the next-hop router or, for the final hop, the destination host. This choice, called routing, depends on a routing database within the router. The routing database is also sometimes known as a routing table or forwarding table ๐Ÿ—บ๏ธ.

The routing database should be maintained dynamically to reflect the current topology of the Internet system. A router normally does this by participating in distributed routing and reachability algorithms with other routers ๐Ÿ”.

Routers provide datagram transport only, and they aim to minimize the state information needed to sustain this service, for the sake of routing flexibility and robustness ๐Ÿฆ‹.

Packet switching devices can also operate at the Link Layer. Such devices are usually called bridges. Network segments connected by bridges share the same IP network number, meaning they logically form a single IP network ๐ŸŒ‰. These other devices are outside the scope of this document ๐Ÿ™…โ€โ™€๏ธ.

Another variation on the simple model of networks connected with routers sometimes shows up: a set of routers may be interconnected with only serial lines, forming a network where the packet switching happens at the Internetwork (IP) Layer instead of the Link Layer ๐Ÿงš.

2.2.4. Autonomous Systems ๐Ÿฐ

For technical, managerial, and sometimes political reasons, the routers of the Internet system are grouped into collections called autonomous systems ๐ŸŽ€. The routers included in a single autonomous system (AS) are expected to:

  • Be under the control of a single operations and maintenance (O&M) organization;
  • Employ common routing protocols among themselves, to dynamically maintain their routing databases.

A number of different dynamic routing protocols have been developed (see Section [7.2]). The routing protocol within a single AS is generically called an interior gateway protocol, or IGP ๐Ÿ”ง.

An IP datagram may have to traverse the routers of two or more ASs to reach its destination. The ASs must provide each other with topology information to allow that forwarding. An exterior gateway protocol (generally BGP or EGP) is used for this purpose ๐ŸŒโœจ.

2.2.5. Addresses and Subnets โœจ

okay so every IP datagram carries 32-bit source and destination addresses ๐ŸŒˆ and each one is split into two bits: a network number and a host number on that network. Symbolically, it looks like this:

IP-address  ::=  { <Network-number>, <Host-number> }

bestie, to actually deliver the datagram, the last router on its path has to map the Host-number (or rest) part of the address onto the physical address of a host connection on that network ๐Ÿ’–

Then came subnets ๐Ÿฆ‹, which were introduced so an organization could have as messy and complicated a web of interconnected LANs as it wanted, without the whole Internet exploding from an ever-growing pile of network numbers and routing complexity. Subnets basically give the Internet a multi-level hierarchical routing structure. The subnet extension, described in [INTERNET:2], is now a required part of the Internet architecture ๐Ÿ‘‘ The idea is to split the <Host-number> field into two pieces: a subnet number, and a true host number on that subnet:

IP-address  ::=

  { <Network-number>, <Subnet-number>, <Host-number> }

The physical networks inside one organization all get the same network number but different subnet numbers ๐ŸŽ€ Usually, the way those subnets are split up stays hidden from the outside world. So routing everywhere else on the Internet is based only on the <Network-number> part of the destination address. Routers outside the network just squish <Subnet-number> and <Host-number> together into one uninterpreted rest part of the 32-bit IP address ๐Ÿงš Inside the subnetted network, though, the routers have to route based on an extended network number:

{ <Network-number>, <Subnet-number> }

Sometimes you want the subnets of one network to be connected only through a path that is not part of the subnetted network ๐ŸŒธ Lots of IGP's work this setup fine, even though barely any EGP's do yet, but routers still need to be able to support this kind of subnetting (see Section [4.2.3.4]). In general, routers should not make assumptions about what counts as a subnet and what doesn't. They should just ignore the concept of Class in networks and treat every route as a { network, mask }-tuple ๐Ÿ’…

DISCUSSION: It is becoming clear that as the Internet grows larger and larger, the traditional uses of Class A, B, and C networks will be modified in order to achieve better use of IP's 32-bit address space. Classless Interdomain Routing (CIDR) [INTERNET:15] is a method currently being deployed in the Internet backbones to achieve this added efficiency. CIDR depends on the ability of assigning and routing to networks that are not based on Class A, B, or C networks. Thus, routers should always treat a route as a network with a mask.

It's giving "no more boxes" energy ๐Ÿ“ฆ๐Ÿ™ˆ Also, a subnetted network doesn't need one consistent subnet mask everywhere. For example, one subnet could use an 8 bit subnet mask, another 10 bit, and another 6 bit. Routers need to be able to support this kind of mix too (see Section [4.2.3.4]) ๐Ÿ“

The bit positions holding this extended network number are marked by a 32-bit mask called the subnet mask. It is recommended but not required that the <Subnet-number> bits be contiguous and sit between the <Network-number> and the <Host-number> fields ๐ŸŒˆ And no subnet should be assigned the value zero or -1 (all one bits) โญ

Okay, plot twist ๐Ÿ˜ญ The inventors of the subnet mechanism probably expected each piece of an organization's network to have just one subnet number. In practice, though, it has often turned out to be necessary or useful for several subnets to share a single physical cable. Iconic behavior ๐Ÿ’œ

Finally, there are special considerations for the router when a connected network offers a broadcast or multicast capability. We'll get to those later ๐Ÿฆ‹

2.2.6. IP Multicasting ๐ŸŽ€

IP multicasting is basically an extension of Link Layer multicast out to IP internets ๐ŸŒ With IP multicasts, a single datagram can be addressed to multiple hosts at once. That collection of hosts is called a multicast group, and every multicast group is represented by a Class D IP address ๐Ÿ’– An IP datagram sent to the group is supposed to be delivered to each group member with the same best-effort delivery you get for unicast IP traffic. And the sender doesn't even have to be a member of the destination group. Main character energy ๐Ÿ‘‘

The semantics of IP multicast group membership are defined in [INTERNET:4]. That document explains how hosts and routers join and leave multicast groups. It also defines a protocol called the Internet Group Management Protocol (IGMP), which keeps tabs on IP multicast group membership ๐Ÿงš

Forwarding of IP multicast datagrams happens either through static routing information or via a multicast routing protocol ๐ŸŒธ The devices that forward them are called multicast routers. They may or may not also forward IP unicasts, which is very relatable ๐Ÿ™ˆ Generally speaking, multicast datagrams get forwarded based on both their source and destination addresses. The details of forwarding IP multicast packets are in Section [5.2.1], and Appendix D covers multicast routing protocols ๐Ÿซถ

2.2.7. Unnumbered Lines and Networks and Subnets ๐ŸŒˆ

Traditionally, every network interface on an IP host or router gets its own IP address. People noticed over the years that this can waste the scarce IP address space, because it forces an IP network number (or at least a subnet number) to be allocated to every point-to-point link ๐Ÿ˜ญ

To fix this, a bunch of people proposed and implemented the idea of unnumbered serial lines โœจ An unnumbered serial line doesn't have any IP network or subnet number attached to it. As a result, the network interfaces connected to an unnumbered serial line don't have IP addresses at all.

Here's where it gets dilemma-y ๐Ÿ’€ The IP architecture has always assumed that every interface has an IP address, so these unnumbered interfaces cause some interesting problems. For example, some IP options (like Record Route) say a router must insert the interface address into the option, but an unnumbered interface has no IP address to insert. Even more fundamental (as we shall see in chapter 5) is that routes contain the IP address of the next hop router. A router expects that IP address to be on an IP (sub)net the router is connected to. That assumption is obviously broken if the only connection is an unnumbered serial line ๐Ÿ™ƒ

So two schemes were invented to get around this. The first scheme says two routers connected by an unnumbered serial line aren't really two routers at all, but two half-routers that together make up a single (virtual) router ๐ŸŽ€ The unnumbered serial line is treated like an internal bus inside that virtual router. The two halves have to coordinate so they act exactly like one router. This fits nicely into the IP architecture, but it has two big drawbacks ๐Ÿ˜ฌ First, although it handles the common case of a single unnumbered serial line, it isn't easily extensible to a mesh of routers and unnumbered serial lines. Second, the interactions between the half-routers are necessarily complex and not standardized, which effectively blocks connecting equipment from different vendors over unnumbered serial lines.

Because of those drawbacks, this memo adopts the alternative scheme ๐Ÿฆ‹ It has been invented multiple times, but it's probably originally attributable to Phil Karn. In this scheme, a router that has unnumbered serial lines also has a special IP address, called a router-id in this memo. The router-id is one of the router's IP addresses (a router is required to have at least one IP address, no exceptions ๐Ÿ‘‘). Then the router-id gets used as if it's the IP address of all the unnumbered interfaces. Galaxy brain โœจ

2.2.8. Notable Oddities ๐Ÿ’…

2.2.8.1. Embedded Routers ๐Ÿงš

A router can be a stand-alone computer system dedicated to its IP router functions ๐ŸŒธ Or, alternatively, router functions can be embedded inside a host operating system that supports connections to two or more networks. The best-known example of an operating system with embedded router code is the Berkeley BSD system ๐ŸŽ€ The embedded router feature seems to make internetting super easy, but it comes with a bunch of hidden pitfalls ๐Ÿ™ˆ

  1. If a host has only a single constituent-network interface, it should not act as a router. For example, hosts with embedded router code that gratuitously forward broadcast packets or datagrams on the same net often cause packet avalanches ๐ŸŒŠ๐Ÿ˜ญ
  2. If a (multihomed) host acts as a router, it must implement ALL the relevant router requirements contained in this document. For example, the routing protocol issues and the router control and monitoring problems are as hard and important for embedded routers as for stand-alone routers ๐Ÿ’ช Since Internet router requirements and specifications may change independently of operating system changes, an administration that operates an embedded router in the Internet is strongly advised to have the ability to maintain and update the router code (e.g., this might require router code source) ๐Ÿซถ
  3. Once a host runs embedded router code, it becomes part of the Internet system. Thus, errors in software or configuration can hinder communication between other hosts. As a consequence, the host administrator must lose some autonomy ๐Ÿฅบ In many circumstances, a host administrator will need to disable router code embedded in the operating system, and any embedded router code must be organized so that it can be easily disabled ๐Ÿ”ง
  4. If a host running embedded router code is concurrently used for other services, the O&M (Operation and Maintenance) requirements for the two modes of use may be in serious conflict. For example, router O&M will in many cases be performed remotely by an operations center; this may require privileged system access which the host administrator would not normally want to distribute ๐Ÿ”๐Ÿ’€

2.2.8.2 Transparent Routers ๐Ÿฆ‹

okay so there are two main ways to hook LANs up to the big wide-area networks of the Internet ๐ŸŒˆ. In the first way, the LAN gets its own network number, and every router in the Internet has to know how to route to it. In the second way, the LAN shares (a small part of) the wide-area network's address space. Routers that do this second thing are called address sharing routers or transparent routers โœจ. This memo is mostly about routers that do the first thing, but that doesn't mean transparent routers are banned ๐Ÿ™…โ€โ™€๏ธ.

The whole vibe of a transparent router is that the hosts on the LAN behind it share the address space of the wide-area network in front of it. In certain situations this is super useful, and the limitations don't really hurt ๐Ÿ’….

The words in front and behind give away one of the limitations ๐Ÿ‘€. This way of connecting things only works for a geographically (and topologically) limited stub environment. It needs some kind of logical addressing in the network-level addressing of the wide-area network. All of the IP addresses in the local environment map to a few (usually one) physical address in the wide-area network. That mapping has to happen in a way that matches the { IP address <-> network address } mapping used throughout the wide-area network ๐Ÿงš.

Multihoming works on one wide-area network, but it can cause routing problems if the interfaces are geographically or topologically separated ๐Ÿ—บ๏ธ. Multihoming on two (or more) wide-area networks is a mess because the addresses get confused ๐Ÿ˜ญ.

Here's the tea ๐Ÿต. Hosts might act differently toward other hosts that look like they're on the same network if the transparent router can't fully copy the normal wide-area network service. For example, the ARPANET used a Link Layer protocol that gave a "Destination Dead" indication when you tried to send to a host that was powered off. But if there were a transparent router between the ARPANET and an Ethernet, a host on the ARPANET would NOT get that "Destination Dead" indication when it sent a datagram to a powered-off host that was hooked up through the transparent router instead of directly ๐Ÿ’€.


2.3 Router Characteristics ๐Ÿ‘‘

okay, so an Internet router does the following things ๐Ÿ’–:

  1. Conforms to specific Internet protocols specified in this document, including the Internet Protocol (IP), Internet Control Message Protocol (ICMP), and others as necessary.
  2. Interfaces to two or more packet networks. For each connected network, the router must implement the functions required by that network. These functions typically include:
    • Encapsulating and decapsulating the IP datagrams with the connected network framing (e.g., an Ethernet header and checksum),
    • Sending and receiving IP datagrams up to the maximum size supported by that network. This size is the network's Maximum Transmission Unit or MTU,
    • Translating the IP destination address into an appropriate network-level address for the connected network (e.g., an Ethernet hardware address), if needed, and
    • Responding to the network flow control and error indication, if any.

See chapter 3 (Link Layer).

  1. Receives and forwards Internet datagrams. Important issues in this process are buffer management, congestion control, and fairness.
    • Recognizes various error conditions and generates ICMP error and information messages as required.
    • Drops datagrams whose time-to-live fields have reached zero.
    • Fragments datagrams when necessary to fit into the MTU of the next network.

See chapter 4 (Internet Layer - Protocols) and chapter 5 (Internet Layer - Forwarding) for more information.

  1. Chooses a next-hop destination for each IP datagram, based on the information in its routing database. See chapter 5 (Internet Layer - Forwarding) for more information.
  2. (Usually) supports an interior gateway protocol (IGP) to carry out distributed routing and reachability algorithms with the other routers in the same autonomous system. In addition, some routers will need to support an exterior gateway protocol (EGP) to exchange topological information with other autonomous systems. See chapter 7 (Application Layer - Routing Protocols) for more information.
  3. Provides network management and system support facilities, including loading, debugging, status reporting, exception reporting and control. See chapter 8 (Application Layer - Network Management Protocols) and chapter 10 (Operation and Maintenance) for more information.

A router vendor will have a ton of choices on power, complexity, and features for any particular router product ๐Ÿ› ๏ธ. It's helpful to know that the Internet system is neither homogeneous nor fully connected ๐Ÿซ . For reasons of technology and geography, it's growing into a global interconnect system plus a fringe of LANs around the edge ๐ŸŒธ. More and more, these fringe LANs are getting richly interconnected, so they're less out on the fringe and more demanding on router requirements ๐Ÿ”ฅ.

  • The global interconnect system is made up of a number of wide-area networks, with routers from several Autonomous Systems (AS) attached to them. There are relatively few hosts connected directly to the system.
  • Most hosts are connected to LANs. Lots of organizations have clusters of LANs linked by local routers. Each cluster connects to the global interconnect system through routers at one or more points. If it's connected at only one point, the LAN is known as a stub network ๐Ÿงธ.

Routers in the global interconnect system generally require:

  • Advanced Routing and Forwarding Algorithms ๐Ÿง 

These routers need routing algorithms that are highly dynamic and also offer type-of-service routing. Congestion is still not a completely resolved issue (see Section [5.3.6]). Improvements in these areas are expected, since the research community is actively working on them โœจ.

  • High Availability ๐Ÿ’ช

These routers need to be highly reliable, providing 24 hours a day, 7 days a week service. Equipment and software faults can have a widespread (sometimes global) effect ๐Ÿ˜ฑ. When something fails, they must recover quickly. In any environment, a router must be highly robust and able to operate, possibly in a degraded state, under conditions of extreme congestion or failure of network resources.

  • Advanced O&M Features ๐Ÿ“Š

Internet routers normally operate in an unattended mode. They'll typically be operated remotely from a centralized monitoring center. They need sophisticated ways to monitor and measure traffic and other events, and to diagnose faults.

  • High Performance ๐ŸŽ๏ธ

Long-haul lines in the Internet today are most often 56 Kbps, DS1 (1.4Mbps), and DS3 (45Mbps) speeds. LANs are typically Ethernet (10Mbps) and, to a lesser degree, FDDI (100Mbps). Network media technology is constantly advancing, though, and even higher speeds are likely in the future ๐Ÿš€. Full-duplex operation is provided at all of these speeds.

The requirements for routers used in the LAN fringe (e.g., campus networks) depend a lot on the demands of the local networks ๐ŸŽ“. These might be high or medium-performance devices, probably competitively procured from several different vendors and run by an internal organization (e.g., a campus computing center). The design of these routers should emphasize low average latency and good burst performance, along with delay and type-of-service sensitive resource management. In this environment there may be less formal O&M, but it won't be any less important ๐Ÿ™ˆ. The need for the routing mechanism to be highly dynamic will matter more as networks get more complex and interconnected. Users will expect more from their local connections because the global interconnects are so fast โšก.

As networks have grown, and as more of them have gotten old enough that they're phasing out older equipment, it has become increasingly imperative that routers interoperate with routers from other vendors ๐Ÿค.

Even though the Internet system isn't fully interconnected, many parts of it need redundant connectivity ๐Ÿ”. Rich connectivity allows reliable service despite failures of communication lines and routers. It can also improve service by shortening Internet paths and by providing additional capacity ๐Ÿ’œ. Unfortunately, this richer topology can make it much harder to choose the best path to a particular destination ๐Ÿ˜ฉ.

2.4 Architectural Assumptions

okay so the current Internet architecture is built on a set of assumptions about how the communication system works ๐Ÿงš the ones that matter most for routers are these:

  • The Internet is a network of networks. ๐ŸŒ

Every host is directly connected to some particular network(s), so its connection to the Internet is only conceptual โœจ Two hosts on the same network talk using the same set of protocols they'd use with hosts on distant networks. no separate rulebook, just vibes ๐Ÿซถ

  • Routers don't keep connection state information. ๐Ÿ’…

To make the communication system more robust, routers are designed to be stateless, so each IP packet gets forwarded on its own, separate from every other packet ๐Ÿฆ‹ That means redundant paths can be exploited to keep service solid even when intervening routers and networks fail.

All the state needed for end-to-end flow control and reliability lives in the hosts, in the transport layer or in application programs ๐Ÿ’– So all the connection control info sits right with the endpoints of the communication, and it only gets lost if an endpoint fails. routers only do flow control indirectly, by dropping packets or adding network delay ๐Ÿ™ˆ

heads up: future protocol developments might totally put some more state into routers ๐Ÿ‘€ this is especially likely for resource reservation and flows.

  • Routing complexity should be in the routers. ๐Ÿง 

Routing is a complex, difficult problem, and it ought to be handled by the routers, not the hosts โœจ A big goal here is to insulate host software from changes caused by the inevitable evolution of the Internet routing architecture. protecting the hosts is iconic behavior ๐Ÿ‘‘

  • The system must tolerate wide network variation. ๐ŸŒˆ

A basic goal of the Internet design is to tolerate a wide range of network characteristics, like bandwidth, delay, packet loss, packet reordering, and maximum packet size ๐Ÿ“ Another goal is robustness against the failure of individual networks, routers, and hosts, using whatever bandwidth is still available. And finally, the goal is full open system interconnection: an Internet router must be able to interoperate robustly and effectively with any other router or Internet host, across diverse Internet paths. main character energy fr ๐Ÿ’…

Sometimes implementors have designed for less ambitious goals ๐Ÿ™ƒ For example, the LAN environment is usually way more benign than the Internet as a whole, since LANs have low packet loss and delay and don't reorder packets. Some vendors have shipped implementations that are fine for a simple LAN but work badly for general interoperation. the vendor justifies it as economical within the restricted LAN market, but ngl isolated LANs seldom stay isolated for long ๐Ÿ’€ They soon get connected to each other, to organization-wide internets, and eventually to the global Internet system. In the end, neither the customer nor the vendor is served by incomplete or substandard routers ๐Ÿ˜ญ

The requirements spelled out in this document are designed for a full-function router โœจ It's intended that fully compliant routers will be usable in almost any part of the Internet. โœจ๐ŸŽ€

Although [INTRO:1] covers Link Layer standards (IP over foo, ARP, etc.), this document expects that Link-Layer material will be covered in a separate Link Layer Requirements document ๐Ÿ“ A Link-Layer requirements document would apply to both hosts and routers. So this document won't obsolete the parts of [INTRO:1] that deal with link-layer issues ๐Ÿฆ‹

3.1 INTRODUCTION

Routers basically have the same Link Layer protocol requirements as other sorts of Internet systems ๐Ÿงš These are given in chapter 3 of Requirements for Internet Gateways [INTRO:1]. A router MUST comply with its requirements and SHOULD comply with its recommendations. since some of the material in that document has gotten kinda dated, some extra requirements and explanations are included below ๐Ÿ•ฐ๏ธ

DISCUSSION: It is expected that the Internet community will produce a Requirements for Internet Link Layer standard which will supersede both this chapter and chapter 3 of [INTRO:1] ๐Ÿ’œ

This document doesn't try to specify the interface between the Link Layer and the upper layers ๐Ÿคทโ€โ™€๏ธ but it's worth noting that other parts of this document, especially chapter 5, need various sorts of information to be passed across this layer boundary.

This section uses the following definitions:

  • Source physical address: the Link Layer address of the host or router the packet was received from ๐Ÿ“ฌ
  • Destination physical address: the Link Layer address the packet was sent to ๐Ÿ“ฎ

The information that must pass from the Link Layer to the Internetwork Layer for each received packet is:

  1. The IP packet [5.2.2],
  2. The length of the data portion (i.e., not including the Link-Layer framing) of the Link Layer frame [5.2.2],
  3. The identity of the physical interface the IP packet was received on [5.2.3], and
  4. The classification of the packet's destination physical address as a Link Layer unicast, broadcast, or multicast [4.3.2], [5.3.4].

In addition, the Link Layer also should provide:

  1. The source physical address.

The information that must pass from the Internetwork Layer to the Link Layer for each transmitted packet is:

  1. The IP packet [5.2.1]
  2. The length of the IP packet [5.2.1]
  3. The destination physical interface [5.2.1]
  4. The next hop IP address [5.2.1]

In addition, the Internetwork Layer also should provide:

  1. The Link Layer priority value [5.3.3.2]

The Link Layer must also notify the Internetwork Layer if the packet to be transmitted causes a Link Layer precedence-related error [5.3.3.3] ๐Ÿšจ

3.3 SPECIFIC ISSUES โœจ

3.3.1 Trailer Encapsulation

Routers which can connect to 10Mb Ethernets MAY be able to receive and forward Ethernet packets encapsulated using the trailer encapsulation described in [LINK:1] ๐ŸŽ€ However, a router SHOULD NOT originate trailer encapsulated packets. A router MUST NOT originate trailer encapsulated packets without first verifying, using the mechanism described in section 2.3.1 of [INTRO:2], that the immediate destination of the packet is willing and able to accept trailer-encapsulated packets ๐Ÿ” A router SHOULD NOT agree (using these same mechanisms) to accept trailer-encapsulated packets.

3.3.2 Address Resolution Protocol - ARP

Routers which implement ARP MUST be compliant and SHOULD be unconditionally compliant with the requirements in section 2.3.2 of [INTRO:2] ๐Ÿงฉ

The link layer MUST NOT report a Destination Unreachable error to IP solely because there is no ARP cache entry for a destination ๐Ÿ™…โ€โ™€๏ธ

A router MUST not believe any ARP reply which claims that the Link Layer address of another host or router is a broadcast or multicast address ๐Ÿšซ

3.3.3 Ethernet and 802.3 Coexistence

Routers which can connect to 10Mb Ethernets MUST be compliant and SHOULD be unconditionally compliant with the requirements of Section [2.3.3] of [INTRO:2] ๐ŸŒธ

3.3.4 Maximum Transmission Unit - MTU

The MTU of each logical interface MUST be configurable โš™๏ธ

Many Link Layer protocols define a maximum frame size that may be sent ๐Ÿ“ In such cases, a router MUST NOT allow an MTU to be set which would allow sending of frames larger than those allowed by the Link Layer protocol. However, a router SHOULD be willing to receive a packet as large as the maximum frame size even if that is larger than the MTU ๐Ÿซถ

DISCUSSION: Note that this is a stricter requirement than imposed on hosts by [INTRO:2], which requires that the MTU of each physical interface be configurable. If a network is using an MTU smaller than the maximum frame size for the Link Layer, a router may receive packets larger than the MTU from hosts which are in the process of initializing themselves, or which have been misconfigured ๐Ÿคญ In general, the Robustness Principle indicates that these packets should be successfully received, if at all possible ๐Ÿ’–

3.3.5 Point-to-Point Protocol - PPP

Contrary to [INTRO:1], the Internet does have a standard serial line protocol: the Point-to-Point Protocol (PPP), defined in [LINK:2], [LINK:3], [LINK:4], and [LINK:5] ๐ŸŽ‰

A serial line interface is any interface designed to send data over a telephone, leased, dedicated or direct line (either 2 or 4 wire) using a standardized modem or bit serial interface (such as RS-232, RS-449 or V.35), using either synchronous or asynchronous clocking ๐Ÿ“ก

A general purpose serial interface is a serial line interface that isn't solely for use as an access line to a network that has an alternative IP link layer specification (such as X.25 or Frame Relay) ๐Ÿงƒ

Routers which contain such general purpose serial interfaces MUST implement PPP ๐Ÿ”ฅ

PPP MUST be supported on all general purpose serial interfaces on a router. The router MAY allow the line to be configured to use serial line protocols other than PPP, but all general purpose serial interfaces MUST default to using PPP ๐ŸŽ€

3.3.5.1 Introduction

This section gives guidelines to router implementors so they can make sure of interoperability with other routers using PPP over either synchronous or asynchronous links ๐Ÿงš

It is critical that an implementor understands the semantics of the option negotiation mechanism ๐Ÿง  Options are a way for a local device to tell a remote peer what the local device will accept from the remote peer, not what it wishes to send. It's up to the remote peer to decide what is most convenient to send within the limits of the set of options the local device has said it can accept. Therefore it's perfectly acceptable and normal for a remote peer to ACK all the options indicated in an LCP Configuration Request (CR), even if the remote peer doesn't support any of those options ๐Ÿ’… Again, the options are simply a mechanism for either device to indicate to its peer what it will accept, not necessarily what it will send โœจ

okay so PPP's Link Control Protocol (LCP) has a whole buffet of options you can negotiate ๐Ÿ“ Some of them are address and control field compression, protocol field compression, the asynchronous character map, Maximum Receive Unit (MRU), Link Quality Monitoring (LQM), the magic number (for loopback detection), Password Authentication Protocol (PAP), Challenge Handshake Authentication Protocol (CHAP), and the 32-bit Frame Check Sequence (FCS). and yes, that's not the full list, it's just the "among others" crowd ๐Ÿ’…

A router MAY do address/control field compression on either synchronous or asynchronous links. A router MAY do protocol field compression on either synchronous or asynchronous links. A router MAY indicate that it can accept these compressions, but MUST be able to accept uncompressed PPP header information even if it has indicated a willingness to receive compressed PPP headers. bestie, that last part is so important ๐Ÿซถ

DISCUSSION: These options control how the PPP header looks. normally it's an address field (one byte, value 0xff), a control field (one byte, value 0x03), and a two-byte protocol field that tells you what's in the data area of the frame. If a system negotiates address and control field compression, it's basically saying "yes, I'll accept frames that have these fields at the front, or frames that don't." It is NOT saying it will send frames with those fields removed ๐Ÿ‘€ The protocol field can also shrink from two bytes to one in most cases. โœจ

IMPLEMENTATION: some hardware is not a fan of variable length header info ๐Ÿ˜ญ so in those cases it makes the most sense for the remote peer to send the full PPP header. implementations can make that happen by not sending the address/control field and protocol field compression options to the remote peer. and even if the remote peer says it can receive compressed headers, there's no requirement for the local router to send compressed headers. no pressure, no vibes required ๐ŸŒˆ

A router MUST negotiate the Async Control Character Map (ACCM) for asynchronous PPP links, but SHOULD NOT negotiate the ACCM for synchronous links. If a router receives an attempt to negotiate the ACCM over a synchronous link, it MUST ACKnowledge the option and then ignore it. ๐Ÿ’œ

DISCUSSION: there are implementations that do both sync and async and reuse the same code for option negotiation ๐Ÿงš so it's totally possible that one end or the other sends the ACCM option on a synchronous link. that's why the router has to ACKnowledge it and then just ignore it. we all have that one friend who texts at the wrong time, and we still reply politely ๐Ÿ’–

A router SHOULD properly negotiate the maximum receive unit (MRU). Even if a system negotiates an MRU smaller than 1,500 bytes, it MUST be able to receive a 1,500 byte frame. โœจ that's the floor, periodt.

A router SHOULD negotiate and enable the link quality monitoring (LQM) option. ๐Ÿฆ‹

DISCUSSION: this memo does NOT set a policy for deciding whether a link's quality is good enough. ngl that's kinda a plot twist ๐Ÿ™ˆ BUT it does say (see Section [3.3.6]) that it's important for a router to disable failed links. so keep that in your back pocket ๐Ÿ’…

A router SHOULD implement and negotiate the magic number option for loopback detection. ๐ŸŒธ

A router MAY support the authentication options (PAP - password authentication protocol, and/or CHAP - challenge handshake authentication protocol). ๐Ÿ”

A router MUST support 16-bit CRC frame check sequence (FCS) and MAY support the 32-bit CRC. ๐Ÿ‘‘

3.3.5.3 IP Control Protocol (ICP) Options ๐Ÿ’œ

A router MAY offer to perform IP address negotiation. A router MUST accept a refusal (REJect) to perform IP address negotiation from the peer. so if the other side says no thanks, you say okay and move on, no drama ๐Ÿซถ

A router SHOULD NOT perform Van Jacobson header compression of TCP/IP packets if the link speed is in excess of 64 Kbps. Below that speed the router MAY perform Van Jacobson (VJ) header compression. At link speeds of 19,200 bps or less the router SHOULD perform VJ header compression. ๐ŸŒˆ so it's basically a speed-based vibe check: fast links, skip it; slow links, go for it ๐Ÿขโœจ

3.3.6 Interface Testing ๐Ÿฆ‹

A router MUST have a mechanism to allow routing software to determine whether a physical interface is available to send packets or not. A router SHOULD have a mechanism to allow routing software to judge the quality of a physical interface. A router MUST have a mechanism for informing the routing software when a physical interface becomes available or unavailable to send packets because of administrative action. A router MUST have a mechanism for informing the routing software when it detects a Link level interface has become available or unavailable, for any reason. ๐Ÿ”ฅ

DISCUSSION: it is CRUCIAL that routers have workable ways to check that their network connections are actually working ๐Ÿ˜ญ because if they don't (or they don't do the right thing when something goes wrong), you get black holes, and nobody wants a black hole in their life ๐Ÿ•ณ๏ธ๐Ÿ’€ how well a router can detect problems really depends on the Link Layer protocols in use, and sometimes on the interface hardware the router manufacturer picked. the goal is to catch as many failures as possible within those Link-Layer limits. we do what we can with what we've got, iykyk ๐Ÿงš


4. INTERNET LAYER - PROTOCOLS ๐Ÿฆ‹

4.1 INTRODUCTION ๐ŸŒธ

this chapter and chapter 5 talk about the protocols at the Internet Layer: IP, ICMP, and IGMP. forwarding is obviously a huge deal in a document about routers, so chapter 5 sticks to the parts of these protocols that directly relate to forwarding. this chapter has the rest of the Internet Layer protocol discussion. main character energy for the whole stack ๐Ÿ‘‘

4.2 INTERNET PROTOCOL - IP โœจ

4.2.1 INTRODUCTION ๐Ÿ’–

Routers MUST implement the IP protocol, as defined by [INTERNET:1]. They MUST also implement its mandatory extensions: subnets (defined in [INTERNET:2]), and IP broadcast (defined in [INTERNET:3]). no skipping the basics, bestie ๐Ÿ’…

A router MUST be compliant, and SHOULD be unconditionally compliant, with the requirements of sections 3.2.1 and 3.3 of [INTRO:2], except that:

  • Section 3.2.1.1 may be ignored, since it duplicates requirements found in this memo.
  • Section 3.2.1.2 may be ignored, since it duplicates requirements found in this memo.
  • Section 3.2.1.3 should be ignored, since it is superseded by Section [4.2.2.11] of this memo.
  • Section 3.2.1.4 may be ignored, since it duplicates requirements found in this memo.
  • Section 3.2.1.6 should be ignored, since it is superseded by Section [4.2.2.4] of this memo.
  • Section 3.2.1.8 should be ignored, since it is superseded by Section [4.2.1] of this memo.

Hmm, wait, I need to be accurate here. The last bullet in the original points to [4.2.2.1], not [4.2.1]. Correcting that so the cross-reference stays exact:

  • Section 3.2.1.8 should be ignored, since it is superseded by Section [4.2.2.1] of this memo. ๐Ÿซ 

In the following, the action specified in certain cases is to silently discard a received datagram. This means that the datagram will be discarded without further processing and that the router will not send any ICMP error message (see Section [4.3]) as a result. However, for diagnosis of problems a router SHOULD provide the capability of logging the error (see Section [1.3.3]), including the contents of the silently-discarded datagram, and SHOULD record the event in a statistics counter. ๐Ÿ•ต๏ธโ€โ™€๏ธ quiet discards are still tracked, just not announced ๐Ÿคซ

4.2.2 PROTOCOL WALK-THROUGH ๐ŸŽ€

RFC 791 is [INTERNET:1], the specification for the Internet Protocol. ๐Ÿงš the OG of IP reading list ๐Ÿ’œ

4.2.2.1. Options: RFC-791 Section 3.2 โœจ

Okay so, when a datagram lands at the router itself, the IP layer MUST interpret the IP options it understands and preserve the rest unchanged, so that higher layer protocols can use them ๐Ÿ’…

Higher layer protocols may need to set IP options on the datagrams they send, or read the IP options on the ones they receive. Later sections of this doc cover the specific IP option support those protocols need. ๐Ÿซถ

DISCUSSION: Neither this memo nor [INTRO:2] define the order in which a receiver must process multiple options in the same IP header. Hosts and routers that originate datagrams with multiple options need to be aware that this creates an ambiguity in certain options when they're combined with a source-route option ๐Ÿ™ˆ

Here are the requirements for specific IP options:

(a) Security Option ๐Ÿ”

Some environments require the Security option in every packet originated or received. Routers SHOULD IMPLEMENT the revised security option described in [INTERNET:5].

DISCUSSION: Note that the security options described in [INTERNET:1] and RFC 1038 ([INTERNET:16]) are obsolete. Bestie, don't go reaching for these ๐Ÿ’€

(b) Stream Identifier Option ๐ŸŒธ

This option is obsolete. Routers SHOULD NOT place this option in a datagram that the router originates. This option MUST be ignored in datagrams received by the router.

(c) Source Route Options ๐Ÿฆ‹

A router MUST be able to act as the final destination of a source route. If a router receives a packet containing a completed source route (i.e., the pointer points beyond the last field and the destination address in the IP header addresses the router), the packet has reached its final destination. The option as received (the recorded route) MUST be passed up to the transport layer (or to ICMP message processing).

In order to respond correctly to source-routed datagrams it receives, a router MUST provide a means whereby transport protocols and applications can reverse the source route in a received datagram and insert the reversed source route into datagrams they originate. Main character energy โœจ (see Section 4 of [INTRO:2] for details).

Some applications in the router MAY require that the user be able to enter a source route.

A router MUST NOT originate a datagram containing multiple source route options. What a router should do if asked to forward a packet containing multiple source route options is described in Section [5.2.4.1].

When a source route option is created, it MUST be correctly formed, even if it's being created by reversing a recorded route that erroneously includes the source host (see case (B) in the discussion below) ๐ŸŽ€

DISCUSSION: Suppose a source routed datagram is to be routed from source S to destination D via routers G1, G2, ... Gn. Source S constructs a datagram with G1's IP address as its destination address, and a source route option to get the datagram the rest of the way to its destination. However, there's an ambiguity in the specification over whether the source route option in a datagram sent out by S should be (A) or (B):

(A):  {>>G2, G3, ... Gn, D}     <--- CORRECT

(B):  {S, >>G2, G3, ... Gn, D}  <---- WRONG

(where >> represents the pointer). If (A) is sent, the datagram received at D will contain the option {G1, G2, ... Gn >>}, with S and D as the IP source and destination addresses. If (B) were sent, the datagram received at D would again contain S and D as the same IP source and destination addresses, but the option would be {S, G1, ...Gn >>}. In other words, the originating host would be the first hop in the route. Lowkey a whole mess ๐Ÿ˜ญ

(d) Record Route Option ๐Ÿ—บ๏ธ

Routers MAY support the Record Route option in datagrams originated by the router.

(e) Timestamp Option โฐ

Routers MAY support the timestamp option in datagrams originated by the router. The following rules apply:

  • When originating a datagram containing a Timestamp Option, a router MUST record a timestamp in the option if:
    • Its Internet address fields are not pre-specified, or
    • Its first pre-specified address is the IP address of the logical interface over which the datagram is being sent (or the router's router-id if the datagram is being sent over an unnumbered interface).
  • If the router itself receives a datagram containing a Timestamp Option, the router MUST insert the current timestamp into the Timestamp Option (if there is space in the option to do so) before passing the option to the transport layer or to ICMP for processing.
  • A timestamp value MUST follow the rules given in Section [3.2.2.8] of [INTRO:2].

IMPLEMENTATION: To maximize the usefulness of the timestamps in the timestamp option, it is suggested that the timestamp inserted be, as nearly as practical, the time at which the packet arrived at the router. For datagrams originated by the router, the timestamp inserted should be, as nearly as practical, the time at which the datagram was passed to the Link Layer for transmission. โฑ๏ธ


4.2.2.2. Addresses in Options: RFC-791 Section 3.1 ๐Ÿก

When a router inserts its address into a Record Route, Strict Source and Record Route, Loose Source and Record Route, or Timestamp, it MUST use the IP address of the logical interface on which the packet is being sent. Where this rule can't be obeyed because the output interface has no IP address (i.e., it's an unnumbered interface), the router MUST instead insert its router-id. The router's router-id is one of the router's IP addresses. Which of the router's addresses is used as the router-id MUST NOT change (even across reboots) unless it's changed by the network manager, or unless the configuration of the router changes such that the IP address used as the router-id stops being one of the router's IP addresses. Routers with multiple unnumbered interfaces MAY have multiple router-id's. Each unnumbered interface MUST be associated with a particular router-id. This association MUST NOT change (even across reboots) without reconfiguration of the router. ๐Ÿ”’

DISCUSSION: This specification doesn't allow for routers that don't have at least one IP address. We don't view this as a serious limitation, since a router needs an IP address to meet the manageability requirements of Chapter [8], even if the router is only connected to point-to-point links. ๐Ÿ™Œ

IMPLEMENTATION: One possible method of choosing the router-id that meets this requirement is to use the numerically smallest (or greatest) IP address (treating the address as a 32-bit integer) that is assigned to the router. ๐Ÿงš


4.2.2.3. Unused IP Header Bits: RFC-791 Section 3.1 ๐Ÿซง

The IP header contains two reserved bits: one in the Type of Service byte and the other in the Flags field. A router MUST NOT set either of these bits to one in datagrams originated by the router. A router MUST NOT drop (refuse to receive or forward) a packet merely because one or more of these reserved bits has a non-zero value.

DISCUSSION: Future revisions to the IP protocol may make use of these unused bits. These rules are meant to make sure those revisions can be deployed without having to upgrade every router in the Internet at the same time. That's the kind of planning I respect ๐Ÿ‘‘


4.2.2.4. Type of Service: RFC-791 Section 3.1 ๐Ÿ“

The Type-of-Service byte in the IP header is divided into three sections: the Precedence field (high-order 3 bits), a field that is customarily called Type of Service or TOS (next 4 bits), and a reserved bit (the low order bit).

Rules governing the reserved bit were described in Section [4.2.2.3].

A more extensive discussion of the TOS field and its use can be found in [ROUTE:11].

The description of the IP Precedence field is superseded by Section [5.3.3]. RFC-795, Service Mappings, is obsolete and SHOULD NOT be implemented. Not me going back to read an old spec ๐Ÿ™ˆ


4.2.2.5. Header Checksum: RFC-791 Section 3.1 โœ…

As stated in Section [5.2.2], a router MUST verify the IP checksum of any packet which is received. The router MUST NOT provide a means to disable this checksum verification. No skipping the checksum, periodt ๐Ÿ’…

IMPLEMENTATION: A more extensive description of the IP checksum, including extensive implementation hints, can be found in [INTERNET:6] and [INTERNET:7]. ๐ŸŒˆ


4.2.2.6. Unrecognized Header Options: RFC-791 Section 3.1 ๐ŸŒ™

A router MUST ignore IP options which it does not recognize. A corollary of this requirement is that a router MUST implement the End of Option List option and the No Operation option, since neither contains an explicit length. โœจ

DISCUSSION: All future IP options will include an explicit length. So the parsing stays chill for everyone who comes after us ๐Ÿซถ

4.2.2.7 Fragmentation: RFC-791 Section 3.2 ๐Ÿ’…

Okay so fragmentation, as described in [INTERNET:1], MUST be supported by a router. No cap, it's not optional ๐Ÿซถ

When a router fragments an IP datagram, it SHOULD minimize the number of fragments. When a router fragments an IP datagram, it MUST send the fragments in order. A fragmentation method which may generate one IP fragment which is significantly smaller than the other MAY cause the first IP fragment to be the smaller one. ๐Ÿงฉ

DISCUSSION:

There are a few fragmentation techniques floating around the Internet. One splits the IP datagram into IP fragments where the first one is MTU sized and the rest are roughly the same size, each smaller than the MTU. The reason is twofold. The first IP fragment in the sequence ends up being the effective MTU of the current path between the hosts, and the following IP fragments are sized to hopefully minimize further fragmentation of the IP datagram. Another technique splits the IP datagram into MTU sized IP fragments, where only the last fragment is smaller, as per page 26 of [INTERNET:1]. ๐ŸŒธ

A common trick some TCP/IP implementations use is to fragment an IP datagram into IP fragments that are no larger than 576 bytes when the IP datagram is going to travel through a router. Generally, this lets the resulting IP fragments pass the rest of the path without further fragmentation. It would, though, put more load on the destination host, since it would have a bigger pile of IP fragments to reassemble into one IP datagram. It also wouldn't be efficient on networks where the MTU only changes once and stays much larger than 576 bytes (like an 802.5 network with a MTU of 2048 or an Ethernet network with an MTU of 1536). ๐Ÿ™ˆ

One other technique that got discussed was splitting the IP datagram into roughly equal sized IP fragments, with each size being smaller than the next hop network's MTU. This is meant to minimize the number of fragments that would come from additional fragmentation further down the path. โœจ

In most cases, routers should try to create situations that generate the lowest number of IP fragments possible. ๐Ÿ‘‘

Work with slow machines leads us to believe that if it's necessary to send small packets in a fragmentation scheme, sending the small IP fragment first maximizes the chance of a host with a slow interface receiving all the fragments. ๐Ÿข๐Ÿ’œ

4.2.2.8 Reassembly: RFC-791 Section 3.2 ๐Ÿงš

As specified in Section 3.3.2 of [INTRO:2], a router MUST support reassembly of datagrams which it delivers to itself. Main character energy ๐Ÿ‘‘

4.2.2.9 Time to Live: RFC-791 Section 3.2 โณ

Time to Live (TTL) handling for packets that are originated or received by the router is governed by [INTRO:2]. Note in particular that a router MUST NOT check the TTL of a packet except when forwarding it. Don't peek at it, bestie ๐Ÿ™ˆ๐Ÿซฃ

4.2.2.10 Multi-subnet Broadcasts: RFC-922 ๐Ÿฆ‹

All-subnets broadcasts (called multi-subnet broadcasts in [INTERNET:3]) have been deprecated. See Section [5.3.5.3]. Bye bye, old drama ๐Ÿ’€

4.2.2.11 Addressing: RFC-791 Section 3.2 ๐ŸŒˆ

There are now five classes of IP addresses: Class A through Class E. Class D addresses are used for IP multicasting [INTERNET:4], while Class E addresses are reserved for experimental use. ๐Ÿงช

A multicast (Class D) address is a 28-bit logical address that stands for a group of hosts, and it may be either permanent or transient. Permanent multicast addresses are allocated by the Internet Assigned Number Authority [INTRO:7], while transient addresses may be allocated dynamically to transient groups. Group membership is determined dynamically using IGMP [INTERNET:4]. ๐Ÿ’–

We're now going to summarize the important special cases for Unicast (that is, class A, B, and C) IP addresses. The notation for an IP address looks like this:

{ <Network-number>, <Host-number> }

or

{ <Network-number>, <Subnet-number>, <Host-number> }

The notation -1 means a field that contains all 1 bits, and the notation 0 means a field that contains all 0 bits. This notation is not meant to imply that the 1-bits in a subnet mask need to be contiguous. ๐ŸŽ€

(a) { 0, 0 }

This host on this network. It MUST NOT be used as a source address by routers, except the router MAY use this as a source address as part of an initialization procedure (e.g., if the router is using BOOTP to load its configuration information). ๐ŸŒฑ

Incoming datagrams with a source address of { 0, 0 } which are received for local delivery (see Section [5.2.3]) MUST be accepted if the router implements the associated protocol and that protocol clearly defines appropriate action to be taken. Otherwise, a router MUST silently discard any locally-delivered datagram whose source address is { 0, 0 }. ๐Ÿšซ

DISCUSSION:

Some protocols define specific actions to take in response to a received datagram whose source address is { 0, 0 }. Two examples are BOOTP and ICMP Mask Request. The proper operation of these protocols often depends on the ability to receive datagrams whose source address is { 0, 0 }. For most protocols, however, it's best to ignore datagrams having a source address of { 0, 0 }, since they were probably generated by a misconfigured host or router. So, if a router knows how to deal with a given datagram having a { 0, 0 } source address, the router MUST accept it. Otherwise, the router MUST discard it. ๐Ÿง

See also Section [4.2.3.1] for a non-standard use of { 0, 0 }. ๐Ÿ‘€

(b) { 0, <Host-number> }

Specified host on this network. It MUST NOT be sent by routers, except that the router MAY uses this as a source address as part of an initialization procedure by which the it learns its own IP address. ๐Ÿชช

(c) { -1, -1 }

Limited broadcast. It MUST NOT be used as a source address. ๐Ÿ“ข

A datagram with this destination address will be received by every host and router on the connected physical network, but it will not be forwarded outside that network. ๐Ÿ 

(d) { <Network-number>, -1 }

Network Directed Broadcast - a broadcast directed to the specified network. It MUST NOT be used as a source address. A router MAY originate Network Directed Broadcast packets. A router MUST receive Network Directed Broadcast packets; however, a router MAY have a configuration option to prevent reception of these packets. Such an option MUST default to allowing reception. ๐Ÿ“ฌ

(e) { <Network-number>, <Subnet-number>, -1 }

Subnetwork Directed Broadcast - a broadcast sent to the specified subnet. It MUST NOT be used as a source address. A router MAY originate Network Directed Broadcast packets. A router MUST receive Network Directed Broadcast packets; however, a router MAY have a configuration option to prevent reception of these packets. Such an option MUST default to allowing reception. ๐ŸŒท

(f) { <Network-number>, -1, -1 }

All Subnets Directed Broadcast - a broadcast sent to all subnets of the specified subnetted network. It MUST NOT be used as a source address. A router MAY originate Network Directed Broadcast packets. A router MUST receive Network Directed Broadcast packets; however, a router MAY have a configuration option to prevent reception of these packets. Such an option MUST default to allowing reception. ๐ŸŽ‰

(g) { 127, <any> }

Internal host loopback address. Addresses of this form MUST NOT appear outside a host. ๐Ÿชž

The <Network-number> is administratively assigned so that its value will be unique in the entire world. ๐ŸŒ

IP addresses are not permitted to have the value 0 or -1 for any of the <Host-number>, <Network-number>, or <Subnet-number> fields (except in the special cases listed above). This implies that each of these fields will be at least two bits long. ๐Ÿ”ข

For further discussion of broadcast addresses, see Section [4.2.3.1]. ๐Ÿ“–

Since (as described in Section [4.2.1]) a router must support the subnet extensions to IP, there will be a subnet mask of the form { -1, -1, 0 } associated with each of the host's local IP addresses; see Sections [4.3.3.9], [5.2.4.2], and [10.2.2]. ๐ŸŽญ

When a router originates any datagram, the IP source address MUST be one of its own IP addresses (but not a broadcast or multicast address). The only exception is during initialization. ๐Ÿ™Œ

For most purposes, a datagram addressed to a broadcast or multicast destination is processed as if it had been addressed to one of the router's IP addresses. That is to say:

  • A router MUST receive and process normally any packets with a broadcast destination address. ๐Ÿ“ป
  • A router MUST receive and process normally any packets sent to a multicast destination address which the router is interested in. ๐ŸŽง

The term specific-destination address means the equivalent local IP address of the host. The specific-destination address is defined to be the destination address in the IP header, unless the header contains a broadcast or multicast address. In that case, the specific-destination is an IP address assigned to the physical interface on which the datagram arrived. ๐Ÿช„

A router MUST silently discard any received datagram containing an IP source address that is invalid by the rules of this section. This validation could be done either by the IP layer or by each protocol in the transport layer. ๐Ÿ›ก๏ธ

DISCUSSION:

A misaddressed datagram might be caused by a Link Layer broadcast of a unicast datagram, or by another router or host that is confused or misconfigured. Oof, not the vibe ๐Ÿ˜ญ


4.2.3 SPECIFIC ISSUES โœจ

4.2.3.1. IP Broadcast Addresses โœจ

okay so for historical reasons there are a bunch of IP addresses (some standard, some totally not ๐Ÿ’€) that all mean "this packet is an IP broadcast." here's what a router does with them ๐Ÿ’…

  1. A router MUST treat as IP broadcasts packets addressed to 255.255.255.255, { <Network-number>, -1 }, { <Network-number>, <Subnet-number>, -1 }, and { <Network-number>, -1, -1 }.
  2. A router SHOULD silently discard on receipt (i.e., don't even deliver to applications in the router) any packet addressed to 0.0.0.0, { <Network-number>, 0 }, { <Network-number>, <Subnet-number>, 0 }, or { <Network-number>, 0, 0 }. If these packets are not silently discarded, they MUST be treated as IP broadcasts (see Section [5.3.5]). There MAY be a configuration option to allow receipt of these packets. This option SHOULD default to discarding them.
  3. A router SHOULD (by default) use the limited broadcast address (255.255.255.255) when originating an IP broadcast destined for a connected network or subnet (except when sending an ICMP Address Mask Reply, as discussed in Section [4.3.3.9]). A router MUST receive limited broadcasts.
  4. A router SHOULD NOT originate datagrams addressed to 0.0.0.0, { <Network-number>, 0 }, { <Network-number>, <Subnet-number>, 0 }, or { <Network-number>, 0, 0 }. There MAY be a configuration option to allow generation of these packets (instead of using the relevant 1s format broadcast). This option SHOULD default to not generating them.

DISCUSSION:

In the second bullet, the router obviously cannot recognize addresses of the form { <Network-number>, <Subnet-number>, 0 } if the router does not know how the particular network is subnetted. In that case, the rules of the second bullet do not apply, because from the point of view of the router, the packet is not an IP broadcast packet. ๐Ÿ™ˆ

4.2.3.2. IP Multicasting ๐ŸŽ€

An IP router SHOULD satisfy the Host Requirements with respect to IP multicasting, as specified in Section 3.3.7 of [INTRO:2]. An IP router SHOULD support local IP multicasting on all connected networks for which a mapping from Class D IP addresses to link-layer addresses has been specified (see the various IP-over-xxx specifications), and on all connected point-to-point links. Support for local IP multicasting includes originating multicast datagrams, joining multicast groups and receiving multicast datagrams, and leaving multicast groups. This implies support for all of [INTERNET:4], including IGMP (see Section [4.4]).

DISCUSSION:

Although [INTERNET:4] is entitled Host Extensions for IP Multicasting, it applies to all IP systems, both hosts and routers. In particular, since routers may join multicast groups, it is correct for them to perform the host part of IGMP, reporting their group memberships to any multicast routers that may be present on their attached networks (whether or not they themselves are multicast routers). ๐Ÿฆ‹

Some router protocols may specifically require support for IP multicasting (e.g., OSPF [ROUTE:1]), or may recommend it (e.g., ICMP Router Discovery [INTERNET:13]). โœจ

4.2.3.3. Path MTU Discovery ๐Ÿงš

so to eliminate fragmentation, or at least minimize it, it's really desirable to know the path MTU along the path from the source to the destination. the path MTU is the minimum of the MTUs of each hop in the path. [INTERNET:14] describes a technique for dynamically discovering the maximum transmission unit (MTU) of an arbitrary internet path. for a path that passes through a router that does not support [INTERNET:14], this technique might not discover the correct Path MTU, but it will always choose a Path MTU as accurate as, and in many cases more accurate than, the Path MTU that would be chosen by older techniques or the current practice. ๐ŸŒธ

When a router is originating an IP datagram, it SHOULD use the scheme described in [INTERNET:14] to limit the datagram's size. If the router's route to the datagram's destination was learned from a routing protocol that provides Path MTU information, the scheme described in [INTERNET:14] is still used, but the Path MTU information from the routing protocol SHOULD be used as the initial guess as to the Path MTU and also as an upper bound on the Path MTU. ๐Ÿ’–

4.2.3.4. Subnetting ๐Ÿ“

under certain circumstances, it may be desirable to support subnets of a particular network being interconnected only via a path which is not part of the subnetted network. this is known as discontiguous subnetwork support.

Routers MUST support discontiguous subnetworks.

IMPLEMENTATION:

in general, a router should not make assumptions about what are subnets and what are not. it should just ignore the concept of Class in networks, and treat each route as a { network, mask }-tuple. ๐Ÿ”ฅ

DISCUSSION:

the Internet has been growing at a tremendous rate of late, and this has been placing severe strains on IP addressing technology. a major factor in that strain is the strict IP Address class boundaries. these make it difficult to efficiently size network numbers to their networks and to aggregate several network numbers into a single route advertisement. by eliminating the strict class boundaries of the IP address and treating each route as a {network number, mask}-tuple, these strains may be greatly reduced. ๐Ÿ‘‘

The technology for currently doing this is Classless Interdomain Routing (CIDR) [INTERNET:15]. โœจ

Furthermore, for similar reasons, a subnetted network need not have a consistent subnet mask through all parts of the network. for example, one subnet may use an 8 bit subnet mask, another 10 bit, and another 6 bit. this is known as variable subnet-masks. ๐ŸŒˆ

Routers MUST support variable subnet-masks.

4.3. INTERNET CONTROL MESSAGE PROTOCOL - ICMP ๐Ÿ’œ

4.3.1. INTRODUCTION

ICMP is an auxiliary protocol, which provides routing, diagnostic and error functionality for IP. it is described in [INTERNET:8]. A router MUST support ICMP. ๐Ÿซถ

ICMP messages are grouped in two classes, which are discussed in the following sections:

ICMP error messages:

Destination Unreachable     Section 4.3.3.1
Redirect                    Section 4.3.3.2
Source Quench               Section 4.3.3.3
Time Exceeded               Section 4.3.3.4
Parameter Problem           Section 4.3.3.5

ICMP query messages:
Echo                        Section 4.3.3.6
Information                 Section 4.3.3.7
Timestamp                   Section 4.3.3.8
Address Mask                Section 4.3.3.9
Router Discovery            Section 4.3.3.10

General ICMP requirements and discussion are in the next section. ๐Ÿ’…

4.3.2. GENERAL ISSUES

4.3.2.1. Unknown Message Types

If an ICMP message of unknown type is received, it MUST be passed to the ICMP user interface (if the router has one) or silently discarded (if the router doesn't have one). ๐Ÿ™ˆ

4.3.2.2. ICMP Message TTL

When originating an ICMP message, the router MUST initialize the TTL. The TTL for ICMP responses must not be taken from the packet which triggered the response. โฐ

4.3.2.3. Original Message Header

Every ICMP error message includes the Internet header and at least the first 8 data bytes of the datagram that triggered the error. More than 8 bytes MAY be sent, but the resulting ICMP datagram SHOULD have a length of less than or equal to 576 bytes. The returned IP header (and user data) MUST be identical to that which was received, except that the router is not required to undo any modifications to the IP header that are normally performed in forwarding and that were performed before the error was detected (e.g., decrementing the TTL, updating options). Note that the requirements of Section [4.3.3.5] supersede this requirement in some cases (i.e., for a Parameter Problem message, if the problem is in a modified field, the router must undo the modification). See Section [4.3.3.5]) ๐Ÿฆ‹

4.3.2.4. ICMP Message Source Address

Except where this document specifies otherwise, the IP source address in an ICMP message originated by the router MUST be one of the IP addresses associated with the physical interface over which the ICMP message is transmitted. If the interface has no IP addresses associated with it, the router's router-id (see Section [5.2.5]) is used instead. ๐ŸŒธ

4.3.2.5. TOS and Precedence

ICMP error messages SHOULD have their TOS bits set to the same value as the TOS bits in the packet which provoked the sending of the ICMP error message, unless setting them to that value would cause the ICMP error message to be immediately discarded because it could not be routed to its destination. Otherwise, ICMP error messages MUST be sent with a normal (i.e. zero) TOS. An ICMP reply message SHOULD have its TOS bits set to the same value as the TOS bits in the ICMP request that provoked the reply. ๐ŸŽ€

EDITOR'S COMMENTS:

The following paragraph originally read:

ICMP error messages MUST have their IP Precedence field
set to the same value as the IP Precedence field in the
packet which provoked the sending of the ICMP error
message, except that the precedence value MUST be 6
(INTERNETWORK CONTROL) or 7 (NETWORK CONTROL), SHOULD be
7, and MAY be settable for the following types of ICMP
error messages: Unreachable, Redirect, Time Exceeded, and
Parameter Problem.

I believe that the following paragraph is equivalent and easier for humans to parse (Source Quench is the only other ICMP Error message). Other interpretations of the original are sought. ๐Ÿค“

ICMP Source Quench error messages MUST have their IP Precedence field set to the same value as the IP Precedence field in the packet which provoked the sending of the ICMP Source Quench message. All other ICMP error messages (Destination Unreachable, Redirect, Time Exceeded, and Parameter Problem) MUST have their precedence value set to 6 (INTERNETWORK CONTROL) or 7 (NETWORK CONTROL), SHOULD be 7. The IP Precedence value for these error messages MAY be settable.

An ICMP reply message MUST have its IP Precedence field set to the same value as the IP Precedence field in the ICMP request that provoked the reply. ๐Ÿ’–

4.3.2.6 Source Route โœจ

okay so, if the packet that sets off an ICMP error message has a source route option, the ICMP error message SHOULD also carry a source route option of the same type (strict or loose) ๐Ÿ’…. You build it by reversing the part of the recorded route that sits before the pointer in the original packet's source route option, UNLESS the ICMP error is an ICMP Parameter Problem complaining about a source route option in the original packet ๐Ÿฆ‹.

DISCUSSION: In environments that use the U.S. Department of Defense security option (defined in [INTERNET:5]), ICMP messages may need to include a security option ๐Ÿ”’. The Defense Communications Agency should have the detailed info on this one ๐Ÿซถ.

4.3.2.7 When Not to Send ICMP Errors ๐Ÿ™ˆ

bestie, an ICMP error message MUST NOT be sent as the result of receiving any of these:

  • An ICMP error message, or
  • A packet that fails the IP header validation tests described in Section [5.2.2] (except where that section specifically permits sending an ICMP error message), or
  • A packet destined to an IP broadcast or IP multicast address, or
  • A packet sent as a Link Layer broadcast or multicast, or
  • A packet whose source address has a network number of zero or is an invalid source address (as defined in Section [5.3.7]), or
  • Any fragment of a datagram other than the first fragment (i.e., a packet for which the fragment offset in the IP header is nonzero).

And, no cap, an ICMP error message MUST NOT be sent in any case where this memo says a packet is to be silently discarded ๐Ÿซ .

NOTE: THESE RESTRICTIONS TAKE PRECEDENCE OVER ANY REQUIREMENT ELSEWHERE IN THIS DOCUMENT FOR SENDING ICMP ERROR MESSAGES. ๐Ÿšจ

DISCUSSION: These rules are here to stop the broadcast storms that happen when routers or hosts send ICMP error messages back in response to broadcast packets ๐ŸŒช๏ธ. For example, a broadcast UDP packet to a port that doesn't exist could set off a flood of ICMP Destination Unreachable datagrams from every device that doesn't have a client for that port ๐Ÿ˜ญ. On a big Ethernet, the collisions can make the network useless for a second or more ๐Ÿ’€.

Every packet that gets broadcast on the connected network should have a valid IP broadcast address as its IP destination (see Section [5.3.4] and [INTRO:2]). Sadly, some devices break this rule ๐Ÿ˜ค. So to be sure they catch every broadcast packet, routers are required to check for a link-layer broadcast as well as an IP-layer address ๐Ÿ”.

IMPLEMENTATION: This means the link layer has to tell the IP layer when a link-layer broadcast packet has been received; see Section [3.1] ๐Ÿงš.

4.3.2.8 Rate Limiting ๐ŸŒธ

A router that sends ICMP Source Quench messages MUST be able to limit how fast it generates them ๐Ÿข. A router SHOULD also be able to limit how fast it sends other kinds of ICMP error messages (Destination Unreachable, Redirect, Time Exceeded, Parameter Problem) โœจ. The rate limit parameters SHOULD be settable as part of the router's configuration ๐ŸŽ€. How the limits get applied (e.g., per router or per interface) is up to the implementor's discretion ๐Ÿ’….

DISCUSSION: A router sending ICMP error messages runs into two problems ๐Ÿ˜ฉ:

  1. The consumption of bandwidth on the reverse path, and
  2. The use of router resources (e.g., memory, CPU time)

To help with these, a router can limit how often it generates ICMP error messages ๐Ÿซถ. For similar reasons, a router may also limit how often some other kinds of messages, such as ICMP Echo Replies, get generated ๐Ÿฆ‹.

IMPLEMENTATION: People have used or proposed a few different mechanisms for limiting how fast ICMP messages get sent ๐Ÿง :

  1. Count-based - for example, send an ICMP error message for every N dropped packets overall or per given source host. This mechanism might be appropriate for ICMP Source Quench, but probably not for other types of ICMP messages.
  2. Timer-based - for example, send an ICMP error message to a given source host or overall at most once per T milliseconds.
  3. Bandwidth-based - for example, limit the rate at which ICMP messages are sent over a particular interface to some fraction of the attached network's bandwidth.

4.3.3 SPECIFIC ISSUES ๐Ÿ’–

4.3.3.1 Destination Unreachable ๐Ÿšซ

If a router can't forward a packet because it has no routes at all to the destination network in the packet, then the router MUST generate a Destination Unreachable, Code 0 (Network Unreachable) ICMP message ๐Ÿฅ€. If the router does have routes to that destination network but the TOS on those routes is neither the default TOS (0000) nor the TOS of the packet the router is trying to route, then the router MUST generate a Destination Unreachable, Code 11 (Network Unreachable for TOS) ICMP message ๐Ÿ’….

If a packet is headed to a host on a network that's directly connected to the router (so the router is the last-hop router), and the router has figured out there's no path to that host, then the router MUST generate a Destination Unreachable, Code 1 (Host Unreachable) ICMP message ๐Ÿ˜ญ. If a packet is headed to a host on a directly connected network, and the router can't forward it because no route to the destination has a TOS that's either equal to the TOS requested in the packet or the default TOS (0000), then the router MUST generate a Destination Unreachable, Code 12 (Host Unreachable for TOS) ICMP message ๐ŸŒˆ.

DISCUSSION: The point is that a router generates the "generic" host/network unreachable if it has no path at all (including default routes) to the destination โœจ. If the router has one or more paths to the destination but none of them have an acceptable TOS, then it generates the "unreachable for TOS" message ๐ŸŽ€.

4.3.3.2 Redirect ๐Ÿฆ‹

The ICMP Redirect message gets generated to tell a host on the same subnet that the router it's using for certain packets should be changed ๐Ÿงญ.

Contrary to section 3.2.2.2 of [INTRO:2], a router MAY ignore ICMP Redirects when choosing a path for a packet the router originated, if the router is running a routing protocol or if forwarding is enabled on the router and on the interface the packet is sent over ๐Ÿ™ƒ.

4.3.3.3 Source Quench ๐Ÿซง

A router SHOULD NOT originate ICMP Source Quench messages ๐Ÿšซ. As specified in Section [4.3.2], a router that does originate Source Quench messages MUST be able to limit how fast they're generated ๐ŸŒ.

DISCUSSION: Research seems to suggest that Source Quench eats up network bandwidth but is an ineffective (and unfair) fix for congestion ๐Ÿ˜ฌ. See, for example, [INTERNET:9] and [INTERNET:10]. Section [5.3.6] talks about the current thinking on how routers ought to deal with overload and network congestion ๐Ÿง .

A router MAY ignore any ICMP Source Quench messages it receives ๐Ÿ’œ.

DISCUSSION: A router itself might get a Source Quench because it originated a packet sent to another router or host ๐Ÿคทโ€โ™€๏ธ. Those datagrams could be, for example, an EGP update sent to another router, or a telnet stream sent to a host ๐Ÿ“ก. A mechanism has been proposed ([INTERNET:11], [INTERNET:12]) to make the IP layer respond directly to Source Quench by controlling how fast packets get sent ๐ŸŽข. However, this proposal is currently experimental and not currently recommended ๐Ÿงช.

4.3.3.4 Time Exceeded โฐ

When a router is forwarding a packet and the TTL field of the packet gets reduced to 0, the requirements of section [5.2.3.8] apply ๐Ÿ•ฐ๏ธ.

When the router is reassembling a packet that's destined for the router, it MUST fulfill requirements of [INTRO:2], section [3.3.2] apply ๐Ÿงฉ.

When the router receives a Time Exceeded message (i.e., one destined for the router), it MUST comply with section 3.2.2.4 of [INTRO:2] ๐Ÿ’Œ.

4.3.3.5 Parameter Problem ๐Ÿ› ๏ธ

A router MUST generate a Parameter Problem message for any error that isn't specifically covered by another ICMP message ๐Ÿšจ. The IP header field or IP option that includes the byte indicated by the pointer field MUST be included unchanged in the IP header returned with this ICMP message ๐Ÿ”. Section [4.3.2] defines an exception to this requirement ๐Ÿซถ.

A new variant of the Parameter Problem message was defined in [INTRO:2]:

     Code 1 = required option is missing.

DISCUSSION: This variant is currently in use in the military community for a missing security option ๐Ÿช–.

4.3.3.6. Echo Request/Reply โœจ

Okay bestie, a router MUST implement an ICMP Echo server function that receives Echo Requests and sends back matching Echo Replies ๐Ÿ“. A router MUST also be ready to receive, reassemble and echo an ICMP Echo Request datagram that's at least as big as the maximum of 576 and the MTUs of all the connected networks ๐Ÿ“ฆ.

The Echo server function MAY choose not to respond to ICMP echo requests sent to IP broadcast or IP multicast addresses ๐Ÿ™ˆ.

A router SHOULD have a configuration option that, when enabled, makes it silently ignore all ICMP echo requests ๐Ÿคซ. If that option is provided, it MUST default to allowing responses ๐Ÿ’–.

DISCUSSION: The neutral wording about responding to broadcast and multicast Echo Requests comes from the conclusions reached in section [3.2.2.6] of [INTRO:2] ๐Ÿง .

As stated in Section [10.3.3], a router MUST also implement a user/application-layer interface for sending an Echo Request and receiving an Echo Reply, for diagnostic purposes ๐Ÿ”. All ICMP Echo Reply messages MUST be passed to this interface.

The IP source address in an ICMP Echo Reply MUST be the same as the specific-destination address of the corresponding ICMP Echo Request message ๐ŸŽฏ.

Data received in an ICMP Echo Request MUST be entirely included in the resulting Echo Reply ๐Ÿซถ.

If a Record Route and/or Timestamp option is received in an ICMP Echo Request, this option (these options) SHOULD be updated to include the current router and included in the IP header of the Echo Reply message, without truncation. Thus, the recorded route will be for the entire round trip ๐Ÿ—บ๏ธโœจ.

If a Source Route option is received in an ICMP Echo Request, the return route MUST be reversed and used as a Source Route option for the Echo Reply message ๐Ÿ”.

4.3.3.7. Information Request/Reply ๐Ÿ™ƒ

A router SHOULD NOT originate or respond to these messages.

DISCUSSION: The Information Request/Reply pair was meant for self-configuring systems like diskless workstations, so they could find out their IP network numbers at boot time ๐Ÿ’ป. These messages are obsolete now, though ๐Ÿ’€. The RARP and BOOTP protocols give hosts better ways to discover their own IP address ๐ŸŒธ.

4.3.3.8. Timestamp and Timestamp Reply โฐ

A router MAY implement Timestamp and Timestamp Reply. If they are implemented, then:

  • The ICMP Timestamp server function MUST return a Timestamp Reply to every Timestamp message that is received. It SHOULD be designed for minimum variability in delay.
  • An ICMP Timestamp Request message to an IP broadcast or IP multicast address MAY be silently discarded.
  • The IP source address in an ICMP Timestamp Reply MUST be the same as the specific-destination address of the corresponding Timestamp Request message.
  • If a Source Route option is received in an ICMP Timestamp Request, the return route MUST be reversed and used as a Source Route option for the Timestamp Reply message.
  • If a Record Route and/or Timestamp option is received in a Timestamp Request, this (these) option(s) SHOULD be updated to include the current router and included in the IP header of the Timestamp Reply message.
  • If the router provides an application-layer interface for sending Timestamp Request messages, then incoming Timestamp Reply messages MUST be passed up to the ICMP user interface.

The preferred form for a timestamp value (the standard value) is milliseconds since midnight, Universal Time ๐Ÿ•›. However, it may be hard to give this value with millisecond resolution. For example, many systems use clocks that only update at line frequency, 50 or 60 times per second ๐Ÿข. So some latitude is allowed in a standard value:

  • (a) A standard value MUST be updated at least 16 times per second (i.e., at most the six low-order bits of the value may be undefined).
  • (b) The accuracy of a standard value MUST approximate that of operator-set CPU clocks, i.e., correct within a few minutes.

IMPLEMENTATION: To meet the second condition, a router may need to query some time server when it is booted or restarted. It is recommended that the UDP Time Server Protocol be used for this purpose ๐Ÿ› ๏ธ. A more advanced implementation would use the Network Time Protocol (NTP) to get nearly millisecond clock synchronization ๐Ÿค“. However, this is not required.

4.3.3.9. Address Mask Request/Reply ๐ŸŽญ

A router MUST implement support for receiving ICMP Address Mask Request messages and responding with ICMP Address Mask Reply messages. These messages are defined in [INTERNET:2].

A router SHOULD have a configuration option for each logical interface, specifying whether the router is allowed to answer Address Mask Requests for that interface. This option MUST default to allowing responses. A router MUST NOT respond to an Address Mask Request before the router knows the correct subnet mask ๐Ÿšซ.

A router MUST NOT respond to an Address Mask Request which has a source address of 0.0.0.0 and which arrives on a physical interface that has multiple logical interfaces associated with it, if the subnet masks for those interfaces are not all the same ๐Ÿ™….

A router SHOULD examine all ICMP Address Mask Replies it receives to see whether the information in them matches the router's knowledge of the subnet mask. If an ICMP Address Mask Reply appears to be in error, the router SHOULD log the subnet mask and the sender's IP address ๐Ÿ“. A router MUST NOT use the contents of an ICMP Address Mask Reply to determine the correct subnet mask.

Hosts may not be able to learn the subnet mask if a router is down when they boot up, so a router MAY broadcast a gratuitous ICMP Address Mask Reply on each of its logical interfaces after it has configured its own subnet masks ๐Ÿ“ก. However, this feature can be dangerous in environments that use variable length subnet masks ๐Ÿ˜ฌ. So, if this feature is implemented, gratuitous Address Mask Replies MUST NOT be broadcast over any logical interface(s) which either:

  • Are not configured to send gratuitous Address Mask Replies. Each logical interface MUST have a configuration parameter controlling this, and that parameter MUST default to not sending the gratuitous Address Mask Replies.
  • Share the same IP network number and physical interface but have different subnet masks.

The { <Network-number>, -1, -1 } form (on subnetted networks) or the { <Network-number>, -1 } form (on non-subnetted networks) of the IP broadcast address MUST be used for broadcast Address Mask Replies ๐Ÿ“ฃ.

DISCUSSION: Being able to turn off Address Mask Replies is needed at a few sites that intentionally lie to their hosts about the subnet mask ๐Ÿคฅ. This need is expected to go away as more and more hosts comply with the Host Requirements standards โœจ. The second bullet above, and the rule about which IP broadcast address to use, are there to prevent problems when multiple IP networks or subnets are in use on the same physical network ๐Ÿงฉ.

4.3.3.10. Router Advertisement and Solicitations ๐Ÿ“ข

An IP router MUST support the router part of the ICMP Router Discovery Protocol [INTERNET:13] on all connected networks where the router supports either IP multicast or IP broadcast addressing. The implementation MUST include all of the configuration variables specified for routers, with the specified defaults โš™๏ธ.

DISCUSSION: Routers don't have to implement the host part of the ICMP Router Discovery Protocol, but it might be handy for running while IP forwarding is disabled (i.e., when operating as a host) ๐Ÿ–ฅ๏ธ.

DISCUSSION: It's pretty common for hosts to use RIP as their router discovery protocol ๐Ÿ‘€. Those hosts listen to RIP traffic and use the information they pull from it to find routers and decide which router to use as the first-hop router for a given destination. This behavior is discouraged, but it's still common, so implementors should know about it ๐Ÿ’….

4.4. INTERNET GROUP MANAGEMENT PROTOCOL - IGMP ๐ŸŒˆ

IGMP [INTERNET:4] is a protocol used between hosts and multicast routers on a single physical network to establish hosts' membership in particular multicast groups ๐Ÿชช. Multicast routers use this information, together with a multicast routing protocol, to support IP multicast forwarding across the Internet ๐ŸŒ.

A router SHOULD implement the host part of IGMP.

5. INTERNET LAYER - FORWARDING ๐Ÿš€

5.1. INTRODUCTION

This section describes the process of forwarding packets ๐Ÿ“ฌ.

5.2. FORWARDING WALK-THROUGH ๐Ÿงญ

There is no separate specification of the forwarding function in IP. Instead, forwarding is covered by the protocol specifications for the internet layer protocols ([INTERNET:1], [INTERNET:2], [INTERNET:3], [INTERNET:8], and [ROUTE:11]) ๐Ÿ’–.

5.2.1. Forwarding Algorithm โœจ

okay bestie, so none of the main protocol docs really spell out the forwarding algorithm ๐Ÿ˜ญ so we're doing it here ๐Ÿ’… this is just a general outline, and it skips the juicy details like congestion handling, which get covered in later sections ๐ŸŒธ

it is not required that an implementation follow sections [5.2.1.1], [5.2.1.2], and [5.2.1.3] exactly ๐Ÿซถ the real challenge of router software is making packets fly out as fast as possible while still getting the same result as the algorithm ๐Ÿ”ฅ how to do that is out of scope here, partly because it depends a lot on the router's architecture ๐Ÿงš so instead we're just pointing out the order dependencies between the steps ๐Ÿ‘‘

(1) A router MUST verify the IP header, as described in section [5.2.2], before doing anything based on what's in the header ๐Ÿ’– this lets the router spot and toss out bad packets before it wastes any other resources ๐Ÿ—‘๏ธ

(2) Some IP options need the router to stick its own IP address into the option ๐ŸŽ€ As noted in Section [5.2.4], the address inserted MUST be the address of the logical interface the packet goes out on, or the router's router-id if the packet goes out an unnumbered interface ๐Ÿฆ‹ which means these options can't be finished until after the output interface is picked ๐Ÿ’…

(3) The router can't check and decrement the TTL before checking whether the packet is meant for the router itself ๐Ÿ™ˆ the reasons are in Section [4.2.2.9] ๐ŸŒˆ

(4) More generally, when a packet gets delivered locally to the router, its IP header MUST NOT be modified in any way ๐Ÿ˜ญ the one exception is that a router may be required to put a timestamp into any Timestamp options in the IP header ๐Ÿ“ so before the router decides whether a packet is for itself, it can't change the IP header in any way it isn't ready to undo โœจ

5.2.1.1. General

this section covers the general forwarding algorithm ๐Ÿ’œ it applies to every kind of packet being forwarded: unicast, multicast, and broadcast ๐ŸŒˆ

(1) The router receives the IP packet (plus extra info about it, as described in Section [3.1]) from the Link Layer ๐Ÿ“ฅ

(2) The router validates the IP header, as described in Section [5.2.2] ๐Ÿ” Note that IP reassembly is not done here, except on IP fragments that are going to be queued for local delivery in step (4) ๐Ÿงฉ

(3) The router does most of the processing for any IP options ๐Ÿ› ๏ธ As described in Section [5.2.4], some IP options need extra processing after the routing decision has been made โณ

(4) The router looks at the destination IP address of the datagram, as described in Section [5.2.3], to figure out how to keep processing it ๐Ÿ•ต๏ธโ€โ™€๏ธ There are three possibilities:

  • The IP datagram is destined for the router, and should be queued for local delivery, doing reassembly if needed. ๐Ÿ 
  • The IP datagram is not destined for the router, and should be queued for forwarding. ๐Ÿš€
  • The IP datagram should be queued for forwarding, but (a copy) must also be queued for local delivery. ๐Ÿ‘ฏโ€โ™€๏ธ

5.2.1.2. Unicast

the local delivery case is already well covered by [INTRO:2], so from here on we're assuming the IP datagram was queued for forwarding ๐Ÿ’… if the destination is an IP unicast address:

(5) The forwarder works out the next hop IP address for the packet, usually by looking up the packet's destination in the router's routing table ๐Ÿ—บ๏ธ This procedure is described in more detail in Section [5.2.4] ๐Ÿ“– It also decides which network interface should be used to send the packet ๐Ÿ”Œ

(6) The forwarder checks that forwarding the packet is permitted ๐Ÿ›‚ The source and destination addresses should be valid, as described in Section [5.3.7] and Section [5.3.4] ๐Ÿ’ฏ If the router supports administrative constraints on forwarding, like the ones described in Section [5.3.9], those constraints must be satisfied ๐Ÿ™…โ€โ™€๏ธ

(7) The forwarder decrements the packet's TTL by at least one, and checks it, as described in Section [5.3.1] โฑ๏ธ

(8) The forwarder does any IP option processing that couldn't be finished in step 3 ๐Ÿงต

(9) The forwarder does any necessary IP fragmentation, as described in Section [4.2.2.7] โœ‚๏ธ Since this step happens after outbound interface selection (step 5), all fragments of the same datagram will go out the same interface ๐Ÿฆ‹

(10) The forwarder figures out the Link Layer address of the packet's next hop ๐Ÿ”— The mechanisms for this depend on the Link Layer (see chapter 3) ๐ŸŒธ

(11) The forwarder wraps the IP datagram (or each of its fragments) in an appropriate Link Layer frame and queues it for output on the interface picked in step 5 ๐ŸŽ

(12) The forwarder sends an ICMP redirect if necessary, as described in Section [4.3.3.2] ๐Ÿ“ฃ

5.2.1.3. Multicast

if the destination is an IP multicast, these steps happen instead ๐ŸŒŸ

note that the main differences between forwarding IP unicasts and forwarding IP multicasts are:

  • IP multicasts are usually forwarded based on both the datagram's source and destination IP addresses, ๐Ÿ‘€
  • IP multicast uses an expanding ring search, ๐Ÿ’
  • IP multicasts are forwarded as Link Level multicasts, and ๐Ÿ“ก
  • ICMP errors are never sent in response to IP multicast datagrams. ๐Ÿ™Š

note that forwarding IP multicasts is still somewhat experimental ๐Ÿงช so the algorithm below is not mandatory, and it's only given as an example ๐Ÿซถ

(5a) Based on the IP source and destination addresses in the datagram header, the router figures out whether the datagram came in on the proper interface for forwarding ๐Ÿ•ต๏ธโ€โ™€๏ธ If it didn't, the datagram is dropped silently ๐Ÿคซ How to determine the proper receiving interface depends on the multicast routing algorithm(s) in use ๐Ÿง  In one of the simplest algorithms, reverse path forwarding (RPF), the proper interface is the one that would be used to forward unicasts back to the datagram source ๐Ÿ”™

(6a) Based on the IP source and destination addresses in the datagram header, the router determines the datagram's outgoing interfaces ๐Ÿ“ To implement IP multicast's expanding ring search (see [INTERNET:4]), a minimum TTL value is specified for each outgoing interface ๐ŸŽฏ A copy of the multicast datagram is forwarded out each outgoing interface whose minimum TTL value is less than or equal to the TTL value in the datagram header, with the remaining steps applied separately on each such interface ๐Ÿชž

(7a) The router decrements the packet's TTL by one โฌ

(8a) The forwarder does any IP option processing that couldn't be finished in step (3) ๐Ÿงถ

(9a) The forwarder does any necessary IP fragmentation, as described in Section [4.2.2.7] โœ‚๏ธ

(10a) The forwarder figures out the Link Layer address to use in the Link Level encapsulation ๐Ÿ”— The mechanisms for this depend on the Link Layer ๐ŸŒˆ On LANs, a Link Level multicast or broadcast is selected, as an algorithmic translation of the datagram's class D destination address ๐Ÿงฎ See the various IP-over-xxx specifications for more details ๐Ÿ“š

(11a) The forwarder wraps the packet (or each of its fragments) in an appropriate Link Layer frame and queues it for output on the appropriate interface ๐ŸŽ€

5.2.2. IP Header Validation โœจ

okay so before a router can even think about touching an IP packet, it MUST do a few basic validity checks on the IP header ๐Ÿซถ the point is making sure the header is actually meaningful. if the packet fails any of these tests, it MUST be silently discarded, and the error SHOULD be logged ๐Ÿ’€

  1. the packet length reported by the Link Layer must be large enough to hold the minimum legal IP datagram (20 bytes) ๐Ÿ“
  2. the IP checksum must be correct โœ…
  3. the IP version number must be 4 ๐Ÿ’œ if it's not 4, the packet may well be another version of IP, like ST-II ๐Ÿฆ‹
  4. the IP header length field must be at least 5 โœจ
  5. the IP total length field must be at least 4 * IP header length field ๐Ÿ”ฅ
a router MUST NOT have a configuration option that lets you disable any of these tests. no skipping the vibe check, bestie ๐Ÿ™…โ€โ™€๏ธ

now, if the packet passes the second and third tests, the IP header length field is at least 4, AND both the IP total length field and the packet length reported by the Link Layer are at least 16, then the router MAY respond with an ICMP Parameter Problem message ๐ŸŽ€ even though the rule above says discard, this little exception is allowed. the pointer would point at the IP header length field (if it failed the fourth test) or the IP total length field (if it failed the fifth test). BUT it still MUST discard the packet, and it still SHOULD log the error ๐Ÿ’…

these rules (and this entire document) only apply to version 4 of the Internet Protocol ๐ŸŒธ that does NOT mean routers aren't allowed to support other versions of IP, so chill. and if a router can truly tell that a packet is some other version of IP, then it ought not treat that packet as an error packet in the context of this memo ๐Ÿงš

IMPLEMENTATION:

it's desirable (for error reporting, though not always totally possible) to figure out why a header was invalid ๐Ÿ” there are four possible reasons:

  • the Link Layer truncated the IP header
  • the datagram is using a version of IP other than the standard one (version 4)
  • the IP header has been corrupted in transit
  • the sender generated an illegal IP header

it's probably best to run the checks in the order listed, because we believe this order is most likely to correctly categorize the cause of the error ๐Ÿง  also, for error reporting, it may be useful to check whether a failing packet has an IP version number equal to 6. if it does, the packet is probably an ST-II datagram and should be treated as one ๐Ÿ’– ST-II is described in [FORWARD:1].

ALSO, the router SHOULD verify that the packet length reported by the Link Layer is at least as large as the IP total length recorded in the packet's IP header ๐Ÿ‘€ if it looks like the packet was truncated, the packet MUST be discarded, the error SHOULD be logged, and the router SHOULD respond with an ICMP Parameter Problem message whose pointer points at the IP total length field ๐Ÿ˜ญ

DISCUSSION:

any higher layer protocol that cares about data corruption will catch truncation once the packet reaches its final destination ๐Ÿซ  so routers don't strictly need this check to keep protocol correctness. BUT doing it lets the router make it way easier to figure out which hop in the path is truncating packets โœจ it also saves resources downstream, because the downstream systems won't have to deal with the packet at all ๐ŸŒˆ

finally, if the destination address in the IP header is NOT one of the router's own addresses, the router SHOULD verify that the packet does not contain a Strict Source and Record Route option ๐Ÿงšโ€โ™€๏ธ if a packet fails this test, the router SHOULD log the error and SHOULD respond with an ICMP Parameter Problem error, with the pointer pointing at the offending packet's IP destination address ๐Ÿ™ˆ

DISCUSSION:

some people might say the router should send a Bad Source Route message instead of a Parameter Problem message ๐Ÿค” but when a packet fails this test, it usually means the previous hop router made a protocol error. Bad Source Route would instead suggest that the source host asked for a nonexistent or broken path through the network. so it's not the sender's fault, it's the hop before us ๐Ÿซฃ


5.2.3. Local Delivery Decision ๐Ÿฆ‹

okay this one is giving decision time ๐Ÿ‘‘ when a router gets an IP packet, it has to figure out whether the packet is addressed to the router (so it should be delivered locally), or addressed to some other system (so it should be handled by the forwarder). there's also a hybrid case, where certain IP broadcasts and IP multicasts get delivered locally AND forwarded ๐Ÿ”ฅ a router MUST determine which of these three cases applies using the following rules:

  • an unexpired source route option is one whose pointer value does not point past the last entry in the source route. if the packet has an unexpired source route option, the pointer in the option gets advanced until either the pointer points past the last address in the option, or the next address is not one of the router's own addresses. in that latter (normal) case, the packet is forwarded (and NOT delivered locally), regardless of the rules below ๐Ÿ’…
  • the packet is delivered locally and not considered for forwarding in these cases:
    • the packet's destination address exactly matches one of the router's IP addresses,
    • the packet's destination address is a limited broadcast address ({-1, -1}), and
    • the packet's destination is an IP multicast address that is limited to a single subnet (like 224.0.0.1 or 224.0.0.2) AND (at least) one of the logical interfaces associated with the physical interface the packet arrived on is a member of the destination multicast group ๐ŸŒธ
  • the packet is passed to the forwarder AND delivered locally in these cases:
    • the packet's destination address is an IP broadcast address that addresses at least one of the router's logical interfaces, but does NOT address any of the logical interfaces associated with the physical interface the packet arrived on
    • the packet's destination is an IP multicast address that is NOT limited to a single subnetwork (like 224.0.0.1 and 224.0.0.2 are), AND (at least) one of the logical interfaces associated with the physical interface the packet arrived on is a member of the destination multicast group ๐ŸŽ€
  • the packet is delivered locally if its destination address is an IP broadcast address (other than a limited broadcast address) that addresses at least one of the logical interfaces associated with the physical interface the packet arrived on. the packet is ALSO passed to the forwarder UNLESS the link it arrived on uses an IP encapsulation that doesn't encapsulate broadcasts differently than unicasts (e.g. by using different Link Layer destination addresses) ๐Ÿงš
  • the packet is passed to the forwarder in all other cases ๐Ÿ“

DISCUSSION:

the reason for the requirement in the last sentence of the fourth bullet is to handle a directed broadcast to another net or subnet on the same physical cable ๐Ÿซถ normally this works as expected: the sender sends the broadcast to the router as a Link Layer unicast. the router notices it arrived as a unicast, so it must be destined for a different logical net (or subnet) than the one the sender sent it on. so the router can safely send it out as a Link Layer broadcast over the same physical interface it arrived on ๐Ÿ’– BUT if the router can't tell whether the packet was received as a Link Layer unicast, that sentence makes sure the router does the safe but wrong thing instead of the unsafe but right thing ๐Ÿ˜ญ

IMPLEMENTATION:

as described in Section [5.3.4], packets received as Link Layer broadcasts are generally not forwarded ๐Ÿ™ƒ so it may be a good idea to avoid passing packets to the forwarder if it would just discard them later because of the rules in that section.

some Link Layers (because of the hardware, or special code in the drivers) can deliver to the router copies of all the Link Layer broadcasts and multicasts it transmits ๐Ÿชž using this feature can simplify the implementation of cases where a packet has to be passed to the forwarder AND delivered locally, since forwarding the packet automatically makes the router receive a copy it can deliver locally. just be careful here, so that you don't treat a received loop-back packet as a normal received packet (and then apply the forwarding rules to it, etc etc) ๐ŸŒ€

even without such a Link Layer, it's obviously not necessary to copy an entire packet just to queue it for both forwarding and local delivery ๐Ÿง BUT you have to take care with fragments, since reassembly is performed on locally delivered packets and NOT on forwarded packets ๐Ÿงฉ one simple scheme is to attach a flag to each packet on the router's output queue, indicating whether it should be queued for local delivery after it's sent ๐Ÿ’œ


5.2.4. Determining the Next Hop Address ๐Ÿ—บ๏ธ

when a router is going to forward a packet, it has to figure out whether it can send it directly to its destination, or whether it needs to pass it through another router ๐Ÿšฆ and if it needs another router, it has to figure out which one. this section explains how those decisions get made ๐Ÿ’…

this section uses the following definitions:

  • LSRR - IP Loose Source and Record Route option
  • SSRR - IP Strict Source and Record Route option
  • Source Route Option - an LSRR or an SSRR
  • Ultimate Destination Address - where the packet is being sent to: the last address in the source route of a source-routed packet, or the destination address in the IP header of a non-source-routed packet โœจ
  • Adjacent - reachable without going through any IP routers ๐Ÿซถ
  • Next Hop Address - the IP address of the adjacent host or router the packet should be sent to next ๐Ÿฆ‹
  • Immediate Destination Address - the ultimate destination address, EXCEPT in source routed packets, where it's the next address specified in the source route ๐ŸŽ€
  • Immediate Destination - the node, system, router, end-system, or whatever is addressed by the Immediate Destination Address ๐ŸŒˆ

5.2.4.1 Immediate Destination Address โœจ

okay so bestie, this is where the router figures out who the packet is actually handing off to right now ๐Ÿซถ If the destination address in the IP header is one of the router's own addresses AND the packet has a Source Route Option, the Immediate Destination Address is whatever address the pointer in that option is pointing at, as long as the pointer hasn't gone past the end of the option ๐Ÿงš Otherwise, the Immediate Destination Address is just the same as the IP destination address in the IP header. Simple, but so important ๐Ÿ’…

A router MUST use the Immediate Destination Address, not the Ultimate Destination Address, when it's deciding how to handle a packet. The Ultimate one is the final stop, but the router is only looking at the very next hop, so it's giving "focus on the next step only" ๐Ÿฆ‹

It is an error for more than one source route option to appear in a datagram ๐Ÿ’€ If a router gets one anyway, it SHOULD discard the packet and reply with an ICMP Parameter Problem message whose pointer points at the beginning of the second source route option. Two source route options in one datagram is just not it ๐Ÿ™ˆ

5.2.4.2 Local/Remote Decision ๐ŸŒธ

Once the packet has been figured out to need forwarding (per the rules in Section [5.2.3]), the router MUST use the following algorithm to work out whether the Immediate Destination is directly accessible (see [INTERNET:2]). This is the "can I just hand it over myself, or do I need a middleman?" check ๐Ÿ‘‘

(1) For each network interface that has not been assigned any IP address (the unnumbered lines as described in Section [2.2.7]), compare the router-id of the other end of the line to the Immediate Destination Address. If they are exactly equal, the packet can be transmitted through this interface. ๐ŸŽ€

DISCUSSION: In other words, the router or host at the remote end of the line is the destination of the packet, or it's the next step in the source route of a source routed packet. Lowkey the cleanest match there is โœจ

(2) If no network interface has been selected in the first step, then for each IP address assigned to the router:

(a) Apply the subnet mask associated with the address to this IP address.

IMPLEMENTATION: The result of this operation will usually have been computed and saved during initialization. So it's basically prepped and ready to go ๐Ÿ“

(b) Apply the same subnet mask to the Immediate Destination Address of the packet.

(c) Compare the resulting values. If they are equal to each other, the packet can be transmitted through the corresponding network interface. ๐Ÿ’–

(3) If an interface has still not been selected, the Immediate Destination is accessible only through some other router. The selection of the router and the next hop IP address is described in Section [5.2.4.3]. So it's a detour, not a dead end ๐ŸŒˆ

5.2.4.3. Next Hop Address โœจ

EDITOR'S COMMENTS: okay bestie, this section got a major glow-up ๐Ÿ’… The original doc said Phil Almquist wanted to revise it to match his "Ruminations on the Next Hop" doc. The editor assumes the working group mostly agreed, since there's a note from Phil still sitting in here saying so, and the RoNH doc has a "mandatory RRWG algorithm" ๐Ÿซถ So I borrowed that algorithm from RoNH and dropped it right here. The other useful and interesting bits from RoNH got moved into an appendix of this note ๐ŸŽ€

The router applies the algorithm in the previous section to figure out if the Immediate Destination Address is adjacent ๐Ÿงš If it is, the next hop address is the same as the Immediate Destination Address. Otherwise, the packet has to be forwarded through another router to reach its Immediate Destination. Picking that router is what this section is all about ๐Ÿ’–

If the packet contains an SSRR, the router MUST discard the packet and reply with an ICMP Bad Source Route error ๐Ÿ™ˆ Otherwise, the router looks up the Immediate Destination Address in its routing table to find an appropriate next hop address.

DISCUSSION: ngl this one makes sense once you think about it ๐Ÿค“ Per the IP spec, a Strict Source Route has to list a sequence of nodes the packet must go through, and the packet has to go from one node in the source route to the next, only crossing intermediate networks. So if the router isn't adjacent to the next step of the source route, the source route just can't be fulfilled ๐Ÿ’€ That's why it gets the ICMP Bad Source Route error.

The goal of next-hop selection is to look through the router's Forwarding Information Base (FIB) and pick the best route (if there is one) for the packet from what's available there โœจ

Conceptually, any route lookup starts with a set of candidate routes, which is the entire contents of the FIB ๐Ÿ“ The algorithm is a series of steps that kick routes out of the set. These steps are called Pruning Rules. Usually, by the time the algorithm finishes, exactly one route is left in the set ๐Ÿ‘‘ If the set ever becomes empty, the packet gets discarded because the destination is unreachable. It's also possible to finish with more than one route still in the set. In that case, the router can arbitrarily toss all but one of them, or do "load-splitting" by picking whichever route was least recently used ๐Ÿฆ‹

With the exception of rule 3 (Weak TOS), a router MUST use the following Pruning Rules when selecting a next hop for a packet. If a router does consider TOS when making next-hop decisions, the Rule 3 must be applied in the order indicated below. These rules MUST be (conceptually) applied to the FIB in the order that they are presented. (For some historical tea, additional pruning rules and other common algorithms in use are in Appendix E ๐Ÿ“œ)

DISCUSSION: Rule 3 is optional, because Section [5.3.2] says that a router only SHOULD consider TOS when making forwarding decisions ๐ŸŒˆ

(1) Basic Match ๐Ÿ’… This rule throws out any routes to destinations other than the Immediate Destination Address of the packet. For example, if a packet's Immediate Destination Address is 36.144.2.5, this step would discard a route to net 128.12.0.0, but would keep any routes to net 36.0.0.0, any routes to subnet 36.144.0.0, and any default routes.

More precisely, each route has a destination attribute called route.dest and a matching mask called route.mask that says which bits of route.dest count. The Immediate Destination Address of the packet being forwarded is ip.dest. This rule discards every route from the candidate set EXCEPT the ones where (route.dest & route.mask) = (ip.dest & route.mask) ๐ŸŽ€

(2) Longest Match ๐Ÿ”ฅ Longest Match is a refinement of Basic Match, described above. After Basic Match pruning is done, the remaining routes get checked for the maximum number of bits set in any of their route.mask attributes. This step then discards any routes from the candidate set that have fewer than that maximum number of bits set in their route.mask attributes.

For example, say a packet's Immediate Destination Address is 36.144.2.5, and we have these {route.dest, route.mask} pairs:

{36.144.2.0, 255.255.255.0}
{36.144.0.5, 255.255.0.255}
{36.144.0.0, 255.255.0.0}
{36.0.0.0, 255.0.0.0}

Then this rule keeps only the first two pairs: {36.144.2.0, 255.255.255.0} and {36.144.0.5, 255.255.0.255} ๐Ÿฆ‹

(3) Weak TOS ๐ŸŒธ Each route has a type of service attribute called route.tos, whose possible values are assumed to be the same ones used in the TOS field of the IP header. Routing protocols that distribute TOS information fill in route.tos appropriately for routes they add to the FIB. Routes from other routing protocols are treated as if they have the default TOS (0000). The TOS field in the IP header of the packet being routed is called ip.tos.

The candidate set gets checked for any routes where route.tos = ip.tos. If there are some, every route except those with route.tos = ip.tos gets discarded. If there aren't, every route except those with route.tos = 0000 gets discarded from the candidate set ๐Ÿงš

More on routing based on Weak TOS can be found in [ROUTE:11] ๐Ÿ“š

DISCUSSION: This rule basically only keeps routes whose TOS matches the TOS the packet asked for ๐Ÿ’– If no such routes exist, then routes with the default TOS get considered. Routes with a non-default TOS that isn't the one requested in the packet are never used, even if they're the only routes that go to the packet's destination. Not iconic for those routes, honestly ๐Ÿ˜ญ

(4) Best Metric ๐Ÿ‘‘ Each route has a metric attribute called route.metric and a routing domain identifier called route.domain. Every member of the candidate set gets compared with every other member. If route.domain is equal for the two routes and route.metric is strictly inferior for one compared with the other, then the one with the inferior metric gets discarded from the set. Usually "inferior" is decided by a simple arithmetic comparison, though some protocols have structured metrics that need more complex comparisons โœจ

(5) Vendor Policy ๐Ÿ’… Vendor Policy is basically a catch-all, since the rules listed above are often not enough to choose between the possible routes ๐ŸŒˆ Vendor Policy pruning rules are super vendor-specific. See section [5.2.4.4] ๐Ÿซถ

This algorithm has two distinct disadvantages. A router implementor might come up with techniques to handle these and make them part of the Vendor Policy pruning rule, so there's hope ๐Ÿ™

  1. IS-IS and OSPF route classes are not directly handled.
  2. Path properties other than type of service (e.g. MTU) are ignored.

It's also worth noting a deficiency in how TOS is supported: routing protocols that support TOS are implicitly preferred when forwarding packets with non-zero TOS values ๐Ÿ™ˆ

The Basic Match and Longest Match pruning rules generalize the treatment of a bunch of specific route types. These routes get selected in the following decreasing order of preference ๐Ÿ‘‘

  1. Host Route: a route to a specific end system.
  2. Subnetwork Route: a route to a particular subnet of a network.
  3. Default Subnetwork Route: a route to all subnets of a particular net for which there are no (explicit) subnet routes.
  4. Network Route: a route to a particular network.
  5. Default Network Route (also known as the default route): a route to all networks for which there are no explicit routes to the net or any of its subnets.

If, after the pruning rules are applied, the set of routes is empty (meaning no routes were found), the packet MUST be discarded and an appropriate ICMP error generated (ICMP Bad Source Route if the Immediate Destination Address came from a source route option; otherwise, whichever of ICMP Destination Host Unreachable or Destination Network Unreachable is appropriate, as described in Section [4.3.3.1]) ๐Ÿ’€๐Ÿฆ‹

5.2.4.4 Administrative Preference โœจ

Okay so one suggested mechanism for the Vendor Policy Pruning Rule is to use administrative preference ๐Ÿ’…

Each route gets a preference value based on various attributes of the route (specific ways to assign these values are suggested below). This preference value is an integer in the range [0..255], where zero is the most preferred and 254 is the least preferred. 255 is a special value that means the route should never be used ๐Ÿ’€. The first step in the Vendor Policy pruning rule throws out all but the most preferable routes, and it always throws out routes whose preference value is 255 ๐Ÿ—‘๏ธ.

Bestie, this policy is not safe, because it can easily be misused to create routing loops ๐Ÿ˜ญ. No protocol makes sure the preferences on a router match the preferences on its neighbors, so network managers have to be extra careful when they configure preferences ๐Ÿซถ.

  • Address Match: It is useful to be able to give a single preference value to all routes (learned from the same routing domain) going to any of a specified set of destinations. That set is every destination that matches a specified address/mask pair ๐ŸŽ€.
  • Route Class: For routing protocols that keep track of route class, it is useful to give a single preference value to all routes (learned from the same routing domain) that have a particular route class. The classes are intra-area, inter-area, external with internal metrics, or external with external metrics ๐Ÿฆ‹.
  • Interface: It is useful to give a single preference value to all routes (learned from a particular routing domain) that would cause packets to be routed out a particular logical interface on the router. Logical interfaces generally map one-to-one onto the router's network interfaces, except that any network interface with multiple IP addresses will have multiple logical interfaces associated with it ๐Ÿงš.
  • Source router: It is useful to give a single preference value to all routes (learned from the same routing domain) that were learned from any router in a set of routers. That set is every router whose updates have a source address that matches a specified address/mask pair ๐ŸŒธ.
  • Originating AS: For routing protocols that provide this information, it is useful to give a single preference value to all routes (learned from a particular routing domain) that originated in another particular routing domain. For BGP routes, the originating AS is the first AS listed in the route's AS_PATH attribute. For OSPF external routes, the originating AS may be considered to be the low order 16 bits of the route's external route tag, if the tag's Automatic bit is set and the tag's PathLength is not equal to 3 ๐Ÿ‘‘.
  • External route tag: It is useful to give a single preference value to all OSPF external routes (learned from the same routing domain) whose external route tags match any value in a list of specified values. Because the external route tag may contain a structured value, it may be useful to be able to match particular subfields of the tag ๐ŸŒˆ.
  • AS path: It may be useful to give a single preference value to all BGP routes (learned from the same routing domain) whose AS path "matches" any of a set of specified values. It is not yet clear exactly which kinds of matches are most useful ๐Ÿค”. A simple option would be to match all routes where a particular AS number appears (or, the other way around, does not appear) anywhere in the route's AS_PATH attribute. A more general but somewhat harder option would be to match all routes whose AS path matches a specified regular expression ๐Ÿ“.

5.2.4.6 Load Splitting ๐Ÿฆ‹

At the end of the Next-hop selection process, multiple routes may still be left over. A router has a few options here. It can arbitrarily discard some of the routes. It can cut down the candidates by comparing metrics of routes from routing domains that aren't considered equivalent. It can keep more than one route and use a load-splitting mechanism to divide traffic among them ๐Ÿ”ฅ. Honestly, the only thing you can say about these options is that load-splitting is useful in some situations and not in others, so a wise implementor who builds load-splitting will also give the network manager a way to turn it off ๐Ÿ™ˆ.

5.2.5 Unused IP Header Bits: RFC-791 Section 3.1 ๐ŸŽ€

The IP header has several reserved bits, hiding in the Type of Service field and the Flags field. Routers MUST NOT drop packets just because one or more of these reserved bits has a non-zero value ๐Ÿ™…โ€โ™€๏ธ.

Routers MUST ignore and MUST pass through unchanged the values of these reserved bits. And if a router fragments a packet, it MUST copy these bits into each fragment ๐Ÿ’–.

DISCUSSION: Future revisions to the IP protocol might use these unused bits ๐Ÿ”ฎ. These rules are meant to make sure those revisions can be rolled out without having to upgrade every router on the Internet at the same time ๐ŸŒˆ.

5.2.6 Fragmentation and Reassembly: RFC-791 Section 3.2 ๐Ÿงš

As was discussed in Section [4.2.2.7], a router MUST support IP fragmentation โœจ.

A router MUST NOT reassemble any datagram before forwarding it ๐Ÿ›‘.

DISCUSSION: A few people have suggested that there might be some topologies where routers reassembling transit datagrams could improve performance. But in general, fragments can take different paths to the destination, so using that safely is basically a no-go ๐Ÿ™ˆ.

Nothing in this section should be read as controlling or limiting fragmentation or reassembly that the router does as a link layer function ๐Ÿ’….

5.2.7 Internet Control Message Protocol - ICMP ๐ŸŒธ

General requirements for ICMP were discussed in Section [4.3] ๐Ÿ’œ. This section covers the ICMP messages that only routers send ๐Ÿ‘‘.

5.2.7.1 Destination Unreachable โœจ

okay so the ICMP Destination Unreachable message is what a router sends back when it can't forward a packet because the destination (or the next hop) is unreachable, or because a service isn't available ๐Ÿซถ

A router MUST be able to generate ICMP Destination Unreachable messages, and it SHOULD pick the response code that most closely matches why it's sending the message. literally the whole point is being specific ๐Ÿ’…

These codes are defined in [INTERNET:8] and [INTRO:2]:

  • 0 = Network Unreachable: a router sends this if it doesn't have a forwarding path (route) to the destination network ๐ŸŒธ
  • 1 = Host Unreachable: a router sends this if it doesn't have a forwarding path (route) to the destination host on a network it's directly connected to ๐Ÿงš
  • 2 = Protocol Unreachable: sent if the transport protocol named in the datagram isn't supported by the transport layer at the final destination ๐Ÿฆ‹
  • 3 = Port Unreachable: sent if the transport protocol (like UDP) can't demultiplex the datagram at the final destination's transport layer, but there's no protocol mechanism to tell the sender ๐Ÿ’€
  • 4 = Fragmentation Needed and DF Set: sent if a router needs to fragment a datagram but can't, because the DF flag is set ๐Ÿ˜ญ
  • 5 = Source Route Failed: sent if a router can't forward a packet to the next hop in a source route option ๐Ÿ™ˆ
  • 6 = Destination Network Unknown: this code SHOULD NOT be generated, because it would basically mean the router is saying the destination network doesn't exist. Net unreachable code 0 SHOULD be used in place of code 6 instead ๐Ÿ™…โ€โ™€๏ธ
  • 7 = Destination Host Unknown: only generated when a router can figure out (from link layer advice) that the destination host doesn't exist ๐Ÿ“
  • 11 = Network Unreachable For Type Of Service: sent by a router if there's no forwarding path (route) to the destination network with the requested or default TOS ๐ŸŽ€
  • 12 = Host Unreachable For Type Of Service: sent if a router can't forward a packet because its routes to the destination match neither the TOS requested in the datagram nor the default TOS (0) ๐Ÿ’œ

The following additional codes are hereby defined:

  • 13 = Communication Administratively Prohibited: sent if a router can't forward a packet because of administrative filtering ๐Ÿ”ฅ
  • 14 = Host Precedence Violation: the first hop router sends this to a host to say a requested precedence isn't allowed for that particular mix of source/destination host or network, upper layer protocol, and source/destination port ๐Ÿ‘‘
  • 15 = Precedence cutoff in effect: the network operators have set a minimum precedence level needed to operate, and the datagram was sent with a precedence below that level โญ

NOTE: [INTRO:2] defined Code 8 for source host isolated. Routers SHOULD NOT generate Code 8, and whichever of Codes 0 (Network Unreachable) and 1 (Host Unreachable) fits SHOULD be used instead. [INTRO:2] also defined Code 9 for communication with destination network administratively prohibited, and Code 10 for communication with destination host administratively prohibited. These were meant for end-to-end encryption devices used by U.S military agencies. Routers SHOULD use the newly defined Code 13 (Communication Administratively Prohibited) if they administratively filter packets ๐ŸŒˆ

Routers MAY have a configuration option that stops Code 13 (Communication Administratively Prohibited) messages from being generated. When that option is on, no ICMP error message gets sent for a packet that's dropped because forwarding was administratively prohibited.

Similarly, routers MAY have a configuration option that stops Code 14 (Host Precedence Violation) and Code 15 (Precedence Cutoff in Effect) messages from being generated. When that option is on, no ICMP error message gets sent for a packet dropped because of a precedence violation ๐Ÿซถ

Routers MUST use the Host Unreachable or Destination Host Unknown codes whenever other hosts on the same destination network might still be reachable. Otherwise the source host might wrongly decide that every host on the network is unreachable, and that might not be true at all ๐Ÿ˜ญโœจ

[INTERNET:14] describes a slightly modified form of Destination Unreachable messages that contain Code 4 (Fragmentation needed and DF set). A router MUST use this modified form when it originates Code 4 Destination Unreachable messages ๐Ÿ’–

5.2.7.2 Redirect

ICMP Redirect messages get generated to tell a host on the same subnet that the router the host has been using for certain packets should be changed ๐Ÿฆ‹

Routers MUST NOT generate the Redirect for Network or Redirect for Network and Type of Service messages (Codes 0 and 2) specified in [INTERNET:8]. Routers MUST be able to generate the Redirect for Host message (Code 1), and SHOULD be able to generate the Redirect for Type of Service and Host message (Code 3) specified in [INTERNET:8] ๐Ÿงš

DISCUSSION: If the directly-connected network isn't subnetted, a router can normally generate a network Redirect that applies to every host on a specified remote network. Using a network Redirect instead of a host one might save a little network traffic and host routing table storage. But the savings aren't significant, and subnets make it ambiguous which subnet mask to use when interpreting a network Redirect. In a general subnet environment it's hard to pin down exactly when network Redirects can be used. So routers must send only host (or host and type of service) Redirects ๐Ÿ™ˆ

A Code 3 (Redirect for Host and Type of Service) message gets generated when the packet that caused the redirect has a destination whose chosen path would depend (in part) on the requested TOS ๐ŸŽ€

Routers that can generate Code 3 redirects (Host and Type of Service) MUST have a configuration option, which defaults to on, that lets Code 1 (Host) redirects be substituted for Code 3 redirects. A router MUST send a Code 1 Redirect in place of a Code 3 Redirect if it's been configured to do that ๐Ÿ’…

If a router can't generate Code 3 Redirects, then it MUST generate Code 1 Redirects in situations where a Code 3 Redirect would be called for ๐ŸŒธ

Routers MUST NOT generate a Redirect message unless all of the following conditions are met:

  • The packet is being forwarded out the same physical interface it was received from,
  • The IP source address in the packet is on the same Logical IP (sub)network as the next-hop IP address, and
  • The packet does not contain an IP source route option.

The source address used in the ICMP Redirect MUST belong to the same logical (sub)net as the destination address ๐Ÿ”ฅ

A router using a routing protocol (other than static routes) MUST NOT consider paths learned from ICMP Redirects when forwarding a packet. If a router isn't using a routing protocol, a router MAY have a configuration that, when set, lets the router consider routes learned via ICMP Redirects when forwarding packets ๐Ÿ‘‘

DISCUSSION: ICMP Redirect is a way for routers to pass routing information along to hosts. Routers use other mechanisms to learn routing information, so they have no reason to obey redirects. Believing a redirect that contradicted the router's other information would likely create routing loops ๐Ÿ˜ญ

On the other hand, when a router isn't acting as a router, it MUST comply with the behavior required of a host โญ

5.2.7.3 Time Exceeded

A router MUST generate a Time Exceeded message Code 0 (In Transit) when it discards a packet because the TTL field has expired. A router MAY have a per-interface option to turn off origination of these messages on that interface, but that option MUST default to allowing the messages to be originated ๐Ÿงš๐Ÿ’–

5.2.8 INTERNET GROUP MANAGEMENT PROTOCOL - IGMP ๐Ÿฆ‹

IGMP [INTERNET:4] is a protocol used between hosts and multicast routers on a single physical network to establish hosts' membership in particular multicast groups. Multicast routers use this information, along with a multicast routing protocol, to support IP multicast forwarding across the Internet ๐ŸŒˆ

A router SHOULD implement the multicast router part of IGMP โœจ


5.3 SPECIFIC ISSUES ๐ŸŽ€

5.3.1. Time to Live (TTL) ๐Ÿ’–

Okay bestie, the TTL field in the IP header is basically a timer for how long a datagram is allowed to live ๐Ÿ•ฐ๏ธ. It's 8 bits, and the units are seconds. Every router (or other module) that handles a packet MUST decrement the TTL by at least one, even if it only took a tiny fraction of a second. ngl that happens sooo often, so the TTL ends up acting like a hop count limit on how far a datagram can travel across the Internet ๐ŸŒ.

When a router forwards a packet, it MUST reduce the TTL by at least one ๐Ÿ’…. If it holds onto a packet for more than one second, it MAY knock the TTL down by one for each second.

If the TTL drops to zero (or below), the packet MUST be discarded ๐Ÿ—‘๏ธ. If the destination isn't a multicast address, the router MUST send an ICMP Time Exceeded message, Code 0 (TTL Exceeded in Transit), back to the source. Note that a router MUST NOT discard an IP unicast or broadcast packet with a non-zero TTL just because it can predict that another router further along the path to the packet's final destination will drop the TTL to zero ๐Ÿ™…โ€โ™€๏ธ. HOWEVER, a router MAY do exactly that for IP multicasts, so it can more efficiently run IP multicast's expanding ring search algorithm (see [INTERNET:4]) ๐Ÿงš.

DISCUSSION:

The IP TTL is used, somewhat schizophrenically ๐Ÿ™ƒ, as both a hop count limit and a time limit. The hop count job is critical for making sure routing problems can't melt the network by sending packets around in endless loops ๐Ÿ”. The time limit job is used by transport protocols like TCP to keep data transfer reliable. Lots of current implementations treat TTL as a pure hop count, and parts of the Internet community strongly feel the time limit job should be handled by the transport protocols that actually need it.

In this spec, we reluctantly went along with the strong belief of the router vendors that the time limit function should be optional ๐Ÿ˜ค. They argued that implementing the time limit is hard enough that it usually isn't done at all. They also pointed out there are no documented cases of this shortcut making TCP corrupt data. (Obviously the problems would be rare and hard to reproduce, so "no documented cases" doesn't prove there weren't any undocumented ones ๐Ÿซ .)

IP multicast ideas like expanding ring search may not work as expected unless TTL is treated as a pure hop count. It's kinda the same deal with traceroute ๐Ÿ—บ๏ธ.

ICMP Time Exceeded messages are required because the traceroute diagnostic tool depends on them ๐Ÿ”.

So the tradeoff is basically severely crippling, if not eliminating, two super useful tools vs. a very rare and transient data transport problem that may not even happen at all ๐Ÿ’€.


5.3.2. Type of Service (TOS) ๐ŸŽ€

The Type-of-Service byte in the IP header is split into three sections ๐Ÿฐ. There's the Precedence field (the top 3 bits), a field customarily called Type of Service or "TOS" (the next 4 bits), and a reserved bit (the lowest bit). The rules for the reserved bit were described in Section [4.2.2.3]. The Precedence field gets its own discussion in Section [5.3.3], and a deeper dive into the TOS field can be found in [ROUTE:11].

A router SHOULD consider the TOS field in a packet's IP header when deciding how to forward it. The rest of this section lays out the rules for routers that follow this requirement ๐Ÿ“‹.

A router MUST maintain a TOS value for each route in its routing table. Routes learned through a routing protocol that doesn't support TOS MUST be assigned a TOS of zero (the default TOS) ๐ŸŒฑ.

To pick a route to a destination, a router MUST use an algorithm equivalent to the following:

  1. The router finds all available routes to the destination in its routing table (see Section [5.2.4]).
  2. If there are none, the router drops the packet because the destination is unreachable. See section [5.2.4].
  3. If one or more of those routes has a TOS that exactly matches the TOS specified in the packet, the router chooses the route with the best metric โœจ.
  4. Otherwise, the router repeats the above step, except it only looks at routes whose TOS is zero.
  5. If no route was chosen above, the router drops the packet because the destination is unreachable. The router returns an ICMP Destination Unreachable error with the appropriate code: either Network Unreachable with Type of Service (code 11) or Host Unreachable with Type of Service (code 12) ๐Ÿ˜ญ.

DISCUSSION:

TOS has barely been used in the past, but its use by hosts is now mandated by the Requirements for Internet Hosts RFCs ([INTRO:2] and [INTRO:3]) ๐Ÿ“š. Support for TOS in routers may become a MUST in the future, but it's a SHOULD for now, until we get more experience with it and can better judge both its benefits and its costs ๐Ÿง.

Various people have proposed that TOS should affect other parts of the forwarding function. For example:

  1. A router could put packets with the Low Delay bit set ahead of other packets in its output queues.
  2. If a router is forced to discard packets, it could try to avoid discarding those with the High Reliability bit set.

These ideas are explored in more detail in [INTERNET:17], but we don't have enough experience with these schemes yet to make requirements in this area ๐Ÿ™ˆ.


5.3.3. IP Precedence ๐Ÿ‘‘

This section lays out requirements and guidelines for handling the IP Precedence field properly in routers. Precedence is a way of allocating network resources based on how important different traffic flows are. The IP specification defines specific values for this field for various types of traffic ๐Ÿšฆ.

The basic mechanisms for precedence processing in a router are preferential resource allocation (which includes both precedence-ordered queue service and precedence-based congestion control) and selection of Link Layer priority features. The router also picks the IP precedence for the routing, management and control traffic it originates. For a more extensive discussion of IP Precedence and how it's implemented, check [FORWARD:6] ๐Ÿ”—.

Precedence-ordered queue service, as discussed in this section, includes but isn't limited to the queue for the forwarding process and the queues for outgoing links. A router that supports precedence should also use the precedence indication wherever its processing deals with allocating finite resources, like packet buffers or Link Layer connections. Which points those are is implementation-dependent ๐Ÿ› ๏ธ.

DISCUSSION:

The Precedence field was originally provided for DOD systems, where large traffic surges or major damage to the network are seen as inherent threats ๐Ÿช–. But it has useful applications for lots of non-military IP networks too. Network traffic handling capacity has grown a ton, but users' traffic-generating ability has grown too, so network overload conditions still happen at times ๐Ÿ“ˆ. Since IP-based routing and management protocols matter so much to how the Internet works, overloads bring two extra risks:

  1. High delays may cause routing protocol packets to be lost. This can make the routing protocol falsely deduce a topology change and spread that false information to other routers ๐Ÿคฏ. Not only can this make routes oscillate, but an extra processing burden may be placed on other routers.
  2. High delays may interfere with the use of network management tools to analyze and perhaps correct or relieve the problem in the network that caused the overload ๐Ÿ› ๏ธ.

Implementing and appropriately using the Precedence mechanism helps ease both of these problems ๐ŸŽ‰.


5.3.3.1. Precedence-Ordered Queue Service ๐Ÿ“

Routers SHOULD implement precedence-ordered queue service. This means that when a packet is selected for output on a (logical) link, the packet of highest precedence queued for that link gets sent first ๐Ÿƒโ€โ™€๏ธ. Routers that implement precedence-ordered queue service MUST also have a configuration option to suppress precedence-ordered queue service in the Internet Layer.

Any router MAY implement other policy-based throughput management procedures that result in something other than strict precedence ordering, but it MUST be configurable to suppress them (i.e., use strict ordering) ๐ŸŽ›๏ธ.

As detailed in Section [5.3.6], routers that implement precedence-ordered queue service discard low precedence packets before discarding high precedence packets for congestion control purposes ๐Ÿ—‘๏ธ.

Preemption (interruption of processing or transmission of a packet) is not envisioned as a function of the Internet Layer. Some protocols at other layers may provide preemption features ๐Ÿ’œ.

5.3.3.2. Lower Layer Precedence Mappings ๐ŸŒˆ

okay so routers that do precedence-ordered queueing MUST implement this, and every other router SHOULD implement it too ๐Ÿ’…

A router that does Lower Layer Precedence Mapping:

  • MUST be able to map IP Precedence onto Link Layer priority mechanisms, but only for link layers that actually have one defined โœจ
  • MUST have a configuration option to pick the Link Layer's default priority treatment for all IP traffic ๐ŸŽ€
  • SHOULD be able to configure custom, nonstandard mappings from IP precedence values to Link Layer priority values on each interface ๐Ÿฆ‹

DISCUSSION: bestie, some people are lowkey doubtful that the priority features of certain Link Layer protocols even work well ๐Ÿ™ˆ and some networks might have buggy link layer priority mechanisms. so it's prudent to give yourself an escape hatch just in case things go sideways in a network ๐Ÿซถ

BUT ALSO, there are proposals for fancy new queueing strategies to give special services like low-delay service ๐Ÿ‘€ and honestly those special services need more research and experimentation before they go everywhere on the Internet ๐Ÿงช these requirements are meant to encourage (not force) precedence features, so that everyone gets better service. so routers that support precedence-ordered queue service should default to keeping strict precedence ordering, no matter what type of service is requested ๐Ÿ’œ

implementors might wanna know that correct link layer mapping of IP precedence is required by DOD policy for TCP/IP systems on DOD networks ๐Ÿซก

5.3.3.3. Precedence Handling For All Routers ๐Ÿ‘‘

A router (whether or not it uses precedence-ordered queue service):

  1. MUST accept and process incoming traffic of all precedence levels normally, unless it's been administratively configured to do otherwise ๐Ÿ’–
  2. MAY implement a validation filter to administratively restrict which traffic sources can use particular precedence levels ๐Ÿ”’ If one is provided, it MUST NOT filter out or cut off these ICMP error messages: Destination Unreachable, Redirect, Time Exceeded, and Parameter Problem ๐Ÿšซ If this filter exists, the procedures required for packet filtering by addresses are required for it too.

DISCUSSION: precedence filtering should be able to target specific source/destination IP Address pairs, specific protocols, specific ports, and so on ๐ŸŒธ

An ICMP Destination Unreachable message with code 14 SHOULD be sent when a packet gets dropped by the validation filter, unless configuration choice has suppressed this ๐Ÿ’Œ

  1. MAY implement a cutoff function that lets the router refuse or drop traffic below a specified precedence level โœ‚๏ธ This function can be turned on by management actions or by some implementation-dependent heuristics, but there MUST be a configuration option to disable any heuristic mechanism that runs without human intervention ๐Ÿ™…โ€โ™€๏ธ An ICMP Destination Unreachable message with code 15 SHOULD be sent when a packet gets dropped by the cutoff function, unless configuration choice has suppressed this ๐Ÿ’€

A router MUST NOT refuse to forward datagrams with IP precedence of 6 (Internetwork Control) or 7 (Network Control) solely because of precedence cutoff ๐Ÿ›ก๏ธ Other criteria can be combined with precedence cutoff to filter high precedence traffic, though ๐Ÿคทโ€โ™€๏ธ

DISCUSSION: unrestricted precedence cutoff could accidentally cut off routing and control traffic, and that would be a whole disaster ๐Ÿ˜ญ in general, host traffic should be restricted to a value of 5 (CRITIC/ECP) or below. this isn't a requirement and might not be valid in certain systems, so don't take it as gospel ๐Ÿงš

  1. MUST NOT change precedence settings on packets it did not originate ๐Ÿ™…โ€โ™€๏ธ
  2. SHOULD be able to configure distinct precedence values for each routing or management protocol supported (except for protocols like OSPF, which specify which precedence value must be used) ๐Ÿ—‚๏ธ
  3. MAY be able to configure routing or management traffic precedence values independently for each peer address ๐ŸŽฏ
  4. MUST respond appropriately to Link Layer precedence-related error indications where they're provided ๐Ÿšจ An ICMP Destination Unreachable message with code 15 SHOULD be sent when a packet gets dropped because a link can't accept it due to a precedence-related condition, unless configuration choice has suppressed this ๐Ÿซ 

DISCUSSION: the precedence cutoff mechanism in (3) is kinda controversial, no cap ๐Ÿ˜ฌ depending on where the cutoff area sits in the topology, routing protocols might send transit traffic right into that area, where it gets dropped. this is only a problem if some other path, unaffected by the cutoff, exists between the communicating points. people have suggested fixes like guaranteeing some minimum bandwidth to all precedence levels even under overload, or propagating cutoff info in routing protocols ๐Ÿง  but until there's a widely accepted (and implemented) solution, great caution is recommended before turning on cutoff mechanisms in transit networks โš ๏ธ

a transport layer relay could legitimately do the thing that (4) prohibits ๐Ÿ” changing precedence levels can cause subtle interactions with TCP and maybe other protocols, so a correct design is a non-trivial task ๐Ÿฅฒ

the intent of (5) and (6) (and the discussion of IP Precedence in ICMP messages in Section [4.3.2]) is that the IP precedence bits should be set appropriately, whether or not this router does anything else with those bits ๐Ÿ’… we expect future specifications for routing and network management protocols to say how IP Precedence should be set for messages those protocols send ๐Ÿ“œ

the right response for (7) depends on the link layer protocol in use ๐Ÿ”Œ typically, the router should stop trying to send offensive traffic to that destination for some period of time, and should return an ICMP Destination Unreachable message with code 15 (service not available for precedence requested) to the traffic source ๐Ÿ’ซ it also shouldn't try to re-establish a preempted Link Layer connection for some period of time โณ

The encapsulation of IP packets in most Link Layer protocols (except PPP) lets a receiver tell broadcasts and multicasts apart from unicasts just by checking the Link Layer protocol headers (most commonly the Link Layer destination address) ๐Ÿ” the rules in this section about Link Layer broadcasts only apply to Link Layer protocols that let broadcasts be told apart, and likewise the rules about Link Layer multicasts only apply to protocols that let multicasts be told apart ๐Ÿฆ‹

A router MUST NOT forward any packet it received as a Link Layer broadcast (even if the IP destination address is also some form of broadcast address) unless the packet is an all-subnets-directed broadcast being forwarded as specified in [INTERNET:3] ๐Ÿšซ

DISCUSSION: as noted in Section [5.3.5.3], forwarding all-subnets-directed broadcasts according to [INTERNET:3] is optional, and it's not something routers do by default ๐Ÿ™ˆ

A router MUST NOT forward any packet it received as a Link Layer multicast unless the packet's destination address is an IP multicast address ๐Ÿ’œ

A router SHOULD silently discard a packet that's received via a Link Layer broadcast but doesn't specify an IP multicast or IP broadcast destination address ๐Ÿคซ

When a router sends a packet as a Link Layer broadcast, the IP destination address MUST be a legal IP broadcast or IP multicast address ๐ŸŽ€

5.3.5 Forwarding of Internet Layer Broadcasts โœจ

Okay bestie, so IP broadcasts come in two big flavors ๐ŸŽ€: limited and directed. Directed broadcasts then split into three subtypes ๐Ÿฆ‹: one aimed at a specified network, one aimed at a specified subnetwork, and one aimed at all subnets of a specified network. ๐Ÿ’… Which bucket a router puts a broadcast in depends on the broadcast address and on what the router knows (if anything) about the subnet structure of the destination network. Same broadcast, different routers, potentially different labels. Iconic chaos ๐Ÿ™ˆ

A limited IP broadcast address is all-ones: { -1, -1 } or 255.255.255.255 ๐ŸŒธ

A net-directed broadcast is the network portion of the IP address with a local part of all-ones, written { <Network-number>, -1 }. For example, a Class A net broadcast address is net.255.255.255, a Class B net broadcast address is net.net.255.255, and a Class C net broadcast address is net.net.net.255, where net is a byte of the network address. ๐Ÿงš

An all-subnets-directed broadcast is the network part of the IP address with a subnet part and a host part of all-ones, written { <Network-number>, -1, -1 }. For example, an all-subnets broadcast on a subnetted class B network is net.net.255.255. A network must be known to be subnetted, and the subnet part must be all-ones, before a broadcast can be classified as all-subnets-directed. Be sure you check that first, babe ๐Ÿ‘‘

A subnet-directed broadcast address is the network and subnet part of the IP address with a host part of all-ones, written { <Network-number>, <Subnet-number>, -1 }. For example, a subnet-directed broadcast to subnet 2 of a class B network might be net.net.2.255 (if the subnet mask was 255.255.255.0) or net.net.1.127 (if the subnet mask was 255.255.255.128). A network must be known to be subnetted, and the net and subnet part must not be all-ones, before an IP broadcast can be classified as subnet-directed. ๐Ÿ“

As was described in Section [4.2.3.1], a router may encounter certain non-standard IP broadcast addresses ๐Ÿ™ƒ

  • 0.0.0.0 is an obsolete form of the limited broadcast address
  • { broadcast address.
  • { broadcast address.
  • { form of a subnet-directed broadcast address.

As was described in that section, packets addressed to any of these addresses SHOULD be silently discarded. But if they are not, they MUST be treated in accordance with the same rules that apply to packets addressed to the non-obsolete forms of the broadcast addresses described above. These rules are described in the next few sections. ๐Ÿ’œ


5.3.5.1 Limited Broadcasts

Limited broadcasts MUST NOT be forwarded. Limited broadcasts MUST NOT be discarded. Limited broadcasts MAY be sent, and SHOULD be sent instead of directed broadcasts where limited broadcasts will suffice. ๐Ÿ’–

DISCUSSION: Some routers contain UDP servers that work by resending the requests (as unicasts or directed broadcasts) to other servers. This requirement should not be interpreted as prohibiting such servers. Note, however, that such servers can easily cause packet looping if misconfigured. So providers of such servers would probably be well-advised to document their setup carefully and to consider carefully the TTL on packets which are sent. Looping is NOT it, bestie ๐Ÿ”


5.3.5.2 Net-directed Broadcasts

A router MUST classify as net-directed broadcasts all valid directed broadcasts destined for a remote network or an attached nonsubnetted network. A router MUST forward net-directed broadcasts. Net-directed broadcasts MAY be sent. โœจ

A router MAY have an option to disable receiving net-directed broadcasts on an interface, and MUST have an option to disable forwarding net-directed broadcasts. These options MUST default to permit receiving and forwarding net-directed broadcasts. ๐ŸŽ€

DISCUSSION: There has been some debate about forwarding or not forwarding directed broadcasts. In this memo we made the forwarding decision depend on the router's knowledge of the subnet mask for the destination network. Forwarding decisions for subnetted networks should be made by routers with an understanding of the subnet structure. Therefore, in general, routers must forward directed broadcasts for networks they are not attached to and for which they do not understand the subnet structure. One router may interpret and handle the same IP broadcast packet differently than another, depending on its own understanding of the structure of the destination (sub)network. It's a whole vibe ๐Ÿฆ‹


5.3.5.3 All-subnets-directed Broadcasts

A router MUST classify as all-subnets-directed broadcasts all valid directed broadcasts destined for a directly attached subnetted network which have all-ones in the subnet part of the address. If the destination network is not subnetted, the broadcast MUST be treated as a net-directed broadcast. ๐ŸŒˆ

A router MUST forward an all-subnets-directed broadcast as a link level broadcast out all physical interfaces connected to the IP network addressed by the broadcast, except that:

  • A router MUST NOT forward an all-subnet-directed broadcast that was received by the router as a Link Layer broadcast, unless the router is forwarding the broadcast in accordance with [INTERNET:3] (see below).
  • If a router receives an all-subnets-directed broadcast over a network which does not indicate via Link Layer framing whether the frame is a broadcast or a unicast, the packet MUST NOT be forwarded to any network which likewise does not indicate whether a frame is a broadcast.
  • A router MUST NOT forward an all-subnets-directed broadcast if the router is configured not to forward such broadcasts. A router MUST have a configuration option to deny forwarding of all-subnets-directed broadcasts. The configuration option MUST default to permit forwarding of all-subnets-directed broadcasts.

EDITOR'S COMMENTS: Okay, real talk ๐Ÿ˜ญ The algorithm presented here is broken. The working group explicitly desired this algorithm, knowing its failures.

The second bullet above stops All Subnets Directed Broadcasts from traversing more than one PPP (or other serial) link in a row. Such a topology is easily conceived. Imagine a corporation that builds its corporate backbone out of PPP links, connecting routers at geographically dispersed locations. Say this corporation has 3 sites (S1, S2, and S3), with a router at each site (R1, R2, and R3). At each site there are also several LANs connected to the local router. Let there be a PPP link connecting S1 to S2, and one connecting S2 to S3 (so the links are R1-R2 and R2-R3). If a host on a LAN at S1 sends an All Subnets Directed Broadcast, R1 will forward the broadcast over the R1-R2 link to R2. R2 will forward the broadcast to the LAN(s) connected to R2. Since PPP does not differentiate broadcast from non-broadcast frames, R2 will NOT forward the broadcast onto the R2-R3 link. Therefore, the broadcast will not reach S3. Major L ๐Ÿ’€

[INTERNET:3] describes an alternative set of rules for forwarding all-subnets-directed broadcasts (called multi-subnet-broadcasts in that document). A router MAY IMPLEMENT that alternative set of rules, but MUST use the set of rules described above unless explicitly configured to use the [INTERNET:3] rules. If routers will do [INTERNET:3]-style forwarding, then the router MUST have a configuration option, which MUST default to doing the rules presented in this document. ๐ŸŽ€

DISCUSSION: As far as we know, the rules for multi-subnet broadcasts described in [INTERNET:3] have never been implemented. That suggests either they are too complex or the utility of multi-subnet broadcasts is low. The rules described in this section match current practice. In the future, we expect that IP multicast (see [INTERNET:4]) will be used to better solve the sorts of problems that multi-subnet broadcasts were intended to address.

We were also concerned that hosts whose system managers neglected to configure a subnet mask could unintentionally send multi-subnet broadcasts. Oops ๐Ÿ™ˆ

A router SHOULD NOT originate all-subnets broadcasts, except as required by Section [4.3.3.9] when sending ICMP Address Mask Replies on subnetted networks. ๐ŸŒธ

DISCUSSION: The current intention is to decree that (like 0-filled IP broadcasts) the notion of the all-subnets broadcast is obsolete. It should be treated as a directed broadcast to the first subnet of the net in question that it appears on.

Routers may implement a switch (default off) which, if turned on, enables the [INTERNET:3] behavior for all-subnets broadcasts.

If a router has a configuration option to allow forwarding all-subnet broadcasts, it should use a spanning tree, RPF, or other multicast forwarding algorithm (which may be computed for other purposes such as bridging or OSPF) to distribute the all-subnets broadcast efficiently. In general, it is better to use an IP multicast address rather than an all-subnets broadcast. ๐Ÿงš


5.3.5.4 Subnet-directed Broadcasts

A router MUST classify as subnet-directed broadcasts all valid directed broadcasts destined for a directly attached subnetted network in which the subnet part is not all-ones. If the destination network is not subnetted, the broadcast MUST be treated as a net-directed broadcast. ๐Ÿ’–

A router MUST forward subnet-directed broadcasts. โœจ

A router MUST have a configuration option to prohibit forwarding of subnet-directed broadcasts. Its default setting MUST permit forwarding of subnet-directed broadcasts. ๐ŸŽ€

A router MAY have a configuration option to prohibit forwarding of subnet-directed broadcasts from a source on a network on which the router has an interface. If such an option is provided, its default setting MUST permit forwarding of subnet-directed broadcasts. ๐Ÿ‘‘

5.3.6. Congestion Control ๐Ÿ’…

okay so congestion is basically when everyone wants a resource (bandwidth or CPU time) and there just isn't enough to go around ๐Ÿ˜ญ. Congestion avoidance is about stopping demand from going over capacity before it happens, and congestion recovery is about getting things back to normal once it already has. A router can help with both, which is so iconic of it ๐Ÿฆ‹. People have spent forever studying this, so if you want the full tea, read [FORWARD:2] for a survey. Other big papers include [FORWARD:3], [FORWARD:4], [FORWARD:5], and [INTERNET:10], among others โœจ.

Here's the storage part. How much memory a router needs to handle peak bursts (when hosts are following reasonable congestion policies, like the ones in [FORWARD:5]) depends on the link bandwidth times the path delay of the flows using that link. That's the Bandwidth*Delay product, and storage should grow as that product grows ๐ŸŒธ. Nobody actually knows the exact formula connecting storage to the chance of a packet getting dropped, so that's still a mystery bestie ๐Ÿ™ˆ.

When a router gets a packet and it's already full, it must (by definition, not by decree) discard it or some other packet or packets ๐Ÿ’€. Which one to toss is a huge topic with, sadly, not a lot of agreement yet ๐Ÿ˜ฉ.

A router MAY discard the packet it just received. That's the simplest option, but it's not the best one ๐Ÿซถ. It's considered better to randomly pick some transit packet sitting in the queue and drop that one instead (see [FORWARD:2]). A router MAY use this Random Drop algorithm to pick what to discard ๐ŸŽ€.

If a router uses a discard policy like Random Drop, where it picks from a pool of eligible packets, a few rules kick in:

  • If precedence-ordered queue service (described in Section [5.3.3.1]) is implemented and enabled, the router MUST NOT discard a packet whose IP precedence is higher than that of a packet which is not discarded. Main character rule, no exceptions ๐Ÿ‘‘.
  • A router MAY protect packets whose IP headers request the maximize reliability TOS, except where doing so would break the previous rule ๐Ÿงš.
  • A router MAY protect fragmented IP packets. The thinking is that dropping one fragment can make the source resend every fragment of the datagram, which can make congestion worse ๐Ÿ’œ.
  • To help prevent routing perturbations or disruption of management functions, the router MAY protect packets used for routing control, link control, or network management from being discarded. Dedicated routers (i.e., routers which are not also general purpose hosts, terminal servers, etc.) can get close to this rule by protecting packets whose source or destination is the router itself ๐ŸŒˆ.

Advanced congestion control methods include a notion of fairness, so the user who loses a packet is the one who contributed the most to the congestion. Lowkey iconic ๐Ÿ’…. Whatever bandwidth congestion mechanism you use, the CPU work it takes has to stay small enough that the router doesn't get CPU congestion too ๐Ÿ˜ญ.

As described in Section [4.3.3.3], this document recommends that a router should not send a Source Quench to the sender of the packet it is discarding. ICMP Source Quench is a very weak mechanism, so a router doesn't need to send it, and host software should not use it exclusively as a sign of congestion ๐Ÿ™…โ€โ™€๏ธโœจ.


5.3.7. Martian Address Filtering ๐Ÿ‘ป

An IP source address is invalid if it is an IP broadcast address or is not a class A, B, or C address ๐Ÿšซ.

An IP destination address is invalid if it is not a class A, B, C, or D address ๐ŸŒธ.

A router SHOULD NOT forward any packet which has an invalid IP source address or a source address on network 0. A router SHOULD NOT forward, except over a loopback interface, any packet which has a source address on network 127. A router MAY have a switch which lets the network manager turn these checks off. If such a switch is provided, it MUST default to performing the checks ๐Ÿ›ก๏ธ.

A router SHOULD NOT forward any packet which has an invalid IP destination address or a destination address on network 0. A router SHOULD NOT forward, except over a loopback interface, any packet which has a destination address on network 127. A router MAY have a switch which lets the network manager disable these checks. If such a switch is provided, it MUST default to performing the checks ๐Ÿง.

If a router discards a packet because of these rules, it SHOULD log at least the IP source address, the IP destination address, and, if the problem was with the source address, the physical interface the packet came in on and the Link Layer address of the host or router it was received from ๐Ÿ“โœจ.


5.3.8. Source Address Validation ๐Ÿ”

A router SHOULD IMPLEMENT the ability to filter traffic by comparing a packet's source address with the forwarding table for the logical interface the packet arrived on ๐Ÿฆ‹. If this filtering is enabled, the router MUST silently discard a packet if the interface it arrived on is not the interface that would be used to forward a packet to reach the address in the source address. Put simply, if a router wouldn't route traffic to that address through a certain interface, it shouldn't trust that address when it shows up as a source on a packet read from that interface ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ’–.

If this feature is implemented, it MUST be disabled by default ๐Ÿ™…โ€โ™€๏ธ.

DISCUSSION: This feature can give real security improvements in some situations, but it can wrongly discard valid packets when paths are asymmetric ๐Ÿ˜ฌ.


5.3.9. Packet Filtering and Access Lists ๐Ÿšง

As a way to provide security and/or limit traffic through parts of a network, a router SHOULD provide the ability to selectively forward (or filter) packets ๐ŸŽ€. If this capability is provided, packet filtering MUST be configurable either to forward all packets or to selectively forward them based on the source and destination addresses. Each source and destination address SHOULD allow an arbitrary mask to be specified ๐ŸŒˆ.

If supported, a router MUST be configurable to allow one of an

  • Include list - specification of a list of address pairs to be forwarded, or an
  • Exclude list - specification of a list of address pairs not to be forwarded.

A router MAY provide a configuration switch that lets you choose between specifying an include or an exclude list ๐Ÿ”€.

A value matching any address (e.g., a keyword any or an address with a mask of all 0's) MUST be allowed as a source and/or destination address ๐ŸŒ.

On top of address pairs, the router MAY allow any combination of transport and/or application protocol and source and destination ports to be specified ๐Ÿ’….

The router MUST allow packets to be silently discarded (i.e., discarded without an ICMP error message being sent) ๐Ÿคซ.

The router SHOULD allow an appropriate ICMP unreachable message to be sent when a packet is discarded. The ICMP message SHOULD specify Communication Administratively Prohibited (code 13) as the reason for the destination being unreachable ๐Ÿ“จ.

The router SHOULD allow ICMP destination unreachable messages (code 13) to be configured for each combination of address pairs, protocol types, and ports it allows to be specified ๐ŸŽ›๏ธ.

The router SHOULD count and SHOULD allow selective logging of packets not forwarded ๐Ÿ“Šโœจ.


5.3.10. Multicast Routing ๐Ÿ“ก

An IP router SHOULD support forwarding of IP multicast packets, based either on static multicast routes or on routes dynamically determined by a multicast routing protocol (e.g., DVMRP [ROUTE:9]). A router that forwards IP multicast packets is called a multicast router ๐Ÿ“.


5.3.11. Controls on Forwarding ๐ŸŽ›๏ธ

For each physical interface, a router SHOULD have a configuration option that says whether forwarding is enabled on that interface. When forwarding on an interface is disabled, the router:

  • MUST silently discard any packets which are received on that interface but are not addressed to the router ๐Ÿ™ˆ
  • MUST NOT send packets out that interface, except for datagrams originated by the router ๐Ÿšซ
  • MUST NOT announce via any routing protocols the availability of paths through the interface ๐Ÿค

DISCUSSION: This feature lets the network manager basically turn off an interface while keeping it reachable for network management ๐ŸŒธ.

Ideally, this control would apply to logical rather than physical interfaces, but it can't, because there is no known way for a router to tell which logical interface a packet arrived on when there isn't a one-to-one match between logical and physical interfaces ๐Ÿฅบ.


5.3.12. State Changes ๐Ÿ”„

While a router is running, interfaces may fail or be manually disabled, or may become available for use by the router. Similarly, forwarding may be disabled for a particular interface or for the entire router, or may be (re)enabled. These transitions are (usually) uncommon, but it is important that routers handle them correctly โœจ๐Ÿ’œ.

5.3.12.1 When a Router Ceases Forwarding

Okay so when a router stops forwarding, it MUST stop advertising all of its routes ๐Ÿ“ข๐Ÿšซ, except for third party routes ๐ŸŽ€. It MAY keep receiving and using routes from other routers in its routing domains ๐Ÿ‘‚. If the forwarding database is kept, the router MUST NOT stop timing the routes in it โฑ๏ธ. If routes it got from other routers are remembered, the router MUST NOT stop timing those remembered routes either. And it MUST throw out any route whose timer runs out while forwarding is off, same as it would if forwarding were on ๐Ÿ’€.

DISCUSSION: When a router stops forwarding, it basically stops being a router ๐Ÿฅบ. It's still a host, so it has to follow all of the requirements of Host Requirements [INTRO: 2] ๐Ÿ’…. The router may still be a passive member of one or more routing domains though, so it's allowed to keep its forwarding database up to date by listening to other routers in its routing domain ๐Ÿฆ‹. It may not advertise any of the routes in its forwarding database, since it isn't doing any forwarding โœ‹. The only exception is when the router is advertising a route that uses only some other router, but that this router has been asked to advertise ๐Ÿซถ.

A router MAY send ICMP destination unreachable (host unreachable) messages to the senders of packets that it is unable to forward ๐Ÿ“จ. It SHOULD NOT send ICMP redirect messages ๐Ÿ™…โ€โ™€๏ธ.

DISCUSSION: Sending an ICMP destination unreachable (host unreachable) message is a router action ๐Ÿ‘‘. Hosts should not send this message. This exception to the rules for hosts is allowed so that packets can be rerouted as fast as possible, and so that black holes are avoided ๐Ÿ•ณ๏ธโœจ.

5.3.12.2 When a Router Starts Forwarding

When a router begins forwarding, it SHOULD expedite the sending of new routing information to all routers that it normally exchanges routing information with ๐Ÿš€.

5.3.12.3 When an Interface Fails or is Disabled

If an interface fails or is disabled, a router MUST remove and stop advertising all routes in its forwarding database that make use of that interface ๐Ÿ™ƒ. It MUST disable all static routes that make use of that interface. If other routes to the same destination and TOS are learned or remembered by the router, the router MUST choose the best alternate and add it to its forwarding database ๐Ÿ”„. The router SHOULD send ICMP destination unreachable or ICMP redirect messages, as appropriate, in reply to all packets it is unable to forward because the interface is unavailable ๐Ÿ’Œ.

5.3.12.4 When an Interface is Enabled

If an interface that had not been available becomes available, a router MUST reenable any static routes that use that interface ๐ŸŒธ. If routes that would use that interface are learned by the router, then those routes MUST be evaluated along with all of the other learned routes, and the router MUST make a decision about which routes should be placed in the forwarding database ๐Ÿง . The implementor is referred to Chapter [7], Application Layer - Routing Protocols, for further information on how this decision is made ๐Ÿ“–.

A router SHOULD expedite the sending of new routing information to all routers that it normally exchanges routing information with โญ.

5.3.13 IP Options

Several options, such as Record Route and Timestamp, have slots where a router puts its address when it forwards the packet ๐Ÿ—‚๏ธ. Each of these options has a finite number of slots, though, so a router might find that there isn't a free slot to put its address into ๐Ÿ˜ฌ. No requirement listed below should be read as requiring a router to insert its address into an option that has no remaining slot for it ๐Ÿ™…โ€โ™€๏ธ. Section [5.2.5] explains how a router must choose which of its addresses to insert into an option ๐Ÿ’œ.

5.3.13.1 Unrecognized Options

Unrecognized IP options in forwarded packets MUST be passed through unchanged ๐ŸŽ.

5.3.13.2 Security Option

Some environments require the Security option in every packet. That kind of requirement is outside the scope of this document and the IP standard specification ๐Ÿ”. Note, however, that the security options described in [INTERNET:1] and [INTERNET:16] are obsolete ๐Ÿ—‘๏ธ. Routers SHOULD IMPLEMENT the revised security option described in [INTERNET:5] ๐Ÿ›ก๏ธ.

5.3.13.3 Stream Identifier Option

This option is obsolete ๐Ÿฅ€. If the Stream Identifier option is present in a packet forwarded by the router, the option MUST be ignored and passed through unchanged ๐Ÿ™ˆ.

5.3.13.4 Source Route Options

A router MUST implement support for source route options in forwarded packets ๐Ÿ—บ๏ธ. A router MAY implement a configuration option that, when enabled, causes all source-routed packets to be discarded ๐Ÿšซ. However, that option MUST NOT be enabled by default ๐Ÿ™…โ€โ™€๏ธ.

DISCUSSION: Being able to source route datagrams through the Internet is important to various network diagnostic tools ๐Ÿ”. In a few rare cases, though, source routing may be used to bypass administrative and security controls within a network ๐Ÿ˜ฑ. Those cases are where manipulating routing tables is used to provide administrative separation instead of other methods such as packet filtering, and those setups may be vulnerable through source routed packets ๐Ÿšจ.

5.3.13.5 Record Route Option

Routers MUST support the Record Route option in forwarded packets ๐Ÿ“.

A router MAY provide a configuration option that, if enabled, will cause the router to ignore (i.e. pass through unchanged) Record Route options in forwarded packets. If provided, such an option MUST default to enabling the record-route ๐ŸŽ€. This option does not affect how the router processes Record Route options in datagrams it receives itself. In particular, Record Route options in ICMP echo requests will still be processed in accordance with Section [4.3.3.6] ๐Ÿ“.

DISCUSSION: Some people believe Record Route is a security problem because it discloses information about the topology of the network ๐Ÿ•ต๏ธโ€โ™€๏ธ. So this document allows it to be disabled ๐Ÿ”’.

5.3.13.6 Timestamp Option

Routers MUST support the timestamp option in forwarded packets โฐ. A timestamp value MUST follow the rules given in Section [3.2.2.8] of [INTRO:2] ๐Ÿ“.

If the flags field = 3 (timestamp and prespecified address), the router MUST add its timestamp if the next prespecified address matches any of the router's IP addresses ๐Ÿงš. The prespecified address does not have to be the address of the interface the packet arrived on, or the address of the interface it will be sent out over ๐Ÿ’–.

IMPLEMENTATION: To get the most out of the timestamps in the timestamp option, it is suggested that the timestamp inserted be, as nearly as practical, the time at which the packet arrived at the router โŒš. For datagrams the router originates, the timestamp inserted should be, as nearly as practical, the time at which the datagram was passed to the network layer for transmission ๐Ÿ“ค.

A router MAY provide a configuration option that, if enabled, will cause the router to ignore (i.e. pass through unchanged) Timestamp options in forwarded datagrams when the flag word is set to zero (timestamps only) or one (timestamp and registering IP address). If provided, such an option MUST default to off, which means the router does not ignore the timestamp ๐ŸŒˆ. This option does not affect how the router processes Timestamp options in datagrams it receives itself. In particular, a router will insert timestamps into Timestamp options in datagrams it receives, and Timestamp options in ICMP echo requests will still be processed in accordance with Section [4.3.3.6] ๐Ÿ’ซ.

DISCUSSION: Like the Record Route option, the Timestamp option can reveal information about a network's topology ๐Ÿ—บ๏ธ. Some people consider that a security concern ๐Ÿ˜ฌ.

6. TRANSPORT LAYER โœจ

A router is not required to implement any Transport Layer protocols except those required to support the Application Layer protocols the router supports. In practice, that means most routers implement both the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) ๐ŸŒ.

6.1 USER DATAGRAM PROTOCOL - UDP

The User Datagram Protocol (UDP) is specified in [TRANS:1] ๐Ÿฆ‹.

A router which implements UDP MUST be compliant, and SHOULD be unconditionally compliant, with the requirements of section 4.1.3 of [INTRO:2], except that:

  • This specification does not specify the interfaces between the various protocol layers. So a router need not comply with sections 4.1.3.2, 4.1.3.3, and 4.1.3.5 of [INTRO:2] (except of course where compliance is required for proper functioning of Application Layer protocols the router supports) ๐Ÿงฉ.
  • Contrary to section 4.1.3.4 of [INTRO:2], an application MUST NOT be able to disable to generation of UDP checksums ๐Ÿ”’.

DISCUSSION: Even though a particular application protocol might require that the UDP datagrams it receives contain a UDP checksum, there's no general requirement that received UDP datagrams contain UDP checksums ๐Ÿคทโ€โ™€๏ธ. Of course, if a UDP checksum is present in a received datagram, the checksum must be verified, and the datagram discarded if the checksum is incorrect โœ….

6.2. TRANSMISSION CONTROL PROTOCOL - TCP โœจ

Okay bestie, TCP is specified in [TRANS:2]. ๐Ÿ’–

A router which implements TCP MUST be compliant, and SHOULD be unconditionally compliant, with the requirements of section 4.2 of [INTRO:2], except that: ๐ŸŽ€

  • This specification does not specify the interfaces between the various protocol layers. Thus, a router need not comply with the following requirements of [INTRO:2] (except of course where compliance is required for proper functioning of Application Layer protocols supported by the router): ๐Ÿงš
    • Section 4.2.2.2: Passing a received PSH flag to the application layer is now OPTIONAL.
    • Section 4.2.2.4: A TCP MUST inform the application layer asynchronously whenever it receives an Urgent pointer and there was previously no pending urgent data, or whenever the Urgent pointer advances in the data stream. There MUST be a way for the application to learn how much urgent data remains to be read from the connection, or at least to determine whether or not more urgent data remains to be read.
    • Section 4.2.3.5: An application MUST be able to set the value for R2 for a particular connection. For example, an interactive application might set R2 to "infinity," giving the user control over when to disconnect.
    • Section 4.2.3.7: If an application on a multihomed host does not specify the local IP address when actively opening a TCP connection, then the TCP MUST ask the IP layer to select a local IP address before sending the (first) SYN. See the function GET_SRCADDR() in Section 3.4.
    • Section 4.2.3.8: An application MUST be able to specify a source route when it actively opens a TCP connection, and this MUST take precedence over a source route received in a datagram.
  • For similar reasons, a router need not comply with any of the requirements of section 4.2.4 of [INTRO:2]. ๐ŸŒธ
  • The requirements of section 4.2.2.6 of [INTRO:2] are amended as follows: a router which implements the host portion of MTU discovery (discussed in Section [4.2.3.3] of this memo) uses 536 as the default value of SendMSS only if the path MTU is unknown; if the path MTU is known, the default value for SendMSS is the path MTU - 40. ๐Ÿฆ‹
  • The requirements of section 4.2.2.6 of [INTRO:2] are amended as follows: ICMP Destination Unreachable codes 11 and 12 are additional soft error conditions. Therefore, these message MUST NOT cause TCP to abort a connection. ๐Ÿ˜ญ

DISCUSSION:

It should particularly be noted that a TCP implementation in a router must conform to the following requirements of [INTRO:2]: ๐Ÿ‘‘

  • Providing a configurable TTL. [4.2.2.1]
  • Providing an interface to configure keep-alive behavior, if keep-alives are used at all. [4.2.3.6]
  • Providing an error reporting mechanism, and the ability to manage it. [4.2.4.1]
  • Specifying type of service. [4.2.4.2]

The general paradigm applied is that if a particular interface is visible outside the router, then all requirements for the interface must be followed. For example, if a router provides a telnet function, then it will be generating traffic, likely to be routed in the external networks. Therefore, it must be able to set the type of service correctly or else the telnet traffic may not get through. ๐Ÿ’…


7. APPLICATION LAYER - ROUTING PROTOCOLS ๐ŸŒˆ

7.1. INTRODUCTION

An Autonomous System (AS) is defined as a set of routers all belonging under the same authority and all subject to a consistent set of routing policies. Interior gateway protocols (IGPs) are used to distribute routing information inside of an AS (i.e. intra-AS routing). Exterior gateway protocols are used to exchange routing information between ASs (i.e. inter-AS routing). ๐Ÿ“

7.1.1. Routing Security Considerations ๐Ÿ”ฅ

Routing is one of the few places where the Robustness Principle (be liberal in what you accept) does not apply. Routers should be relatively suspicious in accepting routing data from other routing systems. ๐Ÿ™ˆ

A router SHOULD provide the ability to rank routing information sources from most trustworthy to least trustworthy and to accept routing information about any particular destination from the most trustworthy sources first. This was implicit in the original core/stub autonomous system routing model using EGP and various interior routing protocols. It is even more important with the demise of a central, trusted core. โœจ

A router SHOULD provide a mechanism to filter out obviously invalid routes (such as those for net 127). ๐Ÿงš

Routers MUST NOT by default redistribute routing data they do not themselves use, trust or otherwise consider invalid. In rare cases, it may be necessary to redistribute suspicious information, but this should only happen under direct intercession by some human agency. ๐Ÿ’€

In general, routers must be at least a little paranoid about accepting routing data from anyone, and must be especially careful when they distribute routing information provided to them by another party. See below for specific guidelines. ๐Ÿฆ‹

Routers SHOULD IMPLEMENT peer-to-peer authentication for those routing protocols that support them. ๐Ÿซถ

7.1.2. Precedence ๐Ÿ’œ

Except where the specification for a particular routing protocol specifies otherwise, a router SHOULD set the IP Precedence value for IP datagrams carrying routing traffic it originates to 6 (INTERNETWORK CONTROL).

DISCUSSION:

Routing traffic with VERY FEW exceptions should be the highest precedence traffic on any network. If a system's routing traffic can't get through, chances are nothing else will. ๐Ÿ˜ญ๐Ÿซถ


7.2. INTERIOR GATEWAY PROTOCOLS ๐ŸŒธ

7.2.1. INTRODUCTION

An Interior Gateway Protocol (IGP) is used to distribute routing information between the various routers in a particular AS. Independent of the algorithm used to implement a particular IGP, it should perform the following functions: ๐ŸŽ€

  1. Respond quickly to changes in the internal topology of an AS
  2. Provide a mechanism such that circuit flapping does not cause continuous routing updates
  3. Provide quick convergence to loop-free routing
  4. Utilize minimal bandwidth
  5. Provide equal cost routes to enable load-splitting
  6. Provide a means for authentication of routing updates

Current IGPs used in the internet today are characterized as either being being based on a distance-vector or a link-state algorithm. ๐ŸŒˆ

Several IGPs are detailed in this section, including those most commonly used and some recently developed protocols which may be widely used in the future. Numerous other protocols intended for use in intra-AS routing exist in the Internet community. โญ

A router which implements any routing protocol (other than static routes) MUST IMPLEMENT OSPF (see Section [7.2.2]) and MUST IMPLEMENT RIP (see Section [7.2.4]). A router MAY implement additional IGPs. ๐Ÿ‘‘

7.2.2. OPEN SHORTEST PATH FIRST - OSPF ๐Ÿฆ‹

7.2.2.1. Introduction

Shortest Path First (SPF) based routing protocols are a class of link-state algorithms which are based on the shortest-path algorithm of Dijkstra. Although SPF based algorithms have been around since the inception of the ARPANet, it is only recently that they have achieved popularity both inside both the IP and the OSI communities. In an SPF based system, each router obtains an exact replica of the entire topology database via a process known as flooding. Flooding insures a reliable transfer of the information. Each individual router then runs the SPF algorithm on its database to build the IP routing table. The OSPF routing protocol is an implementation of an SPF algorithm. The current version, OSPF version 2, is specified in [ROUTE:1]. Note that RFC-1131, which describes OSPF version 1, is obsolete. ๐Ÿงš

Note that to comply with Section [8.3] of this memo, a router which implements OSPF MUST implement the OSPF MIB [MGT:14]. ๐ŸŽ€

7.2.2.2. Specific Issues

Virtual Links

There is a minor error in the specification that can cause routing loops when all of the following conditions are simultaneously true: ๐Ÿ™ˆ

  1. A virtual link is configured through a transit area,
  2. Two separate paths exist, each having the same endpoints, but one utilizing only non-virtual backbone links, and the other using links in the transit area, and
  3. The latter path is part of the (underlying physical representation of the) configured virtual link, routing loops may occur.

To prevent this, an implementation of OSPF SHOULD invoke the calculation in Section 16.3 of [ROUTE:1] whenever any part of the path to the destination is a virtual link (the specification only says this is necessary when the first hop is a virtual link). ๐Ÿ’–

7.2.2.3. New Version of OSPF

As of this writing (4/4/94) there is a new version of the OSPF specification that is winding its way through the Internet standardization process. A prudent implementor will be aware of this and develop an implementation accordingly. โœจ

The new version fixes several errors in the current specification [ROUTE:1]. For this reason, implementors and vendors ought to expect to upgrade to the new version relatively soon. In particular, the following problems exist in [ROUTE:1] that the new version fixes: ๐Ÿ”ฅ

  • In [ROUTE:1], certain configurations of virtual links can lead to incorrect routing and/or routing loops. A fix for this is specified in the new specification.
  • In [ROUTE:1], OSPF external routes to For example, a router cannot import into an OSPF domain external routes both for 192.2.0.0, 255.255.0.0 and 192.2.0.0, 255.255.255.0. Routes such as these may become common with the deployment of CIDR [INTERNET:15]. This has been addressed in the new OSPF specification.
  • In [ROUTE:1], OSPF Network-LSAs originated before a router changes its OSPF Router ID can confuse the Dijkstra calculation if the router again becomes Designated Router for the network. This has been fixed. ๐ŸŒธ

7.2.3. INTERMEDIATE SYSTEM TO INTERMEDIATE SYSTEM - DUAL IS-IS

The American National Standards Institute (ANSI) X3S3.3 committee has defined an intra-domain routing protocol. This protocol is titled Intermediate System to Intermediate System Routeing Exchange Protocol. ๐Ÿ’…

Its application to an IP network has been defined in [ROUTE:2], and is referred to as Dual IS-IS (or sometimes as Integrated IS-IS). IS-IS is based on a link-state (SPF) routing algorithm and shares all the advantages for this class of protocols. ๐ŸŒˆ

7.2.4. ROUTING INFORMATION PROTOCOL - RIP ๐Ÿงš

7.2.4.1. Introduction โœจ

RIP is specified in [ROUTE:3] ๐Ÿ“– Even though RIP is still a big deal on the Internet, sophisticated setups are switching to the more modern IGPs we just covered, like the ones described above. ๐Ÿฆ‹

Another common job for RIP is acting as a router discovery protocol ๐Ÿงญ Section [4.3.3.10] briefly touches on this, so go check it out if you're curious. ๐ŸŒธ

7.2.4.2. Protocol Walk-Through ๐Ÿ’…

Dealing with changes in topology: [ROUTE:3], pp. 11

Okay bestie, this one is serious. ๐Ÿ˜ค An RIP implementation MUST provide a way to time out routes. Messages get lost sometimes, so implementations MUST NOT invalidate a route just because one update went missing. ๐Ÿซถ

By default, implementations MUST wait six times the update interval before invalidating a route. A router MAY have configuration options to change this value. ๐ŸŽ€

DISCUSSION: Routing stability is everything ๐Ÿ’– All the routers in a RIP autonomous system should use a similar timeout for invalidating routes, which is why implementations should default to the timeout value in the RIP specification. BUT that timeout is kind of overly cautious where packets rarely get lost. In those environments, a network manager might want to shorten the timeout so failures get fixed faster. โšก

IMPLEMENTATION: There's a super simple trick a router can use to invalidate routes promptly once they time out โœจ Every time the router scans its routing table for timed-out routes, it also notes the age of the least recently updated route that hasn't timed out yet. Subtract that age from the timeout period and you get the time until the router needs to scan the table again. Genius, right? ๐Ÿง 

Split Horizon: [ROUTE:3], pp. 14-15

An RIP implementation MUST implement split horizon, which is a scheme for avoiding problems caused by sending routes back in updates to the router they were learned from. ๐Ÿ™…โ€โ™€๏ธ

An RIP implementation SHOULD implement Split horizon with poisoned reverse, a variant of split horizon that still sends routes learned from a router back to that router, but sets their metric to infinity. Since poisoned reverse can add routing overhead, implementations MAY include an option to choose whether poisoned reverse is in effect. An implementation SHOULD limit how long it sends reverse routes at an infinite metric. ๐ŸŒˆ

IMPLEMENTATION: Each of the following algorithms can limit how long poisoned reverse applies to a route ๐Ÿ’œ The first one is more complex, but it does a more complete job of only using poisoned reverse when it's actually needed.

The goal of both algorithms is the same: poison reverse gets applied to any destination whose route changed in the last Route Lifetime (typically 180 seconds), unless the router can be sure the previous route used the same output interface. The Route Lifetime matters here because that's how long RIP keeps an old route around before calling it stale. โณ

Here are the time intervals and derived variables used in the algorithms:

Tu   The Update Timer; the number of seconds between
     RIP updates.  This typically defaults to 30
     seconds.

Rl   The Route Lifetime, in seconds.  This is the
     amount of time that a route is presumed to be
     good, without requiring an update.  This typically
     defaults to 180 seconds.

Ul   The Update Loss; the number of consecutive updates
     that have to be lost or fail to mention a route
     before RIP deletes the route.  Ul is calculated to
     be (Rl/Tu)+1.  The +1 is to account for the fact
     that the first time the ifcounter is decremented
     will be less than Tu seconds after it is
     initialized.  Typically, Ul will be 7: (180/30)+1.

In   The value to set ifcounter to when a destination
     is newly learned.  This value is Ul-4, where the 4
     is RIP's garbage collection timer/30

The first algorithm goes like this:

  • Every destination has a counter called the ifcounter. Poison reverse is done for any route whose destination's ifcounter is greater than zero.
  • After a regular update is sent (not a triggered one or one sent in response to a request), all the non-zero ifcounters get decremented by one.
  • When a route to a destination is created, its ifcounter gets set like this:
    • If the new route is superseding a valid route, and the old route used a different (logical) output interface, then the ifcounter is set to Ul.
    • If the new route is superseding a stale route, and the old route used a different (logical) output interface, then the ifcounter is set to MAX(0, Ul - INT(seconds that the route has been stale/Ut)).
    • If there was no previous route to the destination, the ifcounter is set to In.
    • Otherwise, the ifcounter is set to zero.
  • RIP also keeps a timer called the resettimer. Poison reverse is done on all routes whenever the resettimer has not expired (no matter what the ifcounter values are). ๐Ÿ•ฐ๏ธ
  • When RIP is started, restarted, reset, or has its routing table cleared, it sets the resettimer to go off in Rl seconds. ๐Ÿ”„

The second algorithm is the same as the first, except that:

  • The rules that set the ifcounter to non-zero values are changed to always set it to Rl/Tu, and
  • The resettimer is eliminated. ๐Ÿ—‘๏ธ

Triggered updates: [ROUTE:3], pp. 15-16; pp. 29

Triggered updates (also called flash updates) are how a router immediately tells its neighbors when it adds or deletes routes or changes their metrics โšก A router MUST send a triggered update when routes are deleted or their metrics are increased. A router MAY send a triggered update when routes are added or their metrics are decreased. ๐Ÿฆ‹

Triggered updates can cause a lot of routing overhead, so implementations MUST use this mechanism to limit how often they happen:

  1. When a router sends a triggered update, it sets a timer to a random time between one and five seconds in the future. The router must not generate additional triggered updates before this timer expires.
  2. If the router would generate a triggered update during this interval, it sets a flag saying a triggered update is desired. The router also logs the desired triggered update.
  3. When the triggered update timer expires, the router checks the triggered update flag. If the flag is set, the router sends a single triggered update that includes all of the logged changes. The router then clears the flag and, since a triggered update was sent, restarts this algorithm.
  4. The flag is also cleared whenever a regular update is sent.

Triggered updates SHOULD include all routes that have changed since the most recent regular (non-triggered) update. Triggered updates MUST NOT include routes that have not changed since the most recent regular update. ๐ŸŽฏ

DISCUSSION: Sending every route, changed or not, in triggered updates is a no-go ๐Ÿ™…โ€โ™€๏ธ Many Internet routing tables are huge, so that could waste a ton of bandwidth on triggered updates.

Use of UDP: [ROUTE:3], pp. 18-19.

RIP packets sent to an IP broadcast address SHOULD have their initial TTL set to one. ๐Ÿ“ก

Also, to comply with Section [6.1] of this memo, a router MUST use UDP checksums in the RIP packets it originates, MUST discard RIP packets received with invalid UDP checksums, but MUST not discard received RIP packets simply because they do not contain UDP checksums. ๐Ÿง

Addressing Considerations: [ROUTE:3], pp. 22

A RIP implementation SHOULD support host routes. If it does not, it MUST (as described on page 27 of [ROUTE:3]) ignore host routes in received updates. A router MAY log ignored host routes. ๐Ÿ 

The special address 0.0.0.0 is used to describe a default route ๐ŸŒŸ A default route is the route of last resort (i.e. when a route to the specific net doesn't exist in the routing table). The router MUST be able to create a RIP entry for the address 0.0.0.0. ๐Ÿ‘‘

Input Processing - Response: [ROUTE:3], pp. 26

When processing an update, the following validity checks MUST be performed: ๐Ÿ”

  • The response MUST be from UDP port 520.
  • The source address MUST be on a directly connected subnet (or on a directly connected, non-subnetted network) to be considered valid.
  • The source address MUST NOT be one of the router's addresses.

Okay so some networks, media, and interfaces let a sending node receive the packets it broadcasts ๐Ÿ‘€ which is kinda wild. So a router must not accept its own packets as valid routing updates and process them. That last bit stops a router from accepting its own routing updates and processing them, because it would be assuming some other router on the network sent them ๐Ÿ™ˆ

An implementation MUST NOT replace an existing route if the metric received is equal to the existing metric except in accordance with the following heuristic. ๐Ÿ’…

An implementation MAY choose to implement the following heuristic to deal with the above situation. Normally it's useless to switch the route to a network from one router to another if both are advertised at the same metric, ngl. But the route one of the routers is advertising might be in the process of timing out โณ So instead of waiting for it to time out, the new route can be used after a specified amount of time has elapsed. If this heuristic is implemented, it MUST wait at least halfway to the expiration point before the new route is installed. โœจ

7.2.4.3. Specific Issues ๐ŸŽ€

RIP Shutdown

An implementation of RIP SHOULD provide for a graceful shutdown using the following steps: ๐Ÿฆ‹

  1. Input processing is terminated,
  2. Four updates are generated at random intervals of between two and four seconds, These updates contain all routes that were previously announced, but with some metric changes. Routes that were being announced at a metric of infinity should continue to use this metric. Routes that had been announced with a non-infinite metric should be announced with a metric of 15 (infinity - 1).

DISCUSSION: The metric used for the above really ought to be 16 (infinity) ๐Ÿ˜ญ Setting it to 15 is a kludge to avoid breaking certain old hosts which wiretap the RIP protocol ๐Ÿ’€ Such a host will (erroneously) abort a TCP connection if it tries to send a datagram on the connection while the host has no route to the destination. That's true even if the period with no route lasts only a few seconds while RIP picks an alternate path to the destination.

RIP Split Horizon and Static Routes

Split horizon SHOULD be applied to static routes by default. An implementation SHOULD provide a way to specify, per static route, that split horizon should not be applied to this route. ๐ŸŒธ

7.2.5. GATEWAY TO GATEWAY PROTOCOL - GGP ๐Ÿ“

The Gateway to Gateway protocol is considered obsolete and SHOULD NOT be implemented. ๐Ÿฅ€

7.3. EXTERIOR GATEWAY PROTOCOLS ๐ŸŒˆ

7.3.1. INTRODUCTION ๐Ÿ’œ

Exterior Gateway Protocols are used for inter-Autonomous System routing. They swap reachability information for a set of networks inside one autonomous system with a neighboring autonomous system ๐Ÿงš

The area of inter-AS routing is a current hot topic of research inside the Internet Engineering Task Force ๐Ÿ”ฅ The Exterior Gateway Protocol (EGP) described in Section [7.3.3] has traditionally been the inter-AS protocol of choice. The Border Gateway Protocol (BGP) gets rid of a lot of EGP's restrictions and limitations, so it's growing super fast in popularity ๐Ÿ“ˆ A router is not required to implement any inter-AS routing protocol. However, if a router does implement EGP it also MUST IMPLEMENT BGP. ๐Ÿ‘‘

Although it wasn't designed as an exterior gateway protocol, RIP (described in Section [7.2.4]) is sometimes used for inter-AS routing ๐Ÿ™ƒ

7.3.2. BORDER GATEWAY PROTOCOL - BGP โœจ

7.3.2.1. Introduction ๐Ÿฆ‹

The Border Gateway Protocol (BGP) is an inter-AS routing protocol which swaps network reachability information with other BGP speakers. The info for a network includes the complete list of ASs that traffic must transit to reach that network. That lets you use the info to keep paths loop-free. It's enough info to build a graph of AS connectivity, which is how routing loops get pruned and some AS-level policy decisions get enforced ๐Ÿง 

BGP is defined by [ROUTE:4]. [ROUTE:5] covers the proper usage of BGP on the Internet and has some useful implementation hints and guidelines. [ROUTE:12] and [ROUTE:13] give extra useful info ๐Ÿ“š

To comply with Section [8.3] of this memo, a router which implements BGP MUST also implement the BGP MIB [MGT:15]. ๐ŸŽ€

To describe the policy decisions BGP can enforce, you have to focus on the rule that an AS only advertises to its neighbor ASs the routes it actually uses itself. This rule matches the hop-by-hop routing paradigm used all over the current Internet ๐ŸŒ Some policies just can't be supported by hop-by-hop routing, so they need stuff like source routing to enforce them. For example, BGP doesn't let one AS send traffic to a neighbor AS and have that traffic take a different route than the traffic that started in the neighbor AS. On the flip side, BGP can support any policy that fits the hop-by-hop routing paradigm ๐Ÿ’…

Implementors of BGP are strongly encouraged to follow the recommendations outlined in Section 6 of [ROUTE:5]. ๐Ÿซถ

7.3.2.2. Protocol Walk-through ๐ŸŒŸ

BGP supports pretty complex routing policies (see Section 4.2 in [ROUTE:5] for an example), but not every BGP implementor has to support those policies. At a minimum, though, a BGP implementation does the following: ๐Ÿญ

  1. SHOULD allow an AS to control announcements of the BGP learned routes to adjacent AS's. Implementations SHOULD support such control with at least the granularity of a single network. Implementations SHOULD also support such control with the granularity of an autonomous system, where the autonomous system may be either the autonomous system that originated the route, or the autonomous system that advertised the route to the local system (adjacent autonomous system). ๐ŸŒธ
  2. SHOULD allow an AS to prefer a particular path to a destination (when more than one path is available). This function SHOULD be implemented by letting the system administrator assign weights to Autonomous Systems, and having the route selection process pick the route with the lowest weight (where the weight of a route is defined as the sum of the weights of all AS's in the AS_PATH path attribute associated with that route). ๐Ÿง
  3. SHOULD allow an AS to ignore routes with certain AS's in the AS_PATH path attribute. This can be done with the technique in (2), by assigning infinity as the weight for those AS's. The route selection process must ignore routes that have weight equal to infinity. ๐Ÿ™…โ€โ™€๏ธ

7.3.3. EXTERIOR GATEWAY PROTOCOL - EGP ๐ŸŒท

7.3.3.1. Introduction ๐Ÿ’–

The Exterior Gateway Protocol (EGP) specifies an EGP used to swap reachability information between routers in the same or different autonomous systems. EGP isn't really considered a routing protocol, since there's no standard interpretation (metric) for the distance fields in the EGP update message. So distances are only comparable among routers in the same AS. It's still designed to give high-quality reachability info, both about neighbor routers and about routes to non-neighbor routers โœจ

EGP is defined by [ROUTE:6]. An implementor almost certainly wants to read [ROUTE:7] and [ROUTE:8] as well, since they have useful explanations and background material ๐Ÿ“–

DISCUSSION: The current EGP spec has serious limitations, most importantly a restriction that only lets routers advertise networks reachable from inside the router's own autonomous system ๐Ÿ˜ค This restriction against passing along third-party EGP info is there to prevent long-lived routing loops. It effectively limits EGP to a two-level hierarchy. RFC-975 is not a part of the EGP specification, and should be ignored. ๐Ÿ™ˆ

7.3.3.2 Protocol Walk-through ๐ŸŽ€

okay bestie, this is the EGP rules section and it's giving checklist ๐Ÿ’… let's go one by one โœจ

Indirect Neighbors: RFC-888, pp. 26 ๐Ÿฆ‹

An implementation of EGP MUST include indirect neighbor support.

Polling Intervals: RFC-904, pp. 10 โฑ๏ธ

The interval between Hello command retransmissions and the interval between Poll retransmissions SHOULD be configurable but there MUST be a minimum value defined.

The interval at which an implementation will respond to Hello commands and Poll commands SHOULD be configurable but there MUST be a minimum value defined.

Network Reachability: RFC-904, pp. 15 ๐ŸŒธ

An implementation MUST default to not providing the external list of routers in other autonomous systems. Only the internal list of routers together with the nets which are reachable via those routers should be included in an Update Response/Indication packet. However, an implementation MAY elect to provide a configuration option enabling the external list to be provided. An implementation MUST NOT include in the external list routers which were learned via the external list provided by a router in another autonomous system. An implementation MUST NOT send a network back to the autonomous system from which it is learned, i.e. it MUST do split-horizon on an autonomous system level. ๐Ÿšซ

If more than 255 internal or 255 external routers need to be specified in a Network Reachability update, the networks reachable from routers that can not be listed MUST be merged into the list for one of the listed routers. Which of the listed routers is chosen for this purpose SHOULD be user configurable, but SHOULD default to the source address of the EGP update being generated.

An EGP update contains a series of blocks of network numbers, where each block contains a list of network numbers reachable at a particular distance via a particular router. If more than 255 networks are reachable at a particular distance via a particular router, they are split into multiple blocks (all of which have the same distance). Similarly, if more than 255 blocks are required to list the networks reachable via a particular router, the router's address is listed as many times as necessary to include all of the blocks in the update. ๐Ÿงฉ

Unsolicited Updates: RFC-904, pp. 16 ๐Ÿ“ฃ

If a network is shared with the peer, an implementation MUST send an unsolicited update upon entry to the Up state assuming that the source network is the shared network.

Neighbor Reachability: RFC-904, pp. 6, 13-15 ๐Ÿ”

The table on page 6 which describes the values of j and k (the neighbor up and down thresholds) is incorrect. It is reproduced correctly here:

Name    Active  Passive Description
-----------------------------------------------
 j         3       1    neighbor-up threshold
 k         1       0    neighbor-down threshold

The value for k in passive mode also specified incorrectly in RFC-904, pp. 14 The values in parenthesis should read:

(j = 1, k = 0, and T3/T1 = 4)

As an optimization, an implementation can refrain from sending a Hello command when a Poll is due. If an implementation does so, it SHOULD provide a user configurable option to disable this optimization. โšก

Abort timer: RFC-904, pp. 6, 12, 13 โน๏ธ

An EGP implementation MUST include support for the abort timer (as documented in section 4.1.4 of RFC-904). An implementation SHOULD use the abort timer in the Idle state to automatically issue a Start event to restart the protocol machine. Recommended values are P4 for a critical error (Administratively prohibited, Protocol Violation and Parameter Problem) and P5 for all others. The abort timer SHOULD NOT be started when a Stop event was manually initiated (such as via a network management protocol). ๐Ÿ’€

Cease command received in Idle state: RFC-904, pp. 13 ๐Ÿ™…โ€โ™€๏ธ

When the EGP state machine is in the Idle state, it MUST reply to Cease commands with a Cease-ack response.

Hello Polling Mode: RFC-904, pp. 11 ๐Ÿ’œ

An EGP implementation MUST include support for both active and passive polling modes.

Neighbor Acquisition Messages: RFC-904, pp. 18 ๐Ÿ“

As noted the Hello and Poll Intervals should only be present in Request and Confirm messages. Therefore the length of an EGP Neighbor Acquisition Message is 14 bytes for a Request or Confirm message and 10 bytes for a Refuse, Cease or Cease-ack message. Implementations MUST NOT send 14 bytes for Refuse, Cease or Cease-ack messages but MUST allow for implementations that send 14 bytes for these messages. ๐Ÿ“

Sequence Numbers: RFC-904, pp. 10 ๐Ÿ”ข

Response or indication packets received with a sequence number not equal to S MUST be discarded. The send sequence number S MUST be incremented just before the time a Poll command is sent and at no other times.


7.3.4 INTER-AS ROUTING WITHOUT AN EXTERIOR PROTOCOL ๐ŸŒ‰

It is possible to exchange routing information between two autonomous systems or routing domains without using a standard exterior routing protocol between two separate, standard interior routing protocols. The most common way of doing this is to run both interior protocols independently in one of the border routers with an exchange of route information between the two processes.

As with the exchange of information from an EGP to an IGP, without appropriate controls these exchanges of routing information between two IGPs in a single router are subject to creation of routing loops. ๐Ÿ”„

7.4 STATIC ROUTING ๐Ÿ“

Static routing provides a means of explicitly defining the next hop from a router for a particular destination. A router SHOULD provide a means for defining a static route to a destination, where the destination is defined by an address and an address mask. The mechanism SHOULD also allow for a metric to be specified for each static route.

A router which supports a dynamic routing protocol MUST allow static routes to be defined with any metric valid for the routing protocol used. The router MUST provide the ability for the user to specify a list of static routes which may or may not be propagated via the routing protocol. In addition, a router SHOULD support the following additional information if it supports a routing protocol that could make use of the information. They are:

  • TOS,
  • Subnet mask, or
  • A metric specific to a given routing protocol that can import the route.

DISCUSSION: We intend that one needs to support only the things useful to the given routing protocol. The need for TOS should not require the vendor to implement the other parts if they are not used.

Whether a router prefers a static route over a dynamic route (or vice versa) or whether the associated metrics are used to choose between conflicting static and dynamic routes SHOULD be configurable for each static route.

A router MUST allow a metric to be assigned to a static route for each routing domain that it supports. Each such metric MUST be explicitly assigned to a specific routing domain. For example:

        route 36.0.0.0 255.0.0.0 via 192.19.200.3 rip metric 3

        route 36.21.0.0 255.255.0.0 via 192.19.200.4 ospf inter-area
        metric 27
        route 36.22.0.0 255.255.0.0 via 192.19.200.5 egp 123 metric 99

        route 36.23.0.0 255.255.0.0 via 192.19.200.6 igrp 47 metric 1 2
        3 4 5

DISCUSSION: It has been suggested that, ideally, static routes should have preference values rather than metrics (since metrics can only be compared with metrics of other routes in the same routing domain, the metric of a static route could only be compared with metrics of other static routes). This is contrary to some current implementations, where static routes really do have metrics, and those metrics are used to determine whether a particular dynamic route overrides the static route to the same destination. Thus, this document uses the term metric rather than preference. ๐Ÿค“

This technique essentially makes the static route into a RIP route, or an OSPF route (or whatever, depending on the domain of the metric). Thus, the route lookup algorithm of that domain applies. However, this is NOT route leaking, in that coercing a static route into a dynamic routing domain does not authorize the router to redistribute the route into the dynamic routing domain.

For static routes not put into a specific routing domain, the route lookup algorithm is:

  1. Basic match
  2. Longest match
  3. Weak TOS (if TOS supported)
  4. Best metric (where metric are implementation-defined)

The last step may not be necessary, but it's useful in the case where you want to have a primary static route over one interface and a secondary static route over an alternate interface, with failover to the alternate path if the interface for the primary route fails. ๐Ÿ›Ÿ

7.5 FILTERING OF ROUTING INFORMATION ๐Ÿซง

Each router within a network makes forwarding decisions based upon information contained within its forwarding database. In a simple network the contents of the database may be statically configured. As the network grows more complex, the need for dynamic updating of the forwarding database becomes critical to the efficient operation of the network.

If the data flow through a network is to be as efficient as possible, it is necessary to provide a mechanism for controlling the propagation of the information a router uses to build its forwarding database. This control takes the form of choosing which sources of routing information should be trusted and selecting which pieces of the information to believe. The resulting forwarding database is a filtered version of the available routing information.

In addition to efficiency, controlling the propagation of routing information can reduce instability by preventing the spread of incorrect or bad routing information.

In some cases local policy may require that complete routing information not be widely propagated.

These filtering requirements apply only to non-SPF-based protocols (and therefore not at all to routers which don't implement any distance vector protocols).

7.5.1 Route Validation ๐Ÿ”

A router SHOULD log as an error any routing update advertising a route to network zero, subnet zero, or subnet -1, unless the routing protocol from which the update was received uses those values to encode special routes (such as default routes).

7.5.2. Basic Route Filtering ๐ŸŽ€

okay so filtering routing info is how a router decides which paths it actually uses to forward the packets it gets ๐Ÿฆ‹. A router should be super picky about which sources it listens to and what it believes, bestie ๐Ÿ’…. So a router MUST provide the ability to specify:

  • On which logical interfaces routing information will be accepted, and which routes will be accepted from each logical interface.
  • Whether all routes or only a default route is advertised on a logical interface.

Some routing protocols don't even recognize logical interfaces as a source of routing info ๐Ÿ™ˆ. In that case the router MUST provide the ability to specify:

  • from which other routers routing information will be accepted.

Here's an example that's lowkey so relatable โœจ. Say a router connects one or more leaf networks to the main backbone of a bigger network. Each leaf network only has one way in and one way out, so the router can just send them a default route ๐Ÿ“. It advertises the leaf networks to the main network.

7.5.3. Advanced Route Filtering ๐ŸŒธ

okay so as a network gets more complex, it's giving the need for more complex route filtering ๐Ÿ˜ญ. Therefore, a router SHOULD provide the ability to specify independently for each routing protocol:

  • Which logical interfaces or routers' routing information (routes) will be accepted from, and which routes will be believed from each other router or logical interface,
  • Which routes will be sent via which logical interface(s), and
  • Which routers' routing information will be sent to, if this is supported by the routing protocol in use.

Honestly, a lot of the time it's way better to give routing info a reliability ranking instead of just the simple "believe it or don't" choice from the first bullet above ๐Ÿ‘‘. A router MAY provide the ability to specify:

  • A reliability or preference to be assigned to each route received. A route with higher reliability will be chosen over one with lower reliability, regardless of the routing metric associated with each route.

If a router supports assigning preferences, it MUST NOT propagate any routes it doesn't prefer as first party information ๐Ÿ’…. If the routing protocol being used to propagate the routes doesn't support telling first and third party information apart, the router MUST NOT propagate any routes it doesn't prefer.

DISCUSSION:

Picture this โœจ: a router gets a route to network C from router R, and a route to that same network from router S. If router R is considered more reliable than router S, then traffic headed for network C gets forwarded to router R, no matter what route came in from router S. Iconic, right? ๐Ÿงš

Routing information for routes the router doesn't use (router S in the example above) MUST NOT be passed to any other router. Not even a little bit ๐Ÿ™…โ€โ™€๏ธ.


7.6. INTER-ROUTING-PROTOCOL INFORMATION EXCHANGE ๐Ÿฆ‹

Okay this section is about routers swapping routing info between separate IP interior routing protocols ๐ŸŒˆ. Routers MUST be able to exchange routing information between separate IP interior routing protocols, if independent IP routing processes can run in the same router. Routers MUST provide some mechanism for avoiding routing loops when routers are configured for bi-directional exchange of routing information between two separate interior routing processes, because loops are a whole mess ๐Ÿ’€. Routers MUST provide some priority mechanism for choosing routes from among independent routing processes. Routers SHOULD provide administrative control of IGP-IGP exchange when it's used across administrative boundaries.

Routers SHOULD also provide some mechanism for translating or transforming metrics on a per network basis โœจ. Routers (or routing protocols) MAY allow for global preference of exterior routes imported into an IGP.

DISCUSSION:

Different IGPs use different metrics, so when you bring info from one protocol into another protocol with a different kind of metric, you need some kind of translation trick ๐Ÿ”ฅ. Some IGPs can run multiple instances within the same router or set of routers. In that setup, metric info can be preserved exactly or translated.

There are at least two techniques for translating between different routing processes ๐Ÿ’œ. The static (or reachability) approach uses the existence of a route advertisement in one IGP to generate a route advertisement in the other IGP with a given metric. The translation or tabular approach uses the metric in one IGP to create a metric in the other IGP, either through a function (like adding a constant) or a table lookup.

Bi-directional exchange of routing info is seriously dangerous without control mechanisms to limit feedback ๐Ÿ˜ญ. This is the same problem distance vector routing protocols have to deal with using the split horizon technique, and the one EGP handles with the third-party rule. Routing loops can be avoided explicitly, using tables or lists of permitted/denied routes, or implicitly, using a split horizon rule, a no-third-party rule, or a route tagging mechanism. Vendors are encouraged to use implicit techniques where possible, since that makes life easier for network operators ๐Ÿซถ.


8. APPLICATION LAYER - NETWORK MANAGEMENT PROTOCOLS ๐Ÿงš

Note that this chapter supersedes any requirements stated in section 6.3 of [INTRO:3] ๐Ÿ’….

8.1. The Simple Network Management Protocol - SNMP โœจ

8.1.1. SNMP Protocol Elements ๐ŸŽ€

Routers MUST be manageable by SNMP [MGT:3]. The SNMP MUST operate using UDP/IP as its transport and network protocols. Others MAY be supported (e.g., see [MGT:25, MGT:26, MGT:27, and MGT:28]). SNMP management operations MUST operate as if the SNMP was implemented on the router itself. Specifically, management operations MUST be effected by sending SNMP management requests to any of the IP addresses assigned to any of the router's interfaces. The actual management operation may be performed either by the router or by a proxy for the router ๐Ÿฆ‹.

DISCUSSION:

This wording is meant to allow management either by proxy ๐ŸŒธ, where the proxy device responds to SNMP packets that have one of the router's IP addresses in the packet's destination address field. Or the SNMP can be implemented directly in the router, so it receives packets and responds to them the right way ๐Ÿ’….

It's super important that management operations can be sent to one of the router's IP addresses ๐Ÿ™Œ. When you're diagnosing network problems, the only thing that identifies the router might be one of its IP addresses, maybe obtained by looking through another router's routing table ๐Ÿ•ต๏ธโ€โ™€๏ธ.

All SNMP operations (get, get-next, get-response, set, and trap) MUST be implemented ๐Ÿ‘‘.

Routers MUST provide a mechanism for rate-limiting the generation of SNMP trap messages. Routers MAY provide this mechanism via the algorithms for asynchronous alert management described in [MGT:5] ๐ŸŒˆ.

DISCUSSION:

Everyone agrees rate-limiting traps is needed ๐Ÿ˜ค, but there isn't yet consensus on the best way to do it. The reference cited is considered experimental ๐Ÿงช.

8.2. Community Table ๐Ÿ’–

For the purposes of this specification, we assume there's an abstract community table in the router โœจ. This table has several entries, each one for a specific community and containing the parameters needed to completely define that community's attributes. How the abstract community table actually gets implemented is, of course, up to the implementation ๐Ÿซถ.

A router's community table MUST allow for at least one entry and SHOULD allow for at least two entries ๐Ÿ“.

DISCUSSION:

A community table with zero capacity is literally useless ๐Ÿ’€. The router won't recognize any communities, so all SNMP operations get rejected.

So one entry is the minimum useful size for the table. Having two entries lets one be read-only while the other has write capabilities ๐Ÿฆ‹.

Routers MUST allow the user to manually (i.e., without using SNMP) examine, add, delete and change entries in the SNMP community table. The user MUST be able to set the community name. The user MUST be able to configure communities as read-only (i.e., they do not allow SETs) or read-write (i.e., they do allow SETs) ๐Ÿ”.

The user MUST be able to define at least one IP address to which traps are sent for each community. These addresses MUST be definable on a per-community basis. Traps MUST be enablable or disablable on a per-community basis ๐ŸŽ€.

A router SHOULD provide the ability to specify a list of valid network managers for any particular community ๐Ÿ‘‘. If that's enabled, a router MUST validate the source address of the SNMP datagram against the list, and MUST discard the datagram if its address doesn't appear there. If the datagram is discarded, the router MUST take all actions appropriate to an SNMP authentication failure ๐Ÿšจ.

DISCUSSION:

This is a pretty limited authentication system ๐Ÿ™ˆ, but paired with various forms of packet filtering, it might give a small boost in security.

The community table MUST be saved in non-volatile storage ๐Ÿ’œ.

The initial state of the community table SHOULD contain one entry, with the community name string public and read-only access. The default state of this entry MUST NOT send traps. If it is implemented, then this entry MUST remain in the community table until the administrator changes or deletes it ๐ŸŒธ.

DISCUSSION:

By default, traps aren't sent to this community. Trap PDUs are sent to unicast IP addresses, and that address has to be configured into the router somehow ๐Ÿงš. Before that configuration happens, there's no such address, so who would the trap even go to? ๐Ÿค” That's why trap sending to the public community defaults to disabled. An administrator can change this once the router is operational โœจ.

8.3. Standard MIBS โœจ

okay so every MIB that's relevant to a router's config has to get implemented, no exceptions ๐Ÿ’… here's the checklist:

  • The System, Interface, IP, ICMP, and UDP groups of MIB-II [MGT:2] MUST be implemented.
  • The Interface Extensions MIB [MGT:18] MUST be implemented.
  • The IP Forwarding Table MIB [MGT:20] MUST be implemented.
  • If the router implements TCP (e.g. for Telnet) then the TCP group of MIB-II [MGT:2] MUST be implemented.
  • If the router implements EGP then the EGP group of MIB-II [MGT:2] MUST be implemented.
  • If the router supports OSPF then the OSPF MIB [MGT:14] MUST be implemented.
  • If the router supports BGP then the BGP MIB [MGT:15] MUST be implemented.
  • If the router has Ethernet, 802.3, or StarLan interfaces then the Ethernet-Like MIB [MGT:6] MUST be implemented.
  • If the router has 802.4 interfaces then the 802.4 MIB [MGT:7] MAY be implemented.
  • If the router has 802.5 interfaces then the 802.5 MIB [MGT:8] MUST be implemented.
  • If the router has FDDI interfaces that implement ANSI SMT 7.3 then the FDDI MIB [MGT:9] MUST be implemented.
  • If the router has FDDI interfaces that implement ANSI SMT 6.2 then the FDDI MIB [MGT:29] MUST be implemented.
  • If the router has RS-232 interfaces then the RS-232 [MGT:10] MIB MUST be implemented.
  • If the router has T1/DS1 interfaces then the T1/DS1 MIB [MGT:16] MUST be implemented.
  • If the router has T3/DS3 interfaces then the T3/DS3 MIB [MGT:17] MUST be implemented.
  • If the router has SMDS interfaces then the SMDS Interface Protocol MIB [MGT:19] MUST be implemented.
  • If the router supports PPP over any of its interfaces then the PPP MIBs [MGT:11], [MGT:12], and [MGT:13] MUST be implemented.
  • If the router supports RIP Version 2 then the RIP Version 2 MIB [MGT:21] MUST be implemented.
  • If the router supports X.25 over any of its interfaces then the X.25 MIBs [MGT:22, MGT:23 and MGT:24] MUST be implemented.

8.4. Vendor Specific MIBS ๐ŸŽ€

the Internet Standard and Experimental MIBs don't cover everything. there's a whole pile of stats, state, config, and control info that a network element can have, and it's honestly super useful ๐Ÿ™ˆ so router vendors (and other network device makers) usually build their own MIB extensions to cover it. those are called Vendor Specific MIBs.

The Vendor Specific MIB for the router MUST provide access to all statistical, state, configuration, and control information that is not available through the Standard and Experimental MIBs that have been implemented. This information MUST be available for both monitoring and control operations.

DISCUSSION: The point here is that you should be able to do anything on the router over SNMP that you could do from a console ๐Ÿซถ there's a small amount of config that has to be in place before SNMP can work at all (like the router needs an IP address), and that first bit can't be done over SNMP. but once that starting config is done, the full set of capabilities ought to be available through network management โœจ

The vendor SHOULD make available the specifications for all Vendor Specific MIB variables. These specifications MUST conform to the SMI [MGT:1] and the descriptions MUST be in the form specified in [MGT:4].

DISCUSSION: Giving users the Vendor Specific MIB is a must ๐Ÿ’œ without it, people can't set up their network management systems to reach the vendor parameters, and then those parameters are basically useless ๐Ÿ˜ญ

The format of the MIB specification is spelled out too. Parsers that read MIB specs and build the tables the network management station needs do exist ๐Ÿงš but they usually only understand the standard MIB spec format.


8.5. Saving Changes ๐Ÿ’พ

Parameters altered by SNMP MAY be saved to non-volatile storage.

DISCUSSION: ok so here's why this one is a MAY and not a MUST:

  • The actual physical form of non-volatile storage isn't pinned down in this document. So parameters could be saved in NVRAM/EEPROM, a local floppy or hard disk, or on some TFTP file server or BOOTP server, and so on. Say the info lives in a file that gets pulled down over TFTP. Then a change made to a config parameter on the router would have to be sent back up to the file server that holds the config file. Or the SNMP operation would have to be aimed at the file server, and then the change would somehow have to make its way to the router. The answer to that isn't obvious at all ๐Ÿ™ˆ

This also puts way more requirements on the host holding the config info than just having a tftp server available. So much more that it's probably unsafe for a vendor to assume every potential customer has a suitable host ready to go ๐Ÿ˜ฌ

  • When to commit changed parameters to non-volatile storage is still up for debate. Some people want every change committed right away. Others only want changes committed to non-volatile storage when someone gives an explicit command ๐Ÿ’…

9. APPLICATION LAYER - MISCELLANEOUS PROTOCOLS ๐ŸŒˆ

For all additional application protocols that a router implements, the router MUST be compliant and SHOULD be unconditionally compliant with the relevant requirements of [INTRO:3].

9.1. BOOTP ๐Ÿ“

9.1.1. Introduction

The Bootstrap Protocol (BOOTP) is a UDP/IP-based protocol that lets a booting host configure itself dynamically, no babysitting required โœจ it gives the host its assigned IP address, the IP address of a boot server host, and the name of a file to load into memory and run ([APPL:1]). Other config info, like the local subnet mask, the local time offset, the addresses of default routers, and the addresses of various Internet servers, can also be handed to a host over BOOTP ([APPL:2]).

9.1.2. BOOTP Relay Agents

In lots of cases, BOOTP clients and their BOOTP server(s) aren't on the same IP network or subnet ๐Ÿฆ‹ when that happens, a third-party agent is required to pass BOOTP messages back and forth between clients and servers. That agent used to be called a BOOTP forwarding agent. But to avoid mixing it up with a router's IP forwarding function, it got renamed to the BOOTP relay agent.

DISCUSSION: A BOOTP relay agent does something different from a router's normal IP forwarding ๐Ÿ’– a router usually moves IP datagrams between networks pretty much transparently, but a BOOTP relay agent is better thought of as receiving BOOTP messages as their final destination and then generating brand-new BOOTP messages because of them. so don't just forward a BOOTP message straight through like it's a regular packet ๐Ÿ™…โ€โ™€๏ธ

This relay-agent functionality is most conveniently placed in the routers that connect the clients and servers (though it can also live in a host that's directly connected to the client subnet).

A router MAY provide BOOTP relay-agent capability. If it does, it MUST conform to the specifications in [APPL:3].

Section [5.2.3] talked about when a packet gets delivered locally (to the router). All locally delivered UDP messages whose UDP destination port number is BOOTPS (67) are considered for special processing by the router's logical BOOTP relay agent ๐Ÿ”ฅ

Sections [4.2.2.11] and [5.3.7] covered invalid IP source addresses. Going by those rules, a router must not forward any received datagram whose IP source address is 0.0.0.0. However, routers that support a BOOTP relay agent MUST accept for local delivery to the relay agent BOOTREQUEST messages whose IP source address is 0.0.0.0. that's the one exception, bestie ๐Ÿ‘‘


10. OPERATIONS AND MAINTENANCE ๐Ÿ› ๏ธ

This chapter supersedes any requirements stated in section 6.2 of [INTRO:3].

Operations and maintenance (O&M) facilities are an essential part of any router implementation ๐Ÿ’… they don't seem to have much to do with interoperability on the surface, but the network manager needs them to make the router interoperate, and to track down problems when it doesn't ๐Ÿ˜ญ this chapter also talks a bit about router initialization, plus facilities that help network managers secure and keep track of their networks ๐Ÿ”

10.1. Introduction ๐ŸŒธ

okay bestie, router O&M is everything you do to keep a router alive and healthy once it's sitting in the rack ๐Ÿงš these are the activities that count:

  • Diagnosing hardware problems in the router's processor, in its network interfaces, or in its connected networks, modems, or communication lines. ๐Ÿ”ง
  • Installing new hardware
  • Installing new software.
  • Restarting or rebooting the router after a crash. ๐Ÿ’€
  • Configuring (or reconfiguring) the router.
  • Detecting and diagnosing Internet problems such as congestion, routing loops, bad IP addresses, black holes, packet avalanches, and misbehaved hosts. ๐Ÿ™ˆ
  • Changing network topology, either temporarily (e.g., to bypass a communication line problem) or permanently.
  • Monitoring the status and performance of the routers and the connected networks. ๐Ÿ‘€
  • Collecting traffic statistics for use in (Inter-)network planning. ๐Ÿ“Š
  • Coordinating the above activities with appropriate vendors and telecommunications specialists. ๐Ÿค

Routers and their connected communication lines are usually run as one system by a centralized O&M organization. That org might have a (Inter-)network operation center, or NOC, to handle all of this. It is essential that routers support remote control and monitoring from that NOC through an Internet path, since routers might not be on the same network as their NOC ๐ŸŒ and a network failure can temporarily cut off access. So lots of NOCs insist that routers be reachable for network management by an alternative means, often dialup modems attached to console ports on the routers. Backup plans are everything, periodt ๐Ÿ’–

Since an IP packet crossing an internet will often go through routers controlled by more than one NOC, diagnosing an Internet problem will often need personnel from more than one NOC working together ๐Ÿซถ and sometimes the same router needs to be monitored by more than one NOC. That should only happen if it's actually necessary, though, because excessive monitoring could hurt a router's performance ๐Ÿ˜ญ

The monitoring tools a NOC can use range from simple to super sophisticated. Current implementations include multi-window, dynamic displays of the entire router system, which is iconic โœจ Using AI techniques for automatic problem diagnosis is proposed for the future ๐Ÿ”ฎ

Router O&M facilities are only one piece of the big, messy problem of Internet management. That problem involves not just multiple management organizations but also multiple protocol layers ๐Ÿฅž For example, at the current stage of the Internet architecture there is a strong coupling between host TCP implementations and eventual IP-level congestion in the router system [OPER:1]. So diagnosing congestion will sometimes require monitoring TCP statistics in hosts, which is so not what you'd expect ๐Ÿ’… There are currently a number of R&D efforts in progress in Internet management and, more specifically, router O&M. These R&D efforts have already produced standards for router O&M. This is also an area where vendor creativity can make a significant contribution ๐ŸŒˆ

10.2. Router Initialization ๐ŸŽ€

10.2.1. Minimum Router Configuration ๐Ÿฆ‹

There is a minimum set of conditions that must be satisfied before a router may forward packets. A router MUST NOT enable forwarding on any physical interface unless either:

  1. The router knows the IP address and associated subnet mask of at least one logical interface associated with that physical interface, or
  2. The router knows that the interface is an unnumbered interface and also knows its router-id.

These parameters MUST be explicitly configured:

  • A router MUST NOT use factory-configured default values for its IP addresses, subnet masks, or router-id, and
  • A router MUST NOT assume that an unconfigured interface is an unnumbered interface.

DISCUSSION: There have been instances in which routers have been shipped with vendor-installed default addresses for interfaces. In a few cases, this has resulted in routers advertising these default addresses into active networks. ๐Ÿ˜ฑ this is why we don't trust the factory defaults, bestie

10.2.2. Address and Address Mask Initialization ๐ŸŒท

A router MUST allow its IP addresses and their subnet masks to be statically configured and saved in permanent storage.

A router MAY obtain its IP addresses and their corresponding subnet masks dynamically as a side effect of the system initialization process (see Section 10.2.3]);

If the dynamic method is provided, the choice of method to be used in a particular router MUST be configurable.

As was described in Section [4.2.2.11], IP addresses are not permitted to have the value 0 or -1 for any of the <Host-number>, <Network-number>, or <Subnet-number> fields. Therefore, a router SHOULD NOT allow an IP address or subnet mask to be set to a value which would make any of the the three fields above have the value zero or -1. ๐Ÿ™…โ€โ™€๏ธ

DISCUSSION: It is possible, using variable length subnet masks, to create situations in which routing is ambiguous (i.e., two routes with different but equally-specific subnet masks match a particular destination address). ๐ŸŒ€ The authors suspect that a router could check whether a mask would cause ambiguous routing when setting it, and that implementors might be able to decrease their customer support costs by having routers prohibit or log such erroneous configurations. However, at this time routers are not required to make such checks, because no published method for accurately making this check is known. ๐Ÿคทโ€โ™€๏ธ

A router SHOULD make the following checks on any subnet mask it installs:

  • The mask is not all 1-bits.
  • The bits which correspond to the network number part of the address are all set to 1.

DISCUSSION: The masks associated with routes are also sometimes called subnet masks, but this test should not be applied to them. ๐Ÿง

10.2.3. Network Booting using BOOTP and TFTP ๐Ÿ’œ

There has been a lot of discussion on how routers can and should be booted from the network. ๐Ÿ—ฃ๏ธ In general, these discussions have centered around BOOTP and TFTP. Currently, there are routers that boot with TFTP from the network. There is no reason that BOOTP could not be used for locating the server that the boot image should be loaded from.

In general, BOOTP is a protocol used to boot end systems, and it needs some stretching to work with routers ๐Ÿซ  If a router is using BOOTP to locate the current boot host, it should send a BOOTP Request with its hardware address for its first interface. Or, if it has been configured otherwise before, it should send the request with either another interface's hardware address, or another number to put in the hardware address field of the BOOTP packet. This lets routers without hardware addresses (like sync line only routers) use BOOTP for bootload discovery, which is lowkey genius ๐Ÿง  TFTP can then be used to retrieve the image found in the BOOTP Reply. If there are no configured interfaces or numbers to use, a router MAY cycle through the interface hardware addresses it has until a match is found by the BOOTP server. ๐Ÿ”

A router SHOULD IMPLEMENT the ability to store parameters learned via BOOTP into local stable storage. A router MAY implement the ability to store a system image loaded over the network into local stable storage. ๐Ÿ’พ

A router MAY have a facility to allow a remote user to request that the router get a new boot image. Differentiation should be made between getting the new boot image from one of three locations: the one included in the request, from the last boot image server, and using BOOTP to locate a server. Three options, three different vibes, so keep them straight ๐Ÿ‘‘

10.3. Operation and Maintenance ๐Ÿ“

10.3.1. Introduction ๐Ÿ’–

There is a range of possible models for performing O&M functions on a router. ๐ŸŽญ At one extreme is the local-only model, under which O&M functions can only be executed locally (e.g., from a terminal plugged into the router machine). At the other extreme is the fully-remote model, which allows only an absolute minimum of functions to be performed locally (e.g., forcing a boot), with most O&M done remotely from the NOC. There are intermediate models too, such as one in which NOC personnel can log into the router as a host, using the Telnet protocol, to perform functions that can also be invoked locally. The local-only model may be adequate in a few router installations, but in general remote operation from a NOC will be required, so remote O&M provisions are required for most routers. ๐ŸŒ

Remote O&M functions may be exercised through a control agent (program). In the direct approach, the router would support remote O&M functions directly from the NOC using standard Internet protocols (e.g., SNMP, UDP or TCP). In the indirect approach, the control agent would support these protocols and control the router itself using proprietary protocols. The direct approach is preferred, although either approach is acceptable. โœ… The use of specialized host hardware and/or software that requires significant additional investment is discouraged, but some vendors may elect to provide the control agent as an integrated part of the network the routers are part of. If that's the case, it is required that a means be available to operate the control agent from a remote site using Internet protocols and paths, with equivalent functionality compared to a local agent terminal. ๐Ÿ›ฐ๏ธ

It is desirable that a control agent and any other NOC software tools a vendor provides operate as user programs in a standard operating system. Using the standard Internet protocols UDP and TCP for communicating with the routers should make that easier ๐Ÿซถ

Remote router monitoring and (especially) remote router control present important access control problems, and those must be addressed. ๐Ÿ”

Care must also be taken to control the use of router resources for these functions. It is not desirable to let router monitoring take more than some limited fraction of the router CPU time, for example. ๐Ÿ™…โ€โ™€๏ธ On the other hand, O&M functions must receive priority so they can be exercised when the router is congested, since that is often exactly when O&M is most needed ๐Ÿšจ

10.3.2. Out Of Band Access ๐Ÿฆ‹

Okay bestie, so routers MUST support Out-Of-Band (OOB) access ๐Ÿ”. OOB access SHOULD give you the same functionality as in-band access โœจ.

DISCUSSION: This Out-Of-Band access gives the NOC a way to reach isolated routers when network access is down ๐Ÿ˜ญ. Out-Of-Band access is a seriously important tool for network admins because it lets you reach equipment without relying on the network connections ๐Ÿ’…. There are lots of ways to pull this off, but whichever one you pick, it's giving independence from the network connections, and that's the whole point ๐Ÿงš. One example is a serial port hooked up to a modem so you can dial in to the router ๐Ÿ“ž.

It's really important that OOB access has the same functionality as in-band access ๐Ÿ’œ. In-band access (reaching the box through the existing network connection) is kinda limiting, because most of the time admins need to reach a router to figure out why it's unreachable ๐Ÿ™ˆ. In-band access is still super important for configuring a router and troubleshooting the more subtle problems ๐Ÿ”ฅ.


10.3.2. Router O&M Functions ๐ŸŒธ

10.3.2.1. Maintenance - Hardware Diagnosis ๐Ÿ› ๏ธ

Each router SHOULD operate as a stand-alone device for local hardware maintenance ๐Ÿ“. There SHOULD be means available to run diagnostic programs at the router site using only on-site tools ๐Ÿงฐ. A router SHOULD be able to run diagnostics in case of a fault ๐Ÿฉบ. For suggested hardware and software diagnostics, see Section [10.3.3] โœจ.

10.3.2.2. Control - Dumping and Rebooting ๐Ÿ”„

A router MUST include both in-band and out-of-band mechanisms that let the network manager reload, stop, and restart the router ๐Ÿ‘‘. A router SHOULD also have a mechanism (like a watchdog timer) that reboots it automatically if it hangs because of a software or hardware fault ๐Ÿถโฐ.

A router SHOULD IMPLEMENT a mechanism for dumping the contents of its memory (and/or other state useful for vendor debugging after a crash) ๐Ÿง ๐Ÿ’ฅ. It can save that dump either on a stable storage device local to the router, or on another host via an up-line dump mechanism such as TFTP (see [OPER:2], [INTRO:3]) ๐Ÿ“ฆ.

10.3.2.3. Control - Configuring the Router โš™๏ธ

Every router has configuration parameters that might need to be set ๐ŸŽ›๏ธ. It SHOULD be possible to update the parameters without rebooting the router; at worst, a restart MAY be required ๐Ÿซถ. There may be cases where you can't change parameters without rebooting (for instance, changing the IP address of an interface) ๐Ÿ™ƒ. In those cases, care should be taken to minimize disruption to the router and the surrounding network ๐Ÿซง.

There SHOULD be a way to configure the router over the network, either manually or automatically ๐ŸŒ. A router SHOULD be able to upload or download its parameters from a host or another router, and those parameters SHOULD be convertible into some sort of text format for making changes, and then back into the form the router can read ๐Ÿ“. A router SHOULD have some sort of stable storage for its configuration ๐Ÿ’พ. A router SHOULD NOT believe protocols such as RARP, ICMP Address Mask Reply, and MAY not believe BOOTP ๐Ÿšซ.

DISCUSSION: It's necessary to note here that in the future, RARP, ICMP Address Mask Reply, BOOTP and other mechanisms may be needed to let a router auto-configure ๐Ÿค–. Even though routers may configure themselves automatically one day, the intent here is to discourage this in a production environment until auto-configuration has been tested more thoroughly ๐Ÿงช. The intent is not to discourage auto-configuration altogether ๐Ÿ™Œ. In cases where a router is expected to get its configuration automatically, it may be wise to let the router believe these things as it comes up, and then ignore them once it has its configuration ๐Ÿงšโ€โ™€๏ธ.

10.3.2.4. Netbooting of System Software ๐Ÿ’ฟ

A router SHOULD keep its system image in local non-volatile storage such as PROM, NVRAM, or disk ๐Ÿ’–. It MAY also be able to load its system software over the network from a host or another router ๐ŸŒ.

A router which can keep its system image in local non-volatile storage MAY be configurable to boot its system image over the network ๐Ÿฅฐ. A router which offers this option SHOULD be configurable to boot the system image in its non-volatile local storage if it can't boot its system image over the network ๐Ÿ›Ÿ.

DISCUSSION: It's super important that the router can come up and run on its own ๐ŸŒŸ. NVRAM might be a particular solution for routers in large networks, since changing PROMs can take forever for a network manager responsible for loads of routers or ones spread out geographically ๐Ÿ˜ฉ. Being able to netboot the system image matters because there should be an easy way for a router to get a bug fix or new feature faster than waiting for PROMs to get installed ๐Ÿš€. Also, if the router has NVRAM instead of PROMs, it will netboot the image and then put it in NVRAM ๐Ÿ’œ.

A router MAY also be able to tell apart different configurations based on which software it's running ๐Ÿ”. If configuration commands change from one software version to another, it would be really helpful if the router could use the configuration that matches the software ๐ŸŽ€.

10.3.2.5. Detecting and responding to misconfiguration ๐Ÿšจ

There MUST be mechanisms for detecting and responding to misconfigurations ๐Ÿ›‘. If a command is executed incorrectly, the router SHOULD give an error message โŒ. The router SHOULD NOT accept a poorly formed command as if it were correct ๐Ÿ™…โ€โ™€๏ธ.

DISCUSSION: Sometimes it's just not possible to detect errors: the command is correctly formed, but wrong with respect to the network ๐Ÿคทโ€โ™€๏ธ. The router may be able to catch that, but it might not be possible ๐Ÿซ .

Another form of misconfiguration is a misconfigured network that the router is attached to ๐Ÿ•ธ๏ธ. A router MAY detect misconfigurations in the network ๐Ÿ‘€. The router MAY log these findings to a file, either on the router or on a host, so the network manager sees there might be problems on the network ๐Ÿ“‹โœจ.

DISCUSSION: Examples of this might be another router using the same address as the one in question, or a router with the wrong subnet mask ๐Ÿ™ƒ. If a router detects problems like these, it's probably not the best idea for the router to try to fix things itself ๐Ÿ™…. That could do more harm than good ๐Ÿ’€.

10.3.2.6. Minimizing Disruption ๐Ÿ•Š๏ธ

Changing the configuration of a router SHOULD have minimal affect on the network ๐ŸŒท. Routing tables SHOULD NOT be unnecessarily flushed when a simple change is made to the router ๐Ÿšซ๐ŸŒŠ. If a router is running several routing protocols, stopping one routing protocol SHOULD NOT disrupt the other routing protocols, except in the case where one network is learned by more than one routing protocol ๐Ÿงฉ.

DISCUSSION: A network manager's whole goal is to run the network so that users get the best connectivity possible ๐ŸŒˆ. Reloading a router for a simple configuration change can cause disruptions in routing, and ultimately to the network and its users ๐Ÿ˜–. If routing tables get flushed unnecessarily, for instance, the default route is lost, along with the specific routes to sites within the network ๐Ÿ’”. That kind of disruption causes serious downtime for users. So the point of this section is that whenever possible, these disruptions should be avoided ๐Ÿซถ.

10.3.2.7. Control - Troubleshooting Problems ๐Ÿ”ง

(1) A router MUST provide in-band network access, but (except as required by Section [8.2]) for security considerations this access SHOULD be disabled by default ๐Ÿ”’. Vendors MUST document the default state of any in-band access ๐Ÿ“–.

DISCUSSION: In-band access mainly refers to access via the normal network protocols, which may or may not affect the permanent operational state of the router ๐Ÿง. This includes, but isn't limited to, Telnet/RLOGIN console access and SNMP operations ๐Ÿ’ป.

This was a point of contention between the "operational out of the box" and "secure out of the box" crowds ๐ŸฅŠ. Any automagic access to the router may introduce insecurities, but it may matter more to the customer to have a router that's reachable over the network as soon as it's plugged in ๐Ÿ”Œ. At least one vendor ships routers without any external console access, and depends on being able to reach the router over the network to finish configuring it ๐Ÿซฃ.

Basically, it's the vendor's call whether in-band access is enabled by default. But it's also the vendor's responsibility to make its customers aware of possible insecurities โš ๏ธ๐Ÿ’….

(2) A router MUST provide the ability to initiate an ICMP echo ๐Ÿ“ก. The following options SHOULD be implemented:

  • Choice of data patterns ๐ŸŽจ
  • Choice of packet size ๐Ÿ“
  • Record route ๐Ÿ›ค๏ธ

and the following additional options MAY be implemented:

  • Loose source route ๐Ÿงญ
  • Strict source route ๐Ÿงญ
  • Timestamps โฑ๏ธ

(3) A router SHOULD provide the ability to initiate a traceroute ๐Ÿ—บ๏ธ. If traceroute is provided, then the 3rd party traceroute SHOULD be implemented ๐Ÿ•ต๏ธโ€โ™€๏ธ.

Each of the above three facilities (if implemented) SHOULD have access restrictions placed on it, to prevent its abuse by unauthorized persons ๐Ÿ”๐Ÿ‘‘.

10.4. Security Considerations ๐Ÿ›ก๏ธ

10.4.1 Auditing and Audit Trails โœจ

Okay so auditing and billing are the absolute bane of every network operator's existence ๐Ÿ˜ญ, but they're also the two things that the security folks and the people paying the bills literally ask for the most. Auditing is worth it when it helps you keep your network running and guards your resources against abuse, as long as it doesn't cost you more than those resources are worth ๐Ÿ’….

(1) Configuration Changes

Router SHOULD provide a method for auditing a configuration change of a router, even if it's something as simple as recording the operator's initials and time of change ๐ŸŽ€.

DISCUSSION: Being able to track who changed what and when is highly desirable ๐Ÿ™ˆ, especially if your packets suddenly start getting routed through Alaska on their way across town ๐Ÿ’€.

(2) Packet Accounting

Vendors should strongly consider providing a system for tracking traffic levels between pairs of hosts or networks ๐Ÿ“Š. A mechanism that limits the collection of this information to specific pairs of hosts or networks is also strongly encouraged ๐Ÿซถ.

DISCUSSION: A host traffic matrix like the one described above can show the operator traffic trends they'd never spot from other stats ๐Ÿ‘€. It can also flag hosts or networks that are poking around the structure of the attached networks ๐Ÿ•ต๏ธโ€โ™€๏ธ, like a single external host trying to send packets to every IP address in a connected network's address range ๐Ÿ˜ค.

(3) Security Auditing

Routers MUST provide a method for auditing security related failures or violations, including the following ๐Ÿ”:

  • Authorization Failures: bad passwords, invalid SNMP communities, invalid authorization tokens ๐Ÿ™…โ€โ™€๏ธ,
  • Violations of Policy Controls: Prohibited Source Routes, Filtered Destinations, and ๐Ÿšซ
  • Authorization Approvals: good passwords, Telnet in-band access, console access โœ….

Routers MUST provide a method of limiting or disabling such auditing, but auditing SHOULD be on by default ๐Ÿ’–. Possible ways to audit include listing violations to a console if one is present, logging or counting them internally, or logging them to a remote security server through the SNMP trap mechanism or the Unix logging mechanism, as appropriate ๐Ÿฆ‹. A router MUST implement at least one of these reporting mechanisms, and it MAY implement more than one ๐ŸŒˆ.

10.4.2 Configuration Control ๐Ÿ”ง

A vendor has a responsibility to use good configuration control practices when creating the software and firmware loads for their routers ๐Ÿ‘‘. In particular, if a vendor makes updates and loads available for retrieval over the Internet, the vendor should also provide a way for the customer to confirm the load is a valid one, perhaps by verifying a checksum over the load ๐Ÿงš.

DISCUSSION: Lots of vendors now put out short notice updates of their software over the Internet ๐ŸŒธ. This is a great trend and should be encouraged ๐Ÿ’œ, but it does create a point of vulnerability in the configuration control process ๐Ÿ˜ฌ.

If a vendor lets the customer change a router's configuration parameters remotely, for example through a Telnet session, then that ability SHOULD be configurable and SHOULD default to off ๐Ÿ™…โ€โ™€๏ธ. The router SHOULD require a password or other valid authentication before permitting remote reconfiguration ๐Ÿ”’.

DISCUSSION: Letting your properly identified network operator tinker with your routers is necessary ๐Ÿ› ๏ธ. Letting anyone else do it is foolhardy ๐Ÿ’€.

A router MUST NOT have undocumented back door access and master passwords ๐Ÿšช. A vendor MUST ensure that any such access added for debugging or product development is deleted before the product is distributed to its customers ๐Ÿงน.

DISCUSSION: A vendor owes its customers an honest picture of the vulnerabilities in its code, including the ones it put there on purpose, like in-band access ๐Ÿ™ˆ. Trap doors, back doors and master passwords, whether intentional or unintentional, can turn a relatively secure router into a major problem on an operational network ๐Ÿ˜ญ. The supposed operational benefits just aren't worth the potential problems ๐Ÿ’….

11. References ๐Ÿ“š

Implementors should be aware that Internet protocol standards are occasionally updated ๐Ÿ”„. These references are current as of this writing, but a cautious implementor will always check a recent version of the RFC index to make sure an RFC hasn't been updated or superseded by another, more recent RFC ๐Ÿง. [INTRO:6] explains various ways to obtain a current RFC index ๐Ÿ—‚๏ธ.

APPL:1. B. Croft and J. Gilmore, Bootstrap Protocol (BOOTP), Request For Comments (RFC) 951, Stanford and SUN Microsystems, September 1985.

APPL:2. S. Alexander and R. Droms, DHCP Options and BOOTP Vendor Extensions, Request For Comments (RFC) 1533, Lachman Technology, Inc., Bucknell University, October 1993.

APPL:3. W. Wimer, Clarifications and Extensions for the Bootstrap Protocol, Request For Comments (RFC) 1542, Carnegie Mellon University, October 1993.

ARCH:1. DDN Protocol Handbook, NIC-50004, NIC-50005, NIC-50006 (three volumes), DDN Network Information Center, SRI International, Menlo Park, California, USA, December 1985.

ARCH:2. V. Cerf and R. Kahn, A Protocol for Packet Network Intercommunication," IEEE Transactions on Communication, May 1974. Also included in [ARCH:1].

ARCH:3. J. Postel, C. Sunshine, and D. Cohen, The ARPA Internet Protocol," Computer Networks, vol. 5, no. 4, July 1981. Also included in [ARCH:1].

ARCH:4. B. Leiner, J. Postel, R. Cole, and D. Mills, The DARPA Internet Protocol Suite, Proceedings of INFOCOM '85, IEEE, Washington, DC, March 1985. Also in: IEEE Communications Magazine, March 1985. Also available from the Information Sciences Institute, University of Southern California as Technical Report ISI-RS-85-153.

ARCH:5. D. Comer, Internetworking With TCP/IP Volume 1: Principles, Protocols, and Architecture, Prentice Hall, Englewood Cliffs, NJ, 1991.

ARCH:6. W. Stallings, Handbook of Computer-Communications Standards Volume 3: The TCP/IP Protocol Suite, Macmillan, New York, NY, 1990.

ARCH:7. J. Postel, Internet Official Protocol Standards, Request For Comments (RFC) 1610, STD 1, USC/Information Sciences Institute, July 1994.

ARCH:8. Information processing systems - Open Systems Interconnection - Basic Reference Model, ISO 7489, International Standards Organization, 1984.

FORWARD:1. IETF CIP Working Group (C. Topolcic, Editor), Experimental Internet Stream Protocol, Version 2 (ST-II), Request For Comments (RFC) 1190, CIP Working Group, October 1990.

FORWARD:2. A. Mankin and K. Ramakrishnan, Editors, Gateway Congestion Control Survey, Request For Comments (RFC) 1254, MITRE, Digital Equipment Corporation, August 1991.

FORWARD:3. J. Nagle, On Packet Switches with Infinite Storage, IEEE Transactions on Communications, vol. COM-35, no. 4, April 1987.

FORWARD:4. R. Jain, K. Ramakrishnan, and D. Chiu, Congestion Avoidance in Computer Networks With a Connectionless Network Layer, Technical Report DEC-TR-506, Digital Equipment Corporation.

FORWARD:5. V. Jacobson, Congestion Avoidance and Control, Proceedings of SIGCOMM '88, Association for Computing Machinery, August 1988.

FORWARD:6. W. Barns, Precedence and Priority Access Implementation for Department of Defense Data Networks, Technical Report MTR-91W00029, The Mitre Corporation, McLean, Virginia, USA, July 1991.

INTERNET:1. J. Postel, Internet Protocol, Request For Comments (RFC) 791, STD 5, USC/Information Sciences Institute, September 1981.

INTERNET:2. J. Mogul and J. Postel, Internet Standard Subnetting Procedure, Request For Comments (RFC) 950, STD 5, USC/Information Sciences Institute, August 1985.

INTERNET:3. J. Mogul, Broadcasting Internet Datagrams in the Presence of Subnets, Request For Comments (RFC) 922, STD 5, Stanford, October 1984.

INTERNET:4. S. Deering, Host Extensions for IP Multicasting, Request For Comments (RFC) 1112, STD 5, Stanford University, August 1989.

INTERNET:5. S. Kent, U.S. Department of Defense Security Options for the Internet Protocol, Request for Comments (RFC) 1108, BBN Communications, November 1991.

INTERNET:6. R. Braden, D. Borman, and C. Partridge, Computing the Internet Checksum, Request For Comments (RFC) 1071, USC/Information Sciences Institute, Cray Researc, BBN, September 1988.

INTERNET:7. T. Mallory and A. Kullberg, Incremental Updating of the Internet Checksum, Request For Comments (RFC) 1141, BBN, January 1990.

INTERNET:8. J. Postel, Internet Control Message Protocol, Request For Comments (RFC) 792, STD 5, USC/Information Sciences Institute, September 1981.

INTERNET:9. A. Mankin, G. Hollingsworth, G. Reichlen, K. Thompson, R. Wilder, and R. Zahavi, Evaluation of Internet Performance - FY89, Technical Report MTR-89W00216, MITRE Corporation, February, 1990.

INTERNET:10. G. Finn, A Connectionless Congestion Control Algorithm, Computer Communications Review, vol. 19, no. 5, Association for Computing Machinery, October 1989.

INTERNET:11. W. Prue, J. Postel, The Source Quench Introduced Delay (SQuID), Request For Comments (RFC) 1016, USC/Information Sciences Institute, August 1987.

INTERNET:12. A. McKenzie, Some comments on SQuID, Request For Comments (RFC) 1018, BBN, August 1987.

INTERNET:13. S. Deering, ICMP Router Discovery Messages, Request For Comments (RFC) 1256, Xerox PARC, September 1991.

INTERNET:14. J. Mogul and S. Deering, Path MTU Discovery, Request For Comments (RFC) 1191, DECWRL, Stanford University, November 1990.

INTERNET:15. V. Fuller, T. Li, J. Yi, and K. Varadhan, Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy Request For Comments (RFC) 1519, BARRNet, cisco, Merit, OARnet, September 1993.

INTERNET:16. M. St. Johns, Draft Revised IP Security Option, Request for Comments 1038, IETF, January 1988.

INTERNET:17. W. Prue and J. Postel, Queuing Algorithm to Provide Type-of-service For IP Links, Request for Comments 1046, USC/Information Sciences Institute, February 1988.

INTRO:1. R. Braden and J. Postel, Requirements for Internet Gateways, Request For Comments (RFC) 1009, STD 4, USC/Information Sciences Institute, June 1987.

INTRO:2. Internet Engineering Task Force (R. Braden, Editor), Requirements for Internet Hosts - Communication Layers, Request For Comments (RFC) 1122, STD 3, USC/Information Sciences Institute, October 1989.

INTRO:3. Internet Engineering Task Force (R. Braden, Editor), Requirements for Internet Hosts - Application and Support, Request For Comments (RFC) 1123, STD 3, USC/Information Sciences Institute, October 1989.

INTRO:4. D. Clark, Modularity and Efficiency in Protocol Implementations, Request For Comments (RFC) 817, MIT, July 1982.

INTRO:5. D. Clark, The Structuring of Systems Using Upcalls, Proceedings of 10th ACM SOSP, December 1985.

INTRO:6. O. Jacobsen and J. Postel, Protocol Document Order Information, Request For Comments (RFC) 980, SRI, USC/Information Sciences Institute, March 1986.

INTRO:7. J. Reynolds and J. Postel, Assigned Numbers, Request For Comments (RFC) 1700, STD 2, USC/Information Sciences Institute, October 1994. This document is periodically updated and reissued with a new number. It is wise to verify occasionally that the version you have is still current. ๐Ÿซถ

INTRO:8. DoD Trusted Computer System Evaluation Criteria, DoD publication 5200.28-STD, U.S. Department of Defense, December 1985.

INTRO:9 G. Malkin and T. LaQuey Parker, Internet Users' Glossary, Request for Comments (RFC) 1392 (also FYI 0018), Xylogics, Inc., UTexas, January 1993.

LINK:1. S. Leffler and M. Karels, Trailer Encapsulations, Request For Comments (RFC) 893, U. C. Berkeley, April 1984.

LINK:2 W. Simpson, The Point-to-Point Protocol (PPP) for the Transmission of Multi-protocol Datagrams over Point-to-Point Links, Daydreamer, Request For Comments (RFC) 1331, May 1992.

LINK:3 G. McGregor, The PPP Internet Protocol Control Protocol (IPCP), Request For Comments (RFC) 1332, Merit, May 1992.

LINK:4 B. Lloyd, W. Simpson, PPP Authentication Protocols, Request For Comments (RFC) 1334, Daydreamer, May 1992.

LINK:5 W. Simpson, PPP Link Quality Monitoring, Daydreamer, Request For Comments (RFC) 1333, May 1992.

MGT:1. M. Rose and K. McCloghrie, Structure and Identification of Management Information of TCP/IP-based Internets, Request For Comments (RFC) 1155, STD 16, Performance Systems International, Hughes LAN Systems, May 1990.

MGT:2. K. McCloghrie and M. Rose (Editors), Management Information Base of TCP/IP-Based Internets: MIB-II, Request For Comments (RFC) 1213, STD 16, Hughes LAN Systems, Performance Systems International, March 1991.

MGT:3. J. Case, M. Fedor, M. Schoffstall, and J. Davin, Simple Network Management Protocol, Request For Comments (RFC) 1157, STD 15, SNMP Research, Performance Systems International, MIT Laboratory for Computer Science, May 1990.

MGT:4. M. Rose and K. McCloghrie (Editors), Towards Concise MIB Definitions, Request For Comments (RFC) 1212, STD 16, Performance Systems International, Hughes LAN Systems, March 1991.

MGT:5. L. Steinberg, Techniques for Managing Asynchronously Generated Alerts, Request for Comments (RFC) 1224, IBM, May 1991.

MGT:6. F. Kastenholz, Definitions of Managed Objects for the Ethernet-like Interface Types, Request for Comments (RFC) 1398, FTP Software January 1993.

MGT:7. R. Fox and K. McCloghrie, IEEE 802.4 Token Bus MIB, Request for Comments (RFC) 1230, Hughes LAN Systems, Synoptics, Inc., May 1991.

MGT:8. K. McCloghrie, R. Fox and E. Decker, IEEE 802.5 Token Ring MIB, Request for Comments (RFC) 1231, Hughes LAN Systems, Synoptics, Inc., cisco Systems, Inc., February 1993.

MGT:9. J. Case and A. Rijsinghani, FDDI Management Information Base, Request for Comments (RFC) 1512, SNMP Research, Digital Equipment Corporation, September 1993.

MGT:10. B. Stewart, Definitions of Managed Objects for RS-232-like Hardware Devices, Request for Comments (RFC) 1317, Xyplex, Inc., April 1992.

MGT:11. F. Kastenholz, Definitions of Managed Objects for the Link Control Protocol of the Point-to-Point Protocol, Request For Comments (RFC) 1471, FTP Software, June 1992.

MGT:12. F. Kastenholz, The Definitions of Managed Objects for the Security Protocols of the Point-to-Point Protocol, Request For Comments (RFC) 1472, FTP Software, June 1992.

MGT:13. F. Kastenholz, The Definitions of Managed Objects for the IP Network Control Protocol of the Point-to-Point Protocol, Request For Comments (RFC) 1473, FTP Software, June 1992.

MGT:14. F. Baker and R. Coltun, OSPF Version 2 Management Information Base, Request For Comments (RFC) 1253, ACC, Computer Science Center, August 1991.

MGT:15. S. Willis and J. Burruss, Definitions of Managed Objects for the Border Gateway Protocol (Version 3), Request For Comments (RFC) 1269, Wellfleet Communications Inc., October 1991.

MGT:16. F. Baker, J. Watt, Definitions of Managed Objects for the DS1 and E1 Interface Types, Request For Comments (RFC) 1406, Advanced Computer Communications, Newbridge Networks Corporation, January 1993.

MGT:17. T. Cox and K. Tesink, Definitions of Managed Objects for the DS3/E3 Interface Types, Request For Comments (RFC) 1407, Bell Communications Research, January 1993.

MGT:18. K. McCloghrie, Extensions to the Generic-Interface MIB, Request For Comments (RFC) 1229, Hughes LAN Systems, August 1992.

MGT:19. T. Cox and K. Tesink, Definitions of Managed Objects for the SIP Interface Type, Request For Comments (RFC) 1304, Bell Communications Research, February 1992.

MGT:20 F. Baker, IP Forwarding Table MIB, Request For Comments (RFC) 1354, ACC, July 1992.

MGT:21. G. Malkin and F. Baker, RIP Version 2 MIB Extension, Request For Comments (RFC) 1389, Xylogics, Inc., Advanced Computer Communications, January 1993.

MGT:22. D. Throop, SNMP MIB Extension for the X.25 Packet Layer, Request For Comments (RFC) 1382, Data General Corporation, November 1992.

MGT:23. D. Throop and F. Baker, SNMP MIB Extension for X.25 LAPB, Request For Comments (RFC) 1381, Data General Corporation, Advanced Computer Communications, November 1992.

MGT:24. D. Throop and F. Baker, SNMP MIB Extension for MultiProtocol Interconnect over X.25, Request For Comments (RFC) 1461, Data General Corporation, May 1993.

MGT:25. M. Rose, SNMP over OSI, Request For Comments (RFC) 1418, Dover Beach Consulting, Inc., March 1993.

MGT:26. G. Minshall and M. Ritter, SNMP over AppleTalk, Request For Comments (RFC) 1419, Novell, Inc., Apple Computer, Inc., March 1993.

MGT:27. S. Bostock, SNMP over IPX, Request For Comments (RFC) 1420, Novell, Inc., March 1993.

MGT:28. M. Schoffstall, C. Davin, M. Fedor, J. Case, SNMP over Ethernet, Request For Comments (RFC) 1089, Rensselaer Polytechnic Institute, MIT Laboratory for Computer Science, NYSERNet, Inc., University of Tennessee at Knoxville, February 1989.

MGT:29. J. Case, FDDI Management Information Base, Request For Comments (RFC) 1285, SNMP Research, Incorporated, January 1992.

OPER:1. J. Nagle, Congestion Control in IP/TCP Internetworks, Request For Comments (RFC) 896, FACC, January 1984.

OPER:2. K.R. Sollins, TFTP Protocol (revision 2), Request For Comments (RFC) 1350, MIT, July 1992.

ROUTE:1. J. Moy, OSPF Version 2, Request For Comments (RFC) 1247, Proteon, July 1991.

ROUTE:2. R. Callon, Use of OSI IS-IS for Routing in TCP/IP and Dual Environments, Request For Comments (RFC) 1195, DEC, December 1990.

ROUTE:3. C. L. Hedrick, Routing Information Protocol, Request For Comments (RFC) 1058, Rutgers University, June 1988.

ROUTE:4. K. Lougheed and Y. Rekhter, A Border Gateway Protocol 3 (BGP-3), Request For Comments (RFC) 1267, cisco, T.J. Watson Research Center, IBM Corp., October 1991.

ROUTE:5. Y. Rekhter and P. Gross Application of the Border Gateway Protocol in the Internet, Request For Comments (RFC) 1268, T.J. Watson Research Center, IBM Corp., ANS, October 1991.

ROUTE:6. D. Mills, Exterior Gateway Protocol Formal Specification, Request For Comments (RFC) 904, UDEL, April 1984.

ROUTE:7. E. Rosen, Exterior Gateway Protocol (EGP), Request For Comments (RFC) 827, BBN, October 1982.

ROUTE:8. L. Seamonson and E. Rosen, "STUB" Exterior Gateway Protocol, Request For Comments (RFC) 888, BBN, January 1984.

ROUTE:9. D. Waitzman, C. Partridge, and S. Deering, Distance Vector Multicast Routing Protocol, Request For Comments (RFC) 1075, BBN, Stanford, November 1988.

ROUTE:10. S. Deering, Multicast Routing in Internetworks and Extended LANs, Proceedings of SIGCOMM '88, Association for Computing Machinery, August 1988.

ROUTE:11. P. Almquist, Type of Service in the Internet Protocol Suite, Request for Comments (RFC) 1349, Consultant, July 1992.

ROUTE:12. Y. Rekhter, Experience with the BGP Protocol, Request For Comments (RFC) 1266, T.J. Watson Research Center, IBM Corp., October 1991.

ROUTE:13. Y. Rekhter, BGP Protocol Analysis, Request For Comments (RFC) 1265, T.J. Watson Research Center, IBM Corp., October 1991.

TRANS:1. J. Postel, User Datagram Protocol, Request For Comments (RFC) 768, STD 6, USC/Information Sciences Institute, August 1980.

TRANS:2. J. Postel, Transmission Control Protocol, Request For Comments (RFC) 793, STD 7, T.J. Watson Research Center, IBM Corp., September 1981.


Appendix A. Requirements for Source-Routing Hosts โœจ

okay bestie, this appendix is the source-routing hosts glow-up ๐Ÿ’… A host MAY be able to act as an intermediate hop in a source route, but only subject to the restrictions below, and it's forwarding the source-routed datagram on to the next specified hop ๐Ÿฆ‹

Here's the thing though: when a host does this router-like job, it MUST obey all the relevant rules for a router forwarding source-routed datagrams [INTRO:2]. Main character energy, but with rules ๐ŸŽ€ Here are the specific provisions:

(A) TTL The TTL field MUST be decremented, and the datagram perhaps discarded, as specified for a router in [INTRO:2]. ๐Ÿ’€

(B) ICMP Destination Unreachable A host MUST be able to generate Destination Unreachable messages with the following codes:

  • 4 (Fragmentation Required but DF Set) when a source-routed datagram cannot be fragmented to fit into the target network;
  • 5 (Source Route Failed) when a source-routed datagram cannot be forwarded, e.g., because of a routing problem or because the next hop of a strict source route is not on a connected network.

(C) IP Source Address A source-routed datagram being forwarded MAY (and normally will) have a source address that is not one of the IP addresses of the forwarding host. iykyk ๐Ÿ™ˆ

(D) Record Route Option A host that is forwarding a source-routed datagram containing a Record Route option MUST update that option, if it has room. ๐Ÿซถ

(E) Timestamp Option A host that is forwarding a source-routed datagram containing a Timestamp Option MUST add the current timestamp to that option, according to the rules for this option. โญ

To define the rules restricting host forwarding of source-routed datagrams, we use the term local source-routing if the next hop will be through the same physical interface through which the datagram arrived. Otherwise, it's non-local source-routing. ๐ŸŒธ

A host is permitted to perform local source-routing without restriction. No cap, that's the easy mode ๐Ÿ’–

A host that supports non-local source-routing MUST have a configurable switch to disable forwarding, and this switch MUST default to disabled. Protect the vibes ๐Ÿ”ฅ

The host MUST satisfy all router requirements for configurable policy filters [INTRO:2] restricting non-local forwarding. Periodt ๐Ÿ‘‘

If a host receives a datagram with an incomplete source route but does not forward it for some reason, the host SHOULD return an ICMP Destination Unreachable (code 5, Source Route Failed) message, unless the datagram was itself an ICMP error message. Lowkey the most important rule in here ๐Ÿ˜ญ


Appendix B. Glossary ๐Ÿ“–

This Appendix defines specific terms used in this memo. It also defines some general purpose terms that may be of interest. For a more general set of definitions, see also [INTRO:9]. ๐Ÿงš

AS (Autonomous System) ๐Ÿฐ is a collection of routers under a single administrative authority, all using a common Interior Gateway Protocol to route packets. ๐Ÿ’…

Connected Network ๐ŸŒ is a network that a router is interfaced to. People often call this the local network or the subnetwork relative to that router, but those terms can get confusing, so this memo uses Connected Network instead. โœจ

Connected (Sub)Network ๐Ÿงฉ is an IP subnetwork that a router is interfaced to, or a connected network if that network isn't subnetted. See also Connected Network. ๐Ÿ’–

Datagram ๐Ÿ“ฆ is the unit transmitted between a pair of internet modules: data, called datagrams, going from sources to destinations. The Internet Protocol doesn't provide a reliable communication facility. There are no acknowledgments, either end-to-end or hop-by-hop. There is no error, and there are no retransmissions. There is no flow control. See IP. ๐Ÿ™ˆ

Default Route ๐Ÿ›ฃ๏ธ is a routing table entry used to direct any data addressed to network numbers that aren't explicitly listed in the routing table. It's the catch-all, bestie. ๐Ÿงบ

EGP (Exterior Gateway Protocol) ๐ŸŒ‰ is a protocol that distributes routing information to the gateways (routers) that connect autonomous systems. See IGP. ๐Ÿ”

EGP-2 (Exterior Gateway Protocol version 2) ๐ŸŒ‰ is an EGP routing protocol developed to handle traffic between AS's in the Internet. โœจ

Forwarder ๐Ÿ”€ is the logical entity inside a router that's responsible for switching packets among the router's interfaces. The Forwarder also makes the calls on whether to queue a packet for local delivery, queue it for transmission out another interface, or do both. ๐Ÿ‘‘

Forwarding ๐Ÿ“ฌ is the process a router goes through for each packet it receives. The router might consume the packet, output it on one or more of its interfaces, or do both. Forwarding covers deciding what to do with the packet and also queuing it up for possible output or internal consumption. It's giving busy router energy. ๐Ÿšฆ

Fragment ๐Ÿงฉ is an IP datagram that represents a portion of a higher layer's packet which was too large to be sent in its entirety over the output network. ๐Ÿซถ

IGP (Interior Gateway Protocol) ๐Ÿ  is a protocol that distributes routing information within an Autonomous System (AS). See EGP. ๐Ÿ’œ

Interface IP Address ๐Ÿชช is the IP Address and subnet mask assigned to a specific interface of a router. โœจ

Internet Address ๐Ÿ”ข is an assigned number that identifies a host in an internet. It has two or three parts: a network number, an optional subnet number, and a host number. ๐ŸŽ€

IP (Internet Protocol) ๐ŸŒ is the network layer protocol for the Internet. It's a packet switching, datagram protocol defined in RFC 791. IP doesn't provide a reliable communications facility, meaning there are no end-to-end or hop-by-hop acknowledgments. ๐Ÿฆ‹

IP Datagram ๐Ÿ“ฆ is the unit of end-to-end transmission in the Internet Protocol. An IP Datagram is an IP header followed by all of the higher-layer data (such as TCP, UDP, ICMP, and the like), so basically an IP header followed by a message. ๐Ÿ’…

An IP Datagram is a complete IP end-to-end transmission unit, and it's made up of one or more IP Fragments. ๐Ÿง 

In this memo, the unqualified term Datagram should be understood to refer to an IP Datagram. ๐Ÿ“

IP Fragment ๐Ÿงฉ is a component of an IP Datagram. An IP Fragment is an IP header followed by all or part of the higher-layer data of the original IP Datagram. ๐Ÿ“

One or more IP Fragments make up a single IP Datagram. ๐Ÿซง

In this memo, the unqualified term Fragment should be understood to refer to an IP Fragment. โœจ

IP Packet ๐Ÿ“ฎ is an IP Datagram or an IP Fragment. ๐Ÿ’–

In this memo, the unqualified term Packet should generally be understood to refer to an IP Packet. ๐ŸŒธ

Logical [network] interface ๐Ÿ”Œ is a logical path, distinguished by a unique IP address, to a connected network. ๐Ÿฆ‹

Martian Filtering ๐Ÿ‘ฝ means that a packet containing an invalid source or destination address is considered martian and discarded. Bye bye, bad addresses. ๐Ÿ—‘๏ธ

MTU (Maximum Transmission Unit) ๐Ÿ“ is the size of the largest packet that can be transmitted or received through a logical interface. This size includes the IP header but doesn't include the size of any Link Layer headers or framing. ๐Ÿง

Multicast ๐Ÿ“ฃ is a packet destined for multiple hosts. See broadcast. ๐ŸŒˆ

Multicast Address ๐ŸŽฏ is a special type of address recognized by multiple hosts. A Multicast Address is sometimes known as a Functional Address or a Group Address. ๐Ÿซถ

Originate ๐Ÿš€ Packets can be transmitted by a router for one of two reasons: 1) the packet was received and is being forwarded, or 2) the router itself created the packet for transmission (such as route advertisements). Packets that the router creates for transmission are said to originate at the router. ๐Ÿ’ซ

Packet ๐Ÿ“ฎ is the unit of data passed across the interface between the Internet Layer and the Link Layer. It includes an IP header and data. A packet may be a complete IP datagram or a fragment of an IP datagram. ๐ŸŽ€

Path ๐Ÿ—บ๏ธ is the sequence of routers and (sub-)networks that a packet traverses from a particular router to a particular destination host. A path is uni-directional, so it's not unusual to have different paths in the two directions between a given host pair. Two-way streets, but make them different! ๐Ÿš—

Physical Network ๐Ÿ”— is a network (or a piece of an internet) that is contiguous at the Link Layer. Its internal structure, if it has any, is transparent to the Internet Layer. ๐Ÿงถ

In this memo, several media components connected together via devices such as bridges or repeaters are considered to be a single Physical Network, since those devices are transparent to the IP. ๐ŸŒท

Physical Network Interface ๐Ÿ”Œ is a physical interface to a Connected Network that has a (possibly unique) Link-Layer address. Multiple Physical Network Interfaces on a single router may share the same Link-Layer address, but the address must be unique for different routers on the same Physical Network. ๐Ÿ™Œ

router ๐Ÿ–ฅ๏ธ is a special-purpose dedicated computer that attaches several networks together. Routers switch packets between these networks in a process known as forwarding. This process may be repeated several times on a single packet by multiple routers until the packet reaches its final destination, switching from router to router to router... until it arrives. ๐Ÿšš

RPF (Reverse Path Forwarding) ๐Ÿ”™ is a method used to deduce the next hops for broadcast and multicast packets. ๐Ÿงญ

serial line ๐Ÿงต is a physical medium that we can't define, but we recognize one when we see one. See the U.S. Supreme Court's definitions on pornography. ๐Ÿ™ˆ

Silently Discard ๐Ÿคซ is the behaviour for several cases in this memo where a router is to Silently Discard a received packet (or datagram). This means the router should discard the packet without further processing, and the router will not send any ICMP error message (see Section [4.3.2]) as a result. However, for diagnosing problems, the router should provide the capability of logging the error (see Section [1.3.3]), including the contents of the silently-discarded packet, and should record the event in a statistics counter. ๐Ÿ“Š

Silently Discard is quiet, but it's not invisible: log it and count it so someone can still diagnose the problem. ๐Ÿ”

Silently Ignore ๐Ÿซฅ means a router takes no action on an error or condition other than possibly generating an error report in an error log or via some network management protocol, and discarding, or ignoring, the source of the error. In particular, the router does NOT generate an ICMP error message. ๐Ÿ™…

Specific-destination address ๐ŸŽฏ is defined as the destination address in the IP header, unless the header contains an IP broadcast or IP multicast address. In that case, the specific-destination is an IP address assigned to the physical interface on which the packet arrived. ๐ŸŒŸ

subnet ๐Ÿ˜๏ธ is a portion of a network, which may be a physically independent network, that shares a network address with other portions of the network and is distinguished by a subnet number. A subnet is to a network what a network is to an internet. ๐Ÿงธ

subnet number ๐Ÿ”ข is a part of the internet address that designates a subnet. It's ignored for the purposes of internet routing, but it's used for intranet routing. ๐Ÿ’œ

TOS (Type Of Service) ๐ŸŽ is a field in the IP header that represents the degree of reliability the transport layer or application expects from the network layer. ๐ŸŒˆ

TTL (Time To Live) โณ is a field in the IP header that represents how long a packet is considered valid. It's a combination of a hop count and a timer value. Main character timer! โญ


APPENDIX C. FUTURE DIRECTIONS ๐Ÿ”ฎ

This appendix lists work that future revisions of this document may wish to address. ๐Ÿ“œ

In preparing Router Requirements, we stumbled across several other architectural issues. Each of these is dealt with somewhat in the document, but each still ought to be classified as an open issue in the IP architecture. ๐Ÿง

Most of the he topics presented here generally indicate areas where the technology is still relatively new, and it isn't appropriate to develop specific requirements since the community is still gaining operational experience. ๐ŸŒฑ

Other topics represent areas of ongoing research and indicate areas that the prudent developer would closely monitor. ๐Ÿ‘€

  • (1) SNMP Version 2 ๐Ÿ’Œ
  • (2) Additional SNMP MIBs ๐Ÿ“š
  • (3) IDPR ๐Ÿ›ฐ๏ธ
  • (4) CIPSO ๐Ÿท๏ธ
  • (5) IP Next Generation research ๐Ÿš€
  • (6) More detailed requirements for next-hop selection ๐Ÿงญ
  • (7) More detailed requirements for leaking routes between routing protocols ๐Ÿ’ง
  • (8) Router system security ๐Ÿ”
  • (9) Routing protocol security ๐Ÿ›ก๏ธ
  • (10) Internetwork Protocol layer security. There has been extensive work refining the security of IP since the original work writing this document. This security work should be included in here. ๐Ÿ”’
  • (11) Route caching ๐Ÿ—ƒ๏ธ
  • (12) Load Splitting โš–๏ธ
  • (13) Sending fragments along different paths ๐Ÿงฉ
  • (14) Variable width subnet masks (i.e., not all subnets of a particular net use the same subnet mask). Routers are required (MUST) support them, but are not required to detect ambiguous configurations. ๐ŸŽญ
  • (15) Multiple logical (sub)nets on the same wire. Router Requirements does not require support for this. We made some attempt to identify pieces of the architecture (e.g. forwarding of directed broadcasts and issuing of Redirects) where the wording of the rules has to be done carefully to make the right thing happen, and tried to clearly distinguish logical interfaces from physical interfaces. However, we did not study this issue in detail, and we are not at all confident that all of the rules in the document are correct in the presence of multiple logical (sub)nets on the same wire. ๐Ÿงต
  • (15) Congestion control and resource management. On the advice of the IETF's experts (Mankin and Ramakrishnan) we deprecated (SHOULD NOT) Source Quench and said little else concrete (Section 5.3.6). ๐Ÿšฆ
  • (16) Developing a Link-Layer requirements document that would be common for both routers and hosts. ๐Ÿค
  • (17) Developing a common PPP LQM algorithm. ๐Ÿงฎ
  • (18) Investigate of other information (above and beyond section [3.2]) that passes between the layers, such as physical network MTU, mappings of IP precedence to Link Layer priority values, etc. ๐Ÿ”

(19) okay so should the Link Layer tell IP when address resolution fails? It already tells IP when there's a Link Layer priority value problem, so why wouldn't it do the same here? ๐Ÿค”

(20) should every router be required to run a DNS resolver? Like, is that a whole main character requirement or nah? ๐Ÿ’…

(21) should a human be able to type a host name anywhere the router config takes an IP address? Even in ping and traceroute?? That would be so convenient ๐Ÿฅน๐ŸŽ€

(22) Almquist's draft Ruminations on the Next Hop and his ruminations on route leaking need to get reviewed, updated, and published. Iconic work that is lowkey overdue ๐Ÿ“œโœจ

(23) we need to figure out whether a redirect message for precedence is actually needed. If it isn't, are the type-of-service redirects good enough? ๐Ÿฆ‹

(24) RIPv2, RIP+CIDR, and variable length subnet masks. Big combo, no cap ๐ŸŒธ

(25) BGP-4 CIDR is going to matter a lot, and literally everyone is betting on BGP-4, so we can't skip it ๐Ÿ™ˆ We probably need to describe how BGP-3 and BGP-4 differ and dig into the upgrade issues too... it's a whole thing ๐Ÿ’œ

(26) Loose Source Route, Mobile IP, and some multicasting may need this. Maybe it should get bumped up to a SHOULD (per Fred Baker's suggestion). Fred knows what's up ๐Ÿ‘‘


APPENDIX D. Multicast Routing Protocols โœจ

Multicasting is still a pretty new glow-up in the Internet Protocol family ๐Ÿงš It isn't widely deployed or commonly used yet, but it's expected to get way bigger over the next few years.

This Appendix covers some of the technologies being looked at for routing multicasts across the Internet.

A diligent implementor will keep up with what's happening here so they can build good multicast features ๐Ÿซถ

This Appendix does not specify any standards or requirements.

D.1 Introduction ๐Ÿ’–

Multicast routing protocols are what let IP multicast datagrams get forwarded around a TCP/IP internet. Usually they forward the datagram based on its source and destination addresses. On top of that, the datagram sometimes has to reach several multicast group members, which means it may need to be copied and sent out over multiple interfaces ๐Ÿฆ‹

Multicast routing is way less developed than unicast forwarding. Two multicast routing protocols have been written up for TCP/IP, and both are currently considered experimental ๐ŸŒˆ They also both use the IGMP protocol (discussed in Section [4.4]) to keep track of multicast group membership.

D.2 Distance Vector Multicast Routing Protocol - DVMRP ๐Ÿ“

DVMRP, documented in [ROUTE:9], is based on Distance Vector, aka Bellman-Ford tech. It only routes multicast datagrams, and it only does that inside a single Autonomous System. DVMRP is an implementation of the Truncated Reverse Path Broadcasting algorithm described in [ROUTE:10]. It also specifies tunneling IP multicasts through IP domains that can't do multicast routing ๐Ÿš‡

D.3 Multicast Extensions to OSPF - MOSPF ๐Ÿงš

MOSPF is still under development, and it's a backward-compatible add-on to OSPF. It lets both IP multicasts and unicasts get forwarded inside an Autonomous System. MOSPF routers can be mixed in with regular OSPF routers in a routing domain, and they'll interoperate when forwarding unicasts ๐Ÿค

OSPF is a link-state or SPF-based protocol. By adding link state advertisements that pinpoint group membership, MOSPF routers can work out the path of a multicast datagram as a tree rooted at the datagram's source. Branches that don't contain any group members can then get pruned, so you skip all those unnecessary forwarding hops โœ‚๏ธ๐Ÿ’…

APPENDIX E Additional Next-Hop Selection Algorithms โœจ

Section [5.2.4.3] specifies an algorithm that routers ought to use when choosing a next-hop for a packet ๐ŸŽ€

This appendix gives some historical perspective on the next-hop selection problem. It also presents several extra pruning rules and next-hop selection algorithms that might show up on the Internet ๐Ÿ”

This appendix is based on earlier, unpublished work by Philip Almquist, Ruminations on the Next Hop.

This Appendix does not specify any standards or requirements.

E.1. Some Historical Perspective ๐Ÿ•ฐ๏ธ

Okay bestie, let's take a quick trip back in time ๐Ÿงš Start with the "classic model" of how a router makes routing decisions. This model came before IP. In it, a router runs one routing protocol, like RIP. That protocol completely decides what goes in the router's FIB. The route lookup is super simple: the router checks the FIB for a route whose destination attribute exactly matches the network number part of the packet's destination address. If it finds one, it uses it. If it finds nothing, the destination is unreachable. Since the routing protocol only keeps one route per destination, the question of what to do when several routes match the same destination never even comes up ๐Ÿ’…

Then the classic model got some upgrades over the years ๐ŸŒธ Once default routes, subnets, and host routes showed up, there could be more than one routing table entry that kind of matched the destination. People sorted this out pretty quickly with a hierarchy: host routes beat subnet routes, subnet routes beat net routes, and net routes beat default routes ๐Ÿ‘‘

Then came variable length subnet masks. The general approach stayed the same, just a bit more complicated to describe. Now each route has a bit mask attached. If a bit is set in a route's bit mask, the matching bit in the route's destination attribute counts. A route can only be used to route a packet if every significant bit in its destination attribute matches the corresponding bit in the packet's destination address. Routes with more bits set in their masks win over routes with fewer bits set. This is just a generalization of that hierarchy, and for the rest of this memo it'll be called choosing a route by preferring longest match ๐ŸŽ€

The classic model also got a small loosening of the idea that a routing protocol has total control over the routing table. First came static routes. For the first time, you could have two routes to the same destination at once, one dynamic and one static. When that happened, the router needed a policy, sometimes configurable and sometimes picked by whoever wrote the router's software, to decide whether the static or the dynamic route wins. But that policy was only a tie-breaker when longest match didn't already settle it. So, for example, a static default route would never beat a dynamic net route, even if the policy preferred static routes over dynamic ones ๐Ÿ™…โ€โ™€๏ธ

Next, the classic model had to be augmented again when inter-domain routing protocols were invented ๐ŸŒ Traditional routing protocols became known as "interior gateway protocols" (IGPs). Every Internet site got a brand new creature called an "exterior gateway". It was a router that spoke EGP to several "BBN Core Gateways" (the routers making up the Internet backbone back then) at the same time as it spoke its IGP to the other routers at its site. Both protocols wanted to decide what went in the router's routing table. In theory, a router could end up with three routes (EGP, IGP, and static) to the same destination. Given the Internet's topology at the time, everyone quickly agreed that routers were best off preferring IGP routes over EGP routes. But longest match stayed sacred: a default route learned from the IGP would never beat a net route learned from EGP ๐Ÿ’–

The Internet's topology, and therefore routing in the Internet, has evolved a ton since then. Still, this slightly augmented classic model has survived pretty much intact to this day (the only real change is that BGP replaced EGP) โœจ Conceptually, and often in implementation too, each router has a routing table and one or more routing protocol processes. Each of those processes can add any entry it likes, and can delete or modify any entry it created itself. When routing a packet, the router picks the best route using longest match, with a policy mechanism to break ties. This augmented classic model has served us really well, but it still has a few shortcomings ๐Ÿ˜ญ

  • It ignores (although it could be augmented to consider) path characteristics such as quality of service and MTU. ๐Ÿšซ
  • It doesn't support routing protocols (such as OSPF and Integrated IS-IS) that need route lookup algorithms that are different from pure longest match. ๐Ÿ™ˆ
  • There has never been a firm consensus on what the tie-breaking mechanism ought to be. Tie-breaking mechanisms have often turned out to be difficult, if not impossible, to configure so that the router always picks what the network manager considers the "correct" route. ๐Ÿ’€

E.2. Additional Pruning Rules ๐Ÿ’–

Okay so [5.2.4.3] already gave us a set of pruning rules for picking routes out of the FIB ๐Ÿงš. There are other rules that could also be used, though, so let's look at those ๐Ÿ‘€

  • OSPF Route Class ๐Ÿฆ‹ Routing protocols that have areas, or that tell internal routes apart from external ones, sort their routes into classes that are ranked by preference. A route always comes from the most preferred class unless that class has nothing available. Then it comes from the second most preferred class, and so on. In OSPF the classes are, from most to least preferred: intra-area, inter-area, type 1 external (external routes with internal metrics), and type 2 external. There's an extra wrinkle too. A router is configured to know which addresses ought to be reachable through intra-area routes, and it won't use inter-area or external routes to reach those destinations, even when no intra-area route exists. ๐Ÿ™ˆ

More precisely, we assume that each route has a class attribute, called route.class, which the routing protocol assigns. First, the set of candidate routes is checked for any route where route.class = intra-area. If there are some, every route except those with route.class = intra-area is thrown out. Otherwise, the router checks whether the packet's destination falls within the address ranges configured for the local area. If it does, the entire set of candidate routes is deleted. Otherwise, the set of candidate routes is checked for any route where route.class = inter-area. If there are some, every route except those with route.class = inter-area is discarded. Otherwise, the set of candidate routes is checked for any route where route.class = type 1 external. If there are some, every route except those with route.class = type 1 external is discarded.

  • IS-IS Route Class ๐ŸŒธ IS-IS route classes work the same way as OSPF's, but the set of classes in Integrated IS-IS is different. That means there isn't a one-to-one mapping between IS-IS route classes and OSPF route classes. Integrated IS-IS uses these classes, from most to least preferred: intra-area, inter-area, and external.

The Integrated IS-IS internal class is equivalent to the OSPF internal class. The Integrated IS-IS external class is equivalent to OSPF's type 2 external class. However, Integrated IS-IS doesn't split inter-area routes from external routes with internal metrics. Both are treated as inter-area routes. So OSPF prefers true inter-area routes over external routes with internal metrics, while Integrated IS-IS gives those two types of routes equal preference. ๐Ÿ’…

  • IDPR Policy ๐Ÿ”ฅ This is a specific case of Policy. The IETF's Inter-domain Policy Routing Working Group is devising a routing protocol called Inter-Domain Policy Routing (IDPR) to support true policy-based routing in the Internet. Packets with certain combinations of header attributes (such as specific combinations of source and destination addresses, or special IDPR source route options) are required to use routes provided by the IDPR protocol. So, unlike the other Policy pruning rules, IDPR Policy would have to be applied before any other pruning rules except Basic Match. โœจ

Specifically, IDPR Policy examines the packet being forwarded to find out whether its attributes require it to be forwarded using policy-based routes. If they do, IDPR Policy deletes all routes not provided by the IDPR protocol. ๐ŸŽ€


E.3 Some Route Lookup Algorithms ๐Ÿง

This section looks at several route lookup algorithms that are in use or have been proposed. Each one is described by the sequence of pruning rules it uses. The strengths and weaknesses of each algorithm are presented.

E.3.1 The Revised Classic Algorithm ๐Ÿ“

The Revised Classic Algorithm is the form of the traditional algorithm that was discussed in Section [E.1]. Its steps are:

  1. Basic match
  2. Longest match
  3. Best metric
  4. Policy

Some implementations leave out the Policy step, since it is only needed when routes may have metrics that can't be compared (because they were learned from different routing domains). ๐Ÿคทโ€โ™€๏ธ

The advantages of this algorithm are:

  1. It is widely implemented.
  2. Except for the Policy step (which an implementor can make arbitrarily complex), the algorithm is simple to understand and to implement. โœจ

Its disadvantages are:

  1. It does not handle IS-IS or OSPF route classes, and therefore cannot be used for Integrated IS-IS or OSPF. ๐Ÿ˜ญ
  2. It does not handle TOS or other path attributes.
  3. The policy mechanisms are not standardized in any way, and are therefore often implementation-specific. This causes extra work for implementors (who must invent appropriate policy mechanisms) and for users (who must learn how to use the mechanisms). This lack of a standardized mechanism also makes it difficult to build consistent configurations for routers from different vendors. This is a significant practical deterrent to multi-vendor interoperability. ๐Ÿšซ
  4. The proprietary policy mechanisms that vendors currently provide are often inadequate in complex parts of the Internet.
  5. The algorithm has not been written down in any generally available document or standard. It is, in effect, a part of the Internet Folklore. ๐Ÿ“œ

E.3.2 The Variant Router Requirements Algorithm ๐ŸŒˆ

Some Router Requirements Working Group members have proposed a slight variant of the algorithm described in Section [5.2.4.3]. In this variant, matching the requested type of service is considered more important, rather than less important, than matching as much of the destination address as possible. For example, this algorithm would prefer a default route that has the correct type of service over a network route that has the default type of service. The algorithm in [5.2.4.3] would make the opposite choice. ๐Ÿ”„

Its steps are:

  1. Basic match
  2. Weak TOS
  3. Longest match
  4. Best metric
  5. Policy

The debate between the proponents of this algorithm and the regular Router Requirements Algorithm shows that each side can produce cases where its algorithm leads to simpler, more intuitive routing than the other's does. In general, this variant has the same set of advantages and disadvantages as the algorithm specified in [5.2.4.3]. The one difference is that pruning on Weak TOS before pruning on Longest Match makes this algorithm less compatible with OSPF and Integrated IS-IS than the standard Router Requirements Algorithm. ๐Ÿซถ

E.3.3 The OSPF Algorithm ๐ŸŒท

OSPF uses an algorithm that is virtually identical to the Router Requirements Algorithm, except for one crucial difference: OSPF considers OSPF route classes. ๐Ÿ‘‘

The algorithm is:

  1. Basic match
  2. OSPF route class
  3. Longest match
  4. Weak TOS
  5. Best metric
  6. Policy

Type of service support is not always present. If it is not present, then, of course, the fourth step would be omitted.

This algorithm has some advantages over the Revised Classic Algorithm:

  1. It supports type of service routing.
  2. Its rules are written down, rather than merely being a part of the Internet folklore.
  3. It (obviously) works with OSPF. ๐Ÿฅฐ

However, this algorithm also keeps some of the disadvantages of the Revised Classic Algorithm:

  1. Path properties other than type of service (e.g. MTU) are ignored.
  2. As in the Revised Classic Algorithm, the details (or even the existence) of the Policy step are left to the discretion of the implementor.

The OSPF Algorithm also has a further disadvantage, which is not shared by the Revised Classic Algorithm. OSPF internal (intra-area or inter-area) routes are always considered superior to routes learned from other routing protocols, even when the OSPF route matches fewer bits of the destination address. This is a policy decision that is inappropriate in some networks. ๐Ÿ˜ฌ

Finally, it's worth noting that the OSPF Algorithm's TOS support has a deficiency. Routing protocols that support TOS are implicitly preferred when forwarding packets that have non-zero TOS values. This may not be appropriate in some cases. ๐Ÿ™ƒ

E.3.4 The Integrated IS-IS Algorithm ๐Ÿ’œ

Integrated IS-IS uses an algorithm that is similar to, but not quite identical to, the OSPF Algorithm. Integrated IS-IS uses a different set of route classes, and it also handles type of service slightly differently. The algorithm is:

  1. Basic Match
  2. IS-IS Route Classes
  3. Longest Match
  4. Weak TOS
  5. Best Metric
  6. Policy

Although Integrated IS-IS uses Weak TOS, the protocol can only carry routes for a small, specific subset of the possible values for the TOS field in the IP header. Packets containing other values in the TOS field are routed using the default TOS. ๐Ÿฌ

Type of service support is optional. If it is disabled, the fourth step would be omitted. As in OSPF, the specification does not include the Policy step.

This algorithm has some advantages over the Revised Classic Algorithm:

  1. It supports type of service routing.
  2. Its rules are written down, rather than merely being a part of the Internet folklore.
  3. It (obviously) works with Integrated IS-IS. ๐ŸŽ‰

However, this algorithm also keeps some of the disadvantages of the Revised Classic Algorithm:

  1. Path properties other than type of service (e.g. MTU) are ignored.
  2. As in the Revised Classic Algorithm, the details (or even the existence) of the Policy step are left to the discretion of the implementor.
  3. It doesn't work with OSPF because of the differences between IS-IS route classes and OSPF route classes. Also, because IS-IS supports only a subset of the possible TOS values, some obvious implementations of the Integrated IS-IS algorithm would not support OSPF's interpretation of TOS. ๐Ÿงฉ

The Integrated IS-IS Algorithm also has a further disadvantage, which is not shared by the Revised Classic Algorithm. IS-IS internal (intra-area or inter-area) routes are always considered superior to routes learned from other routing protocols, even when the IS-IS route matches fewer bits of the destination address and doesn't provide the requested type of service. This is a policy decision that may not be appropriate in all cases. ๐Ÿซ 

Finally, it's worth noting that the Integrated IS-IS Algorithm's TOS support suffers from the same deficiency noted for the OSPF Algorithm. ๐Ÿ”


Security Considerations ๐Ÿ”

Although the focus of this document is interoperability rather than security, there are obviously many sections of this document that have some ramifications on network security. ๐Ÿšจ

Security means different things to different people ๐Ÿ’…. From a router's point of view, it's anything that keeps its own networks running and also helps keep the whole Internet healthy ๐ŸŒˆ. For this doc, the security services we care about are denial of service, integrity, and authentication as it applies to the first two. Privacy is important as a security service, but it's only a peripheral concern for a router, at least as of this document's date ๐Ÿ™ˆ.

In several places in this document there are sections called ... Security Considerations. These talk about the specific considerations for whatever topic is being discussed ๐Ÿ”.

Real talk: this document almost never says "do this and your router/network will be secure" ๐Ÿ’€. It's more like "this is a good idea, and if you do it, it may improve the security of the Internet and your local system in general" โœจ.

Unfortunately, this is the state-of-the-art AT THIS TIME ๐Ÿ˜ญ. Few, if any, of the network protocols a router deals with have reasonable, built-in security features. Industry and protocol designers have been, and still are, struggling with these issues. There is progress, but it's only small baby steps, like the peer-to-peer authentication available in the BGP and OSPF routing protocols ๐Ÿฃ.

In particular, this document notes the current research into developing and enhancing network security. The specific areas of research, development, and engineering underway as of this writing (December 1993) are IP Security, SNMP Security, and common authentication technologies ๐Ÿ”.

Notwithstanding all of the above, there are still things both vendors and users can do to improve the security of their router ๐Ÿ›ก๏ธ. Vendors should get a copy of Trusted Computer System Interpretation [INTRO:8]. Even if a vendor decides not to submit their device for formal verification under these guidelines, the publication gives excellent guidance on general security design and practices for computing devices ๐Ÿ‘‘.


Acknowledgments โœจ

O that we now had here
But one ten thousand of those men in England
That do no work to-day!

What's he that wishes so?
My cousin Westmoreland? No, my fair cousin:
If we are mark'd to die, we are enow
To do our country loss; and if to live,
The fewer men, the greater share of honour.
God's will! I pray thee, wish not one man more.
By Jove, I am not covetous for gold,
Nor care I who doth feed upon my cost;
It yearns me not if men my garments wear;
Such outward things dwell not in my desires:
But if it be a sin to covet honour,
I am the most offending soul alive.
No, faith, my coz, wish not a man from England:
God's peace! I would not lose so great an honour
As one man more, methinks, would share from me
For the best hope I have. O, do not wish one more!
Rather proclaim it, Westmoreland, through my host,
That he which hath no stomach to this fight,
Let him depart; his passport shall be made
And crowns for convoy put into his purse:
We would not die in that man's company
That fears his fellowship to die with us.
This day is called the feast of Crispian:
He that outlives this day, and comes safe home,
Will stand a tip-toe when the day is named,
And rouse him at the name of Crispian.
He that shall live this day, and see old age,
Will yearly on the vigil feast his neighbours,
And say 'To-morrow is Saint Crispian:'
Then will he strip his sleeve and show his scars.
And say 'These wounds I had on Crispin's day.'
Old men forget: yet all shall be forgot,
But he'll remember with advantages
What feats he did that day: then shall our names.
Familiar in his mouth as household words
Harry the king, Bedford and Exeter,
Warwick and Talbot, Salisbury and Gloucester,
Be in their flowing cups freshly remember'd.
This story shall the good man teach his son;
And Crispin Crispian shall ne'er go by,
From this day to the ending of the world,
But we in it shall be remember'd;
We few, we happy few, we band of brothers;
For he to-day that sheds his blood with me
Shall be my brother; be he ne'er so vile,
This day shall gentle his condition:
And gentlemen in England now a-bed
Shall think themselves accursed they were not here,
And hold their manhoods cheap whiles any speaks
That fought with us upon Saint Crispin's day.

This memo was cooked up by the IETF's Router Requirements Working Group ๐Ÿซถ. A memo like this is necessarily the work of way more people than could ever be listed here. A wide variety of vendors, network managers, and other experts from the Internet community generously gave their time and wisdom to make it better, and the editor sends huge thanks to every one of them ๐Ÿ’–.

The current editor also wants to give a special shoutout and heartfelt thanks to the original editor of this document, Philip Almquist. Without Philip's work, both as the original editor and as Chair of the working group, this document would never have been produced ๐Ÿ‘‘.

Philip Almquist, Jeffrey Burgan, Frank Kastenholz, and Cathy Wittbrodt each wrote major chapters of this memo. Others who made major contributions included Bill Barns, Steve Deering, Kent England, Jim Forster, Martin Gross, Jeff Honig, Steve Knowles, Yoni Malachi, Michael Reilly, and Walt Wimer ๐ŸŽ€.

Additional text came from Art Berggreen, John Cavanaugh, Ross Callon, John Lekashman, Brian Lloyd, Gary Malkin, Milo Medin, John Moy, Craig Partridge, Stephanie Price, Yakov Rekhter, Steve Senum, Richard Smith, Frank Solensky, Rich Woundy, and others who have been inadvertently overlooked ๐ŸŒธ.

Some of the text in this memo was (shamelessly) plagiarized from earlier documents, most notably RFC-1122 by Bob Braden and the Host Requirements Working Group, and RFC-1009 by Bob Braden and Jon Postel. The work of these earlier authors is gratefully acknowledged ๐Ÿ™.

Jim Forster was a co-chair of the Router Requirements Working Group during its early meetings, and was instrumental in getting the group off to a good start ๐Ÿš€. Jon Postel, Bob Braden, and Walt Prue also contributed to the success by providing a wealth of good advice prior to the group's first meeting. Later on, Phill Gross, Vint Cerf, and Noel Chiappa all provided valuable advice and support ๐Ÿงš.

Mike St. Johns coordinated the Working Group's interactions with the security community, and Frank Kastenholz coordinated the Working Group's interactions with the network management area. Allison Mankin and K.K. Ramakrishnan provided expertise on the issues of congestion control and resource allocation ๐Ÿฆ‹.

Many more people than could possibly be listed or credited here participated in the deliberations of the Router Requirements Working Group, either through electronic mail or by attending meetings. However, the efforts of Ross Callon and Vince Fuller in sorting out the difficult issues of route choice and route leaking are especially acknowledged ๐Ÿ’….

The previous editor, Philip Almquist, wishes to extend his thanks and appreciation to his former employers, Stanford University and BARRNet, for allowing him to spend a large fraction (probably far more than they ever imagined when he started on this) of his time working on this project ๐Ÿ’œ.

The current editor wishes to thank his employer, FTP Software, for allowing him to spend the time necessary to finish this document ๐ŸŒˆ.

Editor's Address ๐Ÿ“ฌ

The address of the current editor of this document is

   Frank J. Kastenholz
   FTP Software
   2 High Street
   North Andover, MA, 01845-2620
   USA

   Phone: +1 508-685-4000

   EMail: kasten@ftp.com
๐Ÿ“ฆ where this page comes from