Subject: Re: Trying to ping from a subinterface.

From: Ben Greear <[email-masked]>
Date: Mon, 02 Jun 2014 21:13:51 -0700

On 06/02/2014 05:41 PM, CLOSE Dave wrote:
> Stephen Hemminger wrote (in response to my complaint):
>
>>>> # ping -I eth3:sub1 172.17.30.1
>>>> ping: SO_BINDTODEVICE: Invalid argument
>
>> Interface aliases (sub interfaces) aren't real interfaces in Linux.
>> They are a deprecated way of doing multiple addresses on the same
>> device. Aliases aren't real devices, they don't behave like devices,
>> and they only are useful with ancient tools like ifconfig.
>>
>> Don't use them unless you have to deal with systems older than 10
>> years.
>
> I apologize to the group. I had been led to believe this was working on
> earlier Fedora releases. In fact, it was complaining but then falling
> back to the main interface and performing the ping anyway. What is new
> is the refusal to fall back.
>
> Starting fresh, I'd agree with your suggestion. But there is a lot of
> legacy code in the world...

SO_BINDTODEVICE could never work on sub-interfaces as far as I know,
but maybe older versions of ping just didn't bother doing SO_BINDTODEVICE.

Do you actually need sub-interfaces for some reason, or can you just use
multiple IPs on one interface (or maybe mac-vlans)?

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com