04-09-2020 09:20 AM
Hello, I have been trying this for hours with no result. My router is SOHO with ability to static route.
It is only 2 VLANs in switch.
Port 10 has cable to router, router IP is 192.168.0.1, DHCP off.
VLAN1 IP 192.168.0.2 DHCP 192.168.0.200-254, default router IP: 192.168.0.1
Port 2-10 access, untagged for VLAN1
VLAN 2 IP 192.168.2.1 DHCP 192.168.2.2-254, default router IP: 192.168.2.1
Port 1 access, untagged for VLAN2
VLAN1 is in the same subnet as the router, when I'm connected to port 2-10, I can have internet.
But when Im connected as VLAN2, I cannot get the internet.
I use only port 1 for VLAN2 just to test. I have tried many combinations of static routes that I can find example on the internet, such as:
0.0.0.0...0...192.168.0.1, 0.0.0.0...0...192.168.2.1, 0.0.0.0...0...192.168.0.254, etc.
But still, when I connected to port 1, I cannot even ping the router.
Can someone give me one example of how to do this right? Thank you.
Solved! Go to Solution.
04-09-2020 07:51 PM - edited 04-09-2020 07:52 PM
I think, I managed to access router. I just need to add static route in the router like this:
192.168.2.0 255.255.255.0 192.168.0.2
192.168.0.2 is for the interface of Vlan1.
Thank you for trying to help, I knew this would be easy, I just mixed things up because of how new I am to this.
Thanks again.
04-09-2020 09:27 AM
Hi,
VLAN 2 IP 192.168.2.1 DHCP 192.168.2.2-254, default router IP: 192.168.2.1
Port 1 access, untagged for VLAN2
Most likely your provider is not NATing 192.168.2.0/24 subnet. They are only NATing 192.168.0.0/24 subnet which is part of vlan1 and that is why you can access the internet using vlan 1 but not 2.
HTH
04-09-2020 01:08 PM
"Most likely your provider is not NATing 192.168.2.0/24 subnet. They are only NATing 192.168.0.0/24 subnet which is part of vlan1 and that is why you can access the internet using vlan 1 but not 2."
The 192.168.0.0 is my own choosing. I can simply change it into 192.168.2.0 if I want in router setting.
The VLAN1 is behaving like normal switch, when we first plug in the cable. Also I tried it within non-internet devices to test first the settings.
04-09-2020 01:15 PM
If you have access to the router to change the setting to 192.168.2.0/24, than you most likely you would have to change the NAT statement on the router to reflect that.
HTH
04-09-2020 07:51 PM - edited 04-09-2020 07:52 PM
I think, I managed to access router. I just need to add static route in the router like this:
192.168.2.0 255.255.255.0 192.168.0.2
192.168.0.2 is for the interface of Vlan1.
Thank you for trying to help, I knew this would be easy, I just mixed things up because of how new I am to this.
Thanks again.
04-09-2020 09:32 AM - edited 04-09-2020 09:33 AM
Removing response.
I agree that NAT is likely the better reason.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide