Help with AutoDiscovery and IP addresses

Hello all,

The IP returned from the event MemberJoined (IP As String) is way off.
It comes in as 192.168.1.68
But the IP computer is not on the same IP - sorry, I do not know the correct way of writing this - the correct IP would be 192.168.0.xx.

So why does the IP 192.168.1.xx come in at all?

BTW this is my home network. Two Windows PC trying to talk using Auto Discovery

Thanks
Tim

Does that computer have a second network attached? Perhaps Ethernet and Wi-Fi?

Do you try the provided example ?

No second network. I even rebooted it.
It never displayed this behavior before - code is not new.
Tim

Do me a favor and open a command prompt and type ipconfig. What’s the result of that?

Or your DHCP config changed or have a rogue DHCP…

Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 3:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . : Home
Link-local IPv6 Address . . . . . : fe80::ec74:c32e:d147:a0cd%19
IPv4 Address. . . . . . . . . . . : 192.168.0.33
Subnet Mask . . . . . . . . . . . : 255.255.255.0

Windows (View your network properties) shows the ethernet controller having an IP of 192.168.1.168/24 with a gateway of 192.168.1.1. This is from my office yesterday I’m sure. But why is it holding it?

IPConfig /all does not show this at all.
Tim

Name: Ethernet
Description: Realtek PCIe GBE Family Controller
Physical address (MAC): 54:ee:75:b5:9b:c4
Status: Not operational
Maximum transmission unit: 1500
IPv4 address: 192.168.1.68/24
IPv6 address: fe80::1487:9f09:9af4:6104%13/64
Default gateway: 192.168.1.1
DNS servers: 192.168.1.1
Connectivity (IPv4/IPv6): Disconnected

Name: Local Area Connection* 2
Description: Microsoft Wi-Fi Direct Virtual Adapter
Physical address (MAC): 5a:fb:84:53:51:9c
Status: Not operational
Maximum transmission unit: 1500
IPv4 address: 169.254.12.54/16
IPv6 address: fe80::5e8:e3ed:2b18:c36%6/64
DNS servers: fec0:0:0:ffff::1%1, fec0:0:0:ffff::2%1, fec0:0:0:ffff::3%1
Connectivity (IPv4/IPv6): Disconnected

Name: Local Area Connection* 3
Description: Microsoft Wi-Fi Direct Virtual Adapter #2
Physical address (MAC): 58:fb:84:53:51:9d
Status: Not operational
Maximum transmission unit: 1500
IPv4 address: 169.254.116.121/16
IPv6 address: fe80::747e:7000:fbe8:7479%17/64
DNS servers: fec0:0:0:ffff::1%1, fec0:0:0:ffff::2%1, fec0:0:0:ffff::3%1
Connectivity (IPv4/IPv6): Disconnected

Name: Wi-Fi
Description: Intel® Dual Band Wireless-AC 3165
Physical address (MAC): 58:fb:84:53:51:9c
Status: Operational
Maximum transmission unit: 1500
Link speed (Receive/Transmit): 72/72 (Mbps)
DHCP enabled: Yes
DHCP servers: 192.168.0.1
DHCP lease obtained: ?Wednesday, ?August ?15, ?2018 7:43:03 AM
DHCP lease expires: ?Thursday, ?August ?16, ?2018 7:43:03 AM
IPv4 address: 192.168.0.33/24
IPv6 address: fe80::ec74:c32e:d147:a0cd%19/64
Default gateway: 192.168.0.1
DNS servers: 192.168.0.1, 205.171.2.25
DNS domain name: Home
DNS connection suffix: Home
DNS search suffix list:
Network name: Tims Network
Network category: Private
Connectivity (IPv4/IPv6): Connected to Internet / Connected to unknown network

???

The project is there:
Examples/Communication/Internet/AutoDiscovery.xojo_binary_project

I have what was a working application that worked from Mac to Windows and reverse, years ago… Last time I checked, the communication was working fine from Mac OS laptop to the Windows 10 laptop, but not in the other way.

As far as I can recall, it was not necessary to be connected to the internet (I used it on WiFi) provided you have a wifi hotspot (or a computer to computer "network). But I was not able to make it working this year.

It wont work over the internet, LAN only.

IP addresses that are received from a DHCP server have a lease-length, typically 3-days, to allow users to leave for a weekend and still have the same IP when they return on Monday. It sounds like that’s what you are seeing. You’d have to talk to their IT dept or directly at their router to find out what that length is. I’ve seen it set to 30 days to facilitate users who travel a lot.

That said, I don’t remember when Windows reorders their NIC addresses, but on macOS, they’re updated as soon as the network conditions change. You might try restarting to see if that makes your Wi-Fi the primary network connection.

Open command prompt as admin and try bellow things to get up to date with your nic’s.

ipconfig /flushdns

ipconfig /release

ipconfig /renew

But why would it appear when that hardware is not used - it was on a wireless connection when it detected the IP assigned to the Ethernet which was not connected at all?

Thanks for the answers. I do appreciate the insight and help!
Tim

Are you specifying a NIC on both ends?

No, I do the following:

ADController.Bind( 9090 )
ADController.Register("Axcys")

Dont know how to specify a NIC, or even if the other end would know what it is? I thought that the big benefit was not knowing who was there, as long as we are on the same page (ADController.Register(“Axcys”) )

Tim