Internet Protocol IP and its supporting protocols
@ (computer network)
IP protocol is one of the two most important protocols in TCP/IP protocol cluster. The protocol is as follows: Address Resolution Protocol –arp Inverse address resolution –RARP Internet Control Message Protocol –ICMP Inter-Group Management Protocol –IGMP
where ARP and RARP support IP protocol operations, ICMP and IGMP operations require IP support. four different intermediate device physical layers: Transponder (repeater) Data Link layer: Bridge/Bridge (Bridger) network layer: Router (router) network layer above : Gateway
Note: When connecting two incompatible systems with a gateway, a higher level of protocol conversion is required.
In the data link layer and the physical layer using the intermediary device, just a network expansion , the network layer appears to be a net. The network interconnection is not known.
In addition, gateways are more complex and are now less used.
In such a view, the network interconnection of the task can only be given to the router.
The router is a dedicated computer , which is used to realize Internet interconnection . This is a heavy responsibility, we can swim the network, the router is not. (Here's the Internet router, not the little router we have at hand).
This is true, but history is often strange, such as geometric distributions are not geometry and so on. The name and the real thing are not exactly the same, but we are often used to derive meaning from the name.
For historical reasons, many of the documents about TCP/IP used to refer to routers used by the network layer as gateways. – "Computer 5th"
That is, in the TCP/IP system, which is currently the largest Internet internet, the interconnection is implemented in the network layer. Logically formed a virtual internetwork , the real connection is still heterogeneous physical interconnection.
The IP protocol is used to communicate at the network layer uniformly.
the internet can be interconnected by a variety of heterogeneous networks. category IP address
An IP address is a unique 32-bit identifier that is assigned to each interface on the Internet for each host or router.
Allows us to address them over the Internet.
Three phases of IP addressing: classification IP address: The most basic method of addressing Network division: The improvement of classification IP address to form the network: A newer non-classified addressing approach
Classification IP address is the IP address is divided into several fixed classes, each class by: Network number: Identify the host or router connected to the network, network number in the Internet is the only host number: Network number indicated under the premise, identify the host or router, the only
Two times unique, guaranteed IP address: Network number + address number is unique throughout the Internet .
Class A, B, and C addresses are unicast addresses. The Class D is a multicast address. But inside the A, B, and C addresses, the host 1 represents the broadcast of hosts within this network. Class A: (0 ...) 8b + 24b– is about 50% class B for all IP addresses: (10 ...) 16b+16b– 25% Class C for the total IP address: (110 ...) 24b+8b– 12.5% Class D for all IP addresses: 1110+28b Multicast address Class E: (1111) + reserved Unused
Now widely used is CIDR, no classification address, with the use of ultra-network, classification address is already the past. Of course, our country is actively advocating the implementation of the IPV6, in order to re-build the new network under the power of discourse is another thing. three-class address value details # # #:
A Class A network number is only 1 bytes, or 8b, and the first bit is fixed to 0, then only 7bits is actually available. However, the network number that can be assigned is 27−2=126 2^7-2 = 126.
Lost 2: All 0: Indicates this network (this) all 1:01111111: Reserved as loopback test address. For example, using a network framework such as flask, a socket such as 127.0.0.1:5000 in a local test run. Used for communication between local processes. The process is: the host sends the destination address is the IP datagram of the loopback address, the protocol stack on this host processes the data in the datagram, and does not send the data to the network.
That is: The available network number is 1~126
Note: 10.x.x.x is a reserved private address
After reading the network number, naturally again to focus on the host number.
The Class A address host number accounts for 3 bytes, and the maximum number of hosts is 224−2 2^24-2.
Reason for minus 2: The full 0 host number indicates that the IP address is the single network address where the host is located, emphasizing that a single host can connect to multiple networks. Outgoing a full 0 host number status identifies the network number, which can be used at a later gateway address concept. Full 1 Host number : All hosts on the network
Here we need to emphasize that a Class A address has (27−2) (224−2) ≈231 (2^7-2) (2^{24}-2) \approx 2^{31} for a rough calculation. Total IP address: 232 2^{32}. In fact, because of the previous fixed tag, as well as the reserved class E address, the total is less than 232 2^{32}. The type a address is directly accounted for in half. A total of 126 available Class A IP addresses, an address can be freely allocated 224−2 2^{24}-2 host address, is very convenient. Like Class B, Class C, an institution is slightly larger, it has to apply for multiple to complete the host interconnect. This is actually a very unfair thing. There is no doubt that class A addresses are almost always in North America, which is one of the reasons why we need to accelerate IPv6. IPv4 not enough is of course the main. The fairness of cyberspace is also the goal of the pursuit.
Class B Address: Network number 2B fixed starting from 10, then there is no full 0 full 1 network number. But minus 1, minus 1, the reason is: 128.0.0.0 not allocated.
That is: Network number from 128.1~191.255
Note: Remove the private address: 172.16.x.x~172.31.x.x
The host number is reduced by 2, and all 0 of the 1 are not allocated.
Class C Address: The three-bit front of the 3B network number starts at 110. Then there are 21 bits that can be used. But there is still one though not all 0 full 1, not allocated is: 192.0.0.0.
In fact, B, Class C network number to 1, a class to 2 can be so memory. B, Class C assignable bits, all 0 are not used. Because the loopback address has a Class A is enough, so only minus 1.
There is no logic, it is purely mnemonic.
The IP address is a logical address and is implemented with software.
The physical address is the address used by the data link layer and the physical layer and is the hardware address.
The hardware address is cured in the ROM on the NIC, and the hardware address is called the MAC address.
The data link layer does not see an IP address when sending data from a high down to a frame in the data link layer, and the span between each link is through the MAC address.
Since the data link layer does not see the IP address also means that the source IP address and destination IP address will not be changed during the forwarding process, and can be seen by the Data link layer MAC address, in each jump to change. It is important to note that a NAT router with a private address should be able to wear a public network (Internet)-recognized IP address at a time. Another change. If the other host is also connected to the NAT router, there is another change on the destination side.
In computer network, even in the whole computer-related system, shielding the implementation details of the lower layer is a very important design idea. Talking about a problem at a higher level of abstraction is a simplification of the problem, but the abstraction of itself requires a certain understanding.