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

Till Kamppeter till.kamppeter at gmail.com
Fri Dec 30 19:44:07 UTC 2016


On 12/30/2016 12:15 PM, Till Kamppeter wrote:
>> If dealing with IPv6 link-local becomes too much of a pain, you can
>> still go the ULA way and generate a random ULA address that you add to
>> your ippusbxd interface which will then work without needing the
>> interface name or interface id suffix.
>>
>
> Thank you very much, I will look into the random ULA address solution.
>

I am now using a fixed ULA for testing:

Setup:

sudo ip link add ippusbxd type dummy
sudo ip link set ippusbxdq up
sudo ip link set ippusbxd multicast on
sudo ip -6 addr add 'fd00:1:1::1/64' dev ippusbxd

The new forth line assigns the fixed ULA fd00:1:1::1.

ULA does not need interface specification:

Print queue also works with

ipp://[fd00:1:1::1]:60000/ipp/print

Web browser and wget accept

http://[fd00:1:1::1]:60000/

but interface does not get loaded completely by browser.

Added

fd00:1:1::1	ippusbxd-printers

to /etc/hosts

and firefox loads web admin interface of the printer completely via

http://ippusbxd-printers:60000/

and the printer URI

ipp://ippusbxd-printers:60000/ipp/print

prints correctly.

I also get:

till at till-x1carbon:~$ hostname -I
192.168.0.15 192.168.122.1 2804:14c:5ba8:8b97::1 
2804:14c:5ba8:8b97:205:1bff:feb0:7395 fd00:1:1::1
till at till-x1carbon:~$ hostname -A
till-x1carbon till-x1carbon till-x1carbon till-x1carbon ippusbxd-printers
till at till-x1carbon:~$

Does this mean that the first 4 IPs have the host name till-x1carbon and 
the address fd00:1:1::1 has the host name ippusbxd-printers?

"ping ippusbxd-printers" pings the address fd00:1:1::1.


Problems:

1. I would like to assign the name by Zeroconf and not by modifying 
/etc/hosts. How can I do this.

2. Bonjour/Avahi broadcasting still does not work correctly.

I still register via

error =
     avahi_entry_group_add_service_strlst(bonjour_data->ipp_ref,
                 (int)if_nametoindex("ippusbxd"),
         AVAHI_PROTO_UNSPEC, 0,
         dnssd_name,
         "_ipp._tcp", NULL, NULL, 60000,
         ipp_txt);

but the "Address:" entry in the Bonjour record visible in avahi-discover 
(Interface: ippusbxd -> local -> Internet Printer) still uses the wrong 
host name:

Address: till-x1carbon.local/fd00:1:1::1:60000

It should be

Address: ippusbxd-printers/fd00:1:1::1:60000

How can I fix this?

    Till




More information about the ubuntu-devel mailing list