Difference when adresses set via DHCP and manually

Hey community,
i use a Archer C7 V2 with relayd configuration behind a Fritzbox.
The Archer is connected via WLAN to the Fritzbox.
All is working fine, exept using net shares.

PC1 is connected via wlan to the the Archer (Openwrt) with IP 192.168.1.45 assigned through DHCP.
PC2 is connected to the Fritzbox via cable, settings manual:
IP:192.168.1.3
GW: 192.168.1.1
Mask: 255.255.255.0
DNS: 192.168.1.100

I can access the net shares provided from PC1.
I cannot access the net shares provided from PC2.

The corious thing is, that when i set IP and GW and DNS manually on PC1, i can see the net shares.
IP:192.168.1.45
GW: 192.168.1.1
Mask: 255.255.255.0
DNS: 192.168.1.100

What is the difference ?

PC1 set IP manually: IPconfig /all - WORKING

Windows-IP-Konfiguration

   Hostname  . . . . . . . . . . . . : Klaus-Laptop
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein

Drahtlos-LAN-Adapter WLAN:

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung. . . . . . . . . . . : Intel(R) Wireless-AC 9462
   Physische Adresse . . . . . . . . : 84-C5-A6-F1-27-05
   DHCP aktiviert. . . . . . . . . . : Nein
   Autokonfiguration aktiviert . . . : Ja
   IPv6-Adresse. . . . . . . . . . . : 2003:d2:5731:d600:1726:7aa5:44d4:5c2b(Bevorzugt)
   IPv6-Adresse. . . . . . . . . . . : fd00::95b3:25bc:a244:c8b3(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : 2003:d2:5731:d600:c0f9:bd85:806e:faa4(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : fd00::c0f9:bd85:806e:faa4(Bevorzugt)
   Verbindungslokale IPv6-Adresse  . : fe80::4ef:6479:5454:f401%18(Bevorzugt)
   IPv4-Adresse  . . . . . . . . . . : 192.168.1.45(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . : fe80::32b5:c2ff:feeb:db7e%18
                                       192.168.1.1
   DHCPv6-IAID . . . . . . . . . . . : 126141862
   DHCPv6-Client-DUID. . . . . . . . : 00-01-00-01-2C-4D-1C-54-84-C5-A6-F1-27-05
   DNS-Server  . . . . . . . . . . . : 192.168.1.100
   NetBIOS über TCP/IP . . . . . . . : Aktiviert


PC1 set IP via DHCP: IPconfig /all NOT WORKING

Windows-IP-Konfiguration

   Hostname  . . . . . . . . . . . . : Klaus-Laptop
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein
   DNS-Suffixsuchliste . . . . . . . : fritz.box

Drahtlos-LAN-Adapter WLAN:

   Verbindungsspezifisches DNS-Suffix: fritz.box
   Beschreibung. . . . . . . . . . . : Intel(R) Wireless-AC 9462
   Physische Adresse . . . . . . . . : 84-C5-A6-F1-27-05
   DHCP aktiviert. . . . . . . . . . : Ja
   Autokonfiguration aktiviert . . . : Ja
   IPv6-Adresse. . . . . . . . . . . : 2003:d2:5731:d600:1726:7aa5:44d4:5c2b(Bevorzugt)
   IPv6-Adresse. . . . . . . . . . . : fd00::95b3:25bc:a244:c8b3(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : 2003:d2:5731:d600:c0f9:bd85:806e:faa4(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : fd00::c0f9:bd85:806e:faa4(Bevorzugt)
   Verbindungslokale IPv6-Adresse  . : fe80::4ef:6479:5454:f401%18(Bevorzugt)
   IPv4-Adresse  . . . . . . . . . . : 192.168.1.45(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Lease erhalten. . . . . . . . . . : Donnerstag, 14. März 2024 21:28:08
   Lease läuft ab. . . . . . . . . . : Donnerstag, 21. März 2024 21:28:19
   Standardgateway . . . . . . . . . : fe80::32b5:c2ff:feeb:db7e%18
                                       192.168.1.1
   DHCP-Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6-IAID . . . . . . . . . . . : 126141862
   DHCPv6-Client-DUID. . . . . . . . : 00-01-00-01-2C-4D-1C-54-84-C5-A6-F1-27-05
   DNS-Server  . . . . . . . . . . . : 192.168.1.100
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

PC2 ipconfig /all

Windows-IP-Konfiguration

   Hostname  . . . . . . . . . . . . : Klaus-Desktop
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein

Ethernet-Adapter Ethernet:

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung. . . . . . . . . . . : Realtek Gaming 2.5GbE Family Controller
   Physische Adresse . . . . . . . . : 08-BF-B8-32-65-D1
   DHCP aktiviert. . . . . . . . . . : Nein
   Autokonfiguration aktiviert . . . : Ja
   IPv6-Adresse. . . . . . . . . . . : 2003:d2:5731:d600:2368:36ae:4990:569a(Bevorzugt)
   Lease erhalten. . . . . . . . . . : Donnerstag, 14. März 2024 18:11:54
   Lease läuft ab. . . . . . . . . . : Donnerstag, 14. März 2024 23:18:53
   IPv6-Adresse. . . . . . . . . . . : 2003:d2:5731:d600:60bb:ea2a:cb36:d37(Bevorzugt)
   IPv6-Adresse. . . . . . . . . . . : fd00::1168:e954:ad70:a8c2(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : 2003:d2:5731:d600:440f:1604:c015:c89e(Bevorzugt)
   Temporäre IPv6-Adresse. . . . . . : fd00::440f:1604:c015:c89e(Bevorzugt)
   Verbindungslokale IPv6-Adresse  . : fe80::2368:36ae:4990:569a%6(Bevorzugt)
   IPv4-Adresse  . . . . . . . . . . : 192.168.1.3(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . : fe80::9a9b:cbff:fe56:1625%6
                                       192.168.1.1
   DHCPv6-IAID . . . . . . . . . . . : 101236664
   DHCPv6-Client-DUID. . . . . . . . : 00-01-00-01-2C-52-9C-59-08-BF-B8-32-65-D1
   DNS-Server  . . . . . . . . . . . : fd00::763d:25c9:844f:3bba
                                       192.168.1.100
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

It seems that both PC's are in different subnets, because net shares only work in the same subnet.

To narrow it down, disable windows firewall on both PCs and try again with the DHCP set the way you want.

OK, firewalls disabled on both machines, with DHCP enabled on PC1
==> no net share possible

grafik

If i use the IP \192.168.1.3 instead of the \Klaus-Desktop with disabled firewalls, the share appears.
This motivates me to assume that there must be different subnets..

More than likely this is a dns (or mdns) issue. My guess is that \Klaus-Desktop resolves to a different address than the system is holding at that time.

Speaking of IPv6... :rofl:

So, I'm going to get slaughtered for this but you are using DHCPv6 and this will cause:

DHCPv6 Process

The first step is the DHCPv6 client must find addresses of other devices on the link via Neighbor Discovery Process (NDP). If a DHCP client detects a router, it will check the Router Advertisement (RA) sent by a router to see if a DHCPv6 has been set up, or if no router advertisement messages are seen, the client will send DHCP solicit messages, which is a multicast message addressed with a destination of ff02::1:2 that calls out, “All DHCP agents, both servers and relays.” The DHCPv6 client will use the link-local scope to send the DHCP solicit message to ensure that the message isn’t forwarded, by default, beyond the local link.

Do what you must do to me...

This line appears only on the configuration that works:

And this test confirms it is a DNS issue:

Where does the firewall being down come in?

That was your idea, but I'm not sure if the OP tested with and without the firewall enabled.

In theory, the windows firewall is unrelated to this issue, assuming it is indeed DNS/mdns.

Maybe I am chasing my tail?

I'm just trying to figure out the solution; DNS problem does not solve it. OP is still in the dark on how to fix it.

You suggested that the OP disable the firewalls. The OP would need to test with them enabled/disabled to compare if that affects sharing, or if is purely related to DHCP vs static (and the workaround is to use the IP rather than dns/mdns based addresses).

Okay, enable the firewalls and DHCP and try to connect using ip address.

==> share is working (//192.168.1.3)
==> share is not working (//Klaus-Desktop)

nslookup from PC1 (klaus-laptop):

>nslookup klaus-desktop

Server:  pi.hole
Address:  192.168.1.100

Nicht autorisierende Antwort:
Name:    klaus-desktop.fritz.box
Addresses:  2001:19f0:6c00:1b0e:5400:4ff:fecd:7828
          45.76.93.104

nslookup from PC2 (klaus-desktop):

>nslookup klaus-laptop
Server:  pi.hole
Address:  fd00::763d:25c9:844f:3bba

*** klaus-laptop wurde von pi.hole nicht gefunden: Non-existent domain.

We can now conclude that the firewall was not implicated at all.

At least for the IPv4 address, it's clearly not resolving the way you expect... but that's a DNS issue with your upstream DNS resolver and/or mdns, not related to OpenWrt in any way.

100% agree
If i set the Fritzbox as DNS Server (192.168.1.1) it is working ..
The question for me is, at what point should this be corrected? (Fritzbox, Archer(Openwrt), or pihole) ?

The PiHole is clearly not resolving properly based on the experiment you showed. So that's what I'd fix.

For some reason your DNS is not resolving your IPv6 address for Klaus-Desktop handed out with DHCP. Manually assigning it does not need to be resolved. Klaus-Desktop is not being resolved to its DHCPv6 address, probably because the Pi-hole is not the best choice for DHCP. It is only good for stats on clients' blocked sites.

The quick answer since this will only affect your home network is to access Klaus-Desktop by ip address.

The best answer is make the OpenWrt handle DHCP and DHCPv6.

The pihole can be used quite well for local domains, and it is far more than simply a statistics engine.

The conditional forwarding feature is designed for this specific issue.

It is not working well for the OP.

If you want to walk them through using the Pi-hole for DHCP with Klaus-Desktop being resolved (and they have asked how to fix it) fix it with the Pi-hole.

They could try to un-share everything, enable the ip addresses they way it set up now, and hope enabling the new share configures for the dual stack, hopefully setting up the manual IPv6 correctly, but that does risk breaking sharing all together.