0

I experienced the following "strange" behaviour on a virtual machine network setup (bridged):

host 1

hostname: server_one

ip: 192.168.1.2

netmask: 255.255.255.0

gateway: 192.168.1.1


host 2

hostname: server_one

ip: 192.168.1.3

netmask: 255.255.255.0

gateway: 192.168.1.1

In this scenario windows tells me "duplicate hostname" and one or the other machine is unreachable if pinged by ip (I never tried it, perhaps am I wrong? is this just a warning and the ping works?).

But if I change as follows:

host 1

hostname: server_one

ip: 192.168.1.2

netmask: 255.255.255.0

gateway: 192.168.1.1


host 2

hostname: server_one

ip: 192.168.1.3

netmask: 255.255.255.224

gateway: 192.168.1.1

There's no warning by windows (no duplicate name) and no problem at all. I ping each ip, and the virtual machines respond smoothly.

Why this behaviour? Does Windows recognize the netmask and if it's different the machines hostnames can be the same?

1 Answers1

0

In IPv4 the netmask is used to determine the broadcast address. Windows apparently uses broadcasts to determine duplicate names. If the two hosts use different broadcast addresses they won't see each other's duplicate name checks and assume that the name is not in use.

Sander Steffann
  • 7,712
  • 19
  • 29