There's no such thing as "UDP ICMP "echo"". traceroute sends a UDP probe with an increasing TTL. That probe is a single datagram destined for a high port which is unlikely to be a listening service. As the datagram flows out across the network, the TTL decrements until it hits zero at which point an ICMP ERROR ("time exceeded") is generated. That ICMP message identifies a "hop". When the TTL is enough to reach the target, as there's no listener on that port, an ICMP "port unreachable" error is generated, thus ending the trace.
The purpose of tcptraceroute
is to do the same sort of path check with a TCP connection. It is most useful in diagnosing connection issues to a specific service. (eg. a web server) As the probes look like a normal TCP connection attempt, they'll go through NAT, firewalls, ACLs, rate-limits, etc. exactly as a connection from the intended application.
I would take a look at iperf. You should be able to use built in reporting in iperf to validate the amount of traffic dropped.
iperf is typically ran across the network between two systems. I have iperf3 installed on two CentOS machines, as you can see below, one is configured as the server and the other the client.
Install the iperf rpm, start the server first, and then start the client. Starting the iperf server is as simple as running the following command:
Machine #1
iperf3 -s
The -s
option specifies to run iperf in server (receiver) mode. Initially (by default) the server will listen on 5201/tcp which will be used as a control channel, this port is configurable. Ensure your iptables
(or equivalent) is configured to accommodate both the initial control channel and any subsequent udp flows.
Your client command and subsequent reporting after the transfer will look like this.
Machine #2
Machine #2 (this command essentially says "act as a client, connect to 192.168.2.202, use the udp protocol , send 1GB of data at a data rate of 100Mbps)
$ iperf3 -c 192.168.2.202 -u -n 1G -b 100M
Connecting to host 192.168.2.202, port 5201
[ 4] local 192.168.2.160 port 54356 connected to 192.168.2.202 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-82.00 sec 1.00 GBytes 105 Mbits/sec
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-82.00 sec 1.00 GBytes 105 Mbits/sec 5.016 ms 12372/131072 (9.4%)
[ 4] Sent 131072 datagrams
That's all you need to do with iperf
Best Answer
IP packets are layer 3. UDP is layer 4. That means that UDP packets are encapsulated inside IP packets, not the other way around.
Now, it is possible to tunnel IP packets, in which case you would have IP inside UDP inside another IP, but that is a special case. For learning about the protocols, you can ignore that for now