PDA

View Full Version : [ubuntu] Specifying network adapter



Heinrisch
March 31st, 2010, 03:22 PM
I have two network adapters named eth0 and eth1.

Say that I have two programs, A and B. Is it possible to make A only use eth0 and B only used eth1?

realzippy
March 31st, 2010, 03:29 PM
Generally,yes.
Depends on A and B.
Will you tell us whats A and B?

Heinrisch
March 31st, 2010, 04:21 PM
Generally,yes.
Depends on A and B.
Will you tell us whats A and B?

A is rtorrent and B is everything else basically.

iissmart
March 31st, 2010, 07:35 PM
Usually there is a setting in the config file (per application) which can specify what interface it should use. However, even if you do specify what interface rtorrent uses, that doesn't mean *everything else* will use the second interface. I'm also interested on how one could do this.

Heinrisch
March 31st, 2010, 10:55 PM
Usually there is a setting in the config file (per application) which can specify what interface it should use. However, even if you do specify what interface rtorrent uses, that doesn't mean *everything else* will use the second interface. I'm also interested on how one could do this.

Well the important thing for me is that rtorrent uses a specified interface. The other programs can really do what they want :P

iissmart
March 31st, 2010, 11:16 PM
This looks easy. Run rtorrent -h, and take a look at the -b and -i switches. Using some combination of those (probably just -b then the IP that is on the interface you want it to use) when you run rtorrent should make it work how you expect, assuming your routing is set up properly. If it's not, I can probably help you with that as well :)

I'm still curious as to whether it's possible to have *all other* traffic go to a specific interface, if anyone else knows (assuming you're getting two IPs on the same subnet).