cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Question about curl --interface

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 17 Mar 2011 22:11:23 -0700

On Thu, Mar 17, 2011 at 08:39:38PM +0000, mark-wade_at_comcast.net wrote:
> I have simple question about curl. I am trying to understand what command in
> curl I am look at.
>
> curl --interface "10.10.10.1." foo.com

Note that a dotted quad IP address shouldn't have a trailing period.

> From reading the curl man page I understand that the --interface is telling
> curl to use the interface specified to perform a specific operation. In the
> example above I replaced the actual IP with the 10. non-routable IP, and
> replaced the real domain with foo.com. What would be the purpose of setting
> the interface, which I am assuming is being designated by the IP address
> instead of the interface name (eth0).

The idea is to select a particular address to bind to when the address to
use is ambiguous or there is reason to select only one. A multi-homed host
may have several interfaces over which a request could travel. In some
cases you would want to select a particular one, either to test routing,
to test address-based authentication, or to select a server with a
particular link-local address. It's not usually required.

>>> Dan
-------------------------------------------------------------------
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 2011-03-18