Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have answered some questions and have gotten answers for my questions. Anywhere you can do this on one page helps tremendously..."

Geography

Where in the world do Tek-Tips members come from?

Inter VLAN Routing with a mix of Layer 2 and Layer 3 Switches

beatdown (TechnicalUser)
28 Jun 12 14:57
Hi all,

I've got a basic Layer 3 switching question here...

I have three switches in the network - two of them are layer 2 switches, and one is a layer 3 switch. We have two VLAN's.

I know that you can use a layer 3 switch to do the inter VLAN routing (as opposed to router on a stick), but what I'm confused about is whether all your switches have to be layer 3, or if only one of them has to be layer 3?

So if a VLAN 1 device that is connected to one of the layer 2 switches needs to communicate with a VLAN 2 device, how will it route the traffic through the layer 3 switch?

I'm not understanding how this would work, given that each devices default gateway is our firewall, not the layer 3 switch.

Thanks to anyone who can help explain this to me!
baddos (MIS)
28 Jun 12 17:07
You only need one layer 3 switch or router to do your routing. Your layer 2 switches will have uplink ports (trunks) that will pass the layer 2 frames to it's connecting switch and/or router. As long as the vlan traffic flows through your trunks properly, the router will be able to route them properly.

So for example image that SW1 is a layer 2 switch and SW2 is a layer 3 switch:

SW1 <--------> SW2 (Layer 3)

Ports on SW1:
int fa0/1
switchport access vlan 1
int fa0/2
switchport access vlan 2
int fa0/24
switchport mode trunk

SVIs on SW2:
int Vlan1
ip address 1.1.1.1 255.255.255.0
int Vlan2
ip address 2.2.2.2 255.255.255.0

Assuming host 1 and 2 use the layer 3 switch as their default gateway:
In order for the host plugged into port 1 to ping a host plugged into port 2, it's traffic will traverse the trunk to the layer 3 switch SW2. SW2 will forward (route) the packet to vlan 2 which will then traverse back down the trunk to SW1 and exit port fa0/2.
allworxguy (Vendor)
6 Jul 12 16:48
You will have to assign the default-gateway to the layer 2 switch as well so that it knows to send the traffic out the trunk.

Marv
www.telemarv.ca

baddos (MIS)
6 Jul 12 17:25
No you don't, the layer 2 switch does not make any layer 3 decisions. The trunk determination will be made based upon spanning tree and mac address table on a per vlan basis.
chieftan (MIS)
9 Jul 12 10:44
No Gateway is required on a layer 2 switch.

The dot1q trunk will handle all the traffic not designated for the access ports. It will add it's 4 byte tag to the front of the packet that carries the ID and the far end ingress removes the tag for egress into the switch and then egress out of the designated ports, or re-tag for another trunk.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close