<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to get local routing(BGP) info for South Africa</title>
	<atom:link href="http://rodent.za.net/bgpinformation/feed/" rel="self" type="application/rss+xml" />
	<link>http://rodent.za.net/bgpinformation/</link>
	<description>Development, Networking and Linux Voodoo</description>
	<lastBuildDate>Wed, 11 Apr 2012 20:44:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Jaco</title>
		<link>http://rodent.za.net/bgpinformation/comment-page-1/#comment-121</link>
		<dc:creator>Jaco</dc:creator>
		<pubDate>Mon, 15 Aug 2011 10:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://rodent.za.net/bgpinformation/#comment-121</guid>
		<description>Mod on Script:
1) Use Saix server
2) Display only destination subnet
3) Add standard prefix where required

#!/usr/bin/perl

use Net::Telnet;

$prompt=&#039;/tpr-route-server&gt;/&#039;;

$server=&quot;tpr-route-server.saix.net&quot;;

$saix_cmd=&quot;show ip bgp community 5713:56225\n&quot;;

print &quot;Connecting to $server\n&quot;;
my $session = Net::Telnet-&gt;new(Host =&gt; $server,Prompt =&gt; $prompt,Timeout=&gt;30);
unlink(&quot;t.log&quot;);
$session-&gt;dump_log(&quot;t.log&quot;);
$session-&gt;login(&quot;saix&quot;, &quot;saix&quot;);

#turn off paging
$session-&gt;cmd(&quot;terminal length 0&quot;);

#get list of local routes
print &quot;Retrieving BGP routes\n&quot;;
my @output = $session-&gt;cmd($saix_cmd);
foreach (@output) {
        @fields = split(/\s+/);
        $fields[1] =~ s/^i//;
        @parts = split(/\./, $fields[1]);
        if ($parts[3] =~ /\//) {
                print $fields[1] . &quot;\n&quot;;
        } elsif ($parts[0] &lt; 128) {
                print $fields[1] . &quot;/8\n&quot;;
        } elsif ($parts[0] &lt; 192) {
                print $fields[1] . &quot;/16\n&quot;;
        } elsif ($parts[0] close;</description>
		<content:encoded><![CDATA[<p>Mod on Script:<br />
1) Use Saix server<br />
2) Display only destination subnet<br />
3) Add standard prefix where required</p>
<p>#!/usr/bin/perl</p>
<p>use Net::Telnet;</p>
<p>$prompt=&#8217;/tpr-route-server&gt;/&#8217;;</p>
<p>$server=&#8221;tpr-route-server.saix.net&#8221;;</p>
<p>$saix_cmd=&#8221;show ip bgp community 5713:56225\n&#8221;;</p>
<p>print &#8220;Connecting to $server\n&#8221;;<br />
my $session = Net::Telnet-&gt;new(Host =&gt; $server,Prompt =&gt; $prompt,Timeout=&gt;30);<br />
unlink(&#8220;t.log&#8221;);<br />
$session-&gt;dump_log(&#8220;t.log&#8221;);<br />
$session-&gt;login(&#8220;saix&#8221;, &#8220;saix&#8221;);</p>
<p>#turn off paging<br />
$session-&gt;cmd(&#8220;terminal length 0&#8243;);</p>
<p>#get list of local routes<br />
print &#8220;Retrieving BGP routes\n&#8221;;<br />
my @output = $session-&gt;cmd($saix_cmd);<br />
foreach (@output) {<br />
        @fields = split(/\s+/);<br />
        $fields[1] =~ s/^i//;<br />
        @parts = split(/\./, $fields[1]);<br />
        if ($parts[3] =~ /\//) {<br />
                print $fields[1] . &#8220;\n&#8221;;<br />
        } elsif ($parts[0] &lt; 128) {<br />
                print $fields[1] . &quot;/8\n&quot;;<br />
        } elsif ($parts[0] &lt; 192) {<br />
                print $fields[1] . &quot;/16\n&quot;;<br />
        } elsif ($parts[0] close;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xarion</title>
		<link>http://rodent.za.net/bgpinformation/comment-page-1/#comment-8</link>
		<dc:creator>xarion</dc:creator>
		<pubDate>Mon, 06 Jul 2009 08:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://rodent.za.net/bgpinformation/#comment-8</guid>
		<description>Awesome, I found that the server now reports a: &quot;local-route-server&quot; prompt so for whoever wants to use the script just needs to change $prompt = &#039;/public-route-server&gt;/&#039;; to $prompt = &#039;/local-route-server&gt;/&#039;; How do I spew out just the address not all the other columns?</description>
		<content:encoded><![CDATA[<p>Awesome, I found that the server now reports a: &#8220;local-route-server&#8221; prompt so for whoever wants to use the script just needs to change $prompt = &#8216;/public-route-server&gt;/&#8217;; to $prompt = &#8216;/local-route-server&gt;/&#8217;; How do I spew out just the address not all the other columns?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roelf</title>
		<link>http://rodent.za.net/bgpinformation/comment-page-1/#comment-3</link>
		<dc:creator>roelf</dc:creator>
		<pubDate>Fri, 27 Feb 2009 22:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://rodent.za.net/bgpinformation/#comment-3</guid>
		<description>Hi Rod. A subnet without a mask means that it&#039;s a &quot;standard&quot; class prefix. E.g. you can assume /24 for the 196.3.161.0 subnet, or /8 for a 21.23.0.0 subnet. It&#039;s a bit schizophrenic I must admit.

</description>
		<content:encoded><![CDATA[<p>Hi Rod. A subnet without a mask means that it&#8217;s a &#8220;standard&#8221; class prefix. E.g. you can assume /24 for the 196.3.161.0 subnet, or /8 for a 21.23.0.0 subnet. It&#8217;s a bit schizophrenic I must admit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rodch</title>
		<link>http://rodent.za.net/bgpinformation/comment-page-1/#comment-2</link>
		<dc:creator>rodch</dc:creator>
		<pubDate>Wed, 25 Feb 2009 01:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://rodent.za.net/bgpinformation/#comment-2</guid>
		<description>Hi,
   Thanks for this.

BTW.  Some of the \n nl chars in your perl script lost their \.(As seen by me in FFox)

To reduce the size, I tried running the list through a couple of cidr subnet aggregators, which fail variously.

I am cisco-illiterate, Any idea what a subnet like 196.3.161.0 , (without mask bits) means? One aggregator tries 196.3.161.0/32 another barfs with &quot;line too long&quot;

A quick ping scan tells me there are live hosts within the 196.3.161.0/24 space.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
   Thanks for this.</p>
<p>BTW.  Some of the \n nl chars in your perl script lost their \.(As seen by me in FFox)</p>
<p>To reduce the size, I tried running the list through a couple of cidr subnet aggregators, which fail variously.</p>
<p>I am cisco-illiterate, Any idea what a subnet like 196.3.161.0 , (without mask bits) means? One aggregator tries 196.3.161.0/32 another barfs with &#8220;line too long&#8221;</p>
<p>A quick ping scan tells me there are live hosts within the 196.3.161.0/24 space.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

