Requirements for IP Version 4 Routers

IP路由器的主要职责包括:实现特定互联网协议,如IP、ICMP等;与多个网络接口,执行必要的网络功能;接收和转发互联网数据包,进行错误处理、拥塞控制和公平性管理;选择数据包的下一跳目的地等。路由器需要具备高级路由和转发算法、高可用性、高级操作和维护特性以及高性能。此外,路由器的设计基于互联网是网络的网络,不保存连接状态信息,并且路由复杂性应在路由器中处理。
摘要由CSDN通过智能技术生成
Routers : The devices that perform the network layer forwarding function of the Internet protocol suite.

The major distinction between Internet hosts and routers is that routers implement forwarding algorithms, while Internet hosts do not require forwarding capabilities.

A router connects to two or more logical interfaces, represented by IP subnets or unnumbered point to point lines.Thus, it has at least one physical interface. Forwarding an IP datagram generally requires the router to choose the address and relevant interface of the next-hop router or (for the final hop) the destination host. This choice, called relaying or forwarding depends upon a route database within the router. The route database is also called a routing table or forwarding table.
Routers provide datagram transport only, and they seek to minimize the state information necessary to sustain this service in the interest of routing flexibility and robustness.
An Autonomous System (AS) is a connected segment of a network topology that consists of a collection of subnetworks (with hosts attached) interconnected by a set of routes. The subnetworks and the routers are expected to be under the control of a single operations and maintenance (O&M) organization. An AS is identified by an Autonomous System number.
An IP datagram carries 32-bit source and destination addresses, each of which is partitioned into two parts - a constituent network prefix and a host number on that network.
IP-address ::= { <Network-prefix>, <Host-number> }
To finally deliver the datagram, the last router in its path must map the Host-number (or rest) part of an IP address to the host’s Link Layer address.
The simplest classical network prefix is the Class A, B, C, D, or E network prefix. These address ranges are discriminated by observing the values of the most significant bits of the address, and break the address into simple prefix and host number fields.
  1. 0xxx - Class A - general purpose unicast addresses with standard 8 bit prefix
  2. 10xx - Class B - general purpose unicast addresses with standard 16 bit prefix
  3. 110x - Class C - general purpose unicast addresses with standard 24 bit prefix
  4. 1110 - Class D - IP Multicast Addresses - 28 bit prefix, nonaggregatable
  5. 1111 - Class E - reserved for experimental use
This simple notion has been extended by the concept of subnets. Subnets provide a multi-level hierarchical routing structure for the Internet system. The basic idea is to partition the <Host-number> field into two parts: a subnet number, and a true host number on that subnet:
IP-address ::= { <Network-number>, <Subnet-number>, <Host-number> }
The distinction between the subnets of such a subnetted network is not normally visible outside of that network. Routers outside the network treat <Network-prefix> and <Host-number> together as an uninterpreted rest part of the 32-bit IP address. Within the subnetted network, the routers use the extended network prefix:
{ <Network-number>, <Subnet-number> }
The bit positions containing this extended network number have historically been indicated by a 32-bit mask called the subnet mask.

IP multicasting is an extension of Link Layer multicast to IP internets.This collection of hosts is called a multicast group. Each multicast group is represented as a Class D IP address. An IP datagram sent to the group is to be delivered to each group member with the same besteffort delivery as that provided for unicast IP traffic. The sender of the datagram does not itself need to be a member of the destination group.

Router Characteristics

An Internet router performs the following functions:

  1. Conforms to specific Internet protocols 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:
    1. Encapsulating and decapsulating the IP datagrams with the connected network framing (e.g., an Ethernet header and checksum),
    2. 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,
    3. Translating the IP destination address into an appropriate network-level address for the connected network (e.g., an Ethernet hardware address), if needed, and
    4. Responding to network flow control and error indications, if any.
  3. Receives and forwards Internet datagrams. Important issues in this process are buffer management, congestion control, and fairness.
    1. Recognizes error conditions and generates ICMP error and information messages as required.
    2. Drops datagrams whose time-to-live fields have reached zero.
    3. Fragments datagrams when necessary to fit into the MTU of the next network.
  4. Chooses a next-hop destination for each IP datagram, based on the information in its routing database.
  5. (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.
  6. Provides network management and system support facilities, including loading, debugging, status reporting, exception reporting and control.

Routers in the global interconnect system generally require:

  1. Advanced Routing and Forwarding Algorithms
    These routers need routing algorithms that are highly dynamic, impose minimal processing and communication burdens, and offer type-of-service routing. Congestion is still not a completely resolved issue.
  2. High Availability
    These routers need to be highly reliable, providing 24 hours a day, 7 days a week service.
  3. Advanced O&M Features
    Internet routers normally operate in an unattended mode. They will typically be operated remotely from a centralized monitoring center. They need to provide sophisticated means for monitoring and measuring traffic and other events and for diagnosing faults.
  4. High Performance

Architectural Assumptions
The current Internet architecture is based on a set of assumptions about the communication system. The assumptions most relevant to routers are as follows:

  1. The Internet is a network of networks.
    Each host is directly connected to some particular network(s); its connection to the Internet is only conceptual. Two hosts on the same network communicate with each other using the same set of protocols that they would use to communicate with hosts on distant networks.
  2. Routers do not 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. All connection control information is thus co-located with the end points of the communication, so it will be lost only if an end point fails. Routers control message flow only indirectly, by dropping packets or increasing network delay.
    Note that future protocol developments may well end up putting some more state into routers. This is especially likely for multicast routing, resource reservation, and flow based forwarding.
  3. Routing complexity should be in the routers.
    Routing is a complex and difficult problem, and ought to be performed by the routers, not the hosts.
  4. The system must tolerate wide network variation.
    A basic objective of the Internet design is to tolerate a wide range of network characteristics - e.g., bandwidth, delay, packet loss, packet reordering, and maximum packet size.
    Another objective is robustness against failure of individual networks, routers, and hosts, using whatever bandwidth is still available.
    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.

LINK/INTERNET LAYER INTERFACE
The information that must pass from the Link Layer to the Internetwork Layer for each received packet is:

  1. The IP packet
  2. The length of the data portion (i.e., not including the Link-Layer framing) of the Link Layer frame
  3. The identity of the physical interface from which the IP packet was received
  4. The classification of the packet’s destination physical address as a Link Layer unicast, broadcast, or multicast
  5. 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
  2. The length of the IP packet
  3. The destination physical interface
  4. The next hop IP address
  5. The Link Layer priority value

Here are the requirements for specific IP options:

  1. Security Option
  2. Stream Identifier Option
    This option is obsolete;
  3. 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, the packet has reached its final destination. In such an option, the pointer points beyond the last field and the destination address in the IP header addresses the router. The option as received (the recorded route) MUST be passed up to the transport layer (or to ICMP message processing).
    When a source route option is created (which would happen when the router is originating a source routed datagram or is inserting a source route option as a result of a special filter), it MUST be correctly formed even if it is being created by reversing a recorded route that erroneously includes the source host
    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 is 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.
  4. Record Route Option
  5. Timestamp Option
    Routers MAY support the timestamp option in datagrams originated by the router. The following rules apply:
    1. 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
    2. If the router itself receives a datagram containing a Timestamp Option, the router MUST insert the current time 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. If space is not present, the router MUST increment the Overflow Count in the option.

    To maximize the utility of the timestamps contained in the timestamp option, the timestamp inserted should 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.
    The timestamp option permits the use of a non-standard time clock, but the use of a non-synchronized clock limits the utility of the time stamp. Therefore, routers are well advised to implement the Network Time Protocol for the purpose of synchronizing their clocks.

A router MUST verify the IP checksum of any packet that is received, and MUST discard messages containing invalid checksums. The router MUST NOT provide a means to disable this checksum verification.
When a router fragments an IP datagram, it SHOULD minimize the number of fragments. When a router fragments an IP datagram, it SHOULD send the fragments in order.
Note in particular that a router MUST NOT check the TTL of a packet except when forwarding it.
A router MUST NOT originate or forward a datagram with a Time-to-Live (TTL) value of zero.
A router MUST NOT discard a datagram just because it was received with TTL equal to zero or one; if it is to the router and otherwise valid, the router MUST attempt to receive it.
On messages the router originates, 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.
The TTL field has two functions: limit the lifetime of TCP segments, and terminate Internet routing loops.

A higher-layer protocol may want to set the TTL in order to implement an "expanding scope" search for some Internet resource. This is used by some diagnostic tools, and is expected to be useful for locating the "nearest" server of a given class using IP multicasting, for example. A particular transport protocol may also want to specify its own TTL bound on maximum datagram lifetime.
A default TTL value in excess of 40, and 64 is a common value.
All-subnets broadcasts (called multi-subnet broadcasts) have been deprecated.
An IP multicast 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 general purpose unicast IP addresses, using the following notation for an IP address:

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

and the notation -1 for a field that contains all 1 bits and the notation 0 for a field that contains all 0 bits.

  1. { 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, 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 }.
    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 is best to  ignore datagrams having a source address of { 0, 0 } since they were probably generated by a misconfigured host or router.
    Thus, 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.
  2. { 0, <Host-number> }
    Specified host on this network. It MUST NOT be sent by routers except that the router MAY use this as a source address as part of an initialization procedure by which the it learns its own IP address.
  3. { -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 will not be forwarded outside that network.
  4. { <Network-prefix>, -1 }
    Directed Broadcast - a broadcast directed to the specified network prefix. 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.
  5. { 127, <any> }
    Internal host loopback address. Addresses of this form MUST NOT appear outside a host.

IP addresses are not permitted to have the value 0 or -1 for the <Host-number> or <Network-prefix> fields except in the special cases listed above. This implies that each of these fields will be at least two bits long.
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:

  1. A router MUST receive and process normally any packets with a broadcast destination address.
  2. A router MUST receive and process normally any packets sent to a multicast destination address that the router has asked to receive.

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.
A router

  1. MUST treat as IP broadcasts packets add
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值