Static IP only working if directly connected to router

I have a question - which might be a little generic - and not 100% related to OpenWrt.
On my R7800, LAN is DHCP enabled, but for some clients, I am using the settings in
Network --> DHCP and DNS -> Static Leases
to assign IP adresses.
In this particular case: to a HUE bridge.
This works fine, as long as the HUE bridge is connected to the R7800 via LAN cable directly.
R7800 --> HUE

*Now it is getting weird: If I move the LAN cable to a switch, that is connected to the router, the Hue bridge is not getting an IP address assigned anymore. *
R7800 -> Switch --> HUE
The switch is a simple NETGEAR GS105GE LAN Switch 5 Port.
(For my understanding, the switch is acting as a simple Layer-2-Switch.)

Restarting HUE, Switch or Router, doesn't help.

Other devices connected to the switch partly work fine, but some need the direct connection to the R7800.

Am I missing some basic knowledge why this is the case?

Cheers, Frood

That switch is a low end vlan aware smart switch. You should look at the configuration to ensure that all ports are configured properly. If you want it to operate as a simple unmanaged switch, all ports should be set to the same vlan, untagged on all ports.

That is the case - all ports are untagged.
It is 100% unmanaged.

can you share screenshots of the VLAN pages (including the PVID page)?

Another thing to try is different physical ports on the switch and different cables. This will help identify if it might be an electrical/mechanical issue or network logic.

Sorry, it is a NETGEAR GS105 LAN Switch 5 Port
No VLAN tagging.

Well a non “E” switch will certainly be unmanaged. So try plugging something else into that port. Try putting the problematic device on another port. Try different cables.

I am using CAT 7 cables only. Tons of them.
Different ports, different cables etc... all the same.

But you partly answered my question: I am not missing any basic knowledge - do I ?!
It is supposed to work, but there are some weird other reasons why it is not..., right?

Does the problem follow any pattern when you try different ports and cables? Do other devices work properly in the port that you’re using for the hue? Does the hue work on any other ports?

It could be that the switch has a problem and is operating out of spec, but the other devices are more tolerant than the hue. Or the other way around - something could be wrong with the hue and the router itself may have a physical port that is able to deal with the problem while the switch doesn’t.

1 Like

Yes it should work.
Static leases is still only the dhcp server giving out leases but with predefined numbers instead of “from the number pool”.

So the problem you have is ether hardware fault or config in the router since your switch doesn’t have a configuration. My experience from this forum say config problem in router since many save money from buying a unmanaged switch and then try to use it as a managed switch once they connect it and realize what a switch can do, but then they forget what switch they actually bought.

The three simple config things you must avoid are:

  1. DHCP pool and static leases must NOT share IP number range.
  2. The static IP for the device MUST have the same gateway/interface as the VLAN in point 3 below.
  3. Since you have unmanaged switch the port on the router connecting to the switch MUST only have one VLAN specified and that VLAN MUST be untagged when leaving the router.

The simplest way to test hardware fault on the unmanages switch is to remove the switch from the router and connect the Hue in this case directly to the port on the router that the switch usually are connected to. If that works then the router is configured right to handle a unmanaged switch and the problem is broken hardware in the switch.

A unmanaged switch is a Layer-3 port spreader (sometimes with a POE injector), you connect it to a router port without a VLAN (router port untagged) and all the single Layer-2 and Layer-3 functions in the router on that single router port is spread out evenly to all the switch ports without questions.

A unmanaged switch doesn’t even get a IP address from the DHCP server so you can’t see it in the network map since it has no brain off its own, it only duplicates the port on the router so the DHCP server only see the devices connected to the unmanaged switch.

To get a Layer-2 switch you need a managed switch.

This is an incorrect description of switches and layers. Here is the OSI model which defines the layers.

Layer 1 is the phy (or physical) - basically about putting signals physically onto the medium - in this case, signals on the wire (but could also be airwaves).

A switch, unmanaged or managed, is fundamentally a layer 2 device. This layer is the data link layer and is responsible for interconnecting nodes. These devices move Ethernet data by means of switching the frames through a matrix.

Layer 3 communication is routing - this is the act of moving packets across multiple networks. Inter-networking.

Layers 4 and above are higher level functions that have to do with the data inside the packets (transport control, session control, etc) and the layers extend up to the application layer (L7) that actually parses and processed the data (say your web browser, for example).

The most basic switches (unmanaged) are L2 devices with no management or configuration, they act effectively as a splitter (at a logical level) to allow more nodes to be connected. Managed switches are also layer 2 devices, but add the ability to manage the switch operation and handle vlans. Most lower end managed switches (often called smart switches) do not perform routing or any advanced functions, they simply allow for the accommodation of multiple networks by means of 802.1q tagging. They allow the designation of which ports belong to which VLANs and can handle tagging and untagging of the Ethernet frames, but they keep each network segregated.

mid-to-high end managed switches may operate as L2+ devices which add some features to help offload some of the inter-networking burdens from the routers. This includes things like dhcp relay, protocol or MAC address based vlan assignments, and other such things. And as you get to the higher end of the managed switch category (think enterprise level), you may find L3 capable switches which basically blend the functions of routing and switching into one unit (not the same as a consumer router with a built-in switch). These are designed for handling offloading of routing responsibilities to improve the efficiency of very large networks.

For the purposes of this original thread, an unmanaged switch should work since they are simple, plug and play devices. If multiple networks are in use (VLANs), a managed switch is required, but any smart/managed switch can do the trick (provided that it is configured properly).

1 Like