<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-15945726</id><updated>2012-02-16T13:06:22.656-05:00</updated><category term='OSPF'/><category term='Hacks-n-tricks'/><category term='Netscreen'/><category term='Cisco'/><category term='Network management'/><category term='Nagios'/><category term='Certification'/><category term='Monitoring'/><category term='Linux'/><category term='Troubleshooting'/><category term='BGP'/><category term='IPv6 routing'/><title type='text'>Val(config)#</title><subtitle type='html'>Musings about various system administration and network projects I am working on.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default?start-index=26&amp;max-results=25'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-15945726.post-6555139588893009966</id><published>2012-02-04T14:25:00.002-05:00</published><updated>2012-02-04T14:25:58.153-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>ip accounting-list</title><content type='html'>Cisco has interface level command "&lt;b&gt;ip accounting&lt;/b&gt;" which records number of bytes and packets passed through the router. If you want to count traffic only for specific IP address, you need to use "&lt;b&gt;ip accounting-list&lt;/b&gt;" command. There seems to be a tiny bug in context help in 12.4(15)T14:&lt;br /&gt;&lt;br /&gt;R2(config)#ip accounting-list 1.1.1.1 ?&lt;br /&gt;&amp;nbsp; A.B.C.D &amp;nbsp;IP address mask&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that context help says you need to enter address mask.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R2(config)#ip accounting-list 1.1.1.1 255.255.255.255&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After checking&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;R2(config)#do sho run | i accounting&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;ip accounting-list 0.0.0.0 255.255.255.255&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;That's not what I entered.&lt;a href="http://www.cisco.com/en/US/docs/ios/ipapp/command/reference/iap_i1.html#wp1109911"&gt; In reality, you are supposed&lt;/a&gt; to enter wildcard mask, which makes more sense. Specifying ACL number or name would have made even more sense. So, let's fix it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;R2(config)#no ip accounting-list 0.0.0.0 255.255.255.255&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R2(config)#ip accounting-list 1.1.1.1 0.0.0.0&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R2(config)#interface fa 0/0&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R2(config-if)#ip accounting&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and test it. Traffic from R3 to 192.168.12.1 and 1.1.1.1 must pass through R2's Fa0/0 interface:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;R3#ping 192.168.12.1&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Type escape sequence to abort.&lt;/div&gt;&lt;div&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:&lt;/div&gt;&lt;div&gt;!!!!!&lt;/div&gt;&lt;div&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 28/58/120 ms&lt;/div&gt;&lt;div&gt;&lt;b&gt;R3#ping 1.1.1.1&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Type escape sequence to abort.&lt;/div&gt;&lt;div&gt;Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:&lt;/div&gt;&lt;div&gt;!!!!!&lt;/div&gt;&lt;div&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 16/47/88 ms&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;R2#sho ip account&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;Source &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Destination &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Packets &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Bytes&lt;/div&gt;&lt;div&gt;&amp;nbsp;192.168.23.3 &amp;nbsp; &amp;nbsp; 1.1.1.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 500&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you can see from the output above, only pings to 1.1.1.1 got counted.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-6555139588893009966?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/6555139588893009966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2012/02/ip-accounting-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/6555139588893009966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/6555139588893009966'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2012/02/ip-accounting-list.html' title='ip accounting-list'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-336112636655773135</id><published>2012-01-14T15:18:00.000-05:00</published><updated>2012-01-14T15:18:25.854-05:00</updated><title type='text'>IGP: administrative distance per prefix</title><content type='html'>Routing protocol administrative distance defines route from which protocol will be placed in RIB - lower is better. However, AD can be changed via&lt;a href="http://www.cisco.com/en/US/docs/ios/iproute_pi/command/reference/iri_pi1.html#wp1035322"&gt; "distance" command &lt;/a&gt;on Cisco routers. The full syntax is:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;distance&lt;/b&gt;&lt;i&gt; ip-address wildcard-mask&lt;/i&gt; &amp;nbsp;[ip-standard-acl&amp;nbsp;| &amp;nbsp;ip-extended-acl&amp;nbsp;|&amp;nbsp;access-list-name]&lt;br /&gt;&lt;br /&gt;access-list option assumes that AD can be changed per IP subnet. Let's see how it works in RIPv2, EIGRP and OSPF.&lt;br /&gt;&lt;br /&gt;I have very simple topology here&lt;br /&gt;&lt;br /&gt;R1-------------------R2&lt;br /&gt;&lt;br /&gt;Router R1 advertises 2 networks into RIP which we can see on R2:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2#show ip route rip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R &amp;nbsp; &amp;nbsp;192.168.200.0/24 [&lt;b&gt;120&lt;/b&gt;/1] via 192.168.12.1, 00:00:11, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R &amp;nbsp; &amp;nbsp;192.168.100.0/24 [&lt;b&gt;120&lt;/b&gt;/1] via 192.168.12.1, 00:00:11, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Both routes have administrative distance 120 as it is default for RIP. Let's change AD for 192.168.100.0/24&lt;span style="font-size: x-small;"&gt;R2#conf t&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config)#access-list 10 permit 192.168.100.0 0.0.0.255&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#distance 150 192.168.12.1 0.0.0.0 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, we'll give it some time since RIP is notoriously slow to converge protocol and check&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2#show ip route rip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R &amp;nbsp; &amp;nbsp;192.168.200.0/24 [120/1] via 192.168.12.1, 00:00:02, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R &amp;nbsp; &amp;nbsp;192.168.100.0/24 [&lt;b&gt;150&lt;/b&gt;/1] via 192.168.12.1, 00:00:02, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see, 192.168.100.0/24 now has administrative distance 150&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. EIGRP&lt;/b&gt;&lt;br /&gt;Now I configure EIGRP between my two routers&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2#show ip route eigrp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;D &amp;nbsp;&amp;nbsp;   192.168.200.0/24 [90/156160] via 192.168.12.1, 00:00:13, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;D &amp;nbsp;&amp;nbsp;   192.168.100.0/24 [90/156160] via 192.168.12.1, 00:00:13, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And repeat:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config)#router eigrp 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#distance 150 192.168.12.1 0.0.0.0 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;Unlike RIP, EIGRP converges almost instantly:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#show ip route eigrp&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;D &amp;nbsp; &amp;nbsp;192.168.200.0/24 [90/156160] via 192.168.12.1, 00:00:02, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;D &amp;nbsp; &amp;nbsp;192.168.100.0/24 [&lt;b&gt;150&lt;/b&gt;/156160] via 192.168.12.1, 00:00:02, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. OSPF&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#show ip route ospf&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.200.0/24 [110/2] via 192.168.12.1, 00:00:17, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.100.0/24 [110/2] via 192.168.12.1, 00:00:17, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In case of OSPF IP address in distance command should be router-id of OSPF neighbor from which route is learned.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#conf t&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2(config)#router ospf 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#distance 150 1.1.1.1 0.0.0.0 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2(config-router)#end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#sho ip route ospf&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.200.0/24 [110/2] via 192.168.12.1, 00:02:55, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.100.0/24 [&lt;b&gt;150&lt;/b&gt;/2] via 192.168.12.1, 00:02:55, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once again, AD has changed to 150 for 192.168.100.0/24&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's consider more complex OSPF scenario:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-p_7d0zF0Qrk/TxHJ4e44OkI/AAAAAAAAAnw/_U13MXSyn4I/s1600/ospf-ad-manipulation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://3.bp.blogspot.com/-p_7d0zF0Qrk/TxHJ4e44OkI/AAAAAAAAAnw/_U13MXSyn4I/s640/ospf-ad-manipulation.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;R2 and R3 advertise 192.168.100.0/24 and 192.168.200.0/24 to R4.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4#sho ip route ospf | begin 192.168.200.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.200.0/24 [110/2] via 192.168.34.3, 00:00:10, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [110/2] via 192.168.24.2, 00:00:10, FastEthernet0/1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.100.0/24 [110/2] via 192.168.34.3, 00:00:10, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [110/2] via 192.168.24.2, 00:00:10, FastEthernet0/1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Both paths are equal and R4 will use both of them by default. Now, for some hard to explain reason we want to use R3 as our primary path to 192.168.100.0/24. &amp;nbsp;It should be easy, all we need to do is to apply our access-list 10 from above to routes we receive from R2 (OSPF router-id 2.2.2.2):&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4#conf t&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4(config)#router ospf 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4(config-router)#distance 150 2.2.2.2 0.0.0.0 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4(config-router)#end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;We can not use "ip ospf cost" command since it affects all routes coming via that interface. Routing check:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R4#sho ip route ospf | begin 192.168.100.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;O &amp;nbsp; &amp;nbsp;192.168.100.0/24 [&lt;b&gt;150&lt;/b&gt;/2] via 192.168.34.3, 00:15:07, FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;b&gt;150&lt;/b&gt;/2] via 192.168.24.2, 00:15:07, FastEthernet0/1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Hmm, 192.168.100.0/24 still has AD of 150 for both next hops. What happened? After doing a lot of digging I found this &lt;a href="https://learningnetwork.cisco.com/thread/8963"&gt;post from Mike Timm&lt;/a&gt;. Cisco bug CSCeh44993 prevents modifying administrative distance per route per neighbor in OSPF. Alas, Cisco decided not to fix it and make it a feature.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-336112636655773135?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/336112636655773135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2012/01/igp-administrative-distance-per-prefix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/336112636655773135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/336112636655773135'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2012/01/igp-administrative-distance-per-prefix.html' title='IGP: administrative distance per prefix'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-p_7d0zF0Qrk/TxHJ4e44OkI/AAAAAAAAAnw/_U13MXSyn4I/s72-c/ospf-ad-manipulation.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-2112921859304185779</id><published>2012-01-04T22:07:00.000-05:00</published><updated>2012-01-14T12:41:37.559-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>IPexpert puzzle</title><content type='html'>IPexpert posted &lt;a href="http://blog.ipexpert.com/2012/01/04/ospf-and-bgp-puzzle/#more-9613"&gt;&amp;nbsp;interesting puzzle&lt;/a&gt;&amp;nbsp;today. Here is my solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;b&gt;R2:&lt;/b&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;router ospf 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;router-id 192.168.0.2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;log-adjacency-changes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;network 192.168.0.0 0.0.255.255 area 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;default-information originate&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;&lt;b&gt;R5:&lt;/b&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;router bgp 5&lt;br /&gt;&amp;nbsp;no synchronization&lt;br /&gt;&amp;nbsp;bgp router-id 192.168.0.5&lt;br /&gt;&amp;nbsp;bgp log-neighbor-changes&lt;br /&gt;&amp;nbsp;redistribute ospf 1&lt;br /&gt;&amp;nbsp;neighbor 172.16.45.4 remote-as 4&lt;br /&gt;&amp;nbsp;neighbor 172.16.45.4 default-originate route-map DEFAULT&lt;br /&gt;&amp;nbsp;no auto-summary&lt;br /&gt;!&lt;br /&gt;ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0&lt;br /&gt;!&lt;br /&gt;route-map DEFAULT permit 10&lt;br /&gt;&amp;nbsp;match ip address prefix-list DEFAULT&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;Now let's head to R4 and check BGP routes:&lt;/div&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;&lt;span style="font-size: x-small;"&gt;R4#sho ip route bgp&lt;br /&gt;B &amp;nbsp; &amp;nbsp;192.168.25.0/24 [20/0] via 172.16.45.5, 00:55:28&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.0/32 is subnetted, 2 subnets&lt;br /&gt;B &amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.0.2 [20/2] via 172.16.45.5, 00:55:28&lt;br /&gt;B &amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.0.5 [20/0] via 172.16.45.5, 00:55:28&lt;br /&gt;&lt;b&gt;B* &amp;nbsp; 0.0.0.0/0 [20/0] via 172.16.45.5, 00:37:36&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;I am still trying to find out why OSPF would not redistribute static default route. BGP will not redistribute default route even it's in source protocol routing table. It must be loop prevention mechanism, but I can not come up with a scenario when redistributing default route as oppose to originating it can cause routing loop. Especially in OSPF, where "default-information originate" creates Type5 LSA - same type as "redistribute" command would have created:&lt;/div&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;&lt;span style="font-size: x-small;"&gt;R2#sho ip ospf database | begin Type-5&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Type-5 AS External Link States&lt;br /&gt;Link ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ADV Router &amp;nbsp; &amp;nbsp; &amp;nbsp;Age &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Seq# &amp;nbsp; &amp;nbsp; &amp;nbsp; Checksum Tag&lt;br /&gt;0.0.0.0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.0.2 &amp;nbsp; &amp;nbsp; 391 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x80000003 0x001F26 1&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-2112921859304185779?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/2112921859304185779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2012/01/ipexpert-puzzle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2112921859304185779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2112921859304185779'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2012/01/ipexpert-puzzle.html' title='IPexpert puzzle'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-6641998611350982567</id><published>2011-12-22T16:22:00.001-05:00</published><updated>2011-12-22T16:23:05.769-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>BGP network route-map command</title><content type='html'>&lt;div&gt;Let's consider following simple network:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-EyBWS_yRSjM/TvONuZIV-WI/AAAAAAAAAnc/Ta8v0phXPdM/s1600/3routers.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-EyBWS_yRSjM/TvONuZIV-WI/AAAAAAAAAnc/Ta8v0phXPdM/s1600/3routers.png" /&gt;&lt;/a&gt;&lt;/div&gt;Here is related configuration&lt;br /&gt;&lt;b&gt;R1&lt;/b&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;interface Loopback0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;ip address 1.1.1.1 255.255.255.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;interface FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;ip address 192.168.12.1 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;network 1.1.1.1 mask 255.255.255.255&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.2 remote-as 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.2 send-community both&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;ip bgp-community new-format&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;interface FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;ip address 192.168.12.2 255.255.255.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;interface FastEthernet0/1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;ip address 192.168.23.2 255.255.255.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.1 remote-as 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.23.3 remote-as 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;ip bgp-community new-format&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;R3&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;interface FastEthernet0/0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;ip address 192.168.23.3 255.255.255.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.23.2 remote-as 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The prefix 1.1.1.1/32 is advertised to R2 and R3:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#sho ip bgp 1.1.1.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;BGP routing table entry for 1.1.1.1/32, version 14&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;Flag: 0x820&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; Advertised to update-groups:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; 192.168.12.1 from 192.168.12.1 (1.1.1.1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Origin IGP, metric 0, localpref 100, valid, external, best&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, let's add community attribute to 1.1.1.1/32 prefix by using &lt;a href="http://www.cisco.com/en/US/docs/ios/iproute_bgp/command/reference/irg_bgp4.html#wp1145316"&gt;network route-map&lt;/a&gt; command. First, we create route-map&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;R1#conf t&lt;br /&gt;R1(config)#route-map LOOP1&lt;br /&gt;R1(config-route-map)#set community 1:100&lt;br /&gt;R1(config-route-map)#exit&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Second, apply this route-map to the prefix&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R1(config)#router bgp 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;R1(config-router)#network 1.1.1.1 mask 255.255.255.255 route-map LOOP1&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can see on R2 that community 1:100 was indeed added to 1.1.1.1/32&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;R2#show ip bgp 1.1.1.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;BGP routing table entry for 1.1.1.1/32, version 15&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;Flag: 0x8A0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; Advertised to update-groups:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; 192.168.12.1 from 192.168.12.1 (1.1.1.1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Origin IGP, metric 0, localpref 100, valid, external, best&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;u&gt;Community: 1:100&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So far, so good. Now I am going to try well-known community no-export, so R2 does not advertise 1.1.1.1/32 to R3&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R1# conf t&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R1(config)#route-map LOOP1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R1(config-route-map)#no set community 1:100&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R1(config-route-map)#set community no-export&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Debug output on R1 indicates that 1.1.1.1/32 is not advertised to R2&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #d0e0e3; font-size: x-small;"&gt;*Mar &amp;nbsp;1 02:37:19.771: BGP(0): sourced route for 1.1.1.1/32 path #0 changed (weight 32768)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #d0e0e3; font-size: x-small;"&gt;*Mar &amp;nbsp;1 02:37:20.231: BGP(0): nettable_walker 1.1.1.1/32 route sourced locally&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #d0e0e3; font-size: x-small;"&gt;*Mar &amp;nbsp;1 02:37:20.231: BGP(0): 192.168.12.2 send unreachable 1.1.1.1/32&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #d0e0e3; font-size: x-small;"&gt;*Mar &amp;nbsp;1 02:37:20.231: BGP(0): 192.168.12.2 send UPDATE 1.1.1.1/32 -- unreachable&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #d0e0e3; font-size: x-small;"&gt;*Mar &amp;nbsp;1 02:37:20.319: BGP(0): 192.168.12.2 rcv UPDATE about 1.1.1.1/32 -- withdrawn&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sure enough:&lt;/div&gt;&lt;div&gt;&lt;div&gt;R2#show ip bgp 1.1.1.1/32&lt;/div&gt;&lt;div&gt;% Network not in table&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's not what I intended. What happened? The thing is route-map key in BGP network command changes attributes BEFORE affected prefix is inserted into BGP routing table. In this case no-export community is added first, then R1 puts 1.1.1.1/32 in BGP routing table on R1, where R1 sees that this prefix can not be advertised outside its AS. To verify, let's change R1-R2 from eBGP into iBGP:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R1#sho run | sec r b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;network 1.1.1.1 mask 255.255.255.255 route-map LOOP1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.2 remote-as 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.2 send-community both&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#sho run | sec r b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.12.1 remote-as 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.23.3 remote-as 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R3#sho run | sec r b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;router bgp 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no synchronization&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;bgp log-neighbor-changes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;neighbor 192.168.23.2 remote-as 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;no auto-summary&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.1.1.1/32 should appear in R2's BGP routing table:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R2#sho ip bgp 1.1.1.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;BGP routing table entry for 1.1.1.1/32, version 3&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; Not advertised to any peer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; Local&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; 192.168.12.1 from 192.168.12.1 (1.1.1.1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Origin IGP, metric 0, localpref 100, valid, internal, best&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;u&gt;Community: no-export&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Since R1 and R2 are in the same ASN, no-export community does not affect route advertisement. However,&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;R3#show ip bgp 1.1.1.1/32&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-small;"&gt;% Network not in table&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: bold; text-decoration: underline;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Important thing to remember is that in this case route-map changes attributes BEFORE prefix added into BGP routing table and advertised to other BGP peers.&lt;/div&gt;&lt;div style="font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-6641998611350982567?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/6641998611350982567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2011/12/bgp-network-route-map-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/6641998611350982567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/6641998611350982567'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2011/12/bgp-network-route-map-command.html' title='BGP network route-map command'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-EyBWS_yRSjM/TvONuZIV-WI/AAAAAAAAAnc/Ta8v0phXPdM/s72-c/3routers.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-5050787031509333380</id><published>2011-11-19T19:34:00.000-05:00</published><updated>2012-01-14T12:41:13.005-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSPF'/><title type='text'>Hidden OSPF command</title><content type='html'>&lt;div&gt;I was testing some OSPF features and wanted to check routes learned via OSPF. Before going into LSA database, I checked RIB, but the output format was not what I was expecting:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OSPF Router with ID (1.1.1.1) (Process ID 1)&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Area BACKBONE(0)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Intra-area Route List&lt;/div&gt;&lt;div&gt;* &amp;nbsp; 1.1.1.1/32, Intra, cost 1, area 0, Connected&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; via 1.1.1.1, Loopback0&lt;/div&gt;&lt;div&gt;* &amp;nbsp; 11.11.11.11/32, Intra, cost 1, area 0, Connected&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; via 11.11.11.11, Loopback11&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Intra-area Router Path List&lt;/div&gt;&lt;div&gt;i 4.4.4.4 [564] via 192.168.12.2, Serial1/0.12, ABR, Area 0, SPF 11&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Inter-area Route List&lt;/div&gt;&lt;div&gt;*&amp;gt; &amp;nbsp;4.4.4.4/32, Inter, cost 565, area 0&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; via 192.168.12.2, Serial1/0.12&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Area 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Intra-area Route List&lt;/div&gt;&lt;div&gt;*&amp;gt; &amp;nbsp;192.168.24.0/24, Intra, cost 564, area 1&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; via 192.168.12.2, Serial1/0.12&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, I checked what I typed in the command line. It was "R1#&lt;b&gt;sho ip ospf route&lt;/b&gt;" instead of "show ip route ospf". However, "route" does not show up as an option for "show ip ospf" command:&lt;/div&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;R1#sho ip ospf ?&lt;br /&gt;&amp;nbsp; &amp;lt;1-65535&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Process ID number&lt;br /&gt;&amp;nbsp; border-routers &amp;nbsp; &amp;nbsp; &amp;nbsp; Border and Boundary Router Information&lt;br /&gt;&amp;nbsp; database &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Database summary&lt;br /&gt;&amp;nbsp; flood-list &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Link state flood list&lt;br /&gt;&amp;nbsp; interface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Interface information&lt;br /&gt;&amp;nbsp; max-metric &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Max-metric origination information&lt;br /&gt;&amp;nbsp; mpls &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MPLS related information&lt;br /&gt;&amp;nbsp; neighbor &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neighbor list&lt;br /&gt;&amp;nbsp; request-list &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Link state request list&lt;br /&gt;&amp;nbsp; retransmission-list &amp;nbsp;Link state retransmission list&lt;br /&gt;&amp;nbsp; rib &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Routing Information Base (RIB)&lt;br /&gt;&amp;nbsp; sham-links &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sham link information&lt;br /&gt;&amp;nbsp; statistics &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Various OSPF Statistics&lt;br /&gt;&amp;nbsp; summary-address &amp;nbsp; &amp;nbsp; &amp;nbsp;Summary-address redistribution Information&lt;br /&gt;&amp;nbsp; timers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OSPF timers information&lt;br /&gt;&amp;nbsp; traffic &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Traffic related statistics&lt;br /&gt;&amp;nbsp; virtual-links &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Virtual link information&lt;br /&gt;&amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Output modifiers&lt;br /&gt;&amp;nbsp;&lt;cr&gt;&lt;/cr&gt;R1#sho ip ospf route ?&lt;br /&gt;% Unrecognized command&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;I am running 12.4(15)T14 on the router. This is very useful command and output is easier to interpret than "show ip ospf database". Why does Cisco keep it hidden?&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-5050787031509333380?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/5050787031509333380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2011/11/i-was-testing-some-ospf-features-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/5050787031509333380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/5050787031509333380'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2011/11/i-was-testing-some-ospf-features-and.html' title='Hidden OSPF command'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-3582224359063576879</id><published>2010-12-14T10:10:00.001-05:00</published><updated>2010-12-14T10:11:55.637-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>CCIE R&amp;S written</title><content type='html'>After getting CCIP and CCNP certifications I did not have a reason to postpone taking CCIE written exam any longer. So, I went for it last Wednesday and passed it. CCIE R&amp;S written covers broad range of topics. All these topics are covered in depth by exams required to obtain CCIP and CCNP. If you took and passed ROUTE, SWITCH, TSHOOT, QOS, BGP and MPLS exams, CCIE R&amp;S written looks fairly easy and does not require any additional preparations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-3582224359063576879?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/3582224359063576879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/12/ccie-r-written.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3582224359063576879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3582224359063576879'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/12/ccie-r-written.html' title='CCIE R&amp;S written'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-1788427522393746567</id><published>2010-11-19T12:48:00.000-05:00</published><updated>2010-11-19T12:48:35.447-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Cisco TSHOOT exam great success</title><content type='html'>My second shot at TSHOOT exam was much better. I went to another testing center and did not experience a single glitch. &lt;a href="https://learningnetwork.cisco.com/community/certifications/ccnp/tshoot?tab=overview"&gt;Out of 35-40 questions&lt;/a&gt; I got only one wrong.&lt;br /&gt;I used Boson's practice exam during the preparation to one of the previous Cisco exams before and was really disappointed. The practice exam was not hard enough and there were few errors, but I was very pleased with their &lt;a href="http://www.boson.com/Product/642-832-cisco-tshoot-practice-exam.html"&gt;TSHOOT simulator&lt;/a&gt;. It is probably even more difficult than real Cisco exam, but no simulator can replace on-the-job experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-1788427522393746567?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/1788427522393746567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/11/cisco-tshoot-exam-great-success.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1788427522393746567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1788427522393746567'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/11/cisco-tshoot-exam-great-success.html' title='Cisco TSHOOT exam great success'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-3089759413544596832</id><published>2010-11-10T16:03:00.000-05:00</published><updated>2010-11-10T16:03:44.662-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Cisco TSHOOT exam epic fail</title><content type='html'>I have one last exam left to add CCNP trophy to my CCNA and CCIP. The exam is new Cisco TSHOOT. I've read a lot of good reviews about the exam and &lt;a href="http://www.cisco.com/web/learning/le3/le2/le37/le10/tshoot_demo.html"&gt;demo looks great&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;The exam has 2 parts: multiple choice questions and tickets. After I finished multiple choice part, exam software crashed throwing some Flash error. I was given another computer and it crashed again in the same place. Kind folks at the testing center spent about an hour on the phone with tech support only to see test exam software crashing again and again with the same Flash error.&lt;br /&gt;It looks like Steve Jobs was onto something when he banned Flash from iPad.&lt;br /&gt;So, I have to re-schedule the exam and hope that next time it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-3089759413544596832?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/3089759413544596832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/11/cisco-tshoot-exam-epic-fail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3089759413544596832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3089759413544596832'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/11/cisco-tshoot-exam-epic-fail.html' title='Cisco TSHOOT exam epic fail'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-2537137961505661091</id><published>2010-11-08T11:47:00.000-05:00</published><updated>2010-11-08T11:47:50.841-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IPv6 routing'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>OSPFv3-EIGRPv6 redistribution. Strange "include-connected" behavior.</title><content type='html'>I've been practicing IPv6 and notice strange thing with "include-connected" option when redistributing between EIGRPv6 and OSPFv3. First, short preamble. In IPv4 redistribution, when source protocol runs on connected network, this network is automatically included in redistribution in destination protocol. Apparently, this is not the case in IPv6. You have to include connected network explicitly. Here is my network:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_cMxbIwo9Fsk/TNghepPl0kI/AAAAAAAAAg8/nnHITkEnHpM/s1600/IPv6redistribution.png"&gt; &lt;br /&gt;&lt;img border="0" height="300" width="400" src="http://2.bp.blogspot.com/_cMxbIwo9Fsk/TNghepPl0kI/AAAAAAAAAg8/nnHITkEnHpM/s400/IPv6redistribution.png" &gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;All routers run IOS 12.4(22)T&lt;br /&gt;R2 and R3 are doing redistribution:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;R2#sho run | sec ipv6 router    &lt;br /&gt;ipv6 router ospf 11&lt;br /&gt; log-adjacency-changes&lt;br /&gt; redistribute rip RIPng &lt;b&gt;include-connected&lt;/b&gt;&lt;br /&gt;ipv6 router rip RIPng&lt;br /&gt; redistribute ospf 11 metric 5 &lt;b&gt;include-connected&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;R3#sho run | sec ipv6 router&lt;br /&gt;ipv6 router eigrp 1&lt;br /&gt; no shutdown&lt;br /&gt; default-metric 1000000 1 255 1 1500&lt;br /&gt; redistribute ospf 11 &lt;b&gt;include-connected&lt;/b&gt;&lt;br /&gt;ipv6 router ospf 11&lt;br /&gt; log-adjacency-changes&lt;br /&gt; default-metric 30&lt;br /&gt; redistribute eigrp 1 &lt;b&gt;include-connected&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;Notice "include-connected" in redistribute command. Now, let's see what routing table looks like on R1 and R4:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;R4&gt;sho ipv6 route&lt;br /&gt;EX  2000:1::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;EX  2000:2::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;C   2000:4::/64 [0/0]&lt;br /&gt;     via Loopback10, directly connected&lt;br /&gt;L   2000:4::1/128 [0/0]&lt;br /&gt;     via Loopback10, receive&lt;br /&gt;EX  2001:1::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;C   2001:3::/64 [0/0]&lt;br /&gt;     via GigabitEthernet0/3, directly connected&lt;br /&gt;L   2001:3::2/128 [0/0]&lt;br /&gt;     via GigabitEthernet0/3, receive&lt;br /&gt;L   FF00::/8 [0/0]&lt;br /&gt;     via Null0, receive&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;R1&gt;1&gt;sho ipv6 route&lt;br /&gt;C   2000:1::/64 [0/0]&lt;br /&gt;     via Loopback10, directly connected&lt;br /&gt;L   2000:1::1/128 [0/0]&lt;br /&gt;     via Loopback10, receive&lt;br /&gt;R   2000:2::/64 [120/2]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;R   2000:3::1/128 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;R   2000:4::/64 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;C   2001:1::/64 [0/0]&lt;br /&gt;     via GigabitEthernet0/2, directly connected&lt;br /&gt;L   2001:1::1/128 [0/0]&lt;br /&gt;     via GigabitEthernet0/2, receive&lt;br /&gt;R   2001:2::/64 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;L   FF00::/8 [0/0]&lt;br /&gt;     via Null0, receive&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;R1 does not have 2001:3::/64 network and R4 is missing 2001:2::/64.&lt;br /&gt;2001:3::/64 is EIGRPv6 network and is supposed to be redistributed into OSPFv3 and then into RIPng.&lt;br /&gt;2001:2::/64 is OSPFv3 network and should be redistributed into EIGRPv6. &lt;br /&gt;So, even though "include-connected" is added to "redistribute ospf" and "redistribute eigrp" it does not seem to work. At the same time, on R2, RIPng redistribute connected OSPF networks.&lt;br /&gt;Let's add explicit "redistribute connected" statements on R3.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;R3(config)#ipv6 router eigrp 1&lt;br /&gt;R3(config-rtr)#redistribute connected &lt;br /&gt;R3(config-rtr)#ipv6 router ospf 11&lt;br /&gt;R3(config-rtr)#redistribute connected &lt;br /&gt;R3(config-rtr)#end&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Let's check R1 and R4 again:&lt;br /&gt;&lt;blockquote&gt;R1&gt;sho ipv6 route&lt;br /&gt;C   2000:1::/64 [0/0]&lt;br /&gt;     via Loopback10, directly connected&lt;br /&gt;L   2000:1::1/128 [0/0]&lt;br /&gt;     via Loopback10, receive&lt;br /&gt;R   2000:2::/64 [120/2]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;R   2000:3::1/128 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;R   2000:4::/64 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;C   2001:1::/64 [0/0]&lt;br /&gt;     via GigabitEthernet0/2, directly connected&lt;br /&gt;L   2001:1::1/128 [0/0]&lt;br /&gt;     via GigabitEthernet0/2, receive&lt;br /&gt;R   2001:2::/64 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;br /&gt;&lt;b&gt;R   2001:3::/64 [120/6]&lt;br /&gt;     via FE80::21E:7AFF:FE75:521A, GigabitEthernet0/2&lt;/b&gt;&lt;br /&gt;L   FF00::/8 [0/0]&lt;br /&gt;     via Null0, receive&lt;br /&gt;&lt;br /&gt;R4&gt;show ipv6 route&lt;br /&gt;EX  2000:1::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;EX  2000:2::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;EX  2000:3::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;C   2000:4::/64 [0/0]&lt;br /&gt;     via Loopback10, directly connected&lt;br /&gt;L   2000:4::1/128 [0/0]&lt;br /&gt;     via Loopback10, receive&lt;br /&gt;EX  2001:1::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;br /&gt;&lt;b&gt;EX  2001:2::/64 [170/3072]&lt;br /&gt;     via FE80::21E:7AFF:FE94:117, GigabitEthernet0/3&lt;/b&gt;&lt;br /&gt;C   2001:3::/64 [0/0]&lt;br /&gt;     via GigabitEthernet0/3, directly connected&lt;br /&gt;L   2001:3::2/128 [0/0]&lt;br /&gt;     via GigabitEthernet0/3, receive&lt;br /&gt;L   FF00::/8 [0/0]&lt;br /&gt;     via Null0, receive&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;It works now. To make sure:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;R4&gt;traceroute 2000:1::1&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Tracing the route to 2000:1::1&lt;br /&gt;&lt;br /&gt;  1 2001:3::1 0 msec 0 msec 0 msec&lt;br /&gt;  2 2001:2::1 0 msec 4 msec 0 msec&lt;br /&gt;  3 2001:1::1 0 msec 0 msec 0 msec&lt;br /&gt;&lt;/blockquote&gt;So far I was not able to find if this is intended behavior.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-2537137961505661091?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/2537137961505661091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/11/ospfv3-eigrpv6-redistribution-strange.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2537137961505661091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2537137961505661091'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/11/ospfv3-eigrpv6-redistribution-strange.html' title='OSPFv3-EIGRPv6 redistribution. Strange &quot;include-connected&quot; behavior.'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_cMxbIwo9Fsk/TNghepPl0kI/AAAAAAAAAg8/nnHITkEnHpM/s72-c/IPv6redistribution.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-8689425446650568259</id><published>2010-08-11T15:35:00.000-04:00</published><updated>2010-08-11T15:35:33.125-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Cisco 642-813 SWITCH exam</title><content type='html'>I recently took and passed Cisco 642-813 SWITCH exam. All those things you might have read about crashing simulators, poorly worded or bad grammar questions are true. In my case sim crashed 3 times when I entered same command, so I simply skipped the command just to continue with the exam. It made task incomplete and cost me few precious points. And do not even try &lt;a href="https://learningnetwork.cisco.com/community/certifications/ccnp/switch?tab=practice"&gt;Cisco's practice tests&lt;/a&gt; - there are too many incorrect answers to take these tests seriously. &lt;br /&gt;All this is not to say that test is impossible to pass, but if you are not in a rush, I'd recommend to wait a few months before taking it. Hopefully, Cisco will clean up its act.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-8689425446650568259?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/8689425446650568259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/08/cisco-642-813-switch-exam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8689425446650568259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8689425446650568259'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/08/cisco-642-813-switch-exam.html' title='Cisco 642-813 SWITCH exam'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-5923203591038567719</id><published>2010-06-21T16:03:00.000-04:00</published><updated>2010-06-21T16:03:18.401-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring'/><title type='text'>Monitoring trunk status via SNMP</title><content type='html'>If you have not guessed yet, SNMP and monitoring are my favorites.&lt;br /&gt;&lt;br /&gt;So, you have configured many trunks on your switch and now need to make sure all of them are actually in trunking mode. Here is 2 SNMP OID that can help you:&lt;br /&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;vlanTrunkPortDynamicState (&lt;/span&gt;&lt;span class="modulecontentbold"&gt;1.3.6.1.4.1.9.9.46.1.6.1.1.13) - reports administrative state. From Cisco SNMP object navigator:&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontent"&gt;&lt;span class="modulecontentbold"&gt;1 : on&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;2 :  off&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;3 :  desirable&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;4 :  auto&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;5 :  onNoNegotiate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;vlanTrunkPortDynamicStatus (&lt;/span&gt;&lt;span class="modulecontentbold"&gt;1.3.6.1.4.1.9.9.46.1.6.1.1.14) - reports operational state.&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontent"&gt;&lt;span class="modulecontentbold"&gt;1 : trunking&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;2 :  notTrunking&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="modulecontent"&gt;&lt;span class="modulecontentbold"&gt;To get data for specific interface you need to add ifIndex to the end of the OID. For example, for interface ifIndex=10147&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontent"&gt;&lt;span class="modulecontentbold"&gt;&lt;b&gt;snmpwalk -v2c -Ov -Oq -c public myswitch&amp;nbsp; 1.3.6.1.4.1.9.9.46.1.6.1.1.13.10147&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontent"&gt;&lt;span class="modulecontentbold"&gt;To get ifIndex, you can either run&amp;nbsp; "&lt;b&gt;show snmp mib ifmib ifIndex&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="modulecontentbold"&gt;" command in exec mode or query ifName OID with snmpwalk. Here is the quick script:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp; for int in ifIndex1 ifIndex2 ifIndexN&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trunkoperstatus=`snmpwalk -v2c -Ov -Oq -c public myswitch \ 1.3.6.1.4.1.9.9.46.1.6.1.1.14.$int`&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ $trunkoperstatus -eq 2 ]&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trunkadminstatus=`snmpwalk -v2c -Ov -Oq -c public myswitch \ 1.3.6.1.4.1.9.9.46.1.6.1.1.13.$int`&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ $trunkadminstatus -eq 1 ]&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo myswitch $int NotTrunking&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; done&lt;/span&gt;&lt;br /&gt;&lt;span class="modulecontentbold"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-5923203591038567719?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/5923203591038567719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/06/monitoring-trunk-status-via-snmp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/5923203591038567719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/5923203591038567719'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/06/monitoring-trunk-status-via-snmp.html' title='Monitoring trunk status via SNMP'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-793253009190208128</id><published>2010-05-28T13:16:00.001-04:00</published><updated>2010-05-28T13:17:51.023-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacks-n-tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco 6500/7600 ACL side effect</title><content type='html'>When you apply ACL to an interface on Cisco 6500 or 7600, it compiles it and puts into TCAM. The way Cisco 7600/6500 does it might have unintended consequences that can leave you open to DDoS attack. Let's consider following example:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_cMxbIwo9Fsk/S__t39yrv7I/AAAAAAAAASs/3o5R4b4Scck/s1600/cisco-tcam-acl-udp-fragments.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://4.bp.blogspot.com/_cMxbIwo9Fsk/S__t39yrv7I/AAAAAAAAASs/3o5R4b4Scck/s640/cisco-tcam-acl-udp-fragments.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;We want to allow any server in 172.16.100.0/24 network to initiate any tcp connection and query any DNS server directly. Here is our ACL&lt;br /&gt;&lt;blockquote&gt;ip access-list extended Test1&lt;br /&gt;&amp;nbsp;permit tcp any any established&lt;br /&gt;&amp;nbsp;permit udp any eq domain any&lt;br /&gt;&amp;nbsp;deny&amp;nbsp; ip any any&lt;/blockquote&gt;&amp;nbsp;We apply it to internet-facing interface of Cisco7600 router: "&lt;b&gt;ip access-group Test1 in&lt;/b&gt;". Now let's look at what actually happened in TCAM:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cisco7600#show tcam int gi 1/1 acl in ip&lt;br /&gt;&lt;br /&gt;* Global Defaults shared&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any fragments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any any fragments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any established match-any &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any eq domain any&lt;/blockquote&gt;Our router automatically added "&lt;b&gt;permit&amp;nbsp; udp any any fragments&lt;/b&gt;", i.e. it allowed udp fragments. Now, let's see if it actually happens. First, take a look at the compiled ACL again:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cisco7600#show tcam int gi 1/1 acl in ip&lt;br /&gt;&lt;br /&gt;* Global Defaults shared&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any fragments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any any fragments (&lt;b style="color: red;"&gt;41 matches&lt;/b&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any established match-any (220 matches)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any eq domain any&lt;/blockquote&gt;Not the counter - 41 matches. Next, on the "attacker" we'll generate fragmented UDP traffic targeting a server in 172.16.100.0/24 network:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;hping2 -2 -d 1500 -c 1 -s 10000 -p 90 -m 500 -f 172.16.100.10&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the command above, we send 1 1500-byte UDP packet from port 10000 on local host to port 90 on 172.16.100.10 and we are telling the host that MTU is 500 bytes. On the target host we run tcpdump:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;10:47:41.942010 IP (tos 0x0, ttl&amp;nbsp; 63, id 130, offset 496, flags [+], length: 520) 172.16.0.101 &amp;gt; 172.16.100.10: udp&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;10:47:41.942027 IP (tos 0x0, ttl&amp;nbsp; 63, id 130, offset 1000, flags [+], length: 520) 172.16.0.101 &amp;gt; 172.16.100.10: udp&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;10:47:41.942034 IP (tos 0x0, ttl&amp;nbsp; 63, id 130, offset 1496, flags [none], length: 28) 172.16.0.101 &amp;gt; 172.16.100.10: udp&lt;/blockquote&gt;&lt;br /&gt;&amp;nbsp;Now, the first fragment, containing IP and UDP header were dropped by our ACL, since we do not allow UDP packets coming from port 10000, but 3 other fragments got through. Let's check the counter again:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cisco7600#show tcam int gi 1/1 acl in ip&lt;br /&gt;&lt;br /&gt;* Global Defaults shared&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entries from Bank 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any fragments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any any fragments (&lt;b style="color: red;"&gt;44 matches&lt;/b&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp any any established match-any (224 matches)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; permit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; udp any eq domain any&lt;/blockquote&gt;The attacker can flood your web or email server with UDP fragments causing it to slow down while it is busy discarding incomplete packets. We can not block fragments completely since legitimate DNS replies can be quite big and require fragmentation. The solution would be to allow outbound UDP traffic and, hence, incoming replies only to specific hosts that need it. Like your caching DNS server and put good firewall in front of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-793253009190208128?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/793253009190208128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/05/cisco-65007600-acl-create-udp-holes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/793253009190208128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/793253009190208128'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/05/cisco-65007600-acl-create-udp-holes.html' title='Cisco 6500/7600 ACL side effect'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_cMxbIwo9Fsk/S__t39yrv7I/AAAAAAAAASs/3o5R4b4Scck/s72-c/cisco-tcam-acl-udp-fragments.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-1944525675033775157</id><published>2010-05-24T14:59:00.000-04:00</published><updated>2010-05-24T14:59:15.701-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco 7600: Netflow and high CPU utilization</title><content type='html'>Cisco &lt;a href="http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a00800a70f2.shtml"&gt;documentation states&lt;/a&gt;, that:&lt;br /&gt;&amp;nbsp;&lt;span class="content"&gt;&lt;i&gt;If NetFlow is configured for version 7, the  flow is performed by the   Routing Processor, which could cause high CPU utilization.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;For troubleshooting high CPU utilization due to Netflow version 7,   configure &lt;b&gt; &lt;a href="http://www.cisco.com/en/US/docs/ios/netflow/command/reference/nf_02.html#wp1012734" onclick="s_objectID=&amp;quot;http://www.cisco.com/en/US/docs/ios/netflow/command/reference/nf_02.html#wp1012734_1&amp;quot;;return this.s_oc?this.s_oc(e):true"&gt;mls    nde sender&lt;/a&gt; &lt;/b&gt;&lt;/i&gt; &lt;i&gt;version 5, as the Netflow export is performed   by the SP, which is the default for version 5 or version 9.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It turns out, combination of NetFlow version 9 and NDE sender version 7 also creates high CPU load in certain situations. Here is the setup:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_cMxbIwo9Fsk/S_q5ntCXKbI/AAAAAAAAASk/D0gddUhmE84/s1600/7600-high-cpu-small.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://2.bp.blogspot.com/_cMxbIwo9Fsk/S_q5ntCXKbI/AAAAAAAAASk/D0gddUhmE84/s640/7600-high-cpu-small.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Both routers are Cisco 7604. Other than different IP addresses, the only difference between R1 and R2 was this:&lt;br /&gt;&lt;br /&gt;on R1:&amp;nbsp; mls nde sender&lt;br /&gt;on R2:&amp;nbsp; mls nde sender version 5 &lt;br /&gt;Default sender version is 7. Both routers configured with &lt;b&gt;ip flow-export version 9&lt;/b&gt;. &lt;br /&gt;When ever R2's eBGP session was interrupted, R1's CPU utilization skyrocketed to 100% and stayed there for 10-15 minutes rendering router unusable. "&lt;b&gt;&lt;a href="http://blog.glinskiy.com/2010/05/catching-high-cpu-usage.html"&gt;process cpu threshold&lt;/a&gt;&lt;/b&gt;" reported that "IP Input" was responsible for CPU load, not "BGP Router" as I expected, since these CPU&amp;nbsp; &lt;br /&gt;spikes only happened when eBGP session went down. After changing NDE sender version to 5 on R1, the problem went away.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-1944525675033775157?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/1944525675033775157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/05/cisco-7600-netflow-and-high-cpu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1944525675033775157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1944525675033775157'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/05/cisco-7600-netflow-and-high-cpu.html' title='Cisco 7600: Netflow and high CPU utilization'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_cMxbIwo9Fsk/S_q5ntCXKbI/AAAAAAAAASk/D0gddUhmE84/s72-c/7600-high-cpu-small.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-3646430417209075467</id><published>2010-05-11T17:43:00.000-04:00</published><updated>2010-05-11T17:43:59.298-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Catching high CPU usage</title><content type='html'>Suddenly your router stops responding and forwarding traffic, you can telnet into it, response on the console is very slow. Few minutes later everything is back to normal and only "&lt;b&gt;show process cpu history&lt;/b&gt;" shows that CPU was at 100% for some time, but what caused it remains a mystery. To catch a process(es) that might have contributed to the problem, add following command in global configuration mode:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;process cpu threshold type process rising 70 interval 5 falling 30 interval 5&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It will generate syslog message every time CPU usage exceeds 70% for 5 or more seconds and falls below 30%. For example:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;May 10 23:50:23.146 EDT: %SYS-1-CPURISINGTHRESHOLD: Threshold: Process  CPU Utilization(Total/Intr): 74%/26%, Top 3 processes(Pid/Util):   192/46%, 7/1%, 2/0%&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Process id 192 contributed 46%. Let's see:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Router#sho proc cpu sor | i ^_192&lt;/b&gt;&lt;br /&gt;192&amp;nbsp;&amp;nbsp;    904947881922327784         47  0.00%  0.18%  0.19%   0 IP Input&lt;br /&gt;&lt;br /&gt;&amp;nbsp;It was "IP Input" which is responsible for process-switching IP packets. Now we have something to work with and can start troubleshooting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-3646430417209075467?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/3646430417209075467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/05/catching-high-cpu-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3646430417209075467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3646430417209075467'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/05/catching-high-cpu-usage.html' title='Catching high CPU usage'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-4861747028535517497</id><published>2010-03-26T15:07:00.002-04:00</published><updated>2010-03-26T15:08:56.188-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network management'/><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring'/><title type='text'>Monitoring logs with SEC</title><content type='html'>&lt;a href="http://www.splunk.com/"&gt;Splunk&lt;/a&gt; seems to become de-facto standard tool for log management. But free version lacks feature that lets you configure and send alerts whenever certain events occur. One need to pay for enterprise version which starts at $5000 in US and Canada.&lt;br /&gt;&lt;br /&gt;So, I use &lt;a href="http://simple-evcorr.sourceforge.net/"&gt;Simple Event Correlator&lt;/a&gt; to notify me of interesting events in life of my router friends. Here, for example, sec template to send me email with syslog line in the body when somebody tries to go to configuration mode and execute certain commands:&lt;br /&gt;&lt;pre&gt;type=Single&lt;br /&gt;ptype=RegExp&lt;br /&gt;pattern=.*cmd=(configure|clear|ip|no|interface|switchport|router|spanning-tree)&lt;br /&gt;desc=$0&lt;br /&gt;action=pipe '$0' /usr/bin/mail -s "router/switch config change is happening right now" noc@example.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You need to put this template into SEC configuration file and tell it were to look for these messages:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sec -detach -conf=/etc/sec-tacacs.conf -input=/var/log/tac-plus/account&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this case it's TACACS+ log file, so you need to configure a router to report such activities:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;aaa new-model&lt;/b&gt;&lt;br /&gt;&lt;b&gt;aaa authentication login default group tacacs+ none&lt;/b&gt;&lt;br /&gt;&lt;b&gt;aaa authentication enable default group tacacs+ none&lt;/b&gt;&lt;br /&gt;&lt;b&gt;aaa authorization exec default group tacacs+ none &lt;/b&gt;&lt;br /&gt;&lt;b&gt;aaa authorization commands 15 default group tacacs+ none &lt;/b&gt;&lt;br /&gt;&lt;b&gt;aaa accounting commands 15 default start-stop group tacacs+&lt;/b&gt;&lt;br /&gt;&lt;b&gt;tacacs-server host &amp;lt;server ip&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;tacacs-server &amp;lt;key&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here is another template to report all syslog messages coming from devices with loopback interface IP address in the range 10.9.20.0/24 or 10.9.25.0/24. Why loopback? See my &lt;a href="http://blog.glinskiy.com/2010/03/best-practices-sort-of.html"&gt;previous post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;type=Single&lt;br /&gt;ptype=RegExp&lt;br /&gt;pattern=(.*)10\.9\.2[0|5]\.(.*)%[A-Z]*&lt;br /&gt;desc=$0&lt;br /&gt;action=pipe '$0' /usr/bin/mail -s " router syslog message" noc@example.com&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-4861747028535517497?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/4861747028535517497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/03/monitoring-logs-with-sec.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/4861747028535517497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/4861747028535517497'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/03/monitoring-logs-with-sec.html' title='Monitoring logs with SEC'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-4631524200592023342</id><published>2010-03-25T17:52:00.001-04:00</published><updated>2011-07-23T16:55:56.419-04:00</updated><title type='text'>Best practices. Sort of.</title><content type='html'>I tend to agree, that there is no "best practices", there are practices that fit best. Here is one of the things that I always configure on the router.&lt;br /&gt;&lt;br /&gt;There are many advantages in configuring Loopback interface when you use dynamic routing, but I also find loopback helpful for syslog reporting and authentication and authorization queries. So, I always configure:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ip tacacs source-interface Loopback0&lt;/b&gt;&lt;br /&gt;&lt;b&gt;logging source-interface Loopback0&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next step is to either add loopback interfaces of your routers to DNS or /etc/hosts file on Tacacs and syslog servers.&lt;br /&gt;The names are no good if you can not use them. I prefer syslog-ng for logging, so, in order to record names instead of IP addresses, you need to configure &lt;b&gt;use_dns(yes)&lt;/b&gt; in "options" section of syslog-ng.conf. For TACACS+: run tac_plus with "-L" option.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-4631524200592023342?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/4631524200592023342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/03/best-practices-sort-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/4631524200592023342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/4631524200592023342'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/03/best-practices-sort-of.html' title='Best practices. Sort of.'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-1103934276192806876</id><published>2010-03-25T11:46:00.000-04:00</published><updated>2010-03-25T11:46:50.511-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network management'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Making same change on many routers</title><content type='html'>Suppose you need to make the same change on many routers, but do not have fancy software like Cisco Works to help you. No worries. Perl is the best friend of any network and system administrator. Here is the quick script that goes to a router and types command "&lt;b&gt;logging source-interface loopback 0&lt;/b&gt;", saves configuration and exit. It can be used to run any command.&lt;br /&gt;Place IP addresses of the routers, one per line, in file routers.txt. This file must be in the same directory as the script. Remember, you put your username, password and enable password in the script in clear text, so do not forget "&lt;b&gt;chmod 700 &lt;/b&gt;" &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;use Net::Telnet::Cisco;&lt;br /&gt;my $myfile="./routers.txt";&lt;br /&gt;open (FH, $myfile) || die "Can not open $myfile\n";&lt;br /&gt;&lt;br /&gt;while (&lt;fh&gt;) {&lt;br /&gt;chomp;&lt;br /&gt;my $switchname=$_;&lt;br /&gt;print "$switchname\n";&amp;nbsp;&lt;/fh&gt;&lt;/pre&gt;&lt;pre&gt;&lt;fh&gt;&lt;br /&gt;&lt;/fh&gt;&lt;/pre&gt;&lt;pre&gt;&lt;fh&gt;my $session = Net::Telnet::Cisco-&amp;gt;new(Host =&amp;gt; $switchname,Input_log =&amp;gt; "$switchname.log");&amp;nbsp;&lt;/fh&gt;&lt;/pre&gt;&lt;pre&gt;# Replace username and password below with real username and password&lt;fh&gt; &lt;/fh&gt;&lt;/pre&gt;&lt;pre&gt;&lt;fh&gt;$session-&amp;gt;login('username', 'password');&lt;br /&gt;&lt;br /&gt;# Enable mode&lt;br /&gt;if ($session-&amp;gt;enable("enable password") ) { # insert your enable passowrd&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @output = $session-&amp;gt;cmd('configure terminal');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @output = $session-&amp;gt;cmd('logging source-interface loopback 0');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print @output;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @output = $session-&amp;gt;cmd('exit');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @output = $session-&amp;gt;cmd("copy run startup-config\n\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print @output;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; warn "Can't enable: " . $session-&amp;gt;errmsg;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;$session-&amp;gt;close;&lt;br /&gt;}&lt;br /&gt;&lt;/fh&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Use at your own risk. &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-1103934276192806876?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/1103934276192806876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/03/making-same-change-on-many-routers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1103934276192806876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1103934276192806876'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/03/making-same-change-on-many-routers.html' title='Making same change on many routers'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-2367405441619526001</id><published>2010-03-22T15:36:00.000-04:00</published><updated>2010-03-22T15:36:57.930-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Debian 5.0.4 on Dell 1950</title><content type='html'>Normally, installing Debian on Dell servers is piece of cake. This particular 1950 came with Broadcom NICs and PERC5 controller. Debian 5.0.4 does not include driver for Broadcom drivers due to some copyright restrictions. However, the driver is available as deb package.&lt;a href="http://http.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.4+etchnhalf.1_all.deb"&gt; Download it&lt;/a&gt; and copy to FAT or FAT32 formatted USB drive. When prompted for NIC driver during the installation process, insert USB drive into USB port. As soon as server loads the driver and moves to the next screen in installation process, remove the drive. If you do not remove the USB drive before installation process gets to partitioning, your drive sequence will we out of whack. You'll have to boot from CD and edit /etc/fstab.&lt;br /&gt;Since this server has hardware I wanted to use instead of configuring software RAID in Linux. The question is how to monitor RAID state from Debian. There is no deb package or source code, but &lt;a href="http://www.lsi.com/storage_home/products_home/internal_raid/megaraid_sas/megaraid_sas_8480e/index.html?remote=1&amp;amp;locale"&gt;LSI provides RPM&lt;/a&gt;. I downloaded "MegaCLI - Linux" from "Miscellaneous" section, unpacked it, installed "alien" on Debian (sudo apt-get install aliean) and then "sudo alien -i&amp;nbsp; MegaCli-1.01-0.i386.rpm". It install MegaCli under /opt/MegaRAID/MegaCli.&amp;nbsp; &lt;span class="cmr-12x-x-120"&gt;Moritz Mertinkat has great &lt;a href="http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"&gt;emergency cheat sheet&lt;/a&gt; for MegaCli usage.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-2367405441619526001?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/2367405441619526001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/03/debian-504-on-dell-1950.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2367405441619526001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2367405441619526001'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/03/debian-504-on-dell-1950.html' title='Debian 5.0.4 on Dell 1950'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-8877564104068953469</id><published>2010-01-06T15:41:00.006-05:00</published><updated>2012-01-04T22:18:33.325-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring'/><title type='text'>Cacti and 95th percentile</title><content type='html'>I use Cacti to collect traffic data on my routers and I need to know what 95th percentile is. There are quite a ways to get 95th percentile line on Cacti graph. The problem with all those methods is that if time frame of the graph does not coincide with ISP billing period the 95th percentile value on the graph is useless. But all the necessary data is collected by Cacti into RRD file. All we have to do is to extract it.&lt;br /&gt;First, I need to figure out where the RRD file is. In Cacti, go to Console -&amp;gt; Data Sources, select your edge router and click on IPS-facing interface. In "Data Source Path" field you'll see the name of the RRD file in Cacti's rra directory where data for this interface is stored&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-a1MNLxsj984/TwUWSwg7cUI/AAAAAAAAAno/jgTyLvSxLCI/s1600/datasource-716501.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://4.bp.blogspot.com/-a1MNLxsj984/TwUWSwg7cUI/AAAAAAAAAno/jgTyLvSxLCI/s640/datasource-716501.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Second, we need to know what to extract from this file. I.e I need to know the names of RRD data sources:&lt;br /&gt;rrdtool info border_router_1_traffic_in_14839.rrd&lt;br /&gt;where border_router_1_traffic_in_14839.rrd is file name from previous step.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;filename = "border_router_1_traffic_in_14839.rrd"&lt;br /&gt;rrd_version = "0003"&lt;br /&gt;step = 300&lt;br /&gt;last_update = 1262806506&lt;br /&gt;ds[traffic_in].type = "COUNTER"&lt;br /&gt;ds[traffic_in].minimal_heartbeat = 600&lt;br /&gt;ds[traffic_in].min = 0.0000000000e+00&lt;br /&gt;ds[traffic_in].max = NaN&lt;br /&gt;ds[traffic_in].last_ds = "437961211333"&lt;br /&gt;ds[traffic_in].value = 4.9711447176e+05&lt;br /&gt;ds[traffic_in].unknown_sec = 0&lt;br /&gt;ds[traffic_out].type = "COUNTER"&lt;br /&gt;ds[traffic_out].minimal_heartbeat = 600&lt;br /&gt;ds[traffic_out].min = 0.0000000000e+00&lt;br /&gt;ds[traffic_out].max = NaN&lt;br /&gt;ds[traffic_out].last_ds = "138465493978"&lt;br /&gt;ds[traffic_out].value = 1.9428099668e+04&lt;br /&gt;ds[traffic_out].unknown_sec = 0&lt;br /&gt;&lt;br /&gt;truncated...&lt;/blockquote&gt;&lt;br /&gt;The data sources names are traffic_in and traffic_out and this is what we are going to extract. Before we proceed we need to remember, that RRD database size is fixed and determined at the time of creation. When limit is reached, oldest data is overwritten. To avoid losing any data, I am going to extract traffic numbers every hour for the last hour and put inbound and outbound data in separate files.&lt;br /&gt;Incoming traffic:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt; rrdtool xport -s now-1h -e now  DEF:xx=border_router_1_traffic_in_14839.rrd:traffic_in:AVERAGE CDEF:bb=xx,8,*  XPORT:bb:"out bits" | grep \&lt;row\&gt;|grep -v Na | awk -F'&lt;v&gt;' '{print $2}'| sed -e  's/&amp;lt;\/v&amp;gt;&amp;lt;\/row&amp;gt;//'|sed -e 's/e+0/\t/' &amp;gt;&amp;gt; incoming.txt&lt;/v&gt;&lt;/row\&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Outgoing traffic:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt; rrdtool xport -s now-1h -e now  \DEF:xx=border_router_1_traffic_in_14839.rrd:traffic_out:AVERAGE  CDEF:bb=xx,8,*  XPORT:bb:"out bits" | grep \&lt;row\&gt;|grep -v Na | awk -F'&lt;v&gt;' '{print $2}'| sed -e  's/&amp;lt;\/v&amp;gt;&amp;lt;\/row&amp;gt;//'|sed -e 's/e+0/\t/' &amp;gt;&amp;gt; outgoing.txt&lt;/v&gt;&lt;/row\&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Both commands should be in one line. Above I converted Bytes/sec into Bits/sec and removed XML formatting. You need these 2 lines into shell script and run it from cron every hour on 2 minutes after the hour so Cacti has time to finish collecting on top of the hour. You'll get 2 files - incoming.txt and outgoing.txt looking like this&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;6.9655133612       7&lt;br /&gt;7.0568998690      7&lt;br /&gt;6.9008144000     7&lt;br /&gt;7.0245826541      7&lt;br /&gt;7.2076520540     7&lt;br /&gt;6.7448901179      7&lt;br /&gt;6.7471832197      7&lt;br /&gt;6.7365174531     7&lt;br /&gt;6.9710477122     7&lt;br /&gt;7.1586411237     7&lt;br /&gt;7.0991637699     7&lt;br /&gt;7.0189321194     7&lt;/blockquote&gt;&lt;br /&gt;This are measurements taken every 5 minutes by Cacti. "6.9655133612    7" means 6.9655133612 * 10^7 bits/sec or 69655133.612 bits/sec.&lt;br /&gt;&lt;br /&gt;Now all you have to do on the 1st of the month right after midnight is to convert the data to get rid of second column, sort it and remove top 5%. For 30-day month:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;cat incoming.txt |perl -e ' while(&amp;lt;&amp;gt;) {$input = $_; chomp($input);($traffic, $power)&lt;br /&gt;=split(/\t/,$input); $traffic = $traffic*10**$power; print "$traffic\n";}'|egrep -v '^0$'|sort -n -r | head -433 |tail -1&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-8877564104068953469?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/8877564104068953469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2010/01/cacti-and-95th-percentile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8877564104068953469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8877564104068953469'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2010/01/cacti-and-95th-percentile.html' title='Cacti and 95th percentile'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-a1MNLxsj984/TwUWSwg7cUI/AAAAAAAAAno/jgTyLvSxLCI/s72-c/datasource-716501.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-1243667935497254339</id><published>2009-10-14T14:37:00.004-04:00</published><updated>2010-05-16T12:51:28.566-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How to generate lots of BGP routes</title><content type='html'>I needed to test in the lab whether my Cisco router can handle more than 300K routes - size of current full BGP table.  Now, Cisco router can only accept 200 &lt;span style="font-weight: bold;"&gt;network&lt;/span&gt; statements under &lt;span style="font-weight: bold;"&gt;router bgp&lt;/span&gt; configuration, so I would need 1500 routers. Even if I had that many routers to my disposal, it would have taken days to configure all of them. As always, open source software can help. &lt;a href="http://www.quagga.net/"&gt;Quagga&lt;/a&gt; lets you run OSPF, BGP, RIP, RIPng on Linux and Solaris. If you go with all default options, it is very easy to install. &lt;a href="http://quagga.net/download.php"&gt;Download&lt;/a&gt; and unpack. Go to quagga directory, in my case it was quagga-0.98.6, type&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;That's it. By default, it went into /usr/local/. I have Debian 4 (Etch) with 2.6.8 kernel and a lot of development packages installed. The only thing I had to do was to add /usr/local/lib to /etc/ld.so.conf file and run /sbin/ldconfig.&lt;br /&gt;Here is the setup&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_cMxbIwo9Fsk/S_AifHgm0YI/AAAAAAAAAR4/etQDfl4-QV8/s1600/quagga-bgp-706519.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_cMxbIwo9Fsk/S_AifHgm0YI/AAAAAAAAAR4/etQDfl4-QV8/s320/quagga-bgp-706519.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now I need a valid configuration file for Quagga BGP. Adding 300000 network statements manually is not something system administrators do on Linux. Hence, here is the script&lt;br /&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;my $host="quagga-host";         #quagga router name&lt;br /&gt;my $logpass="zebra";            #login password&lt;br /&gt;my $enable="zebra";             #enable password&lt;br /&gt;my $myasn="65099";              #local AS number&lt;br /&gt;my $router_id="172.31.2.2";     #bgp router-id&lt;br /&gt;my $remote_as="65001";          #remote-as number&lt;br /&gt;my $remote_ip="172.31.2.1";     #BGP neighbor ip address&lt;br /&gt;my $route_count=0;&lt;br /&gt;my $max_routes=300000;              #max number of routers to generate&lt;br /&gt;&lt;br /&gt;open (BGPCONF,'&amp;gt;bgpd.conf')|| die "Can not open bgpd.conf for writing";&lt;br /&gt;print BGPCONF "hostname $host\npassword $logpass\nenable password $enable\nline vty \n";&lt;br /&gt;print BGPCONF "router bgp $myasn\n  bgp router-id $router_id\n  neighbor $remote_ip remote-as $remote_as\n";&lt;br /&gt;MAXR: while ($route_count &amp;lt;= $max_routes ) { &lt;br /&gt;$octet1=int(rand(223))+1; #generate 1st octet randomly in 1-223 range, 224 and up is multicust and class E  &lt;br /&gt;if ($octet1 ==127) {next;} #need to make sure that 127.X.X.0/24 is excluded&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;$octet2=0;  &lt;br /&gt;while ( $octet2 &amp;lt;= 255 ){&lt;br /&gt;$octet3=0;&lt;br /&gt;while ( $octet3 &amp;lt;= 255 ) {&lt;br /&gt;print BGPCONF "  network $octet1\.$octet2\.$octet3\.0/24\n";&lt;br /&gt;$octet3++;&lt;br /&gt;$route_count++;&lt;br /&gt;if ($route_count == $max_routes) {last MAXR;}&lt;br /&gt;}&lt;br /&gt;$octet2++;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;close BGPCONF;&lt;br /&gt;&lt;/pre&gt;this script will generate bgpd.conf for Quagga. Since it is lab environment not connected to any real network, I do not really care about zebra configuration or restricting access to Quagga BGP console. Copy bgpd.conf file into /usr/local/etc and run &lt;span style="font-weight: bold;"&gt;/usr/local/sbin/bgpd -d -f /usr/local/etc/bgpd.conf -u root -g root&lt;/span&gt; Again, this is not production environment. Do not run Quagga as root in production. Here is relevant configuration from Cisco router: &lt;br /&gt;&lt;pre&gt;interface GigabitEthernet0/0&lt;br /&gt;ip address 172.31.2.1 255.255.255.0&lt;br /&gt;network 172.31.2.0 mask 255.255.255.0&lt;br /&gt;media-type rj45&lt;br /&gt;negotiation auto&lt;br /&gt;!&lt;br /&gt;router bgp 65001&lt;br /&gt;no synchronization&lt;br /&gt;bgp log-neighbor-changes&lt;br /&gt;neighbor 172.31.2.2 remote-as 65099&lt;br /&gt;no auto-summary&lt;br /&gt;!&lt;br /&gt;&lt;/pre&gt;Let's see if it works. On Linux host: &lt;br /&gt;&lt;pre&gt;sh-2.05b$ telnet localhost 2605&lt;br /&gt;Trying 127.0.0.1...&lt;br /&gt;Connected to localhost.localdomain.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;&lt;br /&gt;Hello, this is Quagga (version 0.98.6).&lt;br /&gt;Copyright 1996-2005 Kunihiro Ishiguro, et al.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User Access Verification&lt;br /&gt;&lt;br /&gt;Password:&lt;br /&gt;quagga-host&amp;gt; sho ip bgp summ&lt;br /&gt;BGP router identifier 172.31.2.2, local AS number 65099&lt;br /&gt;2 BGP AS-PATH entries&lt;br /&gt;0 BGP community entries&lt;br /&gt;&lt;br /&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;br /&gt;172.31.2.1      4 65001     283     606        0    0    0 03:41:55        1&lt;br /&gt;&lt;br /&gt;Total number of neighbors 1&lt;br /&gt;quagga-host&amp;gt;&lt;br /&gt;&lt;/pre&gt;on Cisco:  &lt;br /&gt;&lt;pre&gt;R1#sho ip bgp sum&lt;br /&gt;BGP router identifier 192.0.2.2, local AS number 65001&lt;br /&gt;BGP table version is 330002, main routing table version 330002&lt;br /&gt;310001 network entries using 40920132 bytes of memory&lt;br /&gt;310001 path entries using 16120052 bytes of memory&lt;br /&gt;3/2 BGP path/bestpath attribute entries using 444 bytes of memory&lt;br /&gt;1 BGP AS-PATH entries using 24 bytes of memory&lt;br /&gt;0 BGP route-map cache entries using 0 bytes of memory&lt;br /&gt;0 BGP filter-list cache entries using 0 bytes of memory&lt;br /&gt;Bitfield cache entries: current 1 (at peak 2) using 32 bytes of memory&lt;br /&gt;BGP using 57040684 total bytes of memory&lt;br /&gt;BGP activity 310001/0 prefixes, 320001/10000 paths, scan interval 60 secs&lt;br /&gt;&lt;br /&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;br /&gt;172.31.2.2      4 65099     602     322   330002    0    0 03:38:59   310000&lt;br /&gt;&lt;/pre&gt;Yep. It works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-1243667935497254339?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/1243667935497254339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/10/how-to-generate-lots-of-bgp-routes.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1243667935497254339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/1243667935497254339'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/10/how-to-generate-lots-of-bgp-routes.html' title='How to generate lots of BGP routes'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_cMxbIwo9Fsk/S_AifHgm0YI/AAAAAAAAAR4/etQDfl4-QV8/s72-c/quagga-bgp-706519.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-9046956495016617815</id><published>2009-10-09T16:08:00.006-04:00</published><updated>2010-03-24T17:31:23.274-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network management'/><category scheme='http://www.blogger.com/atom/ns#' term='BGP'/><title type='text'>BGP and BFD (Bidirectional Forwading Detection)</title><content type='html'>If you have Ethernet uplink to your ISP, the chances are high that it looks like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_cMxbIwo9Fsk/S6qEbFLX-eI/AAAAAAAAAQY/2TgsG0r7n64/s1600/bgp-bdf1-708081.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_cMxbIwo9Fsk/S6qEbFLX-eI/AAAAAAAAAQY/2TgsG0r7n64/s320/bgp-bdf1-708081.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The Layer2 device could be "on the wire" provider or Ethernet over MPLS service. The problem arises when, for example, connection between Layer2 device and ISP router goes down&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.glinskiy.com/uploaded_images/bgp-bdf2-751409.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_cMxbIwo9Fsk/S6qElNZRGoI/AAAAAAAAAQg/dZfF0K0AL7w/s1600/bgp-bdf2-751409.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_cMxbIwo9Fsk/S6qElNZRGoI/AAAAAAAAAQg/dZfF0K0AL7w/s320/bgp-bdf2-751409.png" /&gt;&lt;/a&gt;&lt;/div&gt;The BGP session with R1 on ISP router will reset immediately, unless you configured "no bgp fast-external-fallover". But R1 will rely on BGP hello messages to detect if neighbor still alive. It might take R1 up to 3 minutes detect that ISP is not available and for these 3 minutes R1 will be sending traffic to black hole instead of re-converging and sending traffic to your backup link. You have backup link, don't you?&lt;br /&gt;Here are the syslog messages from R1 and ISP routers. To imitate link failure I shutdown interface on ISP&lt;br /&gt;&lt;br /&gt;router ISP:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: red;"&gt;Oct  9 17:55:18 UTC&lt;/span&gt;: %LINK-5-CHANGED: Interface GigabitEthernet2/5, changed state to administratively down&lt;br /&gt;Oct  9 17:55:18 UTC: %BGP-5-ADJCHANGE: neighbor 172.31.255.1 Down Interface flap&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;router R1:&lt;br /&gt;&lt;blockquote&gt;Oct  9 17:57:24 UTC: %BGP-5-ADJCHANGE: neighbor 172.31.255.2 Down BGP Notification sent&lt;br /&gt;&lt;span style="color: red;"&gt;Oct  9 17:57:24 UTC&lt;/span&gt;: %BGP-3-NOTIFICATION: sent to neighbor 172.31.255.2 4/0 (hold time expired) 0 bytes&lt;/blockquote&gt;&lt;br /&gt;Note the timestamps of first and last messages. That's not good, especially if every minute of downtime costs you a bundle. You can adjust bgp timers, but lowest you can go is 1 second and it could be hard on CPU.&lt;br /&gt;BFD protocol allows you to go to microseconds level. It is very lightweight and easy to configure.&lt;br /&gt;On interfaces facing Layer2 device apply command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;bfd interval 100 min_rx 100 multiplier 3&lt;/blockquote&gt;To check if BFD is configured properly:&lt;br /&gt;&lt;blockquote&gt;#sho bfd neighbor&lt;br /&gt;&lt;br /&gt;OurAddr       NeighAddr     LD/RD  RH/RS  Holddown(mult)  State     Int&lt;br /&gt;172.31.255.2  172.31.255.1   3/7    Up        0    (3 )   Up        Gi2/5    &lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;under "router bgp" configuration:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;neighbor [neighbor IP]  fall-over bfd&lt;/blockquote&gt;&lt;br /&gt;Now let's imitate link failure again. Shutdown interface on router ISP:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: red;"&gt;Oct  9 18:14:27.408 UTC&lt;/span&gt;: %LINK-5-CHANGED: Interface GigabitEthernet2/5, changed state to administratively down&lt;br /&gt;Oct  9 18:14:27.408 UTC: %BGP-5-ADJCHANGE: neighbor 172.31.255.1 Down Interface flap&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;On R1&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: red;"&gt;Oct  9 18:14:27.673 UTC&lt;/span&gt;: %BGP-5-ADJCHANGE: neighbor 172.31.255.2 Down BFD adjacency down&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The difference now in milliseconds. The hard part is to convince your ISP to configure BFD on their side.&lt;br /&gt;At this moment Cisco supports BFD on Ethernet interfaces only and only for directly connected BGP peers, i.e. no multi-hop BGP.&lt;br /&gt;BFD requires UDP ports 3784 and 3785 to be open in case you have ACL applied to your uplink interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-9046956495016617815?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/9046956495016617815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/10/bgp-and-bfd-bidirectional-forwading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/9046956495016617815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/9046956495016617815'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/10/bgp-and-bfd-bidirectional-forwading.html' title='BGP and BFD (Bidirectional Forwading Detection)'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_cMxbIwo9Fsk/S6qEbFLX-eI/AAAAAAAAAQY/2TgsG0r7n64/s72-c/bgp-bdf1-708081.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-8821110510186592287</id><published>2009-10-06T15:07:00.003-04:00</published><updated>2009-10-06T15:21:36.672-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>CCIE R&amp;S v4.0</title><content type='html'>I just attended webcast about new CCIE R&amp;amp;S written and lab exam. It looks like MPLS portion of the exam is going to be much easier than 642-611 exam which is required for CCIP certification.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-8821110510186592287?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/8821110510186592287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/10/ccie-r-v40.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8821110510186592287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/8821110510186592287'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/10/ccie-r-v40.html' title='CCIE R&amp;S v4.0'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-7262932096001564753</id><published>2009-09-16T13:34:00.002-04:00</published><updated>2012-01-04T21:44:28.829-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>bpduguard vs. bpdufilter</title><content type='html'>Suppose you have a switch with servers connected to it. It's called "access layer switch" in &lt;a href="http://www.cisco.com/en/US/docs/solutions/Enterprise/Data_Center/DC_3_0/DC-3_0_IPInfra.html"&gt;Cisco lingo&lt;/a&gt;. There is no need to go through all spannig-tree states on these host-facing ports. So, you make port transition faster to forwarding mode with "&lt;span style="font-weight: bold;"&gt;switchport portfast&lt;/span&gt;" interface command. One of the benefits is that if your server boots fast, it does not need to wait until port finishes going through all STP port states and can start transmitting data immediately.&lt;br /&gt;Since servers normally should ignore BPDUs coming from a switch, there is no need to send them to a server in the first place. To filter out outgoing BPDUs apply interface command "&lt;span style="font-weight: bold;"&gt;spanning-tree bpdufilter enable&lt;/span&gt;". &lt;br /&gt;But when BPDU is received on the port with bpdufilter enabled, the port's portfast status is disabled and port will participate in spanning-tree.&lt;br /&gt;&amp;nbsp;At all times network needs to be protected from unauthorized device that might decide to participate in your spanning-tree topology and cause spanning-tree loop or try to hijack STP root. Interface command "&lt;span style="font-weight: bold;"&gt;spanning-tree bpduguard enable&lt;/span&gt;" puts interface in err-disable mode whenever BPDU is received from connected device.&lt;br /&gt;What will happen if you have both bpdufilter and bpduguard enabled on the interface?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;spanning-tree portfast&lt;br /&gt;spanning-tree bpdufilter enable&lt;br /&gt;spanning-tree bpduguard enable&lt;/blockquote&gt;bpdufilter takes precedence and bpdugard does not work. Although bpduguard needs more administrative overhead - port needs to be enabled manually - it makes your network more secure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-7262932096001564753?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/7262932096001564753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/09/bpduguard-vs-bpdufilter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/7262932096001564753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/7262932096001564753'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/09/bpduguard-vs-bpdufilter.html' title='bpduguard vs. bpdufilter'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-3865817854771869675</id><published>2009-08-17T16:15:00.002-04:00</published><updated>2010-03-24T17:33:33.566-04:00</updated><title type='text'>Cisco router as Frame-Relay switch</title><content type='html'>There are a lot of examples on the 'Net how to configure Cisco router to act as Frame Relay switch. All of them use command "&lt;span style="font-weight: bold;"&gt;frame-relay route&lt;/span&gt;". Here is (one more) example&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_cMxbIwo9Fsk/S6qFHBG41eI/AAAAAAAAAQo/WSPHw8Qetqo/s1600/frame-relay-741179.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_cMxbIwo9Fsk/S6qFHBG41eI/AAAAAAAAAQo/WSPHw8Qetqo/s320/frame-relay-741179.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the topology on the picture above, the configuration would look like this&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;interface Serial2/0&lt;br /&gt;no ip address&lt;br /&gt;encapsulation frame-relay&lt;br /&gt;no fair-queue&lt;br /&gt;clock rate 128000&lt;br /&gt;frame-relay intf-type dce&lt;br /&gt;frame-relay route 103 interface Serial2/2 301&lt;br /&gt;!&lt;br /&gt;interface Serial2/2&lt;br /&gt;no ip address&lt;br /&gt;encapsulation frame-relay&lt;br /&gt;clock rate 128000&lt;br /&gt;frame-relay intf-type dce&lt;br /&gt;frame-relay route 301 interface Serial2/0 103&lt;br /&gt;end&lt;/blockquote&gt;Here is another way to configure:&lt;br /&gt;&lt;blockquote&gt;interface Serial2/0&lt;br /&gt;no ip address&lt;br /&gt;encapsulation frame-relay&lt;br /&gt;no fair-queue&lt;br /&gt;clock rate 128000&lt;br /&gt;frame-relay intf-type dce&lt;br /&gt;!&lt;br /&gt;interface Serial2/2&lt;br /&gt;no ip address&lt;br /&gt;encapsulation frame-relay&lt;br /&gt;clock rate 128000&lt;br /&gt;frame-relay intf-type dce&lt;br /&gt;!&lt;br /&gt;connect mylink Serial2/0 103 Serial2/2 301&lt;/blockquote&gt;&lt;br /&gt;In latter case I used command "&lt;span style="font-weight: bold;"&gt;connect&lt;/span&gt;". Unlike "&lt;span style="font-weight: bold;"&gt;frame-relay route&lt;/span&gt;", "&lt;span style="font-weight: bold;"&gt;connect&lt;/span&gt;" command can be used only once for each pair of DLCIs that need to be able to talk to each other. If you need to have many Frame Relay links, using "connect" is less error-prone and configuration is easier to read.&lt;br /&gt;To see connection status:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;#show connection all&lt;br /&gt;&lt;br /&gt;ID      Name       Segment 1       Segment 2        State     &lt;br /&gt;========================================&lt;br /&gt;2       mylink      Se2/0 103        Se2/2 301          UP     &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-3865817854771869675?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/3865817854771869675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/08/cisco-router-as-frame-relay-switch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3865817854771869675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/3865817854771869675'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/08/cisco-router-as-frame-relay-switch.html' title='Cisco router as Frame-Relay switch'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_cMxbIwo9Fsk/S6qFHBG41eI/AAAAAAAAAQo/WSPHw8Qetqo/s72-c/frame-relay-741179.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15945726.post-2623220991108466503</id><published>2009-07-20T12:02:00.003-04:00</published><updated>2009-07-20T12:35:44.509-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network management'/><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring'/><title type='text'>Need to find out Cisco switch serial number?</title><content type='html'>Yes, you can do it by logging in and running "show idprom backplane" or "show inventory". What if you have hundreds of switches and need to update your inventory list.  Going to every switch, typing commands and writing down serial numbers is very time consuming. There is also Expect script, but I am not a big fan of putting clear text passwords into code. So, my favorite SNMP to the rescue.&lt;br /&gt;Serial number OID for modular switches (4500 and 6500) is .1.3.6.1.2.1.47.1.1.1.1.11.1. For Catalyst 2960 and 3500:  1.3.6.1.2.1.47.1.1.1.1.11.1001&lt;br /&gt;&lt;br /&gt;Here is the quick shell script to get serial number and location of each switch.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;for i in `cat switches.txt`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;  do &lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;       serial=`snmpwalk -Ov -Oq  -v2c -c public $i  1.3.6.1.2.1.47.1.1.1.1.11.1001`    &lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;      location=`snmpwalk -Ov -Oq  -v2c -c public $i system.sysLocation`&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;      echo -e "$i \t $serial \t $location"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;File switches.txt contains ip addresses of my access switches, one per line. It goes without saying that each switch must have "snmp-server location" configured.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15945726-2623220991108466503?l=blog.glinskiy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.glinskiy.com/feeds/2623220991108466503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.glinskiy.com/2009/07/need-to-find-out-cisco-switch-serial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2623220991108466503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15945726/posts/default/2623220991108466503'/><link rel='alternate' type='text/html' href='http://blog.glinskiy.com/2009/07/need-to-find-out-cisco-switch-serial.html' title='Need to find out Cisco switch serial number?'/><author><name>V. Glinskiy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
