@Sarika-Sharma ,
If you have multiple active network interfaces, then you need to set up routing rules using standard linux network tools (ip route ..). You can check the current routes using ip route list on voxl2.
voxl-my-ip script probably just returns the first available ip address. you can use ifconfig to check all the interfaces.
As an example... assuming your wifi ip range is 192.168.10.x (192.168.10.1 is the wifi router's ip address) and usb0 is 192.168.7.x
# route to the Linux host (192.168.7. subnet) via usb0
sudo ip route add 192.168.7.0/24 via 192.168.7.1 dev usb0
# default route for all other traffic via wlan0
sudo ip route add default via 192.168.10.1 dev wlan0
If you want to make these routes persistent you will have to edit /etc/network/interfaces.. Please check Linux networking documentation.
Alex