Wednesday, December 3, 2008

CEF ျပသနာ


ဒီျပသနာၾကဳံတာ ဒီလထဲမွာ အနည္းဆုံး ၃ ခါရွိျပီ။ Cisco layer-3 switch ေတြမွာ CEF နဲ႔ MLS ကုိသုံးရင္ (default is on) CEF ဇယား ၂ ခုေဆာက္ရတယ္။ တစ္ခုက Hardware table ျဖစ္ျပီး၊ တစ္ခုက Software table ျဖစ္ပါတယ္။ ဒီဇယားႏွစ္ခုက Packet တစ္ခု ဘယ္ကုိသြားခ်င္ရင္ ဘယ္ကတဆင့္သြားမယ္ဆုိတာ ဆုံးျဖတ္တာျဖစ္တယ္။ တနည္းေျပာရင္ Source နဲ႔ destination address ကုိသိရင္ next hop address ကုိဆုံးျဖတ္တာေပါ့။ အဲဒီ Hardware table နဲ႔ Software table သေဘာမတူၾကေတာ့အခါ ျပသနာ မ်ဳိးစံု တက္ေတာ့တာပါဘဲ။

ဒီဥပမာမွာ Source address (10.50.16.11) ကေန destination address (10.100.6.1) နဲ႔ (10.100.6.2) ကုိသြားတဲ့လမ္းေၾကာင္းကုိမွတ္ထားတဲ့ hardware table နဲ႔ software table သေဘာမတူျဖစ္ေနတာကုိ ေတြ႔ပါလိမ့္မယ္။

switch က Cisco 6500 Supervisor-720 ျဖစ္ပါတယ္။

့hardware cef entry ကုိၾကည့္ဖုိ႔ command - "show mls cef exact-route "
software cef entry ကုိၾကည့္ဖုိ႔ command - "show ip cef exact-route "

"show ip route" မွာေရာ၊ software cef table မွာပါ next-hop က 10.50.252.26 လုိ႔ေျပာျပီး - hardware cef table မွာေတာ့ 10.100.6.2 အတြက္ nexthop က 10.50.252.38 လုိ႔ ေျပာပါတယ္။ တကယ္တန္း packet က hardware cef table ကေျပာတဲ့ လမ္းေၾကာင္းအတုိင္းသြားပါတယ္။



lab-router#sh ip route 10.100.6.1
Routing entry for 10.100.6.0/24
Known via "bgp 65050", distance 200, metric 0
Tag 65005, type internal
Last update from 10.22.1.57 03:50:24 ago
Routing Descriptor Blocks:
* 10.22.1.57, from 10.50.252.26, 03:50:24 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65005

lab-router#sh ip route 10.100.6.2
Routing entry for 10.100.6.0/24
Known via "bgp 65050", distance 200, metric 0
Tag 65005, type internal
Last update from 10.22.1.57 03:50:26 ago
Routing Descriptor Blocks:
* 10.22.1.57, from 10.50.252.26, 03:50:26 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65005


lab-router#
lab-router#show ip cef exact-route 10.50.16.11 10.100.6.0
10.50.16.11 -> 10.100.6.1 : GigabitEthernet6/1 (next hop 10.50.252.26)
lab-router#show ip cef exact-route 10.50.16.11 10.100.6.1
10.50.16.11 -> 10.100.6.2 : GigabitEthernet6/1 (next hop 10.50.252.26)
lab-router#

lab-router#show mls cef exact-route 10.50.16.11 10.100.6.1
Interface: Gi6/25, Next Hop: 10.50.252.38, Vlan: 1020, Destination Mac:
0022.55e6.66d1
lab-router#show mls cef exact-route 10.50.16.11 10.100.6.2
Interface: Gi6/1, Next Hop: 10.50.252.26, Vlan: 1018, Destination Mac:
0022.55e6.67f1
lab-router#



ဒီျပသနာကုိ Cisco website မွာ ဒီမွာရွင္းျပထားေပမဲ့ ေရးထားကတလြဲျဖစ္ေနပါတယ္။
အမွန္ကေတာ့ ေအာက္ကစာပုိဒ္အတုိင္းျဖစ္သင့္တယ္လုိ႔ထင္ပါတယ္။ ေနာက္ဆုံးစာေၾကာင္းက မွားေနတာပါ။


Difference Between IP CEF and MLS CEF 

The output of show mls cef exact-route source-ip address dest-ip address and
show ip cef exact-route source-address dest-ip address is different because the
packets are software switched when IP CEF is used, and the packets are
hardware switched when MLS CEF is used. Because most of the packets are
hardware switched, the best command to view the next-hop to reach a destination
is show mls cef exact-route source-ip address dest-ip address .





Post a Comment