Steve,

        What you are referring to is called Multi-Layered Switching
(MLS).  MLS uses a unicast and multicast cache to keep state information
on flows passing through the layer 3 switch.

The following demonstrates layer 2 and layer 3 lookup end to end.  Take
the following situation:

HostA---Router1---HostB

        HostA and HostB are on separate layer 3 segments.  HostA
attempts to send a packet to HostB.  

        HostA looks in its local ARP cache to see if there is already a
layer 3 to layer 2 mapping for HostB's IP address.  If there is not,
HostA does a logical AND with the destination IP address and the local
subnet mask.  If the result shows that HostB is on HostA's local
network, HostA ARPs for HostB.  Since in this case they are not on the
same subnet, HostA must now resolve the layer 2 address of its default
gateway.  

        HostA now checks its ARP cache for the layer 2 address of
Router1.  If the mapping is already in the cache, HostA does not ARP for
Router1, if the mapping is not already in the cache, HostA ARPs for
Router1.  After the layer 2 address of the gateway is returned, HostA
encapsulates a packet with the destination layer 3 address of HostB, and
the destination layer 2 address of Router1.

        Router1 now receives the packet from HostA destined to HostB.
Router1 does a layer 3 routing lookup for HostB's IP address.  Router1
sees that HostB is directly connected.  Router1 rewrites the layer 2
header of the packet, putting its own layer 2 address as the source, and
HostB's layer 2 address as the destination.  Router1 sends the packet,
and it is received by HostB.

        The above process repeats on a per packet basis.  MLS is meant
to optimize the layer 3 routing lookup phase done on Router1.

        When a packet comes to the MSFC (layer 3 engine), the MLS cache
is checked to see if there is a flow for this packet already cached.  If
the flow does not previously exist, a routing lookup is done, the layer
2 header is rewritten, a new entry in the MLS cache is created, and the
packet is switched.  If there is a preexisting entry in the MLS cache,
the layer 2 header is immediately rewritten without having to do a
routing lookup.  

        The optimization is that the routing lookup is skipped if it was
already previously performed, hence Multi-Layered Switching.


HTH,

Brian McGahan, CCIE #8593
[EMAIL PROTECTED] 

Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-334-8987
Direct: 708-362-1418 (Outside the US and Canada)


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Steven Aiello
Sent: Thursday, September 04, 2003 9:05 AM
To: [EMAIL PROTECTED]
Subject: ??? Layer 2 routing ??? [7:74788]

Ok all I have a question on this subject.  I know routing takes place at

the network layer, and switching takes place at the data link layer 
because it works based on physical addresses.  So how do we get route 
switching?  I've just started my CCNP and we were learning about 
different cache methods to speed up performance, is this how route 
switching is done, is the routing calculation be performed on a per 
packet basis?  I was reading that by default, Cisco routers only perform

a routing calculation on the first packet for a destination network and 
then on less the no route-cache option is set all the rest of the 
packets are really only "switched" to the correct interface.  Am I 
missing something?  I would invision that a router would by default 
perform a lookup for each connection sequence.  does layer 3 routing not

do a look up for each sequence of packet?  Does is look at an address 
and use an "old" pre say route that was cached in memory?  If some one 
can give a good explanation I would greatly appreciate it.

Thanks,
Steve
**Please support GroupStudy by purchasing from the GroupStudy Store:
http://shop.groupstudy.com
FAQ, list archives, and subscription info:
http://www.groupstudy.com/list/cisco.html




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=74809&t=74788
--------------------------------------------------
**Please support GroupStudy by purchasing from the GroupStudy Store:
http://shop.groupstudy.com
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html

Reply via email to