Shubham Agrawal
Shubham Agrawal

Reputation: 1

Iperf server is not able to register packets on a tunnel interface

I am trying to route my traffic via a tunnel interface between 2 servers.

  1. A cpp application creates a tunnel interface A on server A.
  2. A cpp application creates a tunnel interface B on server B.
  3. route add tunBIp gw tunAIp on server A.
  4. route add tunAIp gw tunBIp on server B.
  5. Iperf client sends data from server A using command: iperf -c tunBIp -p 2152 -u -i1 -b 10m -t 10 -B tunAIp:2154
  6. Packets are then read by Cpp App from tunAIp and send via socket to serverB.
  7. Packets are then read by Cpp App from socket on serverB and writes them back to tunIpB.
  8. Iperf server is trying to read packets on serverB using: iperf -s -p 2152 -B tunBIp -i1 From logs and tcpdump I am able to verify that packets have reached tunBIp on serverB. and wireshark also shows that all udp packets are exactly same during send on tunAIp interface and on reception at tunBIp interface.

How do I capture those packets on iperf server and achieve end to end traffic flow passing via my tunnel and application.

Ping is working from tunAIp to tunBIp and ping packets are also observed in my application logs. I have tried capturing packets on a working iperf client server connection and observe some LLDP/ ARP packets which are not present in my tunnel interface route.

Upvotes: 0

Views: 73

Answers (1)

Shubham Agrawal
Shubham Agrawal

Reputation: 1

Thanks to Packets not relayed to target application using tun interface I have solved my issue by disabling Checksum offload while setting up my Tunnel interface. TUN_F_CSUM was set in my application during tunnel creation which offloads the checksum validation for a later stage in data traffic and in my case it was never getting validated which caused the issue. Hence, on disabling it checksum gets validated on reception at tunnel A and issue got resolved.

Upvotes: 0

Related Questions