09-30-2024 09:36 AM
Hi all
Hopefully someone can help me out with an issue. I'm relatively good with general IT, included networks, but this switch makes me think I don't know sh..
My setup is:
Router/AP (in the living room): 10.0.10.1
Wireless Access Point (basement): 10.0.10.2
Cisco SG300 (basement): 10.0.10.254 (connected to the wireless access point via cable on GE49 (Trunk)
I have set up several VLAN with different types of machines (internal servers, development servers, production servers (for testing) and some NAS devices. I have left the deault VLAN 1 for now, and the IP 10.0.10.254 is assigned to this VLAN.
If I log into the switch (CLI or WEB interface) I have can ping both IP addresses and domain names, no problem. I can ping the router (10.0.10.1) from ALL computers/servers connected to any of the VLAN's.
Computers/servers connected to any other VLAN than the default has NO INTERNET ACCESS, nor with ping or with other services.
I have static routes on the router that goes to each VLAN, and I can access machines on all VLAN's from my laptop that is on wireless network (same subnet as VLAN 1).
I cannot figure this one out, and hope there is someone out there that might help me out and point me in the right direction. I'm quite sure it something stupid and easy that I have forgotten.
By the way, I'm not very much into switches...
Best regards
Lars-Inge
09-30-2024 10:09 AM
What gateway do you have assigned for all the non-functional VLAN's you've created; and what routing protocol are you running? Where to the IP addresses come from for those devices (presumably some form of DHCP), but it has to include what the (reachable) gateway should be ?
09-30-2024 10:19 AM
Sorry, forgot a couple of things...
The switch is set to L3 mode.
All IP addresses are fixed IP's and all gateways are set to the VLAN IP, i.e., 10.0.30.1 for VLAN 30.
Routing protocol?
09-30-2024 10:39 AM
It could be a NAT issue. The router on this case, need to receive the traffic from the switch and NAT it in order to sent it to the internet.
If you are doing NAT, then this could be a routing problem. As the switch is a layer3 device, as you mentioned, you can have one default route on the switch sending everything to the router. On the router you must have a default route sending everything to your ISP.
then, you need specific routes on the Router sending the traffic back to the switch. Assuming the communication between router and switch is a Layer3 point to point.
If the communication between router and switch is via trunk, then you need to have the vlans create on both device and the gateway must be the router.
09-30-2024 11:06 AM
This is where my knowledge is lacking, but how can it be NAT if everything is working fine on VLAN 1?
Also, as mentioned, the routes back to the switch is set up for all VLAN's on the router and I can access ALL computers on ALL VLAN's from my laptop, hence I cannot see that there is a problem with communication between the switch and the router.
The router is doing NAT by default, and again, everything is working perfectly on VLAN 1.
09-30-2024 11:43 AM
I am focous on the communication between the hosts and the internet. The fact of vlan 1 is working for NAT, does not tell what the problem is. IF the NAT was configured for the vlan1, it will work but what about the other vlans? NAT can be configured on per vlan/network basis.
09-30-2024 11:23 AM
Hello,
The issue seems to be related to NAT or routing between VLANs, specifically for internet access. Since VLAN 1 works perfectly and the router is handling NAT by default, there are a few potential areas to investigate:
Check:
Check:
Check:
Check:
Check:
09-30-2024 11:40 AM
Thanks Maher, really appriciate a thorough chec list.
Will have a look tomorrow...I managed to lock myself out from the switch when I tried some ACL rules...
10-03-2024 01:35 AM
Hi all
I have done some more testing and troubleshooting without much success, and in order to get it running I have moved the one server I'm working on to VLAN 10.
- I have checked static routes on the router, and there is one route for each VLAN pointing to VLAN 10 on the switch.
- On the switch I have the following routes:
0.0.0.0/0 10.0.10.1
10.0.10.0/24
10.0.20.0/24....
I cannot find any way to put in a "Next hop" on the VLAN routes. Is this maybe the problem?
If this is the case, what would be the correct command in CLI to create these?
- VLAN Tagging/Trunk
Have tried different options here without any change. Currently port 49 is set to "Untagged" for VLAN 10 and "Tagged" for all other VLAN's, and it is a trunk port.
- Router Firewall is enabled, but no rules. I have also tried to disable it without any change.
- DNS is set globally on the switch, and i can ping the outside world from the switch, both by IP and domain name, no isses there.
Funny thing is that I can access a webserver on VLAN 30 from the internet unless, but no access from the webserver to the internet...
I have to say that I'm lost, completely.
If anyone feel like having a look at my config file, please let me know, I'm getting desperate
10-03-2024 04:13 AM
Hi Lars,
You've already configured much of the network correctly, but there are a few areas that might need adjustments to allow internet access for devices on VLANs other than VLAN 1. Let's walk through a few possible solutions:
If the switch does not allow you to specify the "Next Hop" for each VLAN route (which is usually necessary when performing routing duties), you may not need to configure individual next hops if the switch is aware of the default route.
However, on some switches, you can set up routes for specific VLANs using commands like:
ip route 10.0.10.0 255.255.255.0 10.0.10.254
ip route 10.0.20.0 255.255.255.0 10.0.20.254
This tells the switch how to handle traffic for each VLAN. Ensure the switch has static routes for each VLAN pointing to their corresponding IP range.
Once you've checked and configured these aspects, your VLANs should be able to route internet-bound traffic properly.
10-23-2024 03:33 AM
Hello Maher
Sorry for the late reply, I have been away for work a few weeks now and haven't been able to look into this until now. Thanks for very specific and useful information, appreciate that.
I have been thru the config again and checked what I can check.
On your last comment, I can set next hop on the VLAN's as long as no clients are connected to the VLAN. As soon as I connect a client it changes to local and directly connected and the next hop disappear.
10-23-2024 03:44 AM
Hi Lars,
It would be better if you can share the configurations to be revised
10-23-2024 03:54 AM
Hi
Added the config. I have cleared most of the config and are currently only focusing on VLAN 30 to try and get that running before I start on the other ones.
As you can see, I have removed some information that is not relevant (some of the ports that are not configured and the SSH information.
Really appreciate your help on this.
Lars
10-23-2024 04:09 AM
Hi Lars,
From the configuration you've shared, everything seems mostly aligned for VLAN 30. Here are a few things to check or adjust to help resolve the issue of no internet access from VLAN 30:
You have assigned IP addresses to VLAN 10 (10.0.10.254/24) and VLAN 30 (10.0.30.254/24). This looks fine. Each VLAN should be using its respective gateway for routing within the subnet.
You have set the switch's default gateway as 10.0.10.1, which is correct as it’s your router. The ip route commands you added should point traffic from VLAN 30 to the router (10.0.10.1), so this looks good too.
The problem could be with the NAT on the router. Ensure the router is NATting traffic from VLAN 30 (10.0.30.0/24) to the internet. Typically, routers only NAT traffic from the default VLAN or main subnet (here, VLAN 10). You need to check the router’s NAT settings and ensure it includes the VLAN 30 subnet in the NAT rules.
Port 49 is configured to allow VLAN 30 in the trunk, which is correct. However, double-check that:
Ensure that there are no firewall rules on the router that block traffic from VLAN 30 from accessing the WAN interface or performing NAT. You may want to temporarily disable firewall rules or inspect them closely to ensure VLAN 30 is allowed.
If VLAN 30 clients can reach internal networks (like VLAN 10), but not the internet, it's almost certainly related to how NAT is configured on your router. Make sure that your router is configured to NAT all outgoing traffic from VLAN 30 to the WAN interface.
Check whether you have any ACLs on the switch or router that might restrict internet access for VLAN 30.
If you’re using DHCP for VLAN 30, ensure that the router is providing the correct gateway and DNS information for clients on this VLAN.
10-23-2024 05:46 AM
Hi Maher
I currently have one NAT for VLAN 30 on the router, and that is "Destination: 10.0.30.0/24" and "Next hop: 10.0.10.254".
With this I have access to clients on VLAN30 from VLAN10, any other setting breaks the connection between VLAN10 and VLAN30.
Maybe I need to look for another router...
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