Internet subnet
(RFC917 --InterNet Subnets)
Http://91mail.51.net translated and organized
download
The state of this memo
This document is a proposal for the INTERNET protocol and needs to be discussed. The release of this memo is not restricted.
Summary
This document discusses the utility of "subnet" in the Internet. "Subnet" is part of the entire Internet. Due to management and technology, many institutions choose to divide a network into several subnets, not simple to use a series of Internet addresses.
This document proposes the procedures and processes of the subnet and discusses the method of resolving the problem arising from this, especially routing.
1 Introduction
The Internet is considered two-layer structure at the beginning, and the high layer is a single chain network, which is a collection of "network", and each network has its own network number. (Although the Topology of the Internet is actually undesirable, the address resolution of the Internet is hierarchical.)
This approach has proven to be simple and effective, but many institutions have found that it is sufficient. Therefore, the third layer is added to the resolution of the Internet address. From this point of view, a particular network needs (or may not be required) a layered a series of subnets.
The view is considered to be two layers is to build on such a hypothesis, ie, for a host in a network, the network it is in only one boundary, that is, this network can be seen For a black box with many hosts. This is correct to the early Arpa network in the Internet. Because IMPS blocks the use of special connections in the network. This is also like this for most LAN technology, such as Ethernet and ring networks.
But this assumption is not right in many practices. In a medium-sized institution, such as a few buildings, universities and companies, often require multiple local area network cables to connect "local areas". In writing this document, Stanford University has 18 such network cables, and more still planned.
There are several reasons for connecting several regions with multiple network cables:
L Different technologies: especially in research environments, there may be several different LAN, for example, some institutions have some devices to support Ethernet, while others support the ring network.
l Technology restriction: Most techniques are limited by the electrical parameters, and the total length of the connected host and the total length of the network cable is limited. These limits, especially the length of the network cable is easy to achieve.
l Network congestion: In a local area network, a small part of the host is likely to exclude most of the bandwidth. The method usually solving this problem is to divide the host according to how many parts of communication, each part uses different network cables.
l Connection of the point-to-point: Sometimes a "local area" is divided into several parts, while the distance between the part is too far away. In this case, the high-speed point-to-point connection can be used to connect these local area networks.
There are three options to allocate Internet addresses for institutions that have to use multiple local area networks:
1. Assign a network number for each network.
2. Allocate a network number for the entire body and assign an address to the host, regardless of which LAN in the host.
3. Use a network address and divide a few address spaces, allocate a subnet address (explicit subnet) for each LAN address (explicit subnet).
Each method has a disadvantage. The first method does not need to modify and increase the existing protocol, but will result in a sharp increase in routing tables, the internal connectivity information of the entire network spread throughout the Internet, and this information is no use of the world other than this institution. Especially now some gateways do not have a large routing table space. So this problem should be avoided.
The second method requires a certain protocol to integrate certain local area networks into a single network. For example, in a local area network using Address Resolution Protocol (ARP), the Internet address is parsed to a hardware address, and the bridge between the local area network will intercept the ARP's request for non-local targets. But not all local area network technology can do this, especially without using ARP or does not support the broadcast protocol. A more basic problem is that the bridge should know which local area network per host (this information can be obtained with the broadcast algorithm), with the increase of the host, the price of the broadcast increases, the buffer required for conversion is also Intensify. When you find a suitable method, you may be that the host in the subnet doesn't know that you are in the subnet. This will be explained later. This is very useful when you cannot modify the host to support the "explicit subnet".
1.1. Term
In order to explain the clear and concise, some terms are defined here, and they are used in later:
Chain network: a collection of networks connected together
Network: A network in the Internet (can be divided into subnets, can also be regarded)
Subnet: part of the network
INT: See Reference [8]
Local address: The bit is not assigned to the network number in the Internet address, also called "remaining bits"
Subny network number: Number of the network in the network
Subnet: The bit is assigned to the subnet number in the Internet address
Host bit: Internet address is used to indicate the bit of specific hosts
Gateway: Connect two or more different networks or subnets, pass data nodes
Bridge: Connect two or more physical can be sorry, but manage uncomaped subnets, and the nodes that pass the packets are required, the host does not know its existence.
2 subnet address assignment standard
According to the description in [2], the division subnet is the issue of the allocation of the address. In this section, we first propose a address resolution scheme that supports the subnet, then discusses the relationship between this address format and the broadcast, and finally give an address resolution protocol.
2.1 Analysis of the Internet Address
Suppose an institution is assigned to a network number and divides it into a series of subnets and is allocated to the host. How to do? Because the allocation limit of the local address portion in the Internet address is small, the assignment of subnet numbers mainly has the following methods:
a) Variable length field: Any bit of the local address portion can be used to subnet, although this part of the length is certain for a particular network, but each network can be different. If the length is 0, the subnet is not used.
b) Delivery field: Specify the length of the field (such as 8 bits) use the language nominal number (in the case where the subnet) is used.
c) Self-encoding bell field: The length of the network is determined by its high position, similar, the length of the subnet number is also determined by its high position.
d) Self-coding fixed length field: a certain length of the field to the subnet. If the highest bit is 1, then the subnet is used, otherwise it is not used.
What criteria choose one from these four scenarios? First, determine if you want to use the self-coding scheme, that is, if you can detect an Internet address, you can learn whether the address is used.
One advantage of self-encoding is that people can know if a non-local network is divided into a subnet. Whether this is still not very clear. However, the main benefits are not required to illustrate whether the two addresses are on the same subnet. However, from another perspective, this will also be a disadvantage: for non-subnet networks, if hosts are anywhere in the local address field of its address, it will cause problems (1). That is, if the network is able to control the network of nets in the allocation of the host address, this will be very useful. Another disadvantage of the self-coding scheme is that the address space used to host the host will decrease at least 2 bits. If there is no self-coding scheme, it is obvious that it is appropriate to make long subsidiary. Since each network has a "logo" in any case, you can use the subnet, which can be ignored by using an integer type than the cost of using the Boolean flag. The benefits of using the varying long subnet field are to allow each institution to select the best allocation scheme to cope with the relative shortcomings of the number of address bits used by the host.
Therefore, the resolution of the Internet address we propose is:
<网号>
The bit used by the network number is described in Reference [8]. The host number field is at least 1 bit. The length of the subnet field is fixed in one network. Subnet fields and host fields do not require other data. If the length of the subnet field is 0, the subnet is not used.
For example, in a Class A network, there is an 8-bit subnet field, its address is as follows:
- - - - - - - - - - - - - - - -
| 0 | Network | Subnet | Host number |
- - - - - - - - - - - - - - - -
To achieve simple and effective, we hope that all institutions use 8 or 8 multiples of subnet lengths. But as a unified implementation method, it must be other possible lengths.
We oppose the use of "recursive subnet", which is to divide the host number field into subnets and hosts. because:
- There is no obvious demand for the four-layer structure.
- There is not enough location in the IP address to have practical value.
- Need complex and external mechanism
2.2 Changes needed to support subnets and software
In most IP implementations, there is often similar to the following code in the module that sends out the packet outward:
IF IP_NET_NUMBER (Packet.ip_Dest) = IP_NET_NUMBER (my_ip_addr)
THEN
Send_packet_locally (packet, packet.ip_dest)
Else
Send_packet_locally (packet,
Gateway_to (IP_NET_NUMBER (Packet)))))
IF Internet network number (packet target address) = its own network number
THEN
Send a local packet
Else
Send a local data package to the gateway
In order to support the subnet, another 32-bit value is required to become a network mask. This is a bit mask, the settings of each bit and the IP network number and the subnet number. For example, a Class A network uses an 8-bit subnet field, and its mask is 255.255.0.0. Then the above program code becomes:
IF bitwise_and (packet.ip_dest, my_ip_mask)
= bitwise_and (my_ip_addr, my_ip_mask)
THEN
Send_packet_locally (packet, packet.ip_dest)
Else
Send_packet_locally (packet,
Gateway_to (bitwise_and (packet.ip_dest, my_ip_mask))))
Of course, the expression of some of the conditions can be pre-calculated.
Function "Gateway_to" may need to be modified to do a similar comparison and judgment.
To support hosts connected to multiple networks, programs can set their respective "my_ip_addr" and "my_ip_mask" for each network interface, and the comparison and judgment in the above code should also be done to each network interface.
2.3 subnets and broadcasts
In the case where there is no subnet, there are only two broadcasts in the Internet protocol: broadcast to all hosts in the specified network, or all hosts broadcast to your own network. The latter approach is useful in which network you are in the host.
When the subnet is used, the situation is complicated. First, the possibility of broadcasting to a particular subnet is generated. Second, all hosts in the broadcast to the subnet need additional mechanisms. Finally, the interpretation of "broadcast to its own network" becomes "broadcast to its own subnet"
The implementation of this must be recognized in the 3nd broadcast address and its host address:
Bible physical network
All bits are 1 target address (255.255.255.255) will broadcast the packet in a local physical network, and the gateway does not pass these packets.
Specified network
There is a valid network address in the target address, while the local address part is 1 (for example: 36.255.255.255).
Subnet designated
The end address and subnet address in the target address are valid, and the host number field is 1 (such as: 36.40.255.255).
More in-depth discussion of Internet Broadcasting [6].
A factor that helps to decide whether to use the subnet is: Does a host need to broadcast all hosts in one step. If the two hosts are not in the same network, it is impossible to broadcast them in one step.
2.4 Determine the length of the subnet field
How do a host know how long the use of the subnet field? This issue is very similar to several "boot procedures": How do you know your address and how to know the address of the gateway. For these three issues, there are two basic solutions: "hardcodes" information and broadcast-based protocols.
"Hard Code" information means information that the host does not receive through the network. Can be compiled, or better ways to store in disk files. However, for an increasing diskless workstation, since it is booted from the network, the two "encoded" methods are not applicable. Most of the local area network technologies support broadcasts, so another preferred method is the required information required to start the host broadcast. For example, in order to know your own Internet address, you can use the "Reverse Address Resolution Protocol" [4].
We recommend extension the ICMP [9] protocol (Internet Breeding Control Protocol) to join a new couple: "Address Format Request" and "Address Format Reply", and "Information Request" and "Information Recovery" message very similar. See Appendix 1 for details.
When a host starts, broadcast newly added ICMP messages "Address Format Request" <3>. After receiving the gateway (or a host of the gateway), the reply is reply to "reply" in address format. If the request is not explained which host sent (source IP address is 0), the reply message is issued in the form of broadcast. I will receive this message to issue a request, so I know my subnet length. There is only one value in the Address Format Request, so there is no need to match the request and reply: there is no relationship with multiple gateway replies. We think the host will not always start from the new, so the broadcast load of these two messages on the network is very small.
If the host is in several local area, it needs to use this protocol for each LAN unless it can determine (from one of the networks), several local area networks are in the same network. In this case, its address will have the same subnet length.
A potential question is what if the host repeatedly received a response to the "address format request" multiple times. There are three reasons that may lead to this situation:
1. The LAN is not connected to other networks (permanent).
2. There is no subnet, and there is no host to support these two ICMP requests.
3. All gateways do not work properly (temporary)
First, two situations means that the subnet length is 0. In the third case, it can't know what it is: the safest choice is 0. Although it is likely to be wrong, this will not block the data transfer that can be successful. When the gateway restores the work, it will reply when it receives "address format request", and the host can get the correct information and adjust it accordingly. Host and gateways should not send "address format reply" based on "guess".
Finally, pay attention to do not require the host to use these two ICMP protocol messages to obtain subnet length, especially for hosts with stable storage media.
3. Subnet routing method
All hosts have to face how to determine the route to another host. In the case of subnet, this problem only needs a small change.
After using the subnet, the routing process will handle two levels. If the target host and the source host are in the same network, only the gateway between the child is required to determine the route. And if the target host and source host are in different networks, the gateways between the networks and the gateways between the networks are needed to determine the route.
Fortunately, many hosts can use the "default" gateway as the first target of all routes, and then define more suitable routes when replying to the ICMP host redirect message. However, this method is too low for gateways and hosts in multiple networks, but should use routing information exchange protocols. This exceeds the scope of this document, and there is also this problem without subnet.
For hosts only on a network, you need to find at least one adjacent gateway. Similarly, there are two solutions: hard coding and broadcasting. The problem of adjacent gateways also exists when there is no subnet, and there is no impact on the issue with no subnet.
But there is still another problem: the source host must know the packet is sent directly to the target host or send it through the gateway? That is to know if the target host and the source host are on the same physical network. This is the only place to know the subnet during the routing process. In fact, if broadcasting is not used, this is the only place in the implementation of the Internet needs to be modified.
Therefore, it is possible to use an existing method to support the subnet <4> without modification. Such implementation must have the following conditions:
- Only for hosts connected to a network, do not use it to the gateway.
- Use in a local area network with broadcast.
- Use the address resolution protocol ARP, such as [7].
- Do not need maintenance and gateways.
In this case, you can modify the address parsing the ARP service module on the subnet. When it receives the address resolution request, check whether the packet is transmitted by the best route. If so, you will reply your hardware address to the source host. The source host considers the address of the gateway to the target address and sends the packet to this address. In fact, the gateway will receive these packets and passed it to the target address. This method makes it clear that the processing level in the gateway is not well known, because in general, the address resolution server and the routing table have no contact. Considering this, this method is not very satisfactory. But it is quite simple to achieve, and there is no significant performance loss. The problem is that if the original gateway is issued, there is no way to choose another gateway. In this way, a successful connection can be successfully connected under other methods.
Do not confuse the "subnet technology based on address resolution protocol" and "bridge based on address resolution protocol". The former is based on the gateway to check the ability of the IP address to derive the ability of the route, based on the topological structure of the explicit subnet. A small portion of the routing function is transferred from the host to the gateway. The bridge based on the address parsing protocol is unware of the location of the host address and the network topology, knowing the position of each host.
Note: The subnet technology based on the address resolution protocol is complicated due to the use of broadcasts. The address resolution server responds to the request of the target address is a broadcast address. Such a request may only come from a host that does not know the broadcast address. This will result in a loop pass of the packet. If there is a host in a physical network that does not know the broadcast address, the survival time is the time T ** N will be repeated.