cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1778
Views
5
Helpful
5
Replies

layer2 switch,layer3 switch

sarahr202
Level 5
Level 5

Hi every body

I have a question.

l2sw is layer 2 switch

l3sw is layer 3 switch

h is host

p is port

====================

Let say we have a set up as:

l2sw--trunk------l3sw

l2sw:

p1,p2 are in vlan1,p3,p4 are in vlan2

h1 is connected to p1

h3 is connected to p3

l3sw:

p1,p2 are in vlan1

p3,p4 are in vlan 2

assume there is no entry in mac table.

Let h1 in vlan 1 wants to ping h3 in vlan 2 on l3sw.

Here is my understanding.

1) h1 sends the ping packet to its default gateway which is l3sw( int vlan 1on sw3)

2) l3sw finds a match in its routing table.  But it has to find the mac address of h3 before ping can be forwarded to h3.

Now  will l3sw send the arp broaddcast out on all ports in vlan2 and also trunk connected to l2sw?

thanks and have a good day.

4 Accepted Solutions

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Sarah,

Yes, on L3 switch you have an SVI for vlan 1 and vlan 2 and the link between L2 switch and L3 switch is trunk.  So, yes all the ports in vlan 2 hear the broadcast over the trunk.

HTH

Reza

View solution in original post

bmcginn
Level 3
Level 3

Hi there,

As Reza said, the arp will be sent to ALL ports in VLAN 2.  Assuming port 3 is up on l2sw (and if it isn't, I'm also assuming you don't have VLAN pruning enabled on the trunk) then the arp will be sent over the trunk to l2sw.

This is just a confirmation of what Reza has posted.

Brad

View solution in original post

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hi every body

I have a question.

l2sw is layer 2 switch

l3sw is layer 3 switch

h is host

p is port

====================

Let say we have a set up as:

l2sw--trunk------l3sw

l2sw:

p1,p2 are in vlan1,p3,p4 are in vlan2

h1 is connected to p1

h3 is connected to p3

l3sw:

p1,p2 are in vlan1

p3,p4 are in vlan 2

assume there is no entry in mac table.

Let h1 in vlan 1 wants to ping h3 in vlan 2 on l3sw.

Here is my understanding.

1) h1 sends the ping packet to its default gateway which is l3sw( int vlan 1on sw3)

2) l3sw finds a match in its routing table.  But it has to find the mac address of h3 before ping can be forwarded to h3.

Now  will l3sw send the arp broaddcast out on all ports in vlan2 and also trunk connected to l2sw?

thanks and have a good day.

Hi Sarah,

If a switch does not have record of the destination MAC address in its table then it is going to flood all of the switchports with the frame except for the port that it originally came in on,so no matter as the mac is unknown to l3 it will think that mac is either from any of the vlans configured so it will flood the request to all available ports irrespective of vlan.

Hope to Help !!

Ganesh.H

View solution in original post

sarahr202 wrote:

Thanks Ganesh.

My understanding is  a layer 3 switch  is just switch with layer2+layer3 (routing)  functionality

The whole purpose of vlan besides others is to control the unnecessary broadcast in the network. So with vlan we achieve this purpose by containing the broadcast within the same vlan the broadcast originated. In our case, when l3sw receives the ping packet from h1, layer3 switch performs look up and finds out this packet has to be delivered to h3 whose ip  mac address is unknowns and h3 must exist on vlan2. How does l3sw find that out?  by looking at destination ip and concluding h3's ip is on the same subnet/network as its intvlan2.  so l3 sw will broadcast the arp request on ports which are in vlan2 not all all ports in other vlans.

Thanks and have a great day.

Sarah

Correct, the L3 switch uses the IP address to work out which vlan the packet is meant to be sent to and then will arp out within that vlan only.

A L3 switch is as you say a switch with L2 and L3 forwarding capabilities so when a L3 switch forwards packets between subnets it is really acting as a router, only real difference being the packets are hardware switched as opposed to software switched.

Jon

View solution in original post

5 Replies 5

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Sarah,

Yes, on L3 switch you have an SVI for vlan 1 and vlan 2 and the link between L2 switch and L3 switch is trunk.  So, yes all the ports in vlan 2 hear the broadcast over the trunk.

HTH

Reza

bmcginn
Level 3
Level 3

Hi there,

As Reza said, the arp will be sent to ALL ports in VLAN 2.  Assuming port 3 is up on l2sw (and if it isn't, I'm also assuming you don't have VLAN pruning enabled on the trunk) then the arp will be sent over the trunk to l2sw.

This is just a confirmation of what Reza has posted.

Brad

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hi every body

I have a question.

l2sw is layer 2 switch

l3sw is layer 3 switch

h is host

p is port

====================

Let say we have a set up as:

l2sw--trunk------l3sw

l2sw:

p1,p2 are in vlan1,p3,p4 are in vlan2

h1 is connected to p1

h3 is connected to p3

l3sw:

p1,p2 are in vlan1

p3,p4 are in vlan 2

assume there is no entry in mac table.

Let h1 in vlan 1 wants to ping h3 in vlan 2 on l3sw.

Here is my understanding.

1) h1 sends the ping packet to its default gateway which is l3sw( int vlan 1on sw3)

2) l3sw finds a match in its routing table.  But it has to find the mac address of h3 before ping can be forwarded to h3.

Now  will l3sw send the arp broaddcast out on all ports in vlan2 and also trunk connected to l2sw?

thanks and have a good day.

Hi Sarah,

If a switch does not have record of the destination MAC address in its table then it is going to flood all of the switchports with the frame except for the port that it originally came in on,so no matter as the mac is unknown to l3 it will think that mac is either from any of the vlans configured so it will flood the request to all available ports irrespective of vlan.

Hope to Help !!

Ganesh.H

Thanks Ganesh.

My understanding is  a layer 3 switch  is just switch with layer2+layer3 (routing)  functionality

The whole purpose of vlan besides others is to control the unnecessary broadcast in the network. So with vlan we achieve this purpose by containing the broadcast within the same vlan the broadcast originated. In our case, when l3sw receives the ping packet from h1, layer3 switch performs look up and finds out this packet has to be delivered to h3 whose ip  mac address is unknowns and h3 must exist on vlan2. How does l3sw find that out?  by looking at destination ip and concluding h3's ip is on the same subnet/network as its intvlan2.  so l3 sw will broadcast the arp request on ports which are in vlan2 not all all ports in other vlans.

Thanks and have a great day.

sarahr202 wrote:

Thanks Ganesh.

My understanding is  a layer 3 switch  is just switch with layer2+layer3 (routing)  functionality

The whole purpose of vlan besides others is to control the unnecessary broadcast in the network. So with vlan we achieve this purpose by containing the broadcast within the same vlan the broadcast originated. In our case, when l3sw receives the ping packet from h1, layer3 switch performs look up and finds out this packet has to be delivered to h3 whose ip  mac address is unknowns and h3 must exist on vlan2. How does l3sw find that out?  by looking at destination ip and concluding h3's ip is on the same subnet/network as its intvlan2.  so l3 sw will broadcast the arp request on ports which are in vlan2 not all all ports in other vlans.

Thanks and have a great day.

Sarah

Correct, the L3 switch uses the IP address to work out which vlan the packet is meant to be sent to and then will arp out within that vlan only.

A L3 switch is as you say a switch with L2 and L3 forwarding capabilities so when a L3 switch forwards packets between subnets it is really acting as a router, only real difference being the packets are hardware switched as opposed to software switched.

Jon

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: