0

I am trying to send packets from my pcap file to my raspberry pi. I am using WSL2 box on my Windows laptop to send the packets over wifi.

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:

enter image description here

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 WSL2 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

I am confused as to why the ping works, yet tcpreplay does not. Is there a fix?

ifconfig of WSL2

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 238947  bytes 343765801 (343.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 267814  bytes 285573706 (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
2
  • Where did the capture come from? From within WSL2, the Windows host, or somewhere else? Oct 19, 2021 at 20:20
  • @NotTheDr01ds Came from my home WIFI, captured on the laptop (but not the WSL) Oct 21, 2021 at 11:08

0

You must log in to answer this question.