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

l2 switching OR l3 routing..if we found a l2 table entry

sidharsh
Level 1
Level 1

Hi Experts,,,

 

I have a doubt regarding l2/vlan switching..suppose on a port we are recieving a packet (PAK1)and we need to route that packet.

On the first place when we will open l2 header of packet ..suppose we find l2 entry for that DA and we figured out which

particular egress port this packet will go out.  furthermore suppose encoming packet(PAK1) is having a vlan tag of say

vlanid 100 and we have a port that is a member of vlanid 100. Now.

1) Will that packet get switch to egress port coz of l2 entry.

2) Will that packet get switch to egress port coz of vlan switching.

3) Will that packet will be processed further for l3 lookup to check for any l3 processing.

 

Thanks in advance. 

 

 

 

5 Replies 5

Dan Lukes
VIP Alumni
VIP Alumni

You are asking in wrong community. This one have no relationship to the question, thus expect no valuable response.

 

Use blue [ EDIT ] button on top to move it to LAN, Switching and Routing

 

Thanks for  your valuable reply Jon..

 

So you mean to say that if we have l3 switch then we will always do a l3 header lookup..even if we can a vlan forwarding of it at l2 level.

I think on chip level we set a l3 bit which will indicate/decide whether we will go for l3 header lookup or not..

Please provide ur comments..

 

Thanks

Sidharth.

Sidharth

A L3 switch will not always do a L3 lookup because it is also a L2 switch.

So if the sender and receiver are in the same vlan there is no need for the switch to do a L3 lookup ie. it can just use the mac address.

But your original question was about routing a packet which is why I focussed on that.

Jon

Jon Marshall
Hall of Fame
Hall of Fame

It depends on whether the switch is L2 or L3.

If the switch is L2 then the destination mac address will be for a L3 interface on another device reachable via another port on the switch and will be forwarded out of that port assuming -

1) the egress port is in the same vlan as the ingress port

or

2) the egress port is a trunk allowing the vlan that the ingress port was in

If the switch is L3 then the destination mac address will be for one of it's own L3 interfaces (usually an SVI) so it will then do further processing and look into the IP header.

Not sure what you are asking about the vlan tag ?

Jon

Peter Paluch
Cisco Employee
Cisco Employee

Hi Sidharth and Jon,

Please allow me to join.

Sidharth, you always need to keep in mind that if a frame carrying an IP packet should be routed to another network then the sender of this frame would have set the destination MAC address to the MAC address of the gateway. In the case of a multilayer switch, this would be the MAC address of the corresponding interface Vlan. So if a frame with this destination MAC address arrives, the switch will process it locally: It will decapsulate the packet and will do all the routing stuff. If the frame has a different destination MAC address then it is not intended for the multilayer switch, and the switch will perform a normal Layer2 switching for this frame, not caring about the packet inside.

Note that in properly behaved networks, it is not possible to have the MAC address of an interface Vlan also learned on a switchport (and thus be unsure whether the frame shall be processed locally or Layer2-switched). This would mean that a MAC address conflict existed.

Would this make any sense?

Best regards,
Peter