Skip to content

Instantly share code, notes, and snippets.

@Chester-Gillon
Last active February 8, 2025 15:01
Show Gist options
  • Save Chester-Gillon/f0afce15855bfc2aa7a349be8e542d28 to your computer and use it in GitHub Desktop.
Save Chester-Gillon/f0afce15855bfc2aa7a349be8e542d28 to your computer and use it in GitHub Desktop.
Windows MAC address for ConnectX-4

Investigation to test the answer How to find the factory default MAC address?

Using Windows 11 Pro 24H2 (OS Build 26100.3037)

Only Ethernet interface with a cable connected is a ConnectX-4. No settings had been changed for the ConnectX-4 since it was installed.

Output from ipconfig /all:

Ethernet adapter Ethernet 5:

   Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Mellanox ConnectX-4 Adapter
   Physical Address. . . . . . . . . : 98-03-9B-6A-7E-A1
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9e6f:f55a:3a8a:3e29%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.59(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 08 February 2025 13:42:20
   Lease Expires . . . . . . . . . . : 09 February 2025 13:42:19
   Default Gateway . . . . . . . . . : 192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 530056091
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2E-DC-B4-A2-C8-D9-D2-1F-5F-F6
   DNS Servers . . . . . . . . . . . : 192.168.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

The 98-03-9B OUI of the MAC address is registered to Mellanox Technologies, Inc.

Used PuTTY to ssh into a Linux host, and the Linux host showed a MAC address which matched that from the Windows ipconfig:

$ ip neigh
192.168.0.59 dev ens1f0 lladdr 98:03:9b:6a:7e:a1 REACHABLE

On the Advanced adapter properties the Network Address is blank:
image

Used Generate Random MAC Addresses to create a MAC address which was entered into the adapter properties, without any colons:
image

Rebooted Windows. ipconfig /all shows the MAC address in use is that set above, and the DHCP server has allocated a new IP address (192.168.0.60) following the change in MAC address (previous IP address was 192.168.0.59):

Ethernet adapter Ethernet 5:

   Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Mellanox ConnectX-4 Adapter
   Physical Address. . . . . . . . . : 9C-F8-6C-D4-89-1A
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::70a9:7e54:cf4a:961e%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.60(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 08 February 2025 14:08:20
   Lease Expires . . . . . . . . . . : 09 February 2025 14:08:20
   Default Gateway . . . . . . . . . : 192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 530056091
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2E-DC-B4-A2-C8-D9-D2-1F-5F-F6
   DNS Servers . . . . . . . . . . . : 192.168.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

ssh into the Linux machine, which shows the new IP address / MAC address is REACHABLE and the previous ones are STALE:

$ ip neigh
192.168.0.60 dev ens1f0 lladdr 9c:f8:6c:d4:89:1a REACHABLE
192.168.0.59 dev ens1f0 lladdr 98:03:9b:6a:7e:a1 STALE

Flushing the ARP cache, and only the new IP address / MAC address is shown which is a further indication the MAC address was changed:

$ sudo ip neigh flush all
$ ip neigh
192.168.0.60 dev ens1f0 lladdr 9c:f8:6c:d4:89:1a REACHABLE

Searching registry has Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0014 with:

Name Type Data
NetworkAddress REG_SZ 9CF86CD4891A
DriverDesc REG_SZ Mellanox ConnectX-4 Adapter

On the adapter properties changed the Network Address to Not Present, which when selected cleared the Value:
image

Rebooted the PC. ipconfig /all shows the MAC address, and the IP address allocated by DHCP, are back to the original values:

Ethernet adapter Ethernet 5:

   Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Mellanox ConnectX-4 Adapter
   Physical Address. . . . . . . . . : 98-03-9B-6A-7E-A1
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9e6f:f55a:3a8a:3e29%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.59(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 08 February 2025 14:26:56
   Lease Expires . . . . . . . . . . : 09 February 2025 14:26:56
   Default Gateway . . . . . . . . . : 192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 530056091
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2E-DC-B4-A2-C8-D9-D2-1F-5F-F6
   DNS Servers . . . . . . . . . . . : 192.168.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

ssh into the Linux machine which also shows the MAC address, and the IP address allocated by DHCP, are back to the original values:

$ ip neigh
192.168.0.60 dev ens1f0 lladdr 9c:f8:6c:d4:89:1a STALE
192.168.0.59 dev ens1f0 lladdr 98:03:9b:6a:7e:a1 REACHABLE
$ sudo ip neigh flush all
$ ip neigh
192.168.0.59 dev ens1f0 lladdr 98:03:9b:6a:7e:a1 REACHABLE

Looking in regedit shows that the Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0014\NetworkAddress registry key in which entered the random MAC address is no longer present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment