autodetect crossbar url and realm

is there a way to develop a sort of dhcp or multicast where crossbar will answer the correct url+realm to the client according its IP for example

This will in large parts depend on what exactly you understand in “correct url+realm to the client” :wink:

A simple situation for example would be: you have a LAN (segment), and start exactly one listening on a host connected to that network segment.

Then you could just use a fixed, hard coded “ws://crossbar.local” URL in your clients (local DNS assuming the host is named “crossbar” and your client OSes support this), plus WAMP-cryptosign with a fixed assignment router-side of client pubkeys to realms and authroles.