Ping command of campus network operation and maintenance experience

PING command

ping command explanation

PING (Packet Internet Groper), Internet packet explorer, a program used to test the amount of network connection. Ping is a service command at the application layer of the TCP/IP network architecture. It is mainly to send ICMP (Internet Control Message Protocol) Echo request packets to a specific destination host to test whether the destination station is reachable and Learn about its status.
Basic usage of ping command

用法: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
            [-4] [-6] target_name

选项:
    -t             Ping 指定的主机,直到停止。
                   若要查看统计信息并继续操作,请键入 Ctrl+Break;
                   若要停止,请键入 Ctrl+C。
    -a             将地址解析为主机名。
    -n count       要发送的回显请求数。
    -l size        发送缓冲区大小。
    -f             在数据包中设置“不分段”标记(仅适用于 IPv4)。
    -i TTL         生存时间。
    -v TOS         服务类型(仅适用于 IPv4。该设置已被弃用,
                   对 IP 标头中的服务类型字段没有任何
                   影响)。
    -r count       记录计数跃点的路由(仅适用于 IPv4)。
    -s count       计数跃点的时间戳(仅适用于 IPv4)。
    -j host-list   与主机列表一起使用的松散源路由(仅适用于 IPv4)。
    -k host-list    与主机列表一起使用的严格源路由(仅适用于 IPv4)。
    -w timeout     等待每次回复的超时时间(毫秒)。
    -R             同样使用路由标头测试反向路由(仅适用于 IPv6)。
                   根据 RFC 5095,已弃用此路由标头。
                   如果使用此标头,某些系统可能丢弃
                   回显请求。
    -S srcaddr     要使用的源地址。
    -c compartment 路由隔离舱标识符。
    -p             Ping Hyper-V 网络虚拟化提供程序地址。
    -4             强制使用 IPv4。
    -6             强制使用 IPv6。

Today I want to install a pagoda linux on the server . Since the server requires a static ip address, we chose to configure a static ip address in centos7. We chose xxx.xxx.187.210, and I used the ping command to ping I clicked on that address and found nowhere.
Insert picture description here

I took it for granted that it didn't work because no one was using this address, so I chose this address decisively, but it always showed that the network was unreachable. I have no choice but to check the arp table entry of this address corresponding to vlan on the 3 layer device

show arp | begin xxx.xxx.187.1

Sure enough, this address was taken.
Insert picture description here
There are many reasons for the request timeout:
1) If the client of this address of ping is closed, we cannot be sure
2) The client does exist. If the other party has set up a firewall such as ICMP packet filtering, your ping The request is filtered out, and this situation may also occur.
3) If the routing information is not reachable, and it is not in the same network segment, it may return timeout information.

There are many reasons, so we must consider the problem comprehensively, and in practice we must doubt all possible problems!

Guess you like

Origin blog.csdn.net/Lovely_Xiaoguo/article/details/108747746