Two way. - one is use Broadcast(IPv4), Multicasting(IPv6) - Hole punching STUN help to find in same PublicIP (maybe not in LAN).