default gateways again

aloisalois Member Posts: 29 ■□□□□□□□□□
sorry guys, but i need to ask about gateway again.
icon_wink.gif
if i have one router trunk to switch (router on stick) with more vlans, and more switches, what will be a default gateway for that switches? will be on every switch the same one? i know that every vlan must be on different subnet, but on which from this subnets will be a router´s trunk port? i am not sure, if will be on same subnet as one vlan, or not.
thanx a lot
hope my quest. makes a sense...

Comments

  • agustinchernitskyagustinchernitsky Member Posts: 299
    Hello... if you use VLAN trunking, on the router, you have to add one virtual interface with an IP per interface to performe the inter-vlan routing...

    Look at this page: http://www.lanarchitect.net/Articles/VLANTrunking/Implementation/
  • Danman32Danman32 Member Posts: 1,243
    The purpose of a gateway or even an IP on a switch is to be able to manage the switch as a host, not to route frames. Remember, a switch works at the data link level of the OSI model, not the network level (unless of course it is a level 3 switch, in which case it is also a router). However, like any other intelligent network device, a managed switch has the upper layers but only to control and manage the processing of the layer 2 frames. VLANs make a switch behave like multiple switches, all of which would be on separate segments. Trunking combines all the VLANs to one port that is connected to a router so that the router can route between the different vlans. A simplification of this would be thinking of one switch per vlan supporting a separate network segment that also happens to have a separate subnet, with a router connected to each of the VLAN switches to route between the different VLAN switches. As far as the switch is concerned though, it is only managing ethernet frames, nothing more. However, to configure the switch remotely, you still have to telnet to it, which means it needs an IP address, and if you are telnetting from a different IP subnet, it needs a default gateway to be able to send out telnet response packets to you. If you were to only use the console port to manage the switch, or only to telnet to it from the same subnet as the IP of the switch, it would not need a default gateway.

    Don't feel too bad though about getting confused. I too sometimes forget that VLANs are layer 2 segments, and that switches can't route between VLANs by themselves if they are not configured as layer 3 switches. And I really do understand this stuff.
  • aloisalois Member Posts: 29 ■□□□□□□□□□
    thanx guys for excellent advises.
    :D
  • Danman32Danman32 Member Posts: 1,243
    Another area that I often get a Doh! is setting up routing from a host out to the internet through a few routers, relying on default gateways all the way, but forgetting to configure how the response packet from the internet is going to make its way back to the initiating host. If at least 2 routers are connected one behind the other, the 'front' router(s) have to have explicit routes to the networks behind the routers behind the front router.
Sign In or Register to comment.