Loopback address and network interface handling, general commands
There are different options. For example, in order to specify the deviation between the packets:
ping -i N <ip-destination>
where N is expressed in seconds and can also assume decimal values.
In order to specify the packet size:
ping –s <size> <ip-destination>
In order to specify the IP source address:
ping –I <ip-source> <ip-destination>
In order to send a specific number of packets:
ping –c N <ip-destination>
In order to specify the TOS value to insert in the IP packet:
ping –Q <tos-value> <ip-destination>
In order to send packets with DF bit set to 1:
ping –M do <ip-destination>
In order to send packets with DF bit set to 0:
ping –M dont <ip-destination>
Different command options can be combined, for example:
ping 151.1.1.1 –s 1472 –M do –Q 192 –i 0.2 –c 4
PING 151.1.1.1 (151.1.1.1) from 85.34.166.22: 1472(1500) bytes of data.
1480 bytes from 151.1.1.1: icmp_seq=0 ttl=55 time=58.794 msec
1480 bytes from 151.1.1.1: icmp_seq=1 ttl=55 time=58.333 msec
1480 bytes from 151.1.1.1: icmp_seq=2 ttl=55 time=59.094 msec
1480 bytes from 151.1.1.1: icmp_seq=3 ttl=55 time=59.150 msec
--- 151.1.1.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/mdev = 58.315/58.684/59.150/0.405 ms
In order to send ICMP packets to an IPV6 host, ping6 X:X::X:X is used.
TRACEROUTE COMMAND
The traceroute command allows to trace the needed way to reach a remote host:
root@IMOLA> traceroute 10.10.10.10
traceroute to 10.10.10.10 (10.10.10.10), 30 hops max, 40 byte packets
1 85.34.166.18 (85.34.166.18) 1.429 ms 1.047 ms 1.310 ms
2 85.34.166.17 (85.34.166.17) 1.485 ms 1.301 ms 1.521 ms
3 10.10.10.10 (10.10.10.10) 2.614 ms 2.525 ms 2.542 ms
It is possible to specify the IP source address: