Where did sharingd file find the IP address it trying to connect? I have this mac app installed LULU (https://objective-see.com/products/lulu.html)
using which I discovered /usr/libexec/sharingd  trying to local IP Address 192.168.2.255. 
I figured out what sharingd is from here https://discussions.apple.com/thread/6501958

Update: usr/sbin/netbiosd
also tries to access the same ip address.

but I want to know from where does sharingd discovers/find out IP address ?
result of ifconfig without mac address:

$ ifconfig
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384
    options=1203&lt;RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP&gt;
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201&lt;PERFORMNUD,DAD&gt;
gif0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1280
stf0: flags=0&lt;&gt; mtu 1280
EHC29: flags=0&lt;&gt; mtu 0
EHC26: flags=0&lt;&gt; mtu 0
XHC20: flags=0&lt;&gt; mtu 0
en0: flags=8963&lt;UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST&gt; mtu 1500
    options=10b&lt;RXCSUM,TXCSUM,VLAN_HWTAGGING,AV&gt;
    media: autoselect (none)
    status: inactive
en1: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
    inet 192.168.5.218 netmask 0xffffff00 broadcast 192.168.5.255
    media: autoselect
    status: active
p2p0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 2304
    media: autoselect
    status: inactive
awdl0: flags=8943&lt;UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST&gt; mtu 1484
    inet6 fe80::5cc0:dbff:fee3:d8e0%awdl0 prefixlen 64 scopeid 0xa 
    nd6 options=201&lt;PERFORMNUD,DAD&gt;
    media: autoselect
    status: active
en2: flags=8963&lt;UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST&gt; mtu 1500
    options=60&lt;TSO4,TSO6&gt;
    media: autoselect &lt;full-duplex&gt;
    status: inactive
fw0: flags=8822&lt;BROADCAST,SMART,SIMPLEX,MULTICAST&gt; mtu 4078
    lladdr 00:3e:e1:ff:fe:49:4e:9e 
    media: autoselect &lt;full-duplex&gt;
    status: inactive
bridge0: flags=8822&lt;BROADCAST,SMART,SIMPLEX,MULTICAST&gt; mtu 1500
    options=63&lt;RXCSUM,TXCSUM,TSO4,TSO6&gt;
    ether d2:00:14:94:e9:e0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en2 flags=3&lt;LEARNING,DISCOVER&gt;
            ifmaxaddr 0 port 11 priority 0 path cost 0
    media: &lt;unknown type&gt;
    status: inactive
bridge100: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
    options=3&lt;RXCSUM,TXCSUM&gt;
    ether 42:6c:8f:15:90:64 
    inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
    inet6 fe80::406c:8fff:fe15:9064%bridge100 prefixlen 64 scopeid 0xe 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en0 flags=3&lt;LEARNING,DISCOVER&gt;
            ifmaxaddr 0 port 7 priority 0 path cost 0
    nd6 options=201&lt;PERFORMNUD,DAD&gt;
    media: &lt;unknown type&gt;
    status: inactive
utun0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 2000
    inet6 fe80::f21f:cbe5:bae0:c2e1%utun0 prefixlen 64 scopeid 0xf 
    nd6 options=201&lt;PERFORMNUD,DAD&gt;
utun1: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1380
    inet6 fe80::7fa7:7485:c59b:f50%utun1 prefixlen 64 scopeid 0x10 
    nd6 options=201&lt;PERFORMNUD,DAD&gt;
en4: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
    inet 169.254.218.132 netmask 0xffff0000 broadcast 169.254.255.255
    media: autoselect (100baseTX &lt;full-duplex&gt;)
    status: active
macOS implements mDNS - Multicast DNS to find other devices on the same network segment. Basically, it says - who can share files and if the other IP answers - you have a connection that can be made if you click on that host in Finder (for one of many possible instances)


https://developer.apple.com/bonjour/
http://multicastdns.org


It's called Bonjour when it's wrapped up in IPv4/IPv6 as well as bluetooth zero configuration networking and this tech powers things like AirPlay, Printer Sharing, handoff / continuity and more.

So to answer your question, it found it by asking on your network. It's not clear why you have 192.168.5.255 and 192.168.2.255 both as broadcast networks, but that's not necessarily wrong if you have your network set up like that.