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

Packet flow in switch and router

tarun_cisco
Level 1
Level 1

Hi there,

Can someone please explain answer to the question:

What is difference between packet flow in a switch and router.

Please note difference asked is about specifically packet flow in two devices.

Sent from Cisco Technical Support iPhone App

5 Replies 5

fabios
Level 1
Level 1

Tarun,

your question is not very specific, anyhow I will give it a try.

Packet is a layer 3 data unit and therefore it is transparent to a layer 2 device like a switch.

The layer 2 data unit is called frame.

A layer 3 device makes its forwarding decision based on layer 3 address in the packet header and depending on technology a packet can be CEF forwarded, fast switched or processor routed.

A layer 2 device (switch) makes its forwading decision based on MAC address and usually is hardware based.

Fabio

(pls rate useful content)

tarun_cisco
Level 1
Level 1

Thanks very much.

Can it be said that layer 2 switch does not process packet and only frame?

Whereas layer 3 switch has the ability to process both?

Sent from Cisco Technical Support iPhone App

The answer is a bit more complicated than a simple yes or not but generally yes.

A layer 2 non managed switch has no layer 3 capabilities at all so cannot dive into the frame payload. A managed laye2 switch has to have the capability to look into layer 3 information to asses if the frame/packet is addresses to it and act upon the content.

A (pure) layer 3 device has no capability of switching frames. It has to decapsulate them, pass the resulting packet (payload of frame) to the routing process, re-encapsulate the modified packet into the frame of the outgoing interface.

Nowadays all Cisco routers  implement IRB (Integrated Routing and Bridging) which allows the administrator to configure a bridge group made up of multiple interface and the router acts like a bridge (layer 2 device) switching frames between them.

Fabio

(pls rate useful content)

tarun_cisco
Level 1
Level 1

Thnks very much once again for detailed explanation ...

Regards,

Tarun

Sent from Cisco Technical Support iPhone App

one improtant thing is to be aware of is Cisco CEF

first, Process switching requires the CPU to be involved with every forwarding decision.

Fast switching still uses the CPU, but after a packet has been forwarded, information about how to reach the destination is stored in a fast-switching cache.  This way, when another packet going to the same destination is seen, the next hop information can be re-used from the cache, so the processor doesn’t have to look up and assemble all the information again.  If the information is not cached, (for example a first packet for a given destination network) the CPU will have a similar workload, for that packet, as if fast switching was not in use.

Cisco Express Forwarding (CEF), is the evolution of optimizing the router to make it be able to forward more packets faster.  CEF cheats a little, by building a Forwarding Information Base (FIB), and an adjacency table.  The FIB is accessed very quickly based on how they built it (it is Cisco proprietary), and contains pre-computed reverse lookups, next hop information for routes including the interface and L2 information to use.  a router has to consider all this for forwarding a packet !

HTH

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: