ping

检查网络连通

参数:

ttl值系统参考

  1. [root@riyimei ~]# ping 192.168.11.181
  2. PING 192.168.11.181 (192.168.11.181) 56(84) bytes of data.
  3. 64 bytes from 192.168.11.181: icmp_seq=1 ttl=64 time=0.014 ms
  4. 64 bytes from 192.168.11.181: icmp_seq=2 ttl=64 time=0.041 ms
  5. 64 bytes from 192.168.11.181: icmp_seq=3 ttl=64 time=0.035 ms
  6. 64 bytes from 192.168.11.181: icmp_seq=4 ttl=64 time=0.026 ms
  7. 64 bytes from 192.168.11.181: icmp_seq=5 ttl=64 time=0.018 ms
  8. 64 bytes from 192.168.11.181: icmp_seq=6 ttl=64 time=0.022 ms
  9. ^C
  10. --- 192.168.11.181 ping statistics ---
  11. 6 packets transmitted, 6 received, 0% packet loss, time 5003ms
  12. rtt min/avg/max/mdev = 0.014/0.026/0.041/0.009 ms
  13. [root@riyimei ~]#

netstat

  1. [root@riyimei ~]# netstat -rn
  2. Kernel IP routing table
  3. Destination Gateway Genmask Flags MSS Window irtt Iface
  4. 0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth0
  5. 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
  6. 192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  7. [root@riyimei ~]# netstat -an
  8. Active Internet connections (servers and established)
  9. Proto Recv-Q Send-Q Local Address Foreign Address State
  10. tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
  11. tcp 0 36 192.168.11.181:22 192.168.11.1:16045 ESTABLISHED
  12. tcp6 0 0 :::33060 :::* LISTEN
  13. tcp6 0 0 :::3306 :::* LISTEN
  14. tcp6 0 0 :::22 :::* LISTEN
  15. tcp6 0 0 192.168.11.181:3306 192.168.11.1:5870 ESTABLISHED
  16. tcp6 0 0 192.168.11.181:3306 192.168.11.1:13744 ESTABLISHED
  17. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9020 ESTABLISHED
  18. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9826 ESTABLISHED
  19. tcp6 0 0 192.168.11.181:3306 192.168.11.1:6235 ESTABLISHED
  20. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9126 ESTABLISHED
  21. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9821 ESTABLISHED
  22. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9778 ESTABLISHED
  23. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9085 ESTABLISHED
  24. tcp6 0 0 192.168.11.181:3306 192.168.11.1:5873 ESTABLISHED
  25. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9823 ESTABLISHED
  26. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9816 ESTABLISHED
  27. tcp6 0 0 192.168.11.181:3306 192.168.11.1:13748 ESTABLISHED
  28. tcp6 0 0 192.168.11.181:3306 192.168.11.1:5903 ESTABLISHED
  29. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9792 ESTABLISHED
  30. tcp6 0 0 192.168.11.181:3306 192.168.11.1:9824 ESTABLISHED
  31. Active UNIX domain sockets (servers and established)
  32. Proto RefCnt Flags Type State I-Node Path
  33. unix 2 [ ACC ] STREAM LISTENING 15103 /run/lvm/lvmetad.socket
  34. unix 2 [ ACC ] STREAM LISTENING 18092 /var/lib/mysql/mysql.sock
  35. unix 2 [ ACC ] STREAM LISTENING 17312 /var/run/mysqld/mysqlx.sock
  36. unix 2 [ ACC ] STREAM LISTENING 17082 /run/dbus/system_bus_socket
  37. unix 2 [ ACC ] STREAM LISTENING 15037 /run/systemd/private
  38. unix 2 [ ACC ] SEQPACKET LISTENING 15068 /run/udev/control
  39. unix 2 [ ] DGRAM 15070 /run/systemd/shutdownd
  40. unix 4 [ ] DGRAM 8673 /run/systemd/notify
  41. unix 2 [ ] DGRAM 8675 /run/systemd/cgroups-agent
  42. unix 2 [ ACC ] STREAM LISTENING 8693 /run/systemd/journal/stdout
  43. unix 2 [ ACC ] STREAM LISTENING 15094 /run/lvm/lvmpolld.socket
  44. unix 5 [ ] DGRAM 8696 /run/systemd/journal/socket
  45. unix 6 [ ] DGRAM 8698 /dev/log
  46. unix 3 [ ] STREAM CONNECTED 12477 /run/systemd/journal/stdout
  47. unix 2 [ ] DGRAM 19829
  48. unix 3 [ ] STREAM CONNECTED 19950
  49. unix 2 [ ] DGRAM 22128
  50. unix 3 [ ] STREAM CONNECTED 17110 /run/systemd/journal/stdout
  51. unix 3 [ ] STREAM CONNECTED 19692
  52. unix 2 [ ] DGRAM 19816
  53. unix 3 [ ] STREAM CONNECTED 17201 /run/systemd/journal/stdout
  54. unix 3 [ ] STREAM CONNECTED 19768
  55. unix 3 [ ] STREAM CONNECTED 19815
  56. unix 3 [ ] STREAM CONNECTED 19823
  57. unix 3 [ ] STREAM CONNECTED 15652
  58. unix 3 [ ] STREAM CONNECTED 17124 /run/systemd/journal/stdout
  59. unix 3 [ ] STREAM CONNECTED 17133 /run/systemd/journal/stdout
  60. unix 2 [ ] DGRAM 824
  61. unix 3 [ ] STREAM CONNECTED 18573 /run/dbus/system_bus_socket
  62. unix 2 [ ] DGRAM 840
  63. unix 3 [ ] STREAM CONNECTED 17301
  64. unix 3 [ ] STREAM CONNECTED 19818 /run/dbus/system_bus_socket
  65. unix 3 [ ] STREAM CONNECTED 17108 /run/systemd/journal/stdout
  66. unix 3 [ ] STREAM CONNECTED 17739
  67. unix 2 [ ] DGRAM 17794
  68. unix 3 [ ] STREAM CONNECTED 16960
  69. unix 3 [ ] STREAM CONNECTED 19650
  70. unix 3 [ ] STREAM CONNECTED 13246 /run/systemd/journal/stdout
  71. unix 3 [ ] STREAM CONNECTED 18572
  72. unix 2 [ ] DGRAM 15538
  73. unix 3 [ ] STREAM CONNECTED 20049
  74. unix 3 [ ] STREAM CONNECTED 17930 /run/systemd/journal/stdout
  75. unix 2 [ ] DGRAM 18898
  76. unix 3 [ ] STREAM CONNECTED 17123 /run/dbus/system_bus_socket
  77. unix 2 [ ] DGRAM 17294
  78. unix 3 [ ] STREAM CONNECTED 17121
  79. unix 3 [ ] DGRAM 15213
  80. unix 3 [ ] STREAM CONNECTED 20203 /run/dbus/system_bus_socket
  81. unix 3 [ ] STREAM CONNECTED 17122
  82. unix 3 [ ] DGRAM 15214
  83. [root@riyimei ~]#
  1. [root@riyimei ~]# netstat -i
  2. Kernel Interface table
  3. Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
  4. eth0 1500 29184 0 0 0 25936 0 0 0 BMRU
  5. lo 65536 12 0 0 0 12 0 0 0 LRU
  6. [root@riyimei ~]#