hping command: hping3 -G --rroute $domain -i u1000
Result:
len=80 ip=127.0.0.1 ttl=64 DF id=0 sport=0 flags=RA seq=176 win=0 rtt=0.2 ms
(same route)
len=80 ip=127.0.0.1 ttl=64 DF id=0 sport=0 flags=RA seq=177 win=0 rtt=0.2 ms
(same route)
len=80 ip=127.0.0.1 ttl=64 DF id=0 sport=0 flags=RA seq=178 win=0 rtt=0.2 ms
(same route)
len=80 ip=127.0.0.1 ttl=64 DF id=0 sport=0 flags=RA seq=179 win=0 rtt=0.3 ms
(same route)
--- 127.0.0.1 hping statistic ---
181 packets transmitted, 180 packets received, 1% packet loss
round-trip min/avg/max = 0.2/0.2/0.6 m
So, my question is, what does packets 1% packet loss, 180 packets received and 181 packets transmitted mean?
Update: Question:2:
Command - hping3 -a $ip -S 127.0.0.1 -p 80 -i u1000
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4176 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4177 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4178 win=32792 rtt=7.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4179 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4180 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4181 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4182 win=32792 rtt=0.3 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4183 win=32792 rtt=0.5 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=0 win=32792 rtt=0.0 ms
len=44 ip=127.0.0.1 ttl=64 DF id=0 sport=80 flags=SA seq=4184 win=32792 rtt=0.3 ms
^C^C
--- 127.0.0.1 hping statistic ---
4186 packets transmitted, 9184 packets received, -119% packet loss
When I run the above command (after update), I get -119% packet loss, i.e. i receive more packets than I sent. How is that possible? Any quickies on that?
I suspect that this means nothing. Did you stop the hping3 command by typing Ctrl+c ? If you did then the most likely explanation is that the 181st packet was sent and that you interrupted the program before the response was received and hping3 is (slightly) exaggerating the results as 180/181 is 99.44% of packets received.
181 packets means that the ping sent that many packets out, and you received 180 packets back from the target. When you ping (called an echo request, although hping is able to send more than standard ICMP echoes) a single packet is sent to your target and, upon receiving that packet, your target is supposed to reply with an echo response packet. If you don't receive a response packet for each packet sent then it can be an indicator that something is going on between you and your target. Since your target in this case is localhost you had some kind of momentary minor hiccup in your machine's IP stack, or maybe your firewall took too long to process a rule, or something similar. I wouldn't worry about it too much unless you start to consistently see larger packet losses. Whatever the case, the response for that one packet wasn't received within the time expected.
If you're testing your firewall configuration then it would be better to do it from a remote host both inside and outside of the firewall.