Static Routes using Netsh or Switch?


So I have a setup on my Layer 3 switch as follows (SG300-52) SRW2048-K9-NA:

Router IP =
LAYER 3 SWITCH contains following VLANS:

Computer#1 IP =

Computer #2 IP =

I have read you can have the VLANs communicate with each other by adding static routes. If I want VLAN1 and VLAN2 communicate:

Should I add a static route via:
Netsh command in Command Prompt
Switch: Routing Table
Router: Routing Table

Are all the mentioned above do essentially the same thing, and is it just based on preferences?
6 answers Last reply Best Answer
More about static routes netsh switch
  1. Best answer
    I'm not familiar with that particular switch... but in general, you need to enable routing on the switch first off. Then you'll need to assign an IP address to each VLAN (which you probably have done already). You won't need to add static routes for the VLANs since they're directly connected. Lastly, if you have anything on the other side of your router, y ou'll need to make a layer 3 port pointing to that interface. At that point you can assign a default route to send traffic to the router interface if it isn't destined for VLAN1 or 2.

    Hope this helps!

    Also, you could trunk the switch to the router and have the router do the routing but that kind of defeats the purpose of having a layer 3 switch. Adding routes to a workstations routing table won't help route packets once they reach the switch. The default gateway of each machine tells the packets where to go, then the switch or router takes it from there.
  2. Thanks mitchflossin,

    Your answer helped clear up my confusion regarding static routes.

    One last thing I had on my mind, so the port that is assigned an IP can be blank (no ethernet from switch to router needed)? It is essentially used as a Trunk port do inter-vlan communication? This can be implemented to allow each VLAN to have internet access correct without using all the port on the router?
  3. I edited my original post as I misread what you were trying to do (just removed a step). Where is the internet coming in from? Is it on the other side of that router?

    You only need one cable going from your router to your switch. Your switch is acting like a router by forwarding ports amongst VLANs including your gateway port (the port you have connecting your router and switch). By default (at least with Cisco) any VLANs you have created on a L3 switch will be able to communicate by default. You would need to explicitly tell them not to if that's not the behavior you wanted.
  4. Yes, the internet is supplied directly into the router, just like a home network is set up. It's good to know that I only need one ethernet cable from router to switch to supply all VLANS with internet access, assuming I set everything up correctly.

    Thanks again for all your help, very much appreciate it.
  5. Best answer selected by invulnarable27.
  6. I'm very glad I could help you! Best of luck!
Ask a new question

Read More

LAN IP Switch Command Prompt Routers Networking