5,232 views

5 Answers

0 votes
0 votes

Option 1 is the answer. Works both ways :

$ ping --icmp --dest-ip 192.168.1.3 -S 127.0.0.1 -c 1

SENT (0.0310s) ICMP [127.0.0.1 > 192.168.1.3 Echo request (type=8/code=0) id=17069 seq=1] IP [ttl=64 id=52759 iplen=28 ]
RCVD (0.2122s) ICMP [192.168.1.3 > 127.0.0.1 Echo reply (type=0/code=0) id=17069 seq=1] IP [ttl=64 id=33614 iplen=28 ]
 
Max rtt: 181.075ms | Min rtt: 181.075ms | Avg rtt: 181.075ms
Raw packets sent: 1 (28B) | Rcvd: 1 (28B) | Lost: 0 (0.00%)

$ ping --icmp -S 192.168.1.3 --dest-ip 127.0.0.1 -c 1

SENT (0.0402s) ICMP [192.168.1.3 > 127.0.0.1 Echo request (type=8/code=0) id=62835 seq=1] IP [ttl=64 id=24034 iplen=28 ]
RCVD (0.2207s) ICMP [127.0.0.1 > 192.168.1.3 Echo reply (type=0/code=0) id=62835 seq=1] IP [ttl=64 id=47357 iplen=28 ]
 
Max rtt: 180.536ms | Min rtt: 180.536ms | Avg rtt: 180.536ms
Raw packets sent: 1 (28B) | Rcvd: 1 (28B) | Lost: 0 (0.00%)

Related questions

0 votes
0 votes
2 answers
7