OpenWRT Router: 192.168.1.1
"other device": 192.168.168.54 (plugged into switch (192.168.1.100) and switch is connected to router (192.168.1.1)
Now I want to access 192.168.168.54 from the other devices that have 192.168.1.x
I did setup a static route with:
Target: 192.168.168.0/24
Gateway: 192.168.1.1
Unicast
I assume I also need to add a firewall rule? But the 192.168.168.54 is in no interface kind of. It's just a device connected to the router with a static IP...
You need to create a network interface that uses the 192.168.168.0/24 (presumably it is a /24) subnet in order for this to work.
What is the device in question? How is that device connected (ethernet, wifi)? Does the device have a DHCP server running? Can it be configured to have another address (and if so, does it have DHCP client as an option, or only static)?
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
That looks strange to me, is that really the gateway that serves the .54 device? Typically it's a router on the same subnet as the device itself, like 192.168.168.1...
Problem is solved. It seems to have "adjusted" to the network it is plugged into (DHCP style) even so the manual and all other sources in the internet say it has a static IP that can not be changed. It's a BYD Battery Box, connected via RJ45 cable to my switch, which is connected to my router. IP can/should not be changed is what I read from others.
But just for my understanding, the only way would be to create a seperate network interface that has 192.168.168.0/24 and then forward that to the zone my other devices are in in the Firewall settings?
If you were to create an interface specifically for the battery box device, you would set this up such that it would be on address 192.168.168.1/24 and associated with the physical network port that connects to the device. If you're connecting via an external switch, it would need to be managed such that it could handle VLANs.
Then, you could simply put the new network in the same firewall zone as the lan and they'd be able to communicate with each other.
That said, without knowing the details of the battery box device, it is possible that inter-vlan routing might not work as expected in a few types of scenarios. If those came up, they'd be limitations of the device in question (sometimes with workarounds possible), not an issue with OpenWrt or the idea of the new network.