<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Local Loop &#187; bgp</title>
	<atom:link href="http://localloop.co.za/tag/bgp/feed/" rel="self" type="application/rss+xml" />
	<link>http://localloop.co.za</link>
	<description>Internet and Networking in South Africa</description>
	<lastBuildDate>Sat, 09 Jul 2011 00:48:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IP sub-netting for fun and profit</title>
		<link>http://localloop.co.za/2009/10/ip-sub-netting-for-fun-and-profit/</link>
		<comments>http://localloop.co.za/2009/10/ip-sub-netting-for-fun-and-profit/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 08:59:48 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[ddos]]></category>
		<category><![CDATA[prefix hijack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[subnetting]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=355</guid>
		<description><![CDATA[IP sub-netting is one of the first things one learns about network administration. You have a /22, you want /24&#8242;s, 2 bits give you 4 sub-nets. Or you want one /24, so you break the /22 into two /24&#8242;s and a /23. Not rocket science. It&#8217;s the kind of thing you can do in your [...]]]></description>
			<content:encoded><![CDATA[<p>IP sub-netting is one of the first things one learns about network administration.</p>
<p>You have a /22, you want /24&#8242;s, 2 bits give you 4 sub-nets. Or you want one /24, so you break the /22 into two /24&#8242;s and a /23. Not rocket science. It&#8217;s the kind of thing you can do in your head and keep track of in a spreadsheet or a text file if you don&#8217;t have too many networks.</p>
<p>When you&#8217;re planning an IP addressing scheme, you probably have the luxury of time, to think about it. But what if you need to do this in a crisis situation? Fortunately it has never happened to me, but I can think of scenarios where you need to do this very quickly:</p>
<p>Apparently, if you use BGP to advertise a network to the Internet and specific hosts within that network become the target of a <a href="http://en.wikipedia.org/wiki/Denial-of-service_attack#Distributed_attack">DDoS attack</a>, one way to mitigate the attack could be to stop advertising the /24 sub-nets being attacked. Although this means the attacker still succeeds in taking down his intended targets (because he made you take them down), at least you can remove the attack traffic from your link, and the rest of your network can remain available.</p>
<p>Another scenario might be someone hijacking part of your network by advertising a more specific route than you are (either intentionally, or due to a BGP filtering misconfiguration). This <a href="http://ripe.net/news/study-youtube-hijacking.html">happened to youtube</a> last year.</p>
<p>Either way, you&#8217;ll need to split the network into at least two (in the case of a /23) sub-nets to get a /24, which is generally the longest prefix accepted on the Internet. In the former case, you want to withdraw the more specific network, and in the latter you want to advertise it.</p>
<p>To this end, I have written a script that accepts a list of networks (in CIDR format, one per line) from STDIN, and the desired sub-net as the first command line argument. It loops through the input subnets, looking  for the one that overlaps with the desired prefix. If a network doesn&#8217;t match, the script just prints it out untouched, if it does, then the script will de-aggregate that network into the minimum number of sub-nets in order to get the desired sub-net as one of the outputs. It prints the surrounding pieces, and unless you specify &#8220;-exclude&#8221; as the second argument, the desired sub-net itself is also added to the output:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;"># deaggregate.py - deaggregate a network for a specific subnet, yielding the minimum number of subnets</span>
<span style="color: #808080; font-style: italic;"># Add -exclude to only output the surrounding subnets. Subnet is read from stdin, all non matching subnets</span>
<span style="color: #808080; font-style: italic;"># are output untouched. Use as a filter, rinse, repeat.</span>
<span style="color: #808080; font-style: italic;"># Simeon Miteff &lt;simeon@localloop.co.za&gt;</span>
<span style="color: #ff7700;font-weight:bold;">from</span> IPy <span style="color: #ff7700;font-weight:bold;">import</span> IP
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> split<span style="color: black;">&#40;</span>ip,sub,exclude<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> ip==sub:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> exclude:
            <span style="color: #ff7700;font-weight:bold;">print</span> ip
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        a = IP<span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span>ip.<span style="color: black;">net</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>+<span style="color: #483d8b;">'/'</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span>ip.<span style="color: black;">prefixlen</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        b = IP<span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span>IP<span style="color: black;">&#40;</span>ip.<span style="color: black;">net</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>|<span style="color: #ff4500;">2</span><span style="color: #66cc66;">**</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">32</span>-<span style="color: black;">&#40;</span>ip.<span style="color: black;">prefixlen</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>+<span style="color: #483d8b;">'/'</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span>ip.<span style="color: black;">prefixlen</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> a.<span style="color: black;">overlaps</span><span style="color: black;">&#40;</span>sub<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">print</span> b
            split<span style="color: black;">&#40;</span>a,sub,exclude<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">elif</span> b.<span style="color: black;">overlaps</span><span style="color: black;">&#40;</span>sub<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">print</span> a
            split<span style="color: black;">&#40;</span>b,sub,exclude<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__==<span style="color: #483d8b;">&quot;__main__&quot;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">&lt;</span><span style="color: #ff4500;">2</span>:
        <span style="color: #dc143c;">sys</span>.<span style="color: black;">stderr</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Usage: %s CIDR_prefix [-exclude]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> 
        <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
    sub = IP<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
    exclude = <span style="color: #008000;">False</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span>==<span style="color: #ff4500;">3</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>==<span style="color: #483d8b;">'-exclude'</span>:
            exclude = <span style="color: #008000;">True</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdin</span>:
        pre = IP<span style="color: black;">&#40;</span>line.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> pre.<span style="color: black;">overlaps</span><span style="color: black;">&#40;</span>sub<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">print</span> line.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            split<span style="color: black;">&#40;</span>pre,sub,exclude<span style="color: black;">&#41;</span></pre></div></div>

<p>An example run:</p>
<pre>simeon@capybara:~/personal$ cat routes.txt
10.0.0.0/10
192.168.0.0/16
simeon@capybara:~/personal$ python deaggregate.py 10.0.100.0/24 < routes.txt
10.32.0.0/11
10.16.0.0/12
10.8.0.0/13
10.4.0.0/14
10.2.0.0/15
10.1.0.0/16
10.0.128.0/17
10.0.0.0/18
10.0.64.0/19
10.0.112.0/20
10.0.104.0/21
10.0.96.0/22
10.0.102.0/23
10.0.101.0/24
10.0.100.0/24
192.168.0.0/16
simeon@capybara:~/personal$</pre>
<p>It requires the IPy module (<code>apt-get install python-ipy</code>). To handle multiple desired sub-nets, run the script again for each subsequent sub-net, using the output of the previous run as the input. Note that your (and your upstream's) filters might need to be updated (unless your original prefix is allowed with something like <code>"le 24"</code>).</p>
<p>I've added this to the <a href="http://localloop.co.za/code">code page</a>. Thanks for listening :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/10/ip-sub-netting-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The humble ZA Internet Map</title>
		<link>http://localloop.co.za/2009/09/the-humble-za-internet-map/</link>
		<comments>http://localloop.co.za/2009/09/the-humble-za-internet-map/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:15:04 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[dia]]></category>
		<category><![CDATA[graphviz]]></category>
		<category><![CDATA[ispmap]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[za internet map]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=303</guid>
		<description><![CDATA[I&#8217;ve been playing with BGP-based maps showing links between South African autonomous systems, on-and-off, for a long time. I always got stuck at the graph layout step and was never able to trick GraphViz into doing exactly what I wanted. When I re-visited this project one evening this week, I decided to generate a Dia [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with BGP-based maps showing links between South African autonomous systems, on-and-off, for a long time. I always got stuck at the graph layout step and was never able to trick GraphViz into doing exactly what I wanted. When I re-visited this project one evening this week, I decided to generate a Dia XML document instead of a dot(1) file, and do the layout by hand. The result is my first map:<br />
<div id="attachment_299" class="wp-caption aligncenter" style="width: 613px"><a href="http://localloop.co.za/wp-content/uploads/2009/09/za_map_2009091.png"><img src="http://localloop.co.za/wp-content/uploads/2009/09/za_map_200909_small1.png" alt="ZA Internet Map (click for full size image)" title="za_map_200909_small1" width="603" height="426" class="size-full wp-image-299" /></a><p class="wp-caption-text">ZA Internet Map (click for full size image)</p></div><br />
I plan to improve and update this map on a regular basis, so it&#8217;s earned itself a <a href="/internet-map">dedicated page</a>. Some quick technical notes about what you&#8217;re seeing:</p>
<ul>
<li>Only local autonomous systems are included. I&#8217;ll probably include the first international upstreams, in the next version.</li>
<li>Only the inbound path (international transit, probably) as seen from RouteViews OIX is shown. This means peering links are not indicated. That might also change in the next version.</li>
<li>This is not an ISP map, like <a href="http://www.ispmap.org.za">Greg Massel&#8217;s</a>, because it includes all autonomous systems, including non-ISP&#8217;s such as customers/end-users running BGP. I&#8217;m toying with the idea of colour-coding different types of ASes.</li>
<li>There are likely to be errors. If you spot them, please <a href="mailto:simeon@localloop.co.za">let me know</a> so that I can correct my scripts.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/09/the-humble-za-internet-map/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ISP Fail: FNBConnect and Internet Solutions. Who screwed up?</title>
		<link>http://localloop.co.za/2009/08/isp-fail-fnbconnect-and-internet-solutions-who-screwed-up/</link>
		<comments>http://localloop.co.za/2009/08/isp-fail-fnbconnect-and-internet-solutions-who-screwed-up/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 09:56:35 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[fnbconnect]]></category>
		<category><![CDATA[IS]]></category>
		<category><![CDATA[MTN Business]]></category>
		<category><![CDATA[peering]]></category>
		<category><![CDATA[SAIX]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=252</guid>
		<description><![CDATA[The /16 route being announced by First National Bank&#8217;s new IPConnect ADSL-based consumer ISP, FNBCONNECT (AS37028) disappeared from the Internet Solutions (AS3741) local routing table somewhere between last week Wednesday (2009/08/12) and Friday (2009/08/14). It seems their transit via First National Bank&#8217;s own network went down. FNB, in turn, buys transit via IS and MTN [...]]]></description>
			<content:encoded><![CDATA[<p>The /16 route being announced by First National Bank&#8217;s new IPConnect ADSL-based consumer ISP, FNBCONNECT (AS37028) disappeared from the Internet Solutions (AS3741) local routing table somewhere between last week Wednesday (2009/08/12) and Friday (2009/08/14).</p>
<p>It seems their transit via First National Bank&#8217;s own network went down. FNB, in turn, buys transit via IS and MTN Business. FNBConnect&#8217;s transit via Telkom SA (SAIX) is still working though, so they are reachable from MTN Business (and the rest of the Internet) via SAIX.<div id="attachment_254" class="wp-caption alignright" style="width: 210px"><img src="http://localloop.co.za/wp-content/uploads/2009/08/whoscrewedup1.png" alt="Spot the odd one out..." title="Spot the odd one out..." width="200" height="347" class="size-full wp-image-254" /><p class="wp-caption-text">Spot the odd one out...</p></div><br />
It&#8217;s hard to tell who is to blame even when you can check the routes on route servers for each provider&#8217;s network. The reason why is because BGP routes could be filtered on either end of a link. This is of course convenient for the providers, as they can (and do!) always blame the other party. When it gets fixed, you never hear who did the fixing. It is however fun to try and infer who screwed up their filters.</p>
<p>In the graph on the right I&#8217;ve used green to indicate the links and ASNs we know for sure are getting the FNBCONNECT route. Orange indicates the links and ASNs of unknown status, while red shows what is definitely not working.</p>
<p>We at least know that their transit to IS via FNB worked when I <a href="http://localloop.co.za/archives/188">first blogged about FNBCONNECT</a>:</p>
<p><code>* 41.183.0.0/16 168.209.255.8 0 3741 17148 37028 i</code></p>
<p>So which is more likely, SAIX screwed up their outbound filters on their peering links to IS but not to MTN Business, or IS screwed up their inbound peering filters and its only showing now because their preferred route was via their customer?</p>
<p>This is possibly the third time I&#8217;ve noticed a peering problem involving IS, where no problem existed between IS&#8217; peer and another peer (like SAIX or MTN Business).</p>
<p>The end result? IS is routing like we&#8217;re back in 1996!:<br />
<code><br />
local-route-server>traceroute 41.183.0.0</p>
<p>Type escape sequence to abort.<br />
Tracing the route to 41.183.0.0</p>
<p>  1 ar2-rba-tnr-gi0-3-11.ip.isnet.net (196.34.7.195) [AS 3741] 0 msec 4 msec 4 msec<br />
  2 core1b-rba-gi1-0-5.ip.isnet.net (196.26.0.181) [AS 3741] 4 msec 4 msec 4 msec<br />
  3 mi-za-rba-p5-gi0-1-101.ip.isnet.net (168.209.164.49) [AS 3741] [MPLS: Label 2594 Exp 1] 172 msec 172 msec 176 msec<br />
  4 mi-uk-dock-p3-po2-0.ip.isnet.net (168.209.224.65) [AS 3741] [MPLS: Label 2859 Exp 1] 172 msec<br />
  5 core1a-dock-gi1-0-0-101.ip.isnet.net (168.209.164.0) [AS 3741] 184 msec 176 msec<br />
  6 core1b-dock-gi0-0-2.ip.isnet.net (168.209.246.1) [AS 3741] 176 msec *  172 msec<br />
  7 gi8-13.mpd01.lon02.atlas.cogentco.com (149.6.148.1) 180 msec 176 msec 172 msec<br />
  8 te4-2.ccr01.lon01.atlas.cogentco.com (130.117.1.201) 172 msec<br />
  9 vl3493.mpd01.lon01.atlas.cogentco.com (130.117.2.17) 172 msec<br />
    te3-1.mpd01.lon01.atlas.cogentco.com (130.117.3.225) 176 msec<br />
    vl3493.mpd01.lon01.atlas.cogentco.com (130.117.2.17) 172 msec<br />
 10 te1-2.ccr01.lon05.atlas.cogentco.com (130.117.49.94) 172 msec 176 msec<br />
 11 149.6.2.194 184 msec 180 msec 180 msec<br />
 12 rrba-ip-esr-1-ge-6-0-0.telkom-ipnet.co.za (196.43.11.166) [AS 5713] 184 msec 184 msec 184 msec<br />
 13 first-national-bank-gw.telkom-ipnet.co.za (196.25.207.178) [AS 5713] 188 msec 188 msec 188 msec<br />
=== snip ===<br />
</code></p>
<p><strong>Update:</strong><br />
Dear Readers</p>
<p>I&#8217;ve decided that if I&#8217;m going to moan, complain, and accuse ISPs of FAILure on this blog, then I should at least follow my accusations up, and provide constructive post-mortem commentary (where possible). So here goes:</p>
<p>IS->FNBConnect traffic is flowing via FNB again. Also see the comment from Nick Treasure (IS).</p>
<p>Regards,<br />
Simeon.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/08/isp-fail-fnbconnect-and-internet-solutions-who-screwed-up/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New kid on the block: Neology</title>
		<link>http://localloop.co.za/2009/07/new-kid-on-the-block-neology/</link>
		<comments>http://localloop.co.za/2009/07/new-kid-on-the-block-neology/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 16:28:31 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[ADSL]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[IPConnect]]></category>
		<category><![CDATA[IS]]></category>
		<category><![CDATA[IS Labs]]></category>
		<category><![CDATA[Neology]]></category>
		<category><![CDATA[split routing]]></category>
		<category><![CDATA[telkom]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=245</guid>
		<description><![CDATA[AS37105 (NEOLOGY-AS) recently appeared in the BGP routing tables, announcing two /24 prefixes, with transit via Imperial Online. This is what Roelf Diedericks of Neology had to say about it: Neology supplies IAP services to ISP&#8217;s in the local market, this includes radius, billing and RealSoon(tm), ADSL IPConnect termination for multiple ISP&#8217;s. We will be [...]]]></description>
			<content:encoded><![CDATA[<p>AS37105 (NEOLOGY-AS) recently appeared in the BGP routing tables, announcing two /24 prefixes, with transit via Imperial Online.</p>
<p>This is what <a href="http://rodent.za.net/">Roelf Diedericks</a> of <a href="http://www.neology.co.za">Neology</a> had to say about it:</p>
<blockquote><p>Neology supplies IAP services to ISP&#8217;s in the local market, this includes radius, billing and RealSoon(tm), ADSL IPConnect termination for multiple ISP&#8217;s.</p>
<p>We will be offering the first consumer ADSL service with differentiated local, versus international radius accounting, and many other cunning differentiated traffic billing plans which cannot as yet be revealed :)</p>
<p>Simply awaiting Telkom to do their bits at the moment.</p></blockquote>
<p>So, while their AS is new to the routing tables, Neology is certainly not new to the local telecoms business.</p>
<p>It&#8217;s good to see someone has solved the (non-trivial) problem of accounting national and international traffic separately&#8230; this is something that IS wasn&#8217;t willing (or able) to do even when their <a href="http://www.islabs.co.za/ideas/split-routing">customers specifically asked them for it on IS Labs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/07/new-kid-on-the-block-neology/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ISP Fail: Private ASN on the Verizon/IS peering link</title>
		<link>http://localloop.co.za/2009/05/isp-fail-private-asn-on-the-verizonis-peering-link/</link>
		<comments>http://localloop.co.za/2009/05/isp-fail-private-asn-on-the-verizonis-peering-link/#comments</comments>
		<pubDate>Wed, 27 May 2009 10:40:22 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[Hetzner]]></category>
		<category><![CDATA[IS]]></category>
		<category><![CDATA[MTN Business]]></category>
		<category><![CDATA[peering]]></category>
		<category><![CDATA[remove-private-as]]></category>
		<category><![CDATA[verizon]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=215</guid>
		<description><![CDATA[Spotted on local-route-server.is.co.za today: * 41.203.16.0/22 168.209.255.8 0 3741 2905 65419 i * 41.203.20.0/23 168.209.255.8 0 3741 2905 65419 i * 41.203.22.0/23 168.209.255.8 0 3741 2905 65419 i * 41.203.24.0/21 168.209.255.8 0 3741 2905 65419 i * 41.204.216.0/22 168.209.255.8 0 3741 2905 65419 i * 41.204.220.0/23 168.209.255.8 0 3741 2905 65419 i * 196.22.132.0/22 168.209.255.8 [...]]]></description>
			<content:encoded><![CDATA[<p>Spotted on <code>local-route-server.is.co.za</code> today:</p>
<p><code>*  41.203.16.0/22   168.209.255.8                          0 3741 2905 65419 i<br />
*  41.203.20.0/23   168.209.255.8                          0 3741 2905 65419 i<br />
*  41.203.22.0/23   168.209.255.8                          0 3741 2905 65419 i<br />
*  41.203.24.0/21   168.209.255.8                          0 3741 2905 65419 i<br />
*  41.204.216.0/22  168.209.255.8                          0 3741 2905 65419 i<br />
*  41.204.220.0/23  168.209.255.8                          0 3741 2905 65419 i<br />
*  196.22.132.0/22  168.209.255.8                          0 3741 2905 65419 i<br />
*  196.22.136.0/21  168.209.255.8                          0 3741 2905 65419 i<br />
*  196.30.125.0     168.209.255.8                          0 3741 2905 65419 i</code></p>
<p>It looks like Hetzner is announcing these to MTN Business (previously Verizon Business SA) using an autonomous system number from the private range (64512 to 65535). That is perfectly reasonable as long as MTN Business strips the private ASN when they announce these routes on the Internet.</p>
<p>Doing this is easy (<i>neighbor x.x.x.x remove-private-AS</i>), and as far as I can tell, they get it right on their links to SAIX and Verizon Business Europe/US, but as you can see, not on their link to Internet Solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/05/isp-fail-private-asn-on-the-verizonis-peering-link/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Post Altech-victory BGP table: New kids on the block</title>
		<link>http://localloop.co.za/2009/05/post-altech-victory-bgp-table-new-kids-on-the-block/</link>
		<comments>http://localloop.co.za/2009/05/post-altech-victory-bgp-table-new-kids-on-the-block/#comments</comments>
		<pubDate>Mon, 11 May 2009 11:17:36 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Regulatory]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[fnbconnect]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[new-kids]]></category>
		<category><![CDATA[sadv]]></category>
		<category><![CDATA[smmt]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=188</guid>
		<description><![CDATA[I compiled my initial list of local ASNs when I started this blog in October last year. Since then we&#8217;ve had Altech&#8217;s self-provisioning court victory which lead to the potential for many new telecoms operators to compete with the likes of Telkom and Neotel. Since I&#8217;ve just updated the table using a fresh copy of [...]]]></description>
			<content:encoded><![CDATA[<p>I compiled my initial list of local ASNs when I started this blog in October last year. Since then we&#8217;ve had Altech&#8217;s self-provisioning court victory which lead to the potential for many new telecoms operators to compete with the likes of Telkom and Neotel.</p>
<p>Since I&#8217;ve just updated the table using a fresh copy of IS&#8217;s &#8220;local&#8221; routing table (minus their African and Malaysian peers), we can check if opening the licensing floodgates has lead to many new South African networks popping up in the BGP table. There are four new ASNs, so the short answer is <i>&#8220;not really&#8221;</i>. The list follows:</p>
<p><b>AS35405 (Macquarie Bank)</b><br />
This is an end user, so not due to regulatory changes. As you can see, they are dual homed (like most of the Banks are), but they&#8217;re running their second link in backup-only mode by announcing sub-prefixes on their primary link (similar to my setup for UCT). Datapro is their primary provider and Neotel is backup:<br />
<code>*  87.236.68.0/24   168.209.255.8                          0 3741 36937 35405 ?<br />
*  87.236.68.0/23   168.209.255.8                          0 3741 11845 35405 ?<br />
*  87.236.69.0/24   168.209.255.8                          0 3741 36937 35405 ?</code></p>
<p><b>AS37028 (FNBConnect)</b><br />
This is First National Bank&#8217;s new IPConnect-based ADSL service provider and VOIP operator. If I recall correctly, they would need at least an IECS license to do this, but they probably got the happy meal (IECNS+IECS) anyway. They transit through the bank&#8217;s original AS:<br />
<code>* 41.183.0.0/16    168.209.255.8                          0 3741 17148 37028 i</code></p>
<p><b>AS37049 (South African Digital Villages (Pty) Ltd)</b><br />
This one is a mystery so far. The name sounds like someone who wires up housing or office complexes and sells them bandwidth. They transit through SAIX:<br />
<code>* 41.222.136.0/21  168.209.255.8                          0 3741 5713 37049 i</code></p>
<p><b>AS37079 (SMMT Online)</b><br />
Finally, the winner of the Gauteng Online tender to provide connected computer labs for the province&#8217;s schools. They transit through Neotel:<br />
<code>*  41.154.0.0/16    168.209.255.8                          0 3741 36937 37079 i</code></p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/05/post-altech-victory-bgp-table-new-kids-on-the-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Local ASN list updated</title>
		<link>http://localloop.co.za/2009/05/local-asn-list-updated/</link>
		<comments>http://localloop.co.za/2009/05/local-asn-list-updated/#comments</comments>
		<pubDate>Mon, 11 May 2009 09:27:40 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=198</guid>
		<description><![CDATA[I&#8217;ve finally gotten around to writing the scripts to update my South African Autonomous Systems list. The table will now be updated using routes from the IS route server on a regular basis. I&#8217;ve made the following changes: As per Joe&#8217;s request, it is now sorted first by the equivalent number of class C networks [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally gotten around to writing the scripts to update my South African <a href="http://localloop.co.za/autonomous-systems">Autonomous Systems</a> list. The table will now be updated using routes from the IS <a href="http://localloop.co.za/route-servers">route server</a> on a regular basis. I&#8217;ve made the following changes:</p>
<ul>
<li>As per <a href="http://www.swimgeek.com/blog/">Joe&#8217;s</a> request, it is now sorted first by the equivalent number of class C networks (/24 prefixes) advertised, and then by the real number of networks.<del datetime="2009-05-12T07:23:04+00:00"> Unfortunately it also counts sub-prefixes, so for example, UCT&#8217;s overlapping /16, /24 and two /17s are counted as 513 /24s instead of 256. I hope to fix this soon.</del> Fixed.</li>
<li>As per <a href="http://karnaugh.za.net/">Colin&#8217;s</a> request, there is a script that renders the table as machine-processable CSV, here: <a href="http://www.localloop.co.za/za_asn.php">http://www.localloop.co.za/za_asn.php</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/05/local-asn-list-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Observations on backup-only BGP multi-homing</title>
		<link>http://localloop.co.za/2009/02/observations-on-backup-only-bgp-multi-homing/</link>
		<comments>http://localloop.co.za/2009/02/observations-on-backup-only-bgp-multi-homing/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:54:03 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[amobia]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[frogfoot]]></category>
		<category><![CDATA[multi-homing]]></category>
		<category><![CDATA[peering]]></category>
		<category><![CDATA[uct]]></category>
		<category><![CDATA[verizon]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=91</guid>
		<description><![CDATA[Last year, I set up a backup Internet link for (my then-employer) the University of Cape Town. The university has it&#8217;s own class-B block of provider independent IPv4 address space, so this required Multiple-Links-Single-IP-Space style multi-homing. Because the primary link was both fast (by South African standards) and very expensive, I had to figure out [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, I set up a backup Internet link for (my then-employer) the <a href="http://www.uct.ac.za">University of Cape Town</a>. The university has it&#8217;s own class-B block of provider independent IPv4 address space, so this required Multiple-Links-Single-IP-Space style <a href="http://en.wikipedia.org/wiki/Multihoming">multi-homing</a>.</p>
<p>Because the primary link was both fast (by South African standards) and very expensive, I had to figure out a way to provision the backup link on a budget that was non-existent by comparison. What I came up with was to get <a href="http://www.amobia.com">Amobia</a> to install a point-to-point link from UCT to their sister company <a href="http://www.frogfoot.com">Frogfoot Networks</a>, who agreed to sell IP transit based on per-gigabyte traffic volume, instead of bandwidth. With this deal, UCT could minimize costs by only using the backup link during a primary link failure. The IT managers were very supportive, and so this pet project of mine materialized within a few months.</p>
<p>I leaned three things due to the backup-only nature of the setup that (in my view) isn&#8217;t immediately obvious from the standard CC[NP|IE]-curriculum&#8217;s version of BGP multi-homing:</p>
<ol>
<li><b>Influencing inbound path selection:</b><br />
The usual mechanisms for influencing BGP inbound path selection (applicable to separate upstreams, so MED doesn&#8217;t count) is to perpend your own ASN a number of times on the path you want less likely to be selected. Apart from the difficulty of getting the length right, the other problem with this approach is that there is no guarantee that someone else&#8217;s routing policy won&#8217;t override your carefully adjusted AS-path length. In fact, most network operators will apply a policy where they adjust the local preference of routes so that customer routes are used before peering routes, and peering routes are used before transit routes.</p>
<p>This is usually not a train smash for a multi homed end-user site that wants to balance load over their Internet links. In fact, they might specifically want BGP to select the best path, both inbound and outbound. However, since I wanted the backup link to <i>only</i> be used during a failure, I chose to short-circuit all of the BGP route selection by advertising more specific routes (two /17s instead of one /16) via the primary link.
</li>
<li><b>What happens during a failure:</b><br />
This scheme works well when the link between the customer and the primary ISP fails: the /17s disappear from the global BGP tables, and the remaining /16 being advertised via the backup ISP is selected by everyone (including the primary ISP).</p>
<p>If the primary ISP experiences a partial failure, for example, if their international link goes down, but the national peering keeps working, then the backup ISP still sees the /17s coming from the customer via the primary ISP, but traffic directed from international networks to the customer arrives at the backup ISP via the /16 route.</p>
<p>What happens now? Does the backup ISP send this traffic via the /17 routes? It turns out in the UCT setup, Verizon Business South Africa discards that traffic. Perhaps they do some filtering to prevent transit between their upstreams and their peers?</p>
<p>If you work for Verizon and you understand why this happens, please drop me a comment.</p>
<p>A possible work-around could be to monitor reliable international beacon prefixes (or just the total number of prefixes) on the primary link, and withdraw the /17s if they disappear.
</li>
<li><b>Adding peering to the mix:</b><br />
You may have noticed that I mentioned that Frogfoot Networks is the backup ISP, but I&#8217;m talking about Verizon above. This is because the Friendly Frogs agreed that they would not bill UCT for peering (traffic between UCT and them and their customers). To make the route selection work, I worked with Warwick at Frogfoot to implement a system of route-maps that allows UCT to mark routes for transit or peering. UCT advertises both /17s and the /16 to Frogfoot, but marks the /17s with the &#8220;Don&#8217;t announce to your upstream&#8221; community.
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2009/02/observations-on-backup-only-bgp-multi-homing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Local route servers</title>
		<link>http://localloop.co.za/2008/09/local-route-servers/</link>
		<comments>http://localloop.co.za/2008/09/local-route-servers/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 21:29:53 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=53</guid>
		<description><![CDATA[Route servers are BGP routers, typically operated by a providers who want to give people a view of what the Internet&#8217;s routes &#8220;look like&#8221; from their network&#8217;s perspective. They are queried via a telnet command line interface or via a web interface (sometimes called a looking glass). Route servers are also used at Internet peering [...]]]></description>
			<content:encoded><![CDATA[<p>Route servers are <a href="http://en.wikipedia.org/wiki/Border_Gateway_Protocol">BGP</a> routers, typically operated by a providers who want to give people a view of what the Internet&#8217;s routes &#8220;look like&#8221; from their network&#8217;s perspective. They are queried via a telnet command line interface or via a web interface (sometimes called a looking glass). Route servers are also used at Internet peering points (or Internet exchanges) to collect routing information from members.</p>
<p>An example of a route server in South Africa is <code>local-route-server.is.co.za</code>, which is used by geeks to get an up-to-date list of &#8220;local&#8221; IP networks by running the <code>show ip bgp</code> Cisco command. A popular use for this information is &#8220;split routing&#8221; &#8211; a trick you might use if you have more than one Internet connection, especially if one of them is local-only (split routing is described <a href="http://www.tlug.org.za/wiki/index.php/Local/International/Router">here</a> and <a href="http://tumbleweed.org.za/2007/09/02/local-only-dsl">here</a>).</p>
<p>Other route servers, like the one at SAIX and Verizon Business SA, are probably not as well known. You&#8217;re unlikely to need them unless you&#8217;ve advertised a new BGP route to your ISP, and you need to check that it&#8217;s being received by their peers and providers. For this reason I tend to forget the host names of these more obscure route servers.</p>
<p>After the <em>third</em> time I had to resort to Google to find Verizon&#8217;s route server, I started making a list, which I&#8217;ve now published here: <a href="http://localloop.co.za/route-servers">http://localloop.co.za/route-servers</a></p>
<p>So how do you use them?</p>
<p>Lets look at a simple example: suppose we want to find out how Neotel is doing BGP-wise. We look up the IP address for <code>www.neotel.co.za</code> and then log onto the IS route server:<br />
<code><br />
local-route-server>sh ip bgp 196.34.133.113<br />
BGP routing table entry for 196.34.0.0/15, version 392335447<br />
Paths: (1 available, best #1, table Default-IP-Routing-Table)<br />
Flag: 0x208<br />
  Not advertised to any peer<br />
  3741<br />
    168.209.255.8 from 168.209.255.8 (168.209.255.245)<br />
      Origin IGP, localpref 100, valid, external, best<br />
</code></p>
<p>That number, 3741 is the as-path, and it&#8217;s telling us that the route is originating from AS3741 (Internet Solutions). That doesn&#8217;t seem right&#8230; Neotel just being an IS customer? Lets try one of their DNS servers: <code>ns0.neotel.co.za</code>:<br />
<code><br />
local-route-server>sh ip bgp 41.160.0.4<br />
BGP routing table entry for 41.160.0.0/12, version 392335736<br />
Paths: (1 available, no best path)<br />
Flag: 0x208<br />
  Not advertised to any peer<br />
  3741 36937<br />
    168.209.255.8 (inaccessible) from 168.209.255.8 (168.209.255.245)<br />
      Origin IGP, localpref 100, valid, external<br />
      Community: 3741:1111 3741:2000<br />
</code></p>
<p>Thats more like it, now the as-path has two numbers: 3741 and then 36937, which turns out to be Neotel. As you&#8217;ve guessed by now, the as-path shows us the path of autonomous systems through which the route is being advertised. Now that we know Neotel&#8217;s ASN, lets get a list of all the routes from them:<br />
<code><br />
local-route-server>sh ip bgp regexp 36937<br />
BGP table version is 392337041, local router ID is 196.4.160.227<br />
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal<br />
Origin codes: i - IGP, e - EGP, ? - incomplete<br />
   Network          Next Hop            Metric LocPrf Weight Path<br />
*  41.160.0.0/12    168.209.255.8                          0 3741 36937 i<br />
*  87.236.68.0/24   168.209.255.8                          0 3741 36937 35405 ?<br />
*  87.236.69.0/24   168.209.255.8                          0 3741 36937 35405 ?<br />
</code></p>
<p>Ah, now a /12 is a decent block of IP addresses. Notice that this shows two other routes with 35405 at the end of the as-path. These are routes from Neotel customers, in this case, someone called &#8220;Macquarie Bank South Africa&#8221;. If we only wanted to see routes <em>originating</em> from Neotel, we could have used <code>sh ip bgp regexp _36937$</code> instead (&#8220;_36937$&#8221; is in fact a special kind of regular expression: &#8220;_&#8221; is short for &#8220;^|[,{}() ]|$&#8221;).</p>
<p>Please let me know if I missed any local route servers. I know MTNNS has a looking glass on their website, but it&#8217;s been broken for a long time. I reported the problem to a NOC email address they give for &#8220;questions and comments&#8221;, but they ignored me (big surprise).</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2008/09/local-route-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Post</title>
		<link>http://localloop.co.za/2008/09/first-post/</link>
		<comments>http://localloop.co.za/2008/09/first-post/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 10:36:39 +0000</pubDate>
		<dc:creator>Simeon Miteff</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[bgp]]></category>

		<guid isPermaLink="false">http://localloop.co.za/?p=26</guid>
		<description><![CDATA[Hi All My intention with this blog is to write some posts and create some pages about networking and Internet in South Africa. Some of my ideas for topics are about industry issues, while others are purely technical, but lets just see where it goes&#8230; The first actual content is my table of local (that [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All</p>
<p>My intention with this blog is to write some posts and create some pages about networking and Internet in South Africa. Some of my ideas for topics are about industry issues, while others are purely technical, but lets just see where it goes&#8230;</p>
<p>The first actual content is my table of local (that is, South African) <a href="http://localloop.co.za/autonomous-systems">Autonomous Systems</a> (usually this means: large Internet-connected networks). The list was compiled with AfriNIC&#8217;s list of assigned AS numbers as a starting point, and then cross-referenced with BGP tables, and info from various WHOIS sources (including RIPE, ARIN, AfriNIC and some IRR databases). </p>
<p>I&#8217;m hoping this is useful to someone. Please let me know what you think.</p>
<p>Cheers!<br />
Simeon.</p>
]]></content:encoded>
			<wfw:commentRss>http://localloop.co.za/2008/09/first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

