ping
检查网络连通
参数:
ttl值系统参考
[root@riyimei ~]# ping 192.168.11.181
PING 192.168.11.181 (192.168.11.181) 56(84) bytes of data.
64 bytes from 192.168.11.181: icmp_seq=1 ttl=64 time=0.014 ms
64 bytes from 192.168.11.181: icmp_seq=2 ttl=64 time=0.041 ms
64 bytes from 192.168.11.181: icmp_seq=3 ttl=64 time=0.035 ms
64 bytes from 192.168.11.181: icmp_seq=4 ttl=64 time=0.026 ms
64 bytes from 192.168.11.181: icmp_seq=5 ttl=64 time=0.018 ms
64 bytes from 192.168.11.181: icmp_seq=6 ttl=64 time=0.022 ms
^C
--- 192.168.11.181 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5003ms
rtt min/avg/max/mdev = 0.014/0.026/0.041/0.009 ms
[root@riyimei ~]#
netstat
[root@riyimei ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
[root@riyimei ~]# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 36 192.168.11.181:22 192.168.11.1:16045 ESTABLISHED
tcp6 0 0 :::33060 :::* LISTEN
tcp6 0 0 :::3306 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 192.168.11.181:3306 192.168.11.1:5870 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:13744 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9020 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9826 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:6235 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9126 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9821 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9778 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9085 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:5873 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9823 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9816 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:13748 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:5903 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9792 ESTABLISHED
tcp6 0 0 192.168.11.181:3306 192.168.11.1:9824 ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 15103 /run/lvm/lvmetad.socket
unix 2 [ ACC ] STREAM LISTENING 18092 /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 17312 /var/run/mysqld/mysqlx.sock
unix 2 [ ACC ] STREAM LISTENING 17082 /run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 15037 /run/systemd/private
unix 2 [ ACC ] SEQPACKET LISTENING 15068 /run/udev/control
unix 2 [ ] DGRAM 15070 /run/systemd/shutdownd
unix 4 [ ] DGRAM 8673 /run/systemd/notify
unix 2 [ ] DGRAM 8675 /run/systemd/cgroups-agent
unix 2 [ ACC ] STREAM LISTENING 8693 /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 15094 /run/lvm/lvmpolld.socket
unix 5 [ ] DGRAM 8696 /run/systemd/journal/socket
unix 6 [ ] DGRAM 8698 /dev/log
unix 3 [ ] STREAM CONNECTED 12477 /run/systemd/journal/stdout
unix 2 [ ] DGRAM 19829
unix 3 [ ] STREAM CONNECTED 19950
unix 2 [ ] DGRAM 22128
unix 3 [ ] STREAM CONNECTED 17110 /run/systemd/journal/stdout
unix 3 [ ] STREAM CONNECTED 19692
unix 2 [ ] DGRAM 19816
unix 3 [ ] STREAM CONNECTED 17201 /run/systemd/journal/stdout
unix 3 [ ] STREAM CONNECTED 19768
unix 3 [ ] STREAM CONNECTED 19815
unix 3 [ ] STREAM CONNECTED 19823
unix 3 [ ] STREAM CONNECTED 15652
unix 3 [ ] STREAM CONNECTED 17124 /run/systemd/journal/stdout
unix 3 [ ] STREAM CONNECTED 17133 /run/systemd/journal/stdout
unix 2 [ ] DGRAM 824
unix 3 [ ] STREAM CONNECTED 18573 /run/dbus/system_bus_socket
unix 2 [ ] DGRAM 840
unix 3 [ ] STREAM CONNECTED 17301
unix 3 [ ] STREAM CONNECTED 19818 /run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 17108 /run/systemd/journal/stdout
unix 3 [ ] STREAM CONNECTED 17739
unix 2 [ ] DGRAM 17794
unix 3 [ ] STREAM CONNECTED 16960
unix 3 [ ] STREAM CONNECTED 19650
unix 3 [ ] STREAM CONNECTED 13246 /run/systemd/journal/stdout
unix 3 [ ] STREAM CONNECTED 18572
unix 2 [ ] DGRAM 15538
unix 3 [ ] STREAM CONNECTED 20049
unix 3 [ ] STREAM CONNECTED 17930 /run/systemd/journal/stdout
unix 2 [ ] DGRAM 18898
unix 3 [ ] STREAM CONNECTED 17123 /run/dbus/system_bus_socket
unix 2 [ ] DGRAM 17294
unix 3 [ ] STREAM CONNECTED 17121
unix 3 [ ] DGRAM 15213
unix 3 [ ] STREAM CONNECTED 20203 /run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 17122
unix 3 [ ] DGRAM 15214
[root@riyimei ~]#
[root@riyimei ~]# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 29184 0 0 0 25936 0 0 0 BMRU
lo 65536 12 0 0 0 12 0 0 0 LRU
[root@riyimei ~]#