The number of times a 1.ping command is followed by the-c parameter to connect to a flat link
Ping-c 10 127.0.0.1
means to stop after PING10 times
2. nslookup command to see how many IP addresses the domain name resolves
[Email protected]:/etc$ nslookup baidu.comserver:127.0.1.1Address:127.0.1.1# -Non-authoritative answer:Name:baidu.comAddress:220.181.57.216Name:baidu.comAddress:111.13.101.208[email protected]:/etc$ Ping baidu.comping baidu.com (220.181.57.216) About( -) bytes of data. -bytes from 220.181.57.216: icmp_seq=1Ttl= -Time=39.0Ms -bytes from 220.181.57.216: icmp_seq=2Ttl= -Time=95.6Ms -bytes from 220.181.57.216: icmp_seq=3Ttl= -Time=37.1Ms^x64 bytes from 220.181.57.216: icmp_seq=4Ttl= -Time=37.1Ms
3.route Routing command to view route map information
Parameter:-n means to view the routing information that is cached on the host
[Email protected]:/etc$ Route-n Kernel IP routing table Destination gateway subnet Mask flag Hop reference use interface0.0.0.0 192.168.10.254 0.0.0.0Ug - 0 0Ens33169.254.0.0 0.0.0.0 255.255.0.0U + 0 0Ens33192.168.10.0 0.0.0.0 255.255.255.0U - 0 0Ens33
To add a default gateway:
Route add default GW 192.168.10.255
To delete a gateway:
Route del default GW 192.168.10.255
4. Network Statistics view command: Netstat
To view the current network statistics command:
Netstat-a for viewing all network statistics that contain listening information
-R view routes can be used with-a
[Email protected]:/etc$ netstat-ar core IP routing table destination Gateway genmask Flags MSS Window irtt Ifacedefault 192.168.10.254 0.0.0.0Ug0 0 0Ens33link-local *255.255.0.0U0 0 0Ens33192.168.10.0*255.255.255.0U0 0 0Ens33
Netstat-t for displaying information about the TCP protocol-T
[Email protected]:/etc$ netstat-t Activate Internet connection (W/o Server) Proto Recv-Q send-Q Local Address Foreign address State TCP0 0 192.168.10.168: SSH192.168.10.1:60139establishedtcp1 0 192.168.10.168:52724 123.150.8.42:8001close_wait TCP1 0 192.168.10.168:52722 123.150.8.42:8001Close_wait
Linux Network commands