Ping is often used in the network. Teach you how to detect the three-layer network at one time

Ping is often used in the network. Teach you how to detect the three-layer network at one time

Internet Control Message Protocol: ICMP is a control plane protocol

The IPv4 protocol is a connectionless protocol, and ICMP assists IPv4 and is used to detect the connectivity of the three-layer network, provide error prompts, and perform path optimization (redirection).

Message encapsulation: Ethernet2/IPv4/ICMP/FCS (IP protocol number 1)

Note: Type: Type Code: Code checksum: ICMP message checksum.

ICMP message type and code type (Code); destination unreachable message, source suppression message, timeout message, parameter problem, change route, echo request and reply, timestamp request and reply, address mask request and reply, route query and notification; some are as follows:

Ping command: Echo Request

Echo Reply Echo reply:

Traceroute command: route tracking

Packet encapsulation: Ethernet 2/IPv4/UDP/Traceroute/FCS UDP port number 33434

Principle: The Traceroute command uses the TTL field and ICMP error messages to determine the route from one host to other hosts on the network. First, Traceroute sends an IP data packet with a TTL of 1 to the destination. When the first router on the path receives this data packet, the packet rewriting engine reduces the TTL by 1. At this time, the TTL becomes 0, so the router will discard this data packet and send back an "ICMP time exceeded" message (including the source address of the IP packet, all the contents of the IP packet and the IP address of the router). After receiving this message, Traceroute knows that this router exists on this path. Then Traceroute sends another data packet with a TTL of 2 and finds the second router... Traceroute increases the TTL of the sent data packet by 1 each time to find another router. This repeated action continues until a data packet reaches the destination. When the data packet reaches the destination, the host will not send back an ICMP time exceeded message. Once it reaches the destination, since Traceroute sends data packets to the uncommon port number 33434 via UDP data packets, it will receive an "ICMP port unreachable" message, so it can be determined that the destination has been reached.

Note: Traceroute 1.1.1.1 source 2.2.2.2 specifies the source address and destination address of Traceroute. The source address of Cisco source Traceroute must be the interface address of the router to prevent DDOS attacks.

<<:  Who will shoulder the responsibility of making money from 5G? Although first class is expensive, total revenue still depends on economy class

>>:  Network Address Translation Protocol (NAT) and Its Application Examples

Recommend

GoLang: Do you really understand HTTPS?

For a long time, the laboratory and even the enti...

Summary information: Yuanyun/OVZH/Shumai Technology/Fanyun

October and November coincide with the Double Nat...

Samsung bets on European 5G orders to grow network equipment business

Samsung Electronics is pinning its hopes on Europ...

The future of wide area networks (WANs) is wireless

Cellular wireless networks are an attractive alte...

IPv6 Basics: Neighbor Discovery Protocol NDP

In this issue, we will introduce the basic neighb...

In the 5G era, will you still look for WiFi everywhere?

Watching short video apps like Tik Tok and Kuaish...

City managers can now predict the future using 5G and digital twins

Digital twins, or DTs, are data-enabled city mode...

5G era: Will WiFi disappear from people’s lives?

WiFi has gradually penetrated into our daily live...

SoftShellWeb: Netherlands/San Jose VPS 10% off first month starting at $0.5

In order to let more users experience its VPS hos...

The emergence of Wi-Fi HaLow promotes IoT applications and innovation

Few emerging technologies have the transformative...