i[padresses/subnets

Started by netpthon, December 21, 2024, 06:33:08 PM

Previous topic - Next topic
Hello, i'm new here pleased to meet you all and the best wishes for 2025!

Question, i have bought a mini PC and installed OpnSense on it.

The lan address of the lan is 192.168.1.1
I have connected a managed switch and it has the ip 192.168.1.100 the two other devices connected to the switch ( a wifi router and a iptv box) have the ip's 192.168.1.101 and 192.168.1.102.

Everything is working fine but when i gave the managed switch an static ip of 192.168.2.1 everthing seemed to work as well.

What is the correct method? opnsense(192.168.1.1) switch(192.168.2.1) wifi router (192.168.3.1)? the opnsense firewall is handling the dhcp leases and that works

BTW i'm migrating to a new glassfiber provider shortly though

December 21, 2024, 07:00:46 PM #1 Last Edit: December 21, 2024, 07:54:43 PM by meyergru
That largely depends on how you want to divide up your network. Generally speaking, every subnet should correspond to one interface.

Normally, the 192.168 RFC1918 range is sudivided into /24 subnets, however you can use it as one large subnet. So, if you want to have several subnets/interfaces/VLANs, you would use a netmask of /24. In that case, your 192.168.1.0/24 and 192.168.2.0/24 subnets would have to be routed over OpnSense.

If you can access your managed switch from your other machines after having what seems to be another subnet, you either have a routing/firewall setup running or a larger netmask than /24 (which you did not specify).

All of this is basic networking 101 (see #1) you and you should learn about it before trying to use OpnSense. There are lots of tutorials out there to help you with IP addressing and subnetting in general.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+