This is the 18th day of my participation in the August Challenge
Before entering the IPV6 era, let’s review some key aspects of IPV4.
IPV4
1. The TTL and Traceroute
-
Each hop will be reduced by 1, if reduced to 0 still does not reach the specified IP address, it will be discarded.
-
The TTL is 8 bits. The value is 32 or 64 and the maximum value is 255. The TTL is introduced to prevent network congestion caused by IP packets with no destination
-
This function can be used for path tracing traceroute. When TTL=0, the route will send a timeout message to the source address, so that it can calculate the time spent on each hop of the IP packet
-
In Windows, 30 hops can be traced using the tracert command:
-
The first column is the number of Hops, the next three columns are the RTT of the three ping tests, and the last column is the IP address or domain name
-
* indicates timeout or no response. Some hops do not respond to ICMP messages due to configuration or firewall reasons
2. Checksum Indicates the checksum
-
The CHECKSUM of an IP packet verifies only the header
-
The TCP checksum checks the header and payload together
3. IHL and Total Length
-
IHL: Internet Header Length: specifies the Header Length. The value ranges from 5 to 15, corresponding to 20 bytes to 60 bytes.
-
Total Length: indicates the header and payload Length. The maximum Length is 65,535 bytes.
-
The length of an IP header and payload is variable. Therefore, the receiver can distinguish the header from the payload.
4. flag
-
DF, don’t fragment, Bit1: 0 – Allow fragment, 1 – Don’t fragment. Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments.
-
If no segment is allowed and the router must segment the IP packet, the IP packet will be discarded
-
For segmented IP packets, the MF is 1 except for the last fragment
-
If an IP packet is segmented, the IDS of the segmented IP packets are the same.
5. TOS
-
Differentiated Services Codepoint (DSCP) accounted for 6 bits, and Explicit Congestion Notification (ECN) accounted for 2 bits
-
The DSCP is used to indicate the data type and processing
-
The ECN is used to warn the network of impending congestion, so that there is no need to display congestion through packet loss. After receiving this instruction, the receiver will notify the sender to reduce the sending window.
6. Address
-
The ABC addresses are unicast addresses, which are used for one-to-one communication.
-
The private address can be used only on the LAN. There are three private addresses, which correspond to the ABC classes 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255. That’s the kind of address we use for our hosts;
-
For Class D multicast addresses, each class D address corresponds to a group. Data sent to a multicast address is received by all members in the group. Class D addresses cannot be assigned to hosts. 224.0.0.1 is all hosts in the subnetwork, including all hosts in the network segment that participate in multicast. 224.0.0.2 indicates all routers that participate in multicast on the local network. To receive multicast, the host must join the corresponding multicast group. After joining the router, it has both a local IP address and a class D IP address of the multicast group, and can belong to multiple multicast groups.
-
Loopback address: 127.xxx.xxx. XXX is loopback;
-
0.0.0.0 has many meanings. In IPV4, it is an unroutable address, used to mark unknown and unavailable targets. For example, when accessing the network but no address is assigned, the IP address is used. For example, a computer has two IP addresses. After setting the listening 0.0.0.0, the program will receive data from both IP addresses.
-
X is a temporary address. On this network segment, the computer cannot access the network and cannot obtain an address from DHCP.
-
Each network has two IP addresses that cannot be assigned. One IP address is used to identify the network (any network id + host ID is 0). This IP address is used only as the network ID and is mainly used in network routing. One is used for network broadcasting (any network id + host ID is 1). The end address of the network address block is used as the broadcast address of the network.
7. Subnet and VLSM
-
The function of the subnet mask is to distinguish the network number and the host number, so that the computer can identify whether the host in the same subnet. If a 32-bit mask is used, it indicates the IP address itself, for example, 127.0.0.1/32 = 127.0.0.1
-
Variable Length Subnet Mask (VLSM) The Variable Length Subnet Mask (VLSM) enables efficient IP address allocation rather than increasing the number of IP addresses. The Variable Length Subnet Mask (VLSM) enables flexible on-demand IP address allocation instead of the traditional fixed mode. For a network segment, different subnet mask lengths can be used to divide subnets of different capacities.
8. 超网(supernetting)与CIDR
- The hypernetwork expands the address pool and reduces the load of the routing table by aggregating IP addresses of multiple subnets. In fact, the hypernetwork combines network numbers. Ensure that the network ids of all hosts after the merge are the same.
- Combining the mask and minimum address of the hypernet, the scope of the hypernet can be defined
- CIDR (Classless inter-domain Routing) effectively reduces the number of networks to be displayed through hypernetworks and prevents routing table explosion.
Above, thank you for reading, if there is inaccurate and wrong place please comment, I will immediately correct, thank you!
Summary is not easy, please do not reprint without permission, otherwise don’t blame old uncle you are welcome
Welcome technical friends to communicate with me, wechat 1296386616
References:
“INTERNET PROTOCOL” IETF datatracker.ietf.org/doc/html/rf…
The IP V4 WIKIPEDIA en.wikipedia.org/wiki/IPv4
Variable Length Subnet Mask (VLSM) Tutorial by AMAKIRI WELEKWE www.comparitech.com/net-admin/v…
Super network merger, rounding qicai_7 www.huaweicloud.com/articles/dd…