RE: ??? Layer 2 routing ??? [7:74788]
I'm sure this HAS to be somewhere on Cisco's web site, but a brief general explanation is this: Cisco, and most other vendor's hardware now-adays, has ASIC chips that inspect ingress traffic coming into the switch. It also has a shared memory buffer that it stores cached route-switch information. This information generally contains all of the information necessary, in the proper format, that the ASIC needs to re-write the packet on the outbound interface (which is usually part of the cached information). If a new flow is being established, there obviously won't be any information in the cache on how to re-write that packet in hardware (ASIC). So, the switch has to send the packet to the routing engine to have it layer-3 routed. The router makes the usual routing decisions, and stores the information necessary for the ASIC to handle future packets between this source-destination pair in the shared memory cache. Any future packets are handled in hardware by the ASIC, and don't need to go back to the route engine. The specific architecture obviously depends on what specific hardware you are talking about. Fred Reimer - CCNA Eclipsys Corporation, 200 Ashford Center North, Atlanta, GA 30338 Phone: 404-847-5177 Cell: 770-490-3071 Pager: 888-260-2050 NOTICE; This email contains confidential or proprietary information which may be legally privileged. It is intended only for the named recipient(s). If an addressing or transmission error has misdirected the email, please notify the author by replying to this message. If you are not the named recipient, you are not authorized to use, disclose, distribute, copy, print or rely on this email, and should immediately delete it from your computer. -Original Message- From: Steven Aiello [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 10: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=7i=74797t=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
RE: ??? Layer 2 routing ??? [7:74788]
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=7i=74809t=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
RE: ??? Layer 2 routing ??? [7:74788]
Steven, as Fred and Brian alluded to, some of the Cisco routers use hardware acceleration to speed up the packet switching. I suspect however that your question was a more generic one, so I would suggest that you check this out: http://www.cisco.com/en/US/tech/tk827/tk831/technologies_white_paper09186a00800a62d9.shtml I will also note that understanding the place of MLS might be a bit difficult without knowning the (rather horrifying :) details of the Catalyst architecture and its development history. It might help maintain your mental balance if you first gain a good understanding of how a router is supposed to work, and only then take a look at what the Catalyst is doing. :))) Thanks, Zsombor Steven Aiello wrote: 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 Message Posted at: http://www.groupstudy.com/form/read.php?f=7i=74819t=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