Официален блог на WebEKM EKM очаквайте сайта онлайн скоро.

Download Free Templates http://bigtheme.net/ free full Wordpress, Joomla, Mgento - premium themes.

Cisco Express Forwarding feature
let’s make routing so fast as switching !

cef switch smallSince routers and multilayer switches use Cisco Express Forwarding feature, the true that switches are much more faster than routers is not a true anymore. Nowadays routers can make decision with the wirespeed likely switches with ASICS. What is CEF, how works and how helps out the routers in packets routing ?



CEF stands for Cisco Express Forwarding.
In order to explain how CEF works on routers let’s recall how switching works at layer 2. When switch gets a frame, immidiately puts source mac address into CAM table and binds its with a port that a frame has came from. Then switch forwards the frame to the correct interface, which is bound with the destination MAC address of the frame. If switch doesn’t have a clue where to forward the frame then the frame will be flooded to all ports except the port that the frame came from. When switch gets the reply, then fills in its MAC table with correct port number. This is how frames switching works.

Regarding packets routing, the multilayer switch has much more to do, to send the packet to the correct interface.When multilayer switch or router gets the packet this is what happens. Firstly switch checks ARP table if there is layer 2 to layer 3 mapping, if not, then sends ARP request (flooded) with inquiry who does the destination ip address belong to? When it gets the reply, then the destination MAC address is being changed to the MAC address of the target and source MAC address of the packet is being changed to MAC address of the outgoing multilayer switch interface. Of course the checksum of the packet has to be recalculated and TTL is being decreased by 1.

Control Plane and Data Plane
Duties separation is called “Planes”. There is management plane that is responsible for router and switch management, serial, telnet and ssh session etc.The management plane has nothing to do with CEF I only mention that exists. Control plane is responsible for building routing table and keeping ARP table, the Data Plane is responsible only for packet forwarding, so as you may suppose necessity of using both planes is more involver then using only Data Plane for packet forwarding.

Recursive Lookup

Let’s have a look on the below routing example.

cef lab

cefrt
 

Now if we look into the routing table we will notice that both entries are in routing table
When R1 has to send packet to 1.1.1.0/24 network then will find in its routing table entry, that for network 1.1.1.0 next hop is 10.0.0.40. But 10.0.0.0 is not directly connected network, so router has to check how to get to 10.0.0.0. This is called recursive lookup,  because the router has to check twice how to get to destination. Everytime the router has to send packet to the network that is not directly connected has to do recursive lookup, this is why routing is slower than switching. Of course it was the example without CEF running

CEF

Ok, so how CEF is involved in faster packets forwarding? CEF uses information from control plane to build hardware tables. Router will use the routing table to build FIB – Forwarding Information Base and ARP table to build the adjency table. Now, when we have run “ip cef” command then in the routing table we will se next hop address for network 1.1.1.0/24 as 192.168.1.20. We may also check FIB table by command “show ip cef” where we notice for prefix 1.1.1.0/24 next hop adress is 192.168.1.20 via interface fa0/0. CEF is meaningful when we deploy MPLS and fortunate you don’t have to do anything in order to use CEF because is being run automatically on Cisco gears.

cef2
 

cef table

Onlain bookmaker bet365.com - the best bokie

Menu