Thursday 29 December 2016

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

Hello Till,

Till Kamppeter [2016-12-19 13:00 -0200]:
> sudo modprobe dummy
> sudo ifconfig dummy0 10.0.0.1 netmask 255.255.255.0 multicast
> sudo ifconfig dummy0 up multicast
>
> What I would like to do is to add the "dummy0" interface as a local-only,
> multicast interface to the distro, either as a default part like "lo" or
> initiated by the maintainer scripts of the ippusbxd Debian package (or the
> printing snap).

lxc/lxd used to hardcode an IP range like this, and it had to be dropped
because it caused conflicts on "real" existing networks. The 10.0.0.0/8 range
is reserved and very actively being used for local networks, including
Canonical's own VPN, and thus prone to create conflicts. If you need to do
something like that, I don't see a way to get away with a static IPv4 address.
Maybe IPv6 has some clever address schema that makes conflicts improbable.

> Does it cause any problems using "dummy0" for a production purpose? Is there
> any better way? Perhaps even one which would allow me to work with
> localhost?

Making avahi work on 'lo' certainly sounds even nicer.

> How should I implement this? Simply run above commands from maintainer
> scripts of ippusbxd? Get them run when the first IPP-over-USB printer is
> detected via UDEV? Or implementation in network-manager or so?

Creating the interface in postinst is a no-go. It won't survive a reboot and it
can't/must not be done when installing into chroots. It could ship or generate
an ifupdown/netplan/systemd-networkd configuration file, though.

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

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