Sign in with
Sign up | Sign in
Your question

How should i set up my default gate way in a 1 router to 3 switch setup?

Last response: in Networking
Share
September 10, 2013 8:45:24 AM

I am setting up a network and I am trying to figure out my default gateways.

I have three switches, SW1 is .105.1 /24, SW2 is .106.1 /24 and SW3 is .108.1 /24. The router IP address is .100.1 /24. I need to be able to let SW 1 through 3 occasionally talk to each other and switch 3 needs internet access. There is a fourth network which will also be attached to this router but is not be built right now. My question is should my default gateway be the router IP or should it be the switch IP?

There is a reason for the three subsets mainly dealing with network traffic and separation of networks.

Thanks for your help in advance
September 10, 2013 11:17:40 AM

If these are actually separate subnets and your switches are layer 2...ie they are not routers it can't be done. You must have a device that has interface on all the subnets. Generally the .1 address is the default gateway BUT if the device that has that IP does not also have a connection to another network it will just drop any data.

The more standard design is to put all the gateway addresses on 1 common devices that can act as a router, either a layer 3 switch or a router. Then each switch will get a IP just for management say .254 out of their corresponding subnets.

I do not think you can get it to work if you only have layer 2 switches and your "router" is what you buy at walmart or bestbuy. The things most people call routers are better referred to as gateways. Unlike a true router they will only take a single subnet and map it to a WAN ip.
September 10, 2013 12:47:03 PM

bill001g said:
If these are actually separate subnets and your switches are layer 2...ie they are not routers it can't be done. You must have a device that has interface on all the subnets. Generally the .1 address is the default gateway BUT if the device that has that IP does not also have a connection to another network it will just drop any data.

The more standard design is to put all the gateway addresses on 1 common devices that can act as a router, either a layer 3 switch or a router. Then each switch will get a IP just for management say .254 out of their corresponding subnets.

I do not think you can get it to work if you only have layer 2 switches and your "router" is what you buy at walmart or bestbuy. The things most people call routers are better referred to as gateways. Unlike a true router they will only take a single subnet and map it to a WAN ip.


I should Clarify the equipment is not Walmart stuff, these are enterprise class switches and router which are all capable of Layer 2 and Layer 3. The switches are also managed switches using the IP address previously mentioned. The router will have an interface per subnet - eg - eth0 = 192.168.105.X, eth1 = 192.168.106.X, eth2 = 192.168.107.X. (I am still making the IP address table, but router and switch management is on the 192.168.XXX.1 of there respective subnets)

So in this set up would the router IP of 192.168.100.1 be the gateway for all the switches or would each switches management IP be it's gateway address for the machines on that network? (fyi all machine on the network will/do have static IPs)
Related resources
September 10, 2013 1:23:41 PM

Yes that will work...not the common way but it will work. The gateway for the users will then be 192.168.10?.x for each vlan. You would have to put restrictions in the router to prevent traffic between whatever networks you did not want to have access.

It is a lot more common to give the router all the .1 addresses and use another address say .2 or .254 on each subnet for the switches but you can make it work the way you described if you like.
September 10, 2013 1:31:48 PM

bill001g said:
Yes that will work...not the common way but it will work. The gateway for the users will then be 192.168.10?.x for each vlan. You would have to put restrictions in the router to prevent traffic between whatever networks you did not want to have access.

It is a lot more common to give the router all the .1 addresses and use another address say .2 or .254 on each subnet for the switches but you can make it work the way you described if you like.


So your suggesting giving each subnet the the .1 -eg- 192.168.105.1 as the D Gateway (/address on the router for that port) and then have switch management as 192.168.105.2

Ok I will do it the way you are suggesting, Thank you for your help, I appreciate it.
!