An IP network is composed of IP subnets interconnected through routing devices, which are responsible for finding routes between IP subnets and forwarding IP packets to the next IP subnet.
IP address
An IP address is the basis for data transmission in an IP network. It identifies a connection in an IP network, and a host can have multiple IP addresses. The IP address in the IP packet remains unchanged during network transmission.
1. Basic address format
Today's IP network uses 32-bit addresses, expressed in dotted decimal, such as 172.16.0.0. The address format is: IP address = network address + host address or IP address = host address + subnet address + host address.
Network addresses are uniformly allocated by the Internet Authority (InterNIC) to ensure the global uniqueness of network addresses. The host address is assigned by the system administrators of each network. Therefore, the uniqueness of network addresses and the uniqueness of host addresses within the network ensure the global uniqueness of IP addresses.
2. Retaining address allocation
Depending on the purpose and security level, IP addresses can also be roughly divided into two categories: public addresses and private addresses. Public addresses are used in the Internet and can be accessed at will on the Internet. Private addresses can only be used in internal networks and can only communicate with the Internet through proxy servers.
To connect to the Internet, an institution or network must apply for a public IP address. However, considering the special circumstances such as network security and internal experiments, three areas are specifically reserved as private addresses in the IP address, and the address range is as follows:
10.0.0.0/8:10.0.0.0~10.255.255.255
172.16.0.0/12:172.16.0.0~172.31.255.255
192.168.0.0/16:192.168.0.0~192.168.255.255
Networks using reserved addresses can only communicate internally and cannot be interconnected with other networks. Because the reserved addresses in this network may also be used by other networks, if network interconnection is performed, problems will arise when looking for routes because the addresses are not unique. However, these networks using reserved addresses can interconnect with external networks by translating and converting reserved addresses within the network into public addresses. This is also one of the important ways to ensure network security.
Classless inter-domain routing (CIDR)
As the number of hosts connected to the Internet increases exponentially every year, the Internet faces crises such as lack of Class B addresses, explosion of routing tables and exhaustion of entire addresses. Classless inter-domain routing (CIDR) is a direct solution developed to solve these problems, which gives the Internet enough time to wait for the emergence of a new generation of IP protocols.
According to the CIDR strategy, the lack of Class B addresses can be solved by applying for several Class C addresses instead of applying for a separate Class B address. The assigned C-class addresses are not random, but continuous, and their highest bits are the same, that is, they have the same prefix. Therefore, the routing table only needs to use one table entry to represent a set of network addresses. This method is called "routing table clustering".
In addition, in addition to the "routing table clustering" measure, each ISP can also obtain a piece of address space from the InterNIC and then assign these addresses to the user.
Routing technology
Routing in an IP network is done by routing devices. The router executes a certain routing protocol to find the best route to the destination host or network for the IP datagram, and forwards the datagram to achieve routing selection.
1. Routing protocol
Routing protocols are divided into two categories:
Routing Protocol
This type of protocol uses certain routing algorithms to find the best path to the destination host or network, such as RIP (Routing Information Protocol), etc.
Routed Protocol
This type of protocol transmits datagrams along selected paths. For example, through IP protocol, it can transform physical connections into network connections, realizing the main function of the network layer - routing.
2. Direct connection routes and non-direct connection routes
The IP protocol forwards data based on routing. There are two types of routes in a router: direct-connected route and non-direct-connected route.
Directly connected networks directly connected to each network interface of the router use direct connection routes for communication. Direct connection routing is automatically generated after configuring the IP address of the router network interface. Therefore, if no special restrictions are imposed on these interfaces, the networks directly connected to these interfaces can communicate directly.
Communication between networks interconnected by two or more routers uses non-direct routing. Non-direct connection routing refers to manual static routing or dynamic routing obtained by running dynamic routing protocols. Among them, static routing has higher operability and security than dynamic routing.
IP networks have gradually become the standard of modern networks. When using IP protocol to form a network, routing devices must be used to interconnect each IP subnet, and routing mechanisms are used between IP subnets to form a hierarchical Internet network through IP gateway interconnection.
[1]
Article entry: csh Editor in charge: csh