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

Packet Routing on Layer 2 and Layer 3 devices

inamprix1
Level 1
Level 1

Please see a Brief routing on the Layer 2 and Layer 3 below:

1) Layer 3 device ( Routers/ Layer 3 switches)

  • Packet generated from within the router (lets say icmp) or reaching the router through any ingress queue are routed based on the Routing table of that device which might have information from:
            • Connected routes
            • Dynamic routing 
            • Manual routes configured

2) Layer 2 Device (L 2 switches)

  • Layer 2 devices limit packet analysis to Mac address or Any layer 2 addressing and Vlans. For Packet to reach proper destination its our responsibility to associate a vlan with a proper Layer 3 addressing like IP subnets. 
  • A virtual interface on the Layer 2 switch does give the switch a clue what vlan a subnet is associated with. (its a layer 3 capability ?). This is limited to connected vlans/subnets.

If all above is correct my question is:

When we ping from a Layer 2 switch how the packet will be routed?

  • Does it need the related vlan interface to be assigned a proper ip address for this to work?

1 Reply 1

Paul Chapman
Level 4
Level 4

Hi -

On a L2 switch, like a Catalyst 2960X, the switch works like an network endpoint host for the purposes of remote management.  If you have 50 VLANs on your network and one of them is for network management, then the SVI (VLAN interface) allows you to apply the correct 802.1q tag to your management traffic.  To allow the device to talk to other subnets we use the "ip default-gateway <w.x.y.z>" command because routing commands are not permitted/functional in L2-only mode.

If you create multiple SVIs, you will see that the L2 switch is still just an endpoint device in each of the networks it has interfaces in, but it does not actually forward packets between the interfaces.

PSC

Review Cisco Networking for a $25 gift card