Netzflocken

...was so an- und abfällt

How to use Coherence on a non networked computer?

written by dev, on 2007-09-18 20:35.

Say you want to work on your favorite UPnP software en route or even present it to somebody else.

But all you have is your laptop and no network connection. And the only interface that is up and has an IP address assigned is the loopback one, good ol’ 127.0.0.1.

Now if you start two Coherence instances and they don’t see each other, that’s due to the SSDP multicast messages, which they send out to announce their presence or to search for other UPnP devices, do not reach each other.

The chances are that no IP routing is set up. That’s quite reasonable on a system with only the loopback interface active, but UPnP - to be more precise SSDP - needs it.

The solution is to add either a route for the UPnP multicast address pointing to the loopback interface:

sudo route add 239.255.255.250 lo
or more lazy universally valid, and maybe helpful for some other software on your system too, just add a default route to it:
sudo route add default lo
as multicast packages - good citizens of the IP network - will travel the default route if not explicitly told elsewise.*

If you get networked again, do not forget to remove that route. Of course having that done automagically by e.g. the Gnome NetworkManager would be much nicer. If you know how, please leave a comment.


* Using a default route is acceptable in this situation, in your own LAN you better go for the UPnP multicast one, as with the default route the packages first will be send to what is mostly your internet gateway, and will be there injected again into your network.