Thursday 29 December 2016

Re: Using the dummy0 interface for a local-only service to be broadcasted by Avahi

On 12/29/2016 01:12 PM, Stéphane Graber wrote:
> On Thu, Dec 29, 2016 at 01:02:29PM -0200, Till Kamppeter wrote:
>> Is there no way to dynamically (with checking what is currently in use)
>> select a small free IPv4 address space? For example in the 10.0.0.0/8 range
>> there are probably only some 10.X.Y.0/24 subranges used. If not, which IPv6
>> range is free for such a dummy0 interface? As it is local only and current
>> Linux supports IPv6 by default it would be no problem to be IPv6-only. It
>> would also need a host name as IPv6 IP addresses are awkward.
>
> There is no way to do so for IPv4 as even if you check your local
> interfaces and routing tables, you can't know what subnets are hidden
> behind your router.
>

Are addresses in the 169.254.0.0/16 not suitable?

> For IPv6, you can generate a random ULA subnet which is near guaranteed
> to be unique and conflict free.
>

How does one do this? Which interface will it use, can I
Bonjour-broadcast it only on the local machine?

> Depending on exactly what you want to do, a link-local IPv6 address may
> also be a better fit as it then absolutely cannot conflict with
> anything.
>

Also how does one do this? Which interface will it use, can I
Bonjour-broadcast it only on the local machine?

>>> Making avahi work on 'lo' certainly sounds even nicer.
>>>
>>
>> Would this be very complicated (would need upstream work on Avahi probably)?
>> It is said that multicast is needed and "lo" does not support multicast. Is
>> that true?
>
> I sure wouldn't recommend using "dummy0". Using a differently named
> device using the dummy driver would probably be fine though.
>
> The reason to stay away from the "dummy0" name is that it's used in test
> suites and other networking tools that simply call to "ip link add
> dummy" and then (and that's the problem), call "ip link del dummy"
> afterwards.
>

How can I assign a different name to a dummy interface? Can I freely
choose a name somehow, for example "ippusbxd"? Or have I to use
"dummy1", "dummy2", ... (loading the dummy kernel module with an option
to support more than one interface)?

Till


--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel