layer 3 switching : CEF and MLS

Answered Question
Apr 26th, 2012
User Badges:
  • Bronze, 100 points or more

Hi everybody.


I have few questions:


MLS:


h1-----------------------( Layer 3 switch) f1/2-------------h2


h1 1.1.1.1----mac1 ( vlan1, default gateway 1.1.1.2, mac3)

h2  2.2.2.2 --mac2 ( vlan2,)


let say we configure the mls switching on layer 3 switch

Flow is configured as only destination

h1 sends first packet to h2.

layer 3 switch builds an entry in route cache as


2.2.2.2       mac2      egress port f1/2


Let say h1 sends another packet to h2.


layer 3 switch receives the packet and compare the destination ip against the entries in cache. Layer 3 switch finds a match and and concludes this  packet will be switched in hardware. L3 switching engine will rewrite the destination mac as mac2, what about source mac address? will layer 3 switching engine  leave the source address as mac1 which is the mac address of h1.

=========================================================


CEF:

In MLS, route cache also contains Egree port. However in CEF, we don't see any egress port  entry in adjacency table. My question is will it not improve performance if adjacency table also lists egress port  because it will  eliminate the need to perform mac address look up.?






thanks .

Correct Answer by Giuseppe Larosa about 5 years 3 months ago

Hello Sarah,

I hope you are well.


1) packet rewrite changes source MAC address too to the one associated to the L3 interface of VLAN2 broadcast domain. To be noted many switching platforms are able to use a single MAC address as source for all locally defined SVI interfaces so the same MAC address is learned in different L2 VLANs with no issues for ternary CAM tables.

Also in CEF based MLS the entry exists even before the first packet of the flow (h1,h2) is seen because with CEF the various tables are built based on topology (topology driven) so even the first packet of the flow would be hardware switched (if the multilayer switch has the ARP table and CAM tables populated otherwise an ARP request for H2 IP address is sent on vlan2 and the first packet is held in a buffer waiting for ARP resolution).


2) good observation however it could simply be a problem of visualization on the show output: I mean internally the various tables related to CEF activity are used efficiently.

It may be related to the fact that the adjacency table has L3 info only showed to us. To be noted L3 operation is kept separated from L2 operation.


Hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Giuseppe Larosa Fri, 04/27/2012 - 06:15
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sarah,

I hope you are well.


1) packet rewrite changes source MAC address too to the one associated to the L3 interface of VLAN2 broadcast domain. To be noted many switching platforms are able to use a single MAC address as source for all locally defined SVI interfaces so the same MAC address is learned in different L2 VLANs with no issues for ternary CAM tables.

Also in CEF based MLS the entry exists even before the first packet of the flow (h1,h2) is seen because with CEF the various tables are built based on topology (topology driven) so even the first packet of the flow would be hardware switched (if the multilayer switch has the ARP table and CAM tables populated otherwise an ARP request for H2 IP address is sent on vlan2 and the first packet is held in a buffer waiting for ARP resolution).


2) good observation however it could simply be a problem of visualization on the show output: I mean internally the various tables related to CEF activity are used efficiently.

It may be related to the fact that the adjacency table has L3 info only showed to us. To be noted L3 operation is kept separated from L2 operation.


Hope to help

Giuseppe

sarahr202 Fri, 04/27/2012 - 18:14
User Badges:
  • Bronze, 100 points or more

Thanks Giuseppe.

Long time no see, How have you been?


I am sorry ; I am confused.


In MLS( not cef), we have cache on data plane which stores egress port among others things( dest ip, mac ip). 



." To be noted L3 operation is kept separated from L2 operation."


I assume by " layer 2 operation mean" you mean mac- address - table's look- up    My question is if we have all the relevant information required  such as destination ip, destination mac and egress port,then switch should be able to perform layer 3 switching without even bothering with mac- address- table's look up.





"good observation however it could simply be a problem of  visualization on the show output: I mean internally the various tables  related to CEF activity are used efficiently.

It may be related to the fact that the adjacency table has L3 info only showed to us."


Does it mean the adjacency table could have egress port but it is not shown in the output?



thanks and have a nice weekend.

Actions

This Discussion

Related Content