- The Internet is a network of networks.
- Gateways don’t keep connection state information.
All state information required for end-to-end flow control and reliability is implemented in the hosts, in the transport layer or in application programs.
- Routing complexity should be in the gateways.
- The System must tolerate wide network variation.
Address Resolution Protocol -- ARP
ARP Cache Validation
An implementation of the ARP MUST provide a mechanism to flush out-of-date cache entries.A mechanism to prevent ARP flooding (repeatedly sending an ARP Request for the same IP address, at a high rate) MUST be included.
Four mechanisms have been used to flush out-of-date cache entries.
- Timeout -- Periodically time out cache entries, even if they are in use. Note that this timeout should be restarted when the cache entry is "refreshed". it SHOULD be possible to configure the timeout value
- Unicast Poll -- Actively poll the remote host by periodically sending a point-to-point ARP Request to it, and delete the entry if no ARP Reply is received from N successive polls. Again, the timeout should be on the order of a minute, and typically N is 2.
- Link-Layer Advice -- If the link-layer driver detects a delivery problem, flush the corresponding ARP cache entry.
- Higher-layer Advice -- Provide a call from the Internet layer to the link layer to indicate a delivery problem. The effect of this call would be to invalidate the corresponding cache entry.
The link layer SHOULD save (rather than discard) at least one (the latest) packet of each set of packets destined to the same unresolved IP address, and transmit the saved packet when the address has been resolved.
Failure to follow this recommendation causes the first packet of every exchange to be lost. Although higherlayer protocols can generally cope with packet loss by retransmission, packet loss does impact performance. For example, loss of a TCP open request causes the initial round-trip time estimate to be inflated.
LINK/INTERNET LAYER INTERFACEThe packet receive interface between the IP layer and the link layer MUST include a flag to indicate whether the incoming packet was addressed to a link-layer broadcast address.
The packet send interface between the IP and link layers MUST include the 5-bit TOS field.The link layer MUST NOT report a Destination Unreachable error to IP solely because there is no ARP cache entry for a destination.
INTERNET LAYER PROTOCOLS
The host IP layer has two basic functions:
- choose the "next hop" gateway or host for outgoing IP datagrams and
- reassemble incoming IP datagrams. The IP layer may also
- implement intentional fragmentation of outgoing datagrams. Finally, the IP layer must
- provide diagnostic and error functionality.
For incoming datagrams, the IP layer:
- verifies that the datagram is correctly formatted;
- verifies that it is destined to the local host;
- processes options;
- reassembles the datagram if necessary; and
- passes the encapsulated message to the appropriate transport-layer protocol module.
For outgoing datagrams, the IP layer:
- sets any fields not set by the transport layer;
- selects the correct first hop on the connected network (a process called "routing");
- fragments the datagram if necessary and if intentional fragmentation is implemented; and
- passes the packet(s) to the appropriate link-layer driver.
A host is said to be multihomed if it has multiple IP addresses. There are two distinct problem areas in multihoming:
- Local multihoming -- the host itself is multihomed; or
- Remote multihoming -- the local host needs to communicate with a remote multihomed host.
Any host that forwards datagrams generated by another host is acting as a gateway.
PROTOCOL WALK-THROUGH
- Version Number
A datagram whose version number is not 4 MUST be silently discarded. - Checksum
A host MUST verify the IP header checksum on every received datagram and silently discard every datagram that has a bad checksum. - Addressing:
There are now five classes of IP addresses: Class A through Class E. Class D addresses are used for IP multicasting, 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 may be either permanent or transient. Permanent multicast addresses are allocated by the Internet Assigned Number Authority, while transient addresses may be allocated dynamically to transient groups. Group membership is determined dynamically using IGMP
We now summarize the important special cases for Class A, B, and C IP addresses, using the following notation for an IP address:
{ <Network-number>, <Host-number> }
or
{ <Network-number>, <Subnet-number>, <Host-number> }
and the notation "-1" for a field that contains all 1 bits
- { 0, 0 }
This host on this network. MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its own IP address. - { 0, <Host-number> }
Specified host on this network. It MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its full IP address. - { -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 on the connected physical network but will not be forwarded outside that network. - { <Network-number>, -1 }
Directed broadcast to the specified network. It MUST NOT be used as a source address. - { <Network-number>, <Subnet-number>, -1 }
Directed broadcast to the specified subnet. It MUST NOT be used as a source address. - { <Network-number>, -1, -1 }
Directed broadcast to all subnets of the specified subnetted network. It MUST NOT be used as a source address. - { 127, <any> }
Internal host loopback address. Addresses of this form MUST NOT appear outside a host.
- { 0, 0 }
The <Network-number> is administratively assigned so that its value will be unique in the entire world.
When a host sends any datagram, the IP source address MUST be one of its own IP addresses (but not a broadcast or multicast address).
A host MUST silently discard an incoming datagram that is not destined for the host. An incoming datagram is destined for the host if the datagram’s destination address field is:
- (one of) the host’s IP address(es); or
- an IP broadcast address valid for the connected network; or
- the address for a multicast group of which the host is a member on the incoming physical interface.
A host MUST NOT send a datagram with a Time-to-Live (TTL) value of zero. A host MUST NOT discard a datagram just because it was received with TTL less than 2.
The IP layer MUST provide a means for the transport layer to set the TTL field of every datagram that is sent. When a fixed TTL value is used, it MUST be configurable.
Options:
All IP options (except NOP or END-OF-LIST) received in datagrams MUST be passed to the transport layer (or to ICMP processing when the datagram is an ICMP message). The IP and transport layer MUST each interpret those IP options that they understand and silently ignore the others.
Here are the requirements for specific IP options:
- Security Option
Some environments require the Security option in every datagram;( RFC-791and RFC-1038 ) - Stream Identifier Option
This option is obsolete; it SHOULD NOT be sent, and it MUST be silently ignored if received. - Source Route Options
A host MUST support originating a source route and MUST be able to act as the final destination of a source route.
If host receives a datagram containing a completed source route (i.e., the pointer points beyond the last field), the datagram 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). This recorded route will be reversed and used to form a return source route for reply datagrams. When a return source route is built, it MUST be correctly formed even if the recorded route included the source host.
An IP header containing more than one Source Route option MUST NOT be sent; the effect on routing of multiple Source Route options is implementationspecific.
If a source-routed datagram is fragmented, each fragment will contain a copy of the source route. Since the processing of IP options (including a source route) must precede reassembly, the original datagram will not be reassembled until the final destination is reached.
Suppose a source routed datagram is to be routed from host S to host D via gateways G1, G2, ... Gn. There was 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 >>}; i.e., the originating host would be the first hop in the route. - Record Route Option
OPTIONAL - Timestamp Option
OPTIONAL. If it is implemented, the following rul