appneta / tcpreplay

Pcap editing and replay tools for *NIX and Windows - Users please download source from
http://tcpreplay.appneta.com/wiki/installation.html#downloads
1.17k stars 268 forks source link

TCPReplay does not send packets to my raspberry pi over wifi. #684

Closed RadiantCoding closed 2 years ago

RadiantCoding commented 2 years ago

Describe the bug I have tcpreplay running on my WSL2 box. This box is on my Windows laptop. I am trying to send a pcap file's traffic to the raspberry pi over Wi-Fi.

WSL2 can ping the raspberry pi.

--- 192.168.1.79 ping statistics ---
240 packets transmitted, 239 received, 0.416667% packet loss, time 239444ms
rtt min/avg/max/mdev = 3.469/38.258/621.335/103.481 ms

Wireshark confirms

image

but when I run tcpreplay

sudo tcpreplay -i eth0 -K /home/barry/pcaps/HomeWifi.pcap

I do not get any output on Wireshark. The Pi does not receive the packets, Despite tcpreplay's output:

sudo tcpreplay -i eth0 -K HomeWifi.pcap
File Cache is enabled

quit
^C User interrupt...
sendpacket_abort
Actual: 60297 packets (69710756 bytes) sent in 35.94 seconds
Rated: 1939345.8 Bps, 15.51 Mbps, 1677.45 pps
Statistics for network device: eth0
        Successful packets:        60296
        Failed packets:            0
        Truncated packets:         0
        Retried packets (ENOBUFS): 0
        Retried packets (EAGAIN):  0

Expected behavior The Pi should receive the packets, alternatively tcpreplay should have given an error.

Ifconfig ifconfig of WSL2, in case it is of use:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.25.168.66  netmask 255.255.240.0  broadcast 172.25.175.255
        inet6 fe80::215:5dff:fe5e:97d0  prefixlen 64  scopeid 0x20<link>
        ether 00:15:5d:5e:97:d0  txqueuelen 1000  (Ethernet)
        RX packets 239295  bytes 343932493 (343.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 267815  bytes 285573776 (285.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

System (please complete the following information):

fklassen commented 2 years ago

Seeing that packets were sent without errors suggest that the issue is in libpcap, drivers, network adapter etc. Tcpreplay can only send to these layers and report whether or not the operation succeeded. If you are convinced this is a bug, report it to the libpcap group.