1) While still being connected to VLAN 4 port on the switch, I manually assign IP Address, netmask and gateway to the one of a VLAN 1. To my surprise, I successfully get assigned the available IP Address from VLAN 1 that I selected but DNS for some reason is not picked up.
2) When I try to ping anything on the VLAN 1, I get a response saying "ICMP_Seq=1 Destination Host Unreachable" no matter if there is a device with that IP or not. I can't also access the logon page that's allowed on VLAN 1 which I guess is a good thing.
My questions to this scenario would be:Is this how VLANs work behind the scene ?
Is this what you can call a VLAN Hopping ?
Is this a result of a misconfiguration on a switch ?
Is this behaviour normal ?
You are not "getting assigned" an IP, you set the IP. DNS won't be "picked up" unless you use DHCP. Since you set a static IP, you would also need to set the DNS statically.
Yes, that should happen since you're on the vlan4 network, but you set an IP in the vlan1 network.It's the same as you going to your neighbors house, with a static IP from your house, and plugging into their network. You won't get anywhere.
Vlan hopping? No, you're on one network with an IP that isn't routable on it.
Switch seems to be configured correctly.
I did both, manual one picked a wrong IP address and the automatic didn't picked up DNS IP at all.
I understand now. However I'm still puzzled why does my PC still accepts the manual configuration I have entered and the status changes to connected when in fact it didn't connect to OPNSense at all ? Usually when you are connected to a normal router and assign a wrong IP, your connection will disconnect but not in this case for some reason. Is this behaviour normal and how managed switches work where it will accept any IP address that I inserted in my PC settings even if it's wrong ?
My main question is, how can I test if VLANs work in accordance with my Firewall rules ? One way I know you can test this is by plugging into each VLAN port then pinging each VLAN Gateway from the currently connected VLAN and see if there's a response. Are there any other tests that people perform to check if VLANs work correctly ? If so, what would you recommend ?
I think you said that backwards. Manual is a static IP. The pc will accept any address you give it.What does "wrong IP" mean? If you plug into vlan4, it should get an IP in the vlan4 subnet. Did it not?
Why wouldn't it accept it?? It doesn't know what network you're connecting to. You set a static IP, it can't tell you "hey, you're giving me the wrong IP for that network.", YOU need to be smart enough to know that."Connected" doesn't mean connected to opnsense, the pc wouldn't know what type of router you're using. It means it has an active network connection. I have never seen a pc disconnect when it has the wrong IP assigned. Again, how would it know?? You gave it the IP.
Sounds like the switch isn't configured correctly.
Can you tell me how you came into this conclusion ? I think there might be some misunderstanding and want to double check.