Hello everybody,

For training purpose, I try to connect 2 Wifi interfaces from my laptop to the same AP :

# Connect Bart the AP "yoda" (security: NONE)
sudo iwconfig bartWlan essid yoda
sudo ifconfig bartWlan 192.168.50.101 netmask 255.255.255.0


# Connect Homere the AP "yoda" (security: NONE)
sudo iwconfig homereWlan essid yoda
sudo ifconfig homereWlan 192.168.50.102 netmask 255.255.255.0



I would like to perform an iperf between these two interfaces : 192.168.50.101 (iperf client) -----> AP -----> 192.168.50.102 (iperf server)
So I setup the following routes :

sudo route del -net 0.0.0.0 gw 192.168.50.1 netmask 0.0.0.0 dev homereWlan
sudo route del -net 0.0.0.0 gw 192.168.50.1 netmask 0.0.0.0 dev bartWlan
sudo route del -net 192.168.50.0 netmask 255.255.255.0 dev homereWlan
sudo route del -net 192.168.50.0 netmask 255.255.255.0 dev bartWlan
sudo ip route add 192.168.50.102/32 dev bartWlan
sudo ip route add 192.168.50.101/32 dev homereWlan



This is the result (route -n) :

0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlp7s0
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp7s0
192.168.50.101 0.0.0.0 255.255.255.255 UH 0 0 0 homereWlan
192.168.50.102 0.0.0.0 255.255.255.255 UH 0 0 0 bartWlan



Then I run iperf in two terminals :

iperf -s -B 192.168.50.101 -i 1 -u

iperf -c 192.168.50.101 -B 192.168.50.102 -n 1000000M -i 1 -u



It work !

BUT, I am not sure the data goes through the AP. I am afraid that the traffic goes through the local interfaces and not the AP.

ip -c route get 192.168.50.101
local 192.168.50.101 dev lo src 192.168.50.101 uid 1000
cache <local>


ip -c route get 192.168.50.102
local 192.168.50.102 dev lo src 192.168.50.102 uid 1000
cache <local>



How can I be sure that the traffic go through the AP and if not, what is wrong with my setup ?

Thanks for your help

Fabrice