Tuesday, November 11, 2008

Difference Between Optimum , Fast and CEF Switching

With reference to my last post on Interrupt Context Switching Vs Process Switching; I am explaining more on to the Interrupt Context Switching Mechanism which is being used by Fast Switching, Optimum Switching & CEF Switching. All the three mentioned switching techniques uses the cache. So you can see how the cache is used by the switching methods and becasue of that cache fact it is said that cisco uses interrupt context switching.

Fast Switching
Fast switching stores the forwarding information and MAC header rewrite string using a binary tree for quick lookup and reference. In Fast Switching, the reachability information is indicated by the existence of a node on the binary tree for the destination of the packet. The MAC header and outbound interface for each destination are stored as part of the node's information within the tree. The binary tree can actually have 32 levels. In order to search a binary tree, you simply start from the left (with the most significant digit) in the (binary) number you are looking for, and branch right or left in the tree based on that number. For instance, if you are looking for the information related to the number 4 in this tree, you would begin by branching right, because the first binary digit is 1. You would follow the tree down, comparing the next digit in the (binary) number, until you reach the end.

Optimum Switching
Optimum switching stores the forwarding information and the MAC header rewrite information in a 256 way multiway tree (256 way mtree). Using an mtree reduces the number of steps which must be taken when looking up a prefix. Each octet is used to determine which of the 256 branches to take at each level of the tree, which means there are, at most, 4 lookups involved in finding any destination. For shorter prefix lengths, only one−three lookups may be required. The MAC header rewrite and output interface information are stored as part of the tree node.

CEF (Cisco Express Forwarding) Switching
Cisco Express Forwarding also uses a 256 way data structure to store forwarding and MAC header rewrite information, but it does not use a tree. Cisco Express Forwarding uses a trie, which means the actual information being searched for is not in the data structure; instead, the data is stored in a separate data structure, and the trie simply points to it. In other words, rather than storing the outbound interface and MAC header rewrite within the tree itself, Cisco Express Forwarding stores this information in a separate data structure called the adjacency table.


regards
shivlu jain
Click Here To Read Rest Of The Post...

Monday, November 10, 2008

Interrupt Context Switching Vs Process Switching

Process Switching
Process switching is the default switching technique used by all cisco routers and ios. According to process switching when the packet comes from media to the interface it will check the following steps given below:-
1) Check the destination address in the routing table.
2) Look for the recursive lookup or find the directly connected outgoing interface.
3) Mac rewrite for the next hop.
For every packet the same steps need to be followed which actually involves the cpu and lot of processing consequence diminish in performance.

Interrupt Context Switching
This is also switching technique used by many cisco routers and ios. According to interrupt context switching a cache is maintained which stores the information of packet which comes first. After that if it finds the same packet credentials then instead of going to the processor it will go to the cache. From cache it gets it all the requirements and forwards the packet towards the destination. That’s why it is called fast switching; optimum switching and cef switching all are using interrupt context switching.
Difference between process and interrupt context switching
1) A cache is maintained in the interrupt context switching where as in process switching it follows all the steps mention above.
2) Interrupt context switching is faster that process switching.
3) Interrupt context switching uses destination based load balancing whereas process switching uses per packet based load balancing.

regards
shivlu jain
Click Here To Read Rest Of The Post...

Saturday, November 8, 2008

Why OSPF VPNv4 Routes Look As External Routes Instead Of Inter Area Routes - Problem Solved With Domain-ID

In my post Why ospf vpnv4 routes look as external route explained that the problem can be overcome by changing the ospf instance id across all instances. But the same can be acheived by changing the domain-id also under ospf vrf instance. In MPLS enviornment the recieving PE will match the packets on the basics of domain id. If the domain id is different then PE thinks the packets are coming from the other domain and treats them as external routes which can be seen at customer end side. So by changing the domain id same on both PE it treats the packets are coming from its own domain and delivers them as inter area routes.

Download the full document with domain-id implementation


regards
shivlu jain
Click Here To Read Rest Of The Post...