cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: using "curl --interface raX" not going out proper interface- is it a unix issue or a curl issue?

From: Alex Bligh <alex_at_alex.org.uk>
Date: Wed, 29 Aug 2012 09:33:40 +0100

--On 28 August 2012 20:39:23 +0000 "Ken (James) Stewart"
<kestewar_at_broadcom.com> wrote:

> It looks like whatever interface is used first – is the one the rest of
> the curl statements try to go out even though a diff wlan card / ra is
> used. So if I connect first on ra0 – then try to connect on ra1, ra2,
> ra3… each curl statement still tries to go out ra0 even though I have a
> different ra used as above.

Curl's --interface command sets the interface that curl will bind to
(and hence the source IP address). It will not set the route that packets
take, which will be determined by the routing table of your machine. My
guess is that you have not set up your routing table correctly, and it
is in the default configuration so that the default route (or one
default route) uses ra0. You can fix this (dependent upon OS)
by using source routing to ensure that packets originating on raX
use whatever the default route is for raX.

-- 
Alex Bligh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-29