Skip to main content

Help with IP addresses on switches

More
13 years 1 week ago #36751 by Arani
Replied by Arani on topic Gateway
Hi

Your gateway should always be a router. So set your gateway IP address on your router.

This is what your network should be ideally



ROUTER<
>SWITCH<
>HOSTS



Cheers

Picking pebbles on the shore of the networking ocean
More
13 years 4 days ago #36788 by Bublitz
The hosts should not "always" be the router. If you have a very simple network with no vlans then yes it should be the routers. If you are doing intervlan routing then no. Setting the gateway as your router will create an unnecessary "hop".

Example

Lets say a network is setup so each department has their own vlan.

I work in HR and I need to grab a report from accounting.

So lets ping the server and follow the path taken.

PC -> Switch -> Router-> Switch -> Server -> switch -> Router -> Switch -> PC

Now with the layer 3 switch as the gateway.

PC -> Switch -> Server -> Switch -> PC

Having the router as the gateway creates many extra hops. Which slows the process down and creates unneeded work for the routers. One of the purposes of layer 3 switching is to prevent this. I would also like to add the router in the above example would need an interface for every single vlan for example 1 to even be possible. Unless of course your going to be doing router on a stick were you create a bunch of virtual interfaces for each vlan created which would add unnecessary configuration.

You then have your layer 3 switches use you router as a gateway. So if you aren't trying to ping an internal network but an external network one THEN the packet will go to the router to be sent to the external network.

So if you plan on not ever having vlans use the router. If you are going to use vlans and intervlan routing use your core switch(switches for redundancy with VRRP in my case) as the gateway thats what they were created for.

The Bublitz
Systems Admin
Hospice of the Red River Valley
Time to create page: 0.139 seconds