Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have multiple wireless adapters (let's call them wlan0, wlan1) and I can connect to multiple networks (let's call them network0, network1) at the same time.

Now, what I want to accomplish is, route certain traffic through network1 and the rest through network0.

Namely, I usually work and stream music at the same time and I want to split those two activities to different networks.

I'm mobile and my work requires being online, and also have a static IP address. So I have a good, steady 3G connection device (which is a wireless access point) with a static IP address.

Since the data transfer is limited and expensive, I also want to carry around a usb wireless adapter (wlan1) to connect to free wireless networks, through which I can stream my music (generally spotify and some internet radios).

I expect all my other "formal" network traffic to go through wlan0.

How do I accomplish this?

share|improve this question
    
Have you tried something like sudo ip route add 241.18.25.0/24 via 172.16.0.1 dev wlan1, where the 241.1.18.25.0 is the IP range you connect to when using Spotify, and 172.16.0.1 is the default gateway of wlan1? –  Bert Dec 15 '13 at 17:01
    
I'll try doing that, however, how do I make sure all other traffic goes through wlan0? Also, I tried different networks and it appears the default gateway changes. –  Serkan Durusoy Dec 15 '13 at 22:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.