 <?xml-stylesheet type="text/css" href="http://www.routeadmin.com/Data/style/rss1.css" ?> <?xml-stylesheet type="text/xsl" href="http://www.routeadmin.com/Data/style/rss1.xsl" ?>
<rss version="2.0">
  <channel>
    <title>CCNA Postings</title>
    <link>http://www.routeadmin.com/ccna.aspx</link>
    <description />
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>mojoPortal Blog Module</generator>
    <ttl>120</ttl>
    <item>
      <title>RIP</title>
      <description><![CDATA[<p>
	Rip assumes that you've made a misconfiguration and removes all of the rip config if you exit out without entering a network statement. Evil stuff because you think you're losing your mind.</p>
<br /><a href='http://www.routeadmin.com/rip.aspx'>dave.trachsel</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/rip.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/rip.aspx</link>
      <comments>http://www.routeadmin.com/rip.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/rip.aspx</guid>
      <pubDate>Sat, 31 Dec 2011 21:19:00 GMT</pubDate>
    </item>
    <item>
      <title>The Explicit Deny All By Anthony Sequeira</title>
      <description><![CDATA[<p>One of the key facts regarding Access Control Lists (ACLs) that we drill into your head during <a href="http://www.internetworkexpert.com/ccna.htm" target="_blank">CCNA</a> is the fact that the lists you create end with what is called the “implicit” deny all. You do not see it, but the effect is undeniable. Any packets that do not match any of the permit statements in your list get deny treatment. In the case of our filtering access lists, this means the packets are dropped. As you recall from the course, this is why we desperately require at least one permit entry in all of our filtering access control lists.</p>
<p class="post">But what if we want to track what we actually drop as a result of this powerful implicit deny all effect? Well, a clever trick is to end the list with an explicit deny statement and log the result. In this post, we will examine this technique.</p>
<p class="post">Let’s create a named, standard ACL that permit packets sourced from the 10.x.x.x address space.</p>
<div class="post">
<pre>ip access-list standard AL_PERMIT_10
permit 10.0.0.0 0.255.255.255</pre>
</div>
<p class="post">Now I will apply this ACL inbound to a router interface and generate some traffic that matches this statement. When we run the command show access-lists, we can see from the “hit counter” that the permit has caught some matches. But what about packets that have failed?</p>
<div class="post">
<pre>R1(config-std-nacl)#int fa0/0
R1(config-if)#ip access-group AL_PERMIT_10 in
R1(config-if)#end
R1#
R1#show access-lists
Standard IP access list AL_PERMIT_10
10 permit 10.0.0.0, wildcard bits 0.255.255.255 <strong>(57 matches)</strong></pre>
</div>
<p class="post">In order to be alerted about packets that hit the implicit deny all, we need to create an explicit one. If we are really concerned about packets that do not match any permits, we can add the log option so we can be alerted at the command line, in addition to being notified when we do the show access-list command.</p>
<div class="post">
<pre>R1(config)#ip access-list standard AL_PERMIT_10
R1(config-std-nacl)#deny any log</pre>
</div>
<p class="post">After this configuration change, watch what happens when someone from 1.1.1.1 tries to ping into R1 through our interface:</p>
<div class="post">
<pre>R1#
<strong>*Mar  1 00:12:23.251: %SEC-6-IPACCESSLOGNP: list AL_PERMIT_10 denied 0 1.1.1.1 -&gt; 10.0.0.1, 1 packet</strong>
R1#show access-lists
Standard IP access list AL_PERMIT_10
10 permit 10.0.0.0, wildcard bits 0.255.255.255 (117 matches)
20 deny   any log <strong>(5 matches)</strong></pre>
</div>
<p class="post">One question I often get from students at this point is: why did we only get one notification (of one packet) via the command line system message, but there were in fact 5 packets that were blocked (as depicted in the show command output)?</p>
<p class="post">The answer is that the IOS is being smart here and it will batch up the log messages so that the system is not overwhelmed in trying to show us all of these matches in real time.</p>
<p class="post">I hope you are enjoying CCNA studies here at <a href="http://blog.internetworkexpert.com/2010/01/02/ccna-the-explicit-deny-all/www.ine.com" target="_blank">INE</a>!</p><br /><a href='http://www.routeadmin.com/the-explicit-deny-all-by-anthony-sequeira.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/the-explicit-deny-all-by-anthony-sequeira.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/the-explicit-deny-all-by-anthony-sequeira.aspx</link>
      <comments>http://www.routeadmin.com/the-explicit-deny-all-by-anthony-sequeira.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/the-explicit-deny-all-by-anthony-sequeira.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 21:00:50 GMT</pubDate>
    </item>
    <item>
      <title>Searching for specific text using linenum and includes By David Bombal</title>
      <description><![CDATA[<p><span style="font-family: Verdana,sans-serif; color: black; font-size: 9pt;" lang="en-us">
<p>Here we are combining two powerful IOS commands to save time when searching for text.<br /><br />If you want to learn more about the individual commands, please get download our "Cool IOS Commands" EBook from<a style="color: #cc0000;" title="http://clicks.aweber.com/y/ct/?l=Ko9vF&amp;m=1purZ7CD5.QCWD&amp;b=JY.W7U5I2JJNLX.UttrwJQ" href="http://clicks.aweber.com/y/ct/?l=Ko9vF&amp;m=1purZ7CD5.QCWD&amp;b=JY.W7U5I2JJNLX.UttrwJQ"><span style="color: #0066cc;"> http://www.ConfigureTerminal.com/Cool_IOS_Commands.html</span></a></p>
<p>In this example, we are looking to see if a dial-peer with a destination pattern of 1000 has been created, and we want to see what dial-peer number it is using. The first command we will use is:<br /><br />        <strong> show run linenum | include 1000<br /></strong><br />This will display the text with the destination pattern as follows:<br /><br />         Router#show run linenum | include 1000<br />         254 : destination-pattern 1000<br />         280 : number 1000<br />         306 : scheduler allocate 20000 1000<br /><br />We can see that the destination pattern command is on line 254. Now we can do a show run starting with line number 253:<br /><br />         Router#show run linenum | begin 253<br />         253 : dial-peer voice 1321 voip<br />         254 : destination-pattern 1000<br />         255 : session target ipv4:10.1.1.6<br /><br />Thus we can see that the dial peer number used is 1321.<br /><br />There are many cases where this can be used; another example would be with IPSec crypto maps or ISAKMP policies.<br /><br />These commands can be used in many cases to save time when searching for text.</p>
</span></p><br /><a href='http://www.routeadmin.com/searching-for-specific-text-using-linenum-and-includes-by-david-bombal-.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/searching-for-specific-text-using-linenum-and-includes-by-david-bombal-.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/searching-for-specific-text-using-linenum-and-includes-by-david-bombal-.aspx</link>
      <comments>http://www.routeadmin.com/searching-for-specific-text-using-linenum-and-includes-by-david-bombal-.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/searching-for-specific-text-using-linenum-and-includes-by-david-bombal-.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 06:10:01 GMT</pubDate>
    </item>
    <item>
      <title>How to stop password recovery By David Bombal</title>
      <description><![CDATA[<p><span style="font-family: Verdana,sans-serif; color: black; font-size: 9pt;" lang="en-us">
<p>        How do I disable Password Recovery? (Which version does it apply to?)       </p>
<p> The command to stop password recovery is<strong>"no service password-recovery".</strong><br /><br />The "no service password-recovery" feature is a security enhancement that prevents anyone with console access from accessing the router configuration and clearing the password and gaining access to the router's configuration.<br /><br />Please note that they will still be able to reset the router to factory defaults, but will not gain access to the configuration. It will also prevent anyone from changing the configuration register values and accessing NVRAM. <br /><br />Normally when doing password recovery you are able to get into privileged mode and copy the startup config to running config</p>
</span></p><br /><a href='http://www.routeadmin.com/how-to-stop-password-recovery-by-david-bombal-.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/how-to-stop-password-recovery-by-david-bombal-.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/how-to-stop-password-recovery-by-david-bombal-.aspx</link>
      <comments>http://www.routeadmin.com/how-to-stop-password-recovery-by-david-bombal-.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/how-to-stop-password-recovery-by-david-bombal-.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 06:08:11 GMT</pubDate>
    </item>
    <item>
      <title>VTY passwords - are they required and how to you configure them By David Bombal</title>
      <description><![CDATA[<p>Here are 4 methods (CCNA/CCENT) <br /><br />Here are two questions that a lot of new Cisco Engineers struggle with.</p>
<p class="style8">&lt;!--[if !supportLists]--&gt;1)    &lt;!--[endif]--&gt; Are passwords required on vty lines?</p>
<p class="style9">&lt;!--[if !supportLists]--&gt;2)    &lt;!--[endif]--&gt; How do you configure vty passwords?</p>
<p><strong>Here we look at 4 options: </strong></p>
<p class="style8">&lt;!--[if !supportLists]--&gt;1)    &lt;!--[endif]--&gt; Line passwords</p>
<p class="style8">&lt;!--[if !supportLists]--&gt;2)    &lt;!--[endif]--&gt; Local username passwords</p>
<p class="style8">&lt;!--[if !supportLists]--&gt;3)    &lt;!--[endif]--&gt; No login</p>
<p class="style9">&lt;!--[if !supportLists]--&gt;4)    &lt;!--[endif]--&gt; AAA</p>
<p>By default, when you telnet to the vty line of a router or switch, you will see the following output:</p>
<p>           C:\&gt;telnet 10.1.2.1</p>
<p>           Password required, but none set</p>
<p>           [Connection to 10.1.2.1 closed by foreign host]</p>
<p>The router/switch will drop your connection as a password is required for access to the router/switch. So by default you can see that a password is required to telnet to the vty lines of a router or switch.</p>
<p><strong>Line passwords: </strong></p>
<p>A password can be used on the line for access. This is easy to setup as there is only one password, but it not very secure because everyone shares that single password and it is difficult to track who has made changes.</p>
<p>This is configured as follows:</p>
<p>           Router&gt;enable</p>
<p> </p>
<p>          Router#configure terminal</p>
<p>           Router(config)#line vty 0 4</p>
<p>           Router-2(config-line)#login</p>
<p>           % Login disabled on line 2, until 'password' is set</p>
<p>           % Login disabled on line 3, until 'password' is set</p>
<p>           % Login disabled on line 4, until 'password' is set</p>
<p>           % Login disabled on line 5, until 'password' is set</p>
<p>           % Login disabled on line 6, until 'password' is set</p>
<p>           Router(config-line)#password configureterminal.com</p>
<p> When a telnet connection is now made to the router, the router will prompt for a password:</p>
<p>            C:\&gt;telnet 10.1.2.1</p>
<p>           User Access Verification</p>
<p>           Password:</p>
<p>Enter your password and you are now in user mode:</p>
<p>           Router&gt;</p>
<p><strong>Local usernames: </strong></p>
<p>This is better than using a line password as different users have their own individual passwords. Each use is required to enter their own passwords rather than using a shared password. This helps with logging which user has made changes to the router.</p>
<p> </p>
<p>           Router&gt;enable</p>
<p>           Router#configure terminal</p>
<p>           Router(config)#username david password configureterminal.com</p>
<p>           Router(config)#line vty 0 4</p>
<p>           Router-2(config-line)#login local</p>
<p>Testing:</p>
<p>           C:\&gt;telnet 10.1.2.1</p>
<p>           User Access Verification</p>
<p>           Username:david</p>
<p>           Password:</p>
<p>Enter your password and you are now in user mode:</p>
<p>           Router&gt;</p>
<p> <strong>No password (not recommended): </strong></p>
<p>It is possible to set up a router to allow vty connections without authentication. This is not a good idea for the real world, but in a lab environment it can save time.</p>
<p> </p>
<p>           Router&gt;enable</p>
<p>           Router#configure terminal</p>
<p>           Router(config)#line vty 0 4</p>
<p>           Router-2(config-line)#no login</p>
<p> </p>
<p>Testing:</p>
<p>           C:\&gt;telnet 10.1.2.1</p>
<p>           Router&gt;</p>
<p> </p>
<p>Notice that no authentication was required. You are taken directly to user mode.</p>
<p> <strong>AAA servers: </strong></p>
<p>This is the most secure and scalable way of implementing authentication. This uses a central server where all usernames and passwords are stored. A windows 2000/2003 server could be used for example, so that users use the same passwords on windows and routers/switches.</p>
<p>           Router&gt;enable</p>
<p>           Router#configure terminal</p>
<p>           Router(config)#aaa new-model</p>
<p>           Router(config)#aaa authentication login default group tacacs+</p>
<p>           Router(config)#line vty 0 4</p>
<p>           Router(config)#login authentication default</p>
<p> </p>
<p>Testing:</p>
<p>C:\&gt;telnet 10.1.2.1</p>
<p> </p>
<p>           User Access Verification</p>
<p>           Username: david</p>
<p>           Password:</p>
<p>           Router&gt;</p>
<p>As you can see, there are various ways to secure the vty lines on routers &amp; switches. </p><br /><a href='http://www.routeadmin.com/vty-passwords-are-they-required-and-how-to-you-configure-them-by-david-bombal-.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/vty-passwords-are-they-required-and-how-to-you-configure-them-by-david-bombal-.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/vty-passwords-are-they-required-and-how-to-you-configure-them-by-david-bombal-.aspx</link>
      <comments>http://www.routeadmin.com/vty-passwords-are-they-required-and-how-to-you-configure-them-by-david-bombal-.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/vty-passwords-are-they-required-and-how-to-you-configure-them-by-david-bombal-.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 06:06:26 GMT</pubDate>
    </item>
    <item>
      <title>Using the power of regular expressions with Show commands By David Bombal</title>
      <description><![CDATA[<p><span style="font-family: Verdana,sans-serif; color: black; font-size: 9pt;" lang="en-us">This is an advanced topic, so get your ready...<br /><br />We have covered some basic regular expressions in our "Cool IOS Commands" EBook. Here I want to show you more <strong>complicated examples</strong> of how to use the power of regular expressions to filter output. This will allow the router to do the searching for text, rather than us doing it manually. <br /><br />Regular expressions are used in many places in the IOS including BGP AS paths and Voice number translations. They are also used in other languages like Perl and TCL. Here however, we are going to concentrate on regular expressions with IOS show commands. We are going to use them to search for specific sets of strings. <br /><br />A regular expression is a pattern (for example a phrase or a number) that can be used very effectively to filter output. Regular expressions are case-sensitive and allow for complex matching requirements. <br /><br />I start with some simple examples so that you can learn each regular expression character individually and then we will combine them into complicated strings. As always with programming, there are many ways to do things, so use your imagination:<br /><br /><strong>^ Regular Expression </strong><br />Use this to look for text at the beginning of a string.<br /><br />For Example: ^123 matches 1234, but not 01234 or 91234 <br /><br />On a router we can demonstrate this as follows: (without any regular expressions)<br /><br />          Router#show run | include ip<br />          ip cef<br />          no ip dhcp use vrf connected<br />          ip dhcp pool ITS<br />          option 150 ip 10.1.1.1<br />          no ip domain lookup<br />          voice service voip<br />          allow-connections h323 to sip<br />          allow-connections sip to h323<br />          allow-connections sip to sip<br />          ip address 192.168.10.1 255.255.255.0<br />          ip address 192.168.11.1 255.255.255.0<br />          ip address 192.168.12.1 255.255.255.0<br />          ip address 192.168.13.1 255.255.255.0<br />          ip address 192.168.14.1 255.255.255.0<br />          &lt;MORE&gt;<br /><br />However, if we use the following:<br />          Router#show run | include ^ip<br /><br />          The output is:<br />          Router#show run | include ^ip<br />          ip cef<br />          ip dhcp pool ITS<br />          ip http server<br /><br />Note - as expected, every line begins with "ip", string we matched on<br /><br /><br /><strong>$ Regular Expression:</strong><br />Use this to look for text at the end of a string<br /><br />For Example123$ matches 0123, but not 1234 <br /><br />On a router we can demonstrate this as follows: (without any regular expressions)<br /><br />          Router#show run | include 1<br />          Current configuration : 5174 bytes<br />          ! Last configuration change at 15:27:21 UTC Wed Jan 24 2007<br />          ! NVRAM config last updated at 14:25:01 UTC Wed Jan 24 2007<br />          version 12.4<br />          network 10.1.1.0 255.255.255.0<br />          option 150 ip 10.1.1.1<br />          default-router 10.1.1.1<br />          source-address 10.1.1.1 port 5060<br />          create profile sync 0002381328447096<br />          voice register dn 1<br />          number 1100<br />          number 1101<br />          voice register pool 1<br />          id mac 0003.6B8B.174A<br />          number 1 dn 1<br />          codec g711ulaw<br />          ip address 192.168.10.1 255.255.255.0<br />          interface Loopback1<br />          ip address 192.168.11.1 255.255.255.0<br />          ip address 192.168.12.1 255.255.255.0<br />          ip address 192.168.13.1 255.255.255.0<br /><br />but if we change it to <br />          Router#show run | include 1$<br /><br />The output is:<br />          Router#show run | include 1$<br />          voice register dn 1<br />          number 1101<br />          voice register pool 1<br />          number 1 dn 1<br />          interface Loopback1<br />          interface Loopback11<br />          interface Loopback21<br />          interface FastEthernet0/1<br />          session target ipv4:10.1.1.1<br />          session target ipv4:10.1.1.11<br />          session target ipv4:10.1.1.21<br />          session target ipv4:10.1.1.31<br />          session target ipv4:10.1.1.41<br />          session target ipv4:10.1.1.51<br />          session target ipv4:10.1.1.61<br />          number 1001<br />          ephone 1<br />          button 1:1<br /><br />Note - as expected, every line ends "1", string we matched on.<br /><br /><br /><strong>. Regular Expression:</strong><br />The "." matches any single character. <br /><br />For example:<br />0.0 matches 0x0 and 020 <br />t..t matches strings such as test, text, and tart <br /><br />On a router, let's look for all lines that end in 0 and another single character:<br /><br />          Router#sh run | include 0.$<br />          ! Last configuration change at 15:27:21 UTC Wed Jan 24 2007<br />          ! NVRAM config last updated at 14:25:01 UTC Wed Jan 24 2007<br />          load 7960-7940 P0S3-07-4-00<br />          number 1100<br />          number 1101<br />          clock rate 2000000<br />          destination-pattern 1000<br />          load 7910 P00405000700<br />          ip source-address 10.1.1.1 port 2000<br />          number 1000<br />          number 1001<br />          scheduler allocate 20000 1000<br />          <br />Note: All the lines end with 0 and another single character.<br /><br /><br /><strong>_ Regular Expression:</strong><br />This replaces a long regular expression list by matching a comma (,), left brace ({), right brace (}), the beginning of the input string, the end of the input string, or a space. <br /><br />The characters _1400_ can match any of the following strings: <br />          ^1400$ <br />          ^1400space <br />          space1400 <br />          {1400, <br />          ,1400, <br />          {1400} <br />          ,1400, <br /><br />We are going to use it looking for a space - in the following example, we are looking for loopback interfaces with 2:<br /><br />          Router#show ip route | include k2<br />          C 192.168.12.0/24 is directly connected, Loopback2<br />          C 192.168.31.0/24 is directly connected, Loopback21<br />          C 192.168.30.0/24 is directly connected, Loopback20<br />          C 192.168.32.0/24 is directly connected, Loopback22<br />          <br />If however, we use the "_" character we see the following:<br /><br />          Router#show ip route | include k2_<br />          C 192.168.12.0/24 is directly connected, Loopback2<br /><br />Note: Only loopback interface 2 is displayed.<br /><br /><br /><strong>[ ] Regular Expression:</strong><br />This matches the characters or a range of characters separated by a hyphen, within left and right square brackets. <br />[02468w] matches for example 0, 4, and w, but not 1, 9, or K <br /><br />On a router we can demonstrate as follows:<br /><br />          Router#show ip route | include k[1-9]<br />          C 192.168.12.0/24 is directly connected, Loopback2<br />          C 192.168.29.0/24 is directly connected, Loopback19<br />          C 192.168.28.0/24 is directly connected, Loopback18<br />          C 192.168.13.0/24 is directly connected, Loopback3<br />          C 192.168.14.0/24 is directly connected, Loopback4<br />          C 192.168.31.0/24 is directly connected, Loopback21<br />          C 192.168.30.0/24 is directly connected, Loopback20<br />          C 192.168.15.0/24 is directly connected, Loopback5<br />          C 192.168.25.0/24 is directly connected, Loopback15<br />          C 192.168.24.0/24 is directly connected, Loopback14<br />          C 192.168.27.0/24 is directly connected, Loopback17<br />          C 192.168.26.0/24 is directly connected, Loopback16<br />          C 192.168.11.0/24 is directly connected, Loopback1<br />          C 192.168.21.0/24 is directly connected, Loopback11<br />          C 192.168.20.0/24 is directly connected, Loopback10<br />          C 192.168.23.0/24 is directly connected, Loopback13<br />          C 192.168.22.0/24 is directly connected, Loopback12<br />          C 192.168.17.0/24 is directly connected, Loopback7<br />          C 192.168.16.0/24 is directly connected, Loopback6<br />          C 192.168.19.0/24 is directly connected, Loopback9<br />          C 192.168.32.0/24 is directly connected, Loopback22<br />          C 192.168.18.0/24 is directly connected, Loopback8<br />          <br />However, if we combine this with the "_" character:<br /><br />          Router#show ip route | include k[1-9]_<br />          C 192.168.12.0/24 is directly connected, Loopback2<br />          C 192.168.13.0/24 is directly connected, Loopback3<br />          C 192.168.14.0/24 is directly connected, Loopback4<br />          C 192.168.15.0/24 is directly connected, Loopback5<br />          C 192.168.11.0/24 is directly connected, Loopback1<br />          C 192.168.17.0/24 is directly connected, Loopback7<br />          C 192.168.16.0/24 is directly connected, Loopback6<br />          C 192.168.19.0/24 is directly connected, Loopback9<br />          C 192.168.18.0/24 is directly connected, Loopback8<br />          <br /><br /><strong>| Regular Expression: </strong><br />Use the | as a logical or statement.<br />Matches one of the characters or character patterns on either side of the vertical bar. <br />A(B|C)D matches ABD and ACD, but not AD, ABCD, ABBD, or ACCD <br /><br />As an example, if you want to look for a route in the routing table that contains routes with 10 or 20 in it:<br />          Router#show ip route | include 10|20<br />          C 192.168.10.0/24 is directly connected, Loopback0<br />          C 192.168.20.0/24 is directly connected, Loopback10<br /><br /><br /><strong>\ Regular Expression:</strong><br />Use this if the following character is not a wildcard, but an actual character you are looking for. <br /><br />As an example, if you do the following:<br /><br />          Router#show running-config | include 10..<br /><br />The result you get is:<br /><br />          network 10.1.1.0 255.255.255.0<br />          option 150 ip 10.1.1.1<br />          default-router 10.1.1.1<br />          source-address 10.1.1.1 port 5060<br />          ip address 10.1.1.1 255.255.255.0<br />          destination-pattern 10..<br />          session target ipv4:10.1.1.1<br />          session target ipv4:10.1.1.6<br />          session target ipv4:10.1.1.11<br />          session target ipv4:10.1.1.16<br />          session target ipv4:10.1.1.21<br />          session target ipv4:10.1.1.26<br />          session target ipv4:10.1.1.31<br />          session target ipv4:10.1.1.36<br />          session target ipv4:10.1.1.41<br />          dial-peer voice 10 voip<br />          session target ipv4:10.1.1.46<br />          session target ipv4:10.1.1.51<br />          session target ipv4:10.1.1.56<br />          session target ipv4:10.1.1.61<br />          session target ipv4:10.1.1.66<br />          registrar ipv4:10.1.1.1 expires 60<br />          load 7910 P00405000700<br />          --More--<br /><br />If you changed it to the following:<br /><br />          Router#show running-config | include 10..$<br /><br />The result is:<br /><br />          destination-pattern 10..<br />          number 1000<br />          number 1001<br />          scheduler allocate 20000 1000<br /><br />But if we now change it to use the "\" character, we can tell the router that we are actually looking for a ".", not using it as a wildcard:<br /><br />          Router#show running-config | include 10\.\.<br /><br />The result now is:<br /><br />          destination-pattern 10..<br /><br />Here is another example:<br /><br />          Router#sh ip route | include \.20|\.10<br /><br />This will look for anything entries in the routing table that contain a . followed by 20 or 10 (looking for the . in the IP address)<br /><br />The result is:<br /><br />          C 192.168.10.0/24 is directly connected, Loopback0<br />          C 192.168.20.0/24 is directly connected, Loopback10<br /><br /><br /><strong>? Regular Expression:</strong><br />This matches zero or one occurrence of the pattern. (Remember to precede the question mark with Ctrl-V sequence to prevent it from being interpreted as a help command.) <br />ba?b matches bb and bab <br /><br />          route-views.oregon-ix.net&gt;show ip route | include 25?5
<p>          B     216.221.5.0/24 [20/2954] via 208.51.134.254, 1w1d          &lt;========= 25 is matched<br />          B     210.51.225.0/24 [20/0] via 203.62.252.186, 2w3d<br />          B     204.255.51.0/24 [20/4294967294] via 144.228.241.81, 3w5d           &lt;========= 255 is matched<br />          B     203.34.233.0/24 [20/0] via 203.62.252.186, 3w5d<br />          B     192.68.132.0/24 [20/0] via 216.218.252.145, 3w5d<br />          B     222.35.252.0/24 [20/559] via 64.125.0.137, 1w0d<br />          B     212.205.24.0/24 [20/7549] via 64.125.0.137, 2d05h<br />          B     212.103.178.0/24 [20/0] via 216.218.252.145, 2w3d<br />          B     209.50.226.0/24 [20/124] via 64.125.0.137, 3w5d<br />          B     208.50.227.0/24 [20/3107] via 208.51.134.254, 1d22h<br />          B     203.254.52.0/24 [20/0] via 213.140.32.146, 1w1d<br />          B     203.1.203.0/24 [20/0] via 203.62.252.186, 3d03h<br />          B     202.171.96.0/24 [20/361] via 129.250.0.11, 5d19h<br /><br /><br /><strong>+ Regular Expression:</strong><br />This matches one or more sequences of the character preceding the plus sign. <br />5+ requires there to be at least one number 5 in the string to be matched <br /><br />In this example we are searching for 0 followed by one or more 0's:<br /><br />          Router#sh run | i 00+</p>
<p>          load 7960-7940 P0S3-07-4-00<br />          create profile sync 0002381328447097<br />          number 1100<br />          id mac 0003.6B8B.174A<br />          clock rate 2000000<br />          tftp-server flash:P0S3-07-4-00.bin<br />          tftp-server flash:P003-07-4-00.bin<br />          tftp-server flash:P0S3-07-4-00.loads<br />          tftp-server flash:P003-07-4-00.sbn<br />          tftp-server flash:P0S3-07-4-00.sb2<br />          tftp-server flash:P00405000700.bin<br />          tftp-server flash:P00405000700.sbn<br />          tftp-server flash:P0030702T023.bin<br />          tftp-server flash:P0030702T023.loads<br />          tftp-server flash:P0030702T023.sb2<br />          tftp-server flash:P0030702T023.sbn<br />          load 7910 P00405000700<br />          load 7960-7940 P0030702T023<br />          ip source-address 10.1.1.1 port 2000<br />          create cnf-files version-stamp 7960 Jan 28 2007 14:22:09<br />          number 1000<br />          number 1001<br /><br /><strong>[] Regular Expression:</strong><br />Nest characters for matching. Separate endpoints of a range with a dash (-). <br />(18)* matches any number of the two-character string 18 <br />([A-Za-z][0-9])+ matches one or more instances of letter-digit pairs: b8 and W4, as examples <br /><br />          Router#sh run | i ([A-Za-z][0-9])+</p>
<p>          allow-connections h323 to sip<br />          allow-connections sip to h323<br />          load 7960-7940 P0S3-07-4-00<br />          id mac 0003.6B8B.174A<br />          codec g711ulaw<br />          interface Loopback0<br />          interface Loopback1<br />          interface Loopback2<br />          interface Loopback3<br />          interface Loopback4<br />          interface Loopback5<br />          interface Loopback6<br />          interface Loopback7<br />          interface Loopback8<br />          interface Loopback9<br />          interface Loopback10<br />          interface Loopback11<br />          interface Loopback12<br />          interface Loopback13<br />          interface Loopback14<br />          interface Loopback15 <br /><br /><strong>* Regular Expression:</strong><br />Matches zero or more sequences of the character preceding the asterisk. Also acts as a wildcard for matching any number of characters. <br />0* matches any occurrence of the number 0 including none <br /><br />10\..* matches the characters 10. and any characters that follow 10.<br /><br /><br />          Router#sh run | i 10\..*</p>
<p>          network 10.1.1.0 255.255.255.0<br />          option 150 ip 10.1.1.1<br />          default-router 10.1.1.1<br />          source-address 10.1.1.1 port 5060<br />          ip address 192.168.10.1 255.255.255.0<br />          ip address 10.1.1.1 255.255.255.0<br />          destination-pattern 10..<br />          session target ipv4:10.1.1.1<br />          session target ipv4:10.1.1.6<br />          session target ipv4:10.1.1.11<br />          session target ipv4:10.1.1.16<br />          session target ipv4:10.1.1.21<br />          session target ipv4:10.1.1.26<br />          session target ipv4:10.1.1.31<br />          session target ipv4:10.1.1.36<br />          session target ipv4:10.1.1.41<br />          session target ipv4:10.1.1.46<br />          session target ipv4:10.1.1.51<br />          session target ipv4:10.1.1.56<br />          session target ipv4:10.1.1.61<br />          session target ipv4:10.1.1.66<br /><br />In this section we learnt about the different regular expressions and saw some examples. In the next section, let's use regular expressions on an Internet Backbone router.</p>
</span></p><br /><a href='http://www.routeadmin.com/using-the-power-of-regular-expressions-with-show-commands-by-david-bombal.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/using-the-power-of-regular-expressions-with-show-commands-by-david-bombal.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/using-the-power-of-regular-expressions-with-show-commands-by-david-bombal.aspx</link>
      <comments>http://www.routeadmin.com/using-the-power-of-regular-expressions-with-show-commands-by-david-bombal.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/using-the-power-of-regular-expressions-with-show-commands-by-david-bombal.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 06:02:40 GMT</pubDate>
    </item>
    <item>
      <title>Cisco IOS Macros By Richard Bannister</title>
      <description><![CDATA[<p> Have you ever wanted a way of storing templates for certain port types, for example an uplink port has an extremely different configuration to an access port...  Consistency is key to good network administration and that's why macros are a great tool.</p>
<p><strong>What is Cisco's macro implementation?</strong><br /><br />The smartport macro feature was introduced in IOS version 12.1(20)EA1.  Default templates are stored on your device, to view the commands stored in the macros execute the following command:</p>
<p>         show parser macro</p>
<p>Each macro is a set of CLI commands that are defined and "wrapped-up".  When a macro is applied the commands are simply dumped at that level.  Global and interface specific macro's can be created but we are going to focus on creating custom interface macro's.<br /><br /><strong>General guidelines:<br /></strong><br />Creating a macro is very similar to creating a banner, a character has to be used to identify the start and end of the macro - for example "@" is used by default.<br />Names are case sensitive.  When a macro is applied all existing configuration is maintained, if more than one macro is applied a description is amended to record a basic history.  Macros are stored in running-configuration until saved to startup-configuration, if a macro is amended the changes aren't sent to interfaces which have the macro applied - the macro would need re-applying.<br /><br /><strong>How to create a custom macro:</strong><br /><br />         configure terminal<br />         !=== Enter global configuration mode<br /><br />         macro name <em>macro-name</em><br />         !=== Create macro<br /><br />         "Enter macro commands one per line.  End with the character '@'."<br />         <em>cli command 1<br /></em>         <em>cli command 2<br /></em>         <em>cli command 3<br /></em>         !=== Enter commands<br />         @<br />         !=== Finish macro<br /><br /><strong>Apply macro:<br /><br />         </strong>configure terminal<strong><br /></strong>         interface FastEthernet0/1<em><br /></em>         !=== Enter interface configuration<br />         macro apply <em>macro-name<br /></em>         !=== Apply macro<br /><br /><strong>Verify:</strong><br /><br />         show running-configuration | be macro<br />         !=== Shortcut to first instance of the string "macro"<br /><strong><br /></strong>         macro name <em>macro-name<br /></em>         <em>cli command 1<br /></em>         <em>cli command 2<br /></em>         <em>cli command 3<br /></em>         @<br />         !=== Verify macro exists in config<br />         /FastEthernet0/1<br />         !=== Shortcut to string "FastEthernet0/1"<br />         <em>cli command 1<br /></em>         <em>cli command 2<br /></em>         <em>cli command 3<br /></em>         !=== Verify commands exist on interface<em><br /></em><strong><br />Parameters:<br /><br /></strong>Not all IOS commands are fixed, for example when applying the command "switchport access vlan ?" ? represents a value which can change depending on the individual switchport.  Cisco included the ability to define a parameter in a macro which when applied can be used to specify what the variable is.<br /><br />For example:<br /><br />         configure terminal<br />         macro name changevlan<br />         switchport access vlan $access<br />         @<br />         !=== Create macro<br /><br />         interface FastEthernet 0/1<br />         macro apply changevlan $access 100<br />         !=== Apply macro - variable = 100 - put interface in vlan 100<br /><strong><br /><br />Handy custom macro templates</strong>:<br /><strong><br /></strong>If some of the commands below don't make any sense whatsoever don't panic, a layer 2 security ebook covering many of them is in the first stages of creation.<br /><br />         macro name data<br />         switchport<br />         switchport mode access<br />         switchport access vlan $access<br />         switchport port-security<br />         switchport port-security maximum 1<br />         switchport port-security aging time 2<br />         switchport port-security aging type inactivity<br />         switchport port-security violation protect<br />         spanning-tree portfast<br />         spanning-tree bpduguard enable<br />         spanning-tree bpdufilter enable<br />         ip dhcp snooping limit rate 10<br />         storm-control broadcast level 20.00<br />         storm-control multicast level 50.00<br />         storm-control unicast level 30.00<br />         storm-control action trap<br />         no cdp enable<br />         no snmp trap link-status<br />         @</p>
<p>         macro name datavoice<br />         switchport<br />         switchport mode access<br />         switchport access vlan $access<br />         switchport voice vlan $voice<br />         switchport port-security<br />         switchport port-security maximum 3<br />         switchport port-security aging time 2<br />         switchport port-security aging type inactivity<br />         switchport port-security violation protect<br />         srr-queue bandwidth share 10 10 60 20<br />         srr-queue bandwidth shape  10  0  0  0<br />         mls qos trust device cisco-phone<br />         mls qos trust cos<br />         auto qos voip cisco-phone<br />         spanning-tree portfast<br />         spanning-tree bpduguard enable<br />         spanning-tree bpdufilter enable<br />         ip dhcp snooping limit rate 10<br />         storm-control broadcast level 20.00<br />         storm-control multicast level 50.00<br />         storm-control unicast level 30.00<br />         storm-control action trap<br />         cdp enable<br />         no snmp trap link-status<br />         @</p>
<p>         macro name uplink<br />         switchport trunk encapsulation dot1q<br />         switchport mode trunk<br />         switchport trunk native vlan $native<br />         switchport trunk allowed vlan all<br />         switchport nonegotiate<br />         auto qos voip trust<br />         mls qos trust dscp<br />         spanning-tree link-type point-to-point<br />         ip arp inspection trust<br />         ip dhcp snooping trust<br />         ip dhcp snooping limit rate 100<br />         ip dhcp relay information trusted<br />         flowcontrol receive desired<br />         udld port<br />         cdp enable<br />         snmp trap link-status<br />         @<br /><br /><strong>Handy tips</strong><br /><br />A macro may contain the entire configuration wanted on an interface, if this is the case and you want to ensure that the interface configuration is blank use the default command first:<br /><br />         configure terminal<br />         default interface FastEthernet0/1<br />         interface FastEthernet0/1<br />         macro apply data $access 100<br /><br />To apply a macro to more than one interface simply use the interface range command:</p>
<p>          configure terminal<br />          interface range FastEthernet 0/1 - 24<br />          macro apply data $access 100</p>
<p>If AAA is offloaded to a TACACS server for config-command authorization applying a macro to an interface range can fail due to the delay created by the request and approval procedure for each command.  I have found that although it's a little naughty the following can get around this:<br /><br />          configure terminal<br />          no aaa new-model<br />          default interface range FastEthernet0/1 - 24<br />          interface range FastEthernet0/1 - 24<br />          macro apply data $access 100<br />          exit<br />          aaa new-model</p>
<p>Macro descriptions can be managed like a normal interface description:<br /><br />          configure terminal<br />          interface FastEthernet0/1<br />          no macro description<br />          macro description data<br /><br />"macro trace <em>macro-name</em>" instead of "macro apply <em>macro-name</em>" will display commands as they are entered</p>
<p>Modifying of macro's isn't possible, creating a macro with the same name will overwrite the existing macro (ensure all commands are present)<br /><br />Don't use exit or end within a macro, this can cause commands to be executed at a different level.<br /><br />I have found that macro configuration cannot be rolled out to devices using certain management tools so bear this in mind.</p>
<p> </p><br /><a href='http://www.routeadmin.com/cisco-ios-macros-by-richard-bannister.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/cisco-ios-macros-by-richard-bannister.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/cisco-ios-macros-by-richard-bannister.aspx</link>
      <comments>http://www.routeadmin.com/cisco-ios-macros-by-richard-bannister.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/cisco-ios-macros-by-richard-bannister.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 05:59:43 GMT</pubDate>
    </item>
    <item>
      <title>How to force a minimum password length on a router By David Bombal</title>
      <description><![CDATA[<p>You can by default set a password of a single character on a router, or a very short password. This is obviously a security risk. It would be better to force a password of a minimum length of 8 or more characters.<br /><br />This command was introduced in IOS version 12.3(1). The default length is 6 characters.<br /><br />To set a minimum password length, enter the following commands:<br /><br />         Router&gt;enable<br />         Router#configure terminal<br />         Router(config)#security passwords min-length 8<br /><br />If a user now attempts to set the enable password to cisco for example, the following happens:<br /><br />         Router(config)#enable password cisco<br />         % Password too short - must be at least 8 characters. Password configuration failed<br />         Router(config)#<br /><br />OR <br /><br />        Router(config)#username david password cisco<br />        % Password too short - must be at least 8 characters. Password configuration failed<br />        Router(config)#<br /><br />Recommended that you do this to insure better security</p><br /><a href='http://www.routeadmin.com/how-to-force-a-minimum-password-length-on-a-router-by-david-bombal.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/how-to-force-a-minimum-password-length-on-a-router-by-david-bombal.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/how-to-force-a-minimum-password-length-on-a-router-by-david-bombal.aspx</link>
      <comments>http://www.routeadmin.com/how-to-force-a-minimum-password-length-on-a-router-by-david-bombal.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/how-to-force-a-minimum-password-length-on-a-router-by-david-bombal.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 05:58:13 GMT</pubDate>
    </item>
    <item>
      <title>Archive running-config By David Bombal</title>
      <description><![CDATA[<p><span style="font-family: Verdana,sans-serif; color: black; font-size: 9pt;" lang="en-us"><span style="color: #0058a9; font-size: 16px; font-weight: 700;"><a id="4" name="four"></a></span>
<p>To save a copy of the current running configuration to the Cisco IOS configuration archive, use the archive config command in privileged EXEC mode. <br /><br />         <strong>archive config <br /></strong><br />The Cisco IOS configuration archive is intended to provide a mechanism to store, organize, and manage an archive of Cisco IOS configuration files in order to enhance the configuration rollback capability provided by the configure replace command. Before this feature was introduced, you could save copies of the running configuration using the copy running-config destination-url command, storing the target file either locally or remotely. However, this method lacked any automated file management. On the other hand, the Configuration Replace and Configuration Rollback feature provides the capability to automatically save copies of the running configuration to the Cisco IOS configuration archive. These archived files serve as checkpoint configuration references and can be used by the configure replace command to revert to previous configuration states. <br /><br />The archive config command allows you to save Cisco IOS configurations in the configuration archive using a standard location and filename prefix that is automatically appended with an incremental version number (and optional timestamp) as each consecutive file is saved. This functionality provides a means for consistent identification of saved Cisco IOS configuration files. You can specify how many versions of the running configuration will be kept in the archive. After the maximum number of files has been saved in the archive, the oldest file will be automatically deleted when the next, most recent file is saved. The show archive command displays information for all configuration files saved in the Cisco IOS configuration archive. <br /><br /><strong>Examples </strong><br />The following example shows how to save the current running configuration to the Cisco IOS configuration archive using the archive config command. Before using the archive config command, you must configure the path command in order to specify the location and filename prefix for the files in the Cisco IOS configuration archive. In this example, the location and filename prefix is specified as disk0:myconfig as follows: <br /><br />         <strong>Router# configure terminal<br /><br />         Router(config)# archive<br /><br />         Router(config-archive)# path flash:myconfig</strong><br /><br />You then save the current running configuration in the configuration archive as follows: <br /><br />          <strong>Router# archive config<br /></strong><br />The show archive command displays information on the files saved in the configuration archive as shown in the following sample output:<br /><br />         <strong>Router#show archive</strong><br />         There are currently 3 archive configurations saved.<br />         The next archive file will be named flash:myconfig-3<br />         Archive # Name<br />         0<br />         1 flash:myconfig-1<br />         2 flash:myconfig-2 &lt;- Most Recent<br />         3<br />         4<br />         5<br />         6<br />         7<br />         8<br />         9<br />         10<br />         11<br />         12<br />         13<br />         14<br /><br />To restore the config, you can do the following:</p>
<p>          <strong>r1#configure replace flash:myconfig-2</strong><br />         This will apply all necessary additions and deletions<br />         to replace the current running configuration with the<br />         contents of the specified configuration file, which is<br />         assumed to be a complete configuration, not a partial<br />         configuration. Enter Y if you are sure you want to proceed. ? [no]: y<br />         Total number of passes: 0<br />         Rollback Done<br /><br />The archive command is great for keeping multiple copies of the running config in an archive.</p>
</span></p><br /><a href='http://www.routeadmin.com/archive-running-config-by-david-bombal-.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/archive-running-config-by-david-bombal-.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/archive-running-config-by-david-bombal-.aspx</link>
      <comments>http://www.routeadmin.com/archive-running-config-by-david-bombal-.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/archive-running-config-by-david-bombal-.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 05:55:59 GMT</pubDate>
    </item>
    <item>
      <title>How to upload an IOS to a router without TFTP or FTP By Ian Castleman (CCIE)</title>
      <description><![CDATA[<p>Just been updating some remote IOS's and thought a description of the method might be useful for a future newsletter as it's not really documented very well on CCO<span lang="en-us">:</span><br /><br />Rather than setting up public FTP or TFTP servers and changing access-lists, etc to download IOS images to remote routers you can use SCP to copy the image to the router as long as you have SSH access to the device. It's a bit slow but it does the trick.<br /><br />To enable SCP on the router use the command "ip scp server enable"<br /><br />Then use the putty scp client "pscp" to upload the image e.g. "pscp -C c:\iosimages\c2800nm-advipservicesk9-mz.124-15.T3.bin sshuser@u.x.y.z: c2800nm-advipservicesk9-mz.124-15.T3.bin", the -C switch just adds compression and the rest of the command is basically just pscp [source] [destination]<br /><br />Of course make sure you have sufficient space on the routers flash or this will fail and always have a backup plan in case things go wrong!<br /><br /><span lang="en-us">Here is the full config required:<br /><br /><br />        ! AAA authentication and authorization must be configured properly for SCP to work.<br /><br />        aaa new-model<br /><br />        aaa authentication login default local<br /><br />        aaa authorization exec default local<br /><br />        username sshuser privilege 15 secret 0 password<br /><br />        ! SSH must be configured and functioning properly.<br /><br />        ip ssh time-out 120<br /><br />        ip ssh authentication-retries 3<br /><br />        <strong>ip scp server enable</strong><br /></span></p><br /><a href='http://www.routeadmin.com/how-to-upload-an-ios-to-a-router-without-tftp-or-ftp-by-ian-castleman-ccie.aspx'>Admin</a>&nbsp;&nbsp;<a href='http://www.routeadmin.com/how-to-upload-an-ios-to-a-router-without-tftp-or-ftp-by-ian-castleman-ccie.aspx'>...</a>]]></description>
      <link>http://www.routeadmin.com/how-to-upload-an-ios-to-a-router-without-tftp-or-ftp-by-ian-castleman-ccie.aspx</link>
      <comments>http://www.routeadmin.com/how-to-upload-an-ios-to-a-router-without-tftp-or-ftp-by-ian-castleman-ccie.aspx</comments>
      <guid isPermaLink="true">http://www.routeadmin.com/how-to-upload-an-ios-to-a-router-without-tftp-or-ftp-by-ian-castleman-ccie.aspx</guid>
      <pubDate>Sun, 07 Mar 2010 05:53:28 GMT</pubDate>
    </item>
  </channel>
</rss>
