<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>NetSack</title>
	<atom:link href="http://netsack.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://netsack.wordpress.com</link>
	<description>In the Dark Sack of the Network</description>
	<lastBuildDate>Wed, 23 Sep 2009 20:41:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='netsack.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>NetSack</title>
		<link>http://netsack.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://netsack.wordpress.com/osd.xml" title="NetSack" />
	<atom:link rel='hub' href='http://netsack.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Dealing with NSRP, BGP and link-layer shenanigans</title>
		<link>http://netsack.wordpress.com/2009/09/23/dealing-with-nsrp-bgp-and-link-layer-shenanigans/</link>
		<comments>http://netsack.wordpress.com/2009/09/23/dealing-with-nsrp-bgp-and-link-layer-shenanigans/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:16:36 +0000</pubDate>
		<dc:creator>netsack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://netsack.wordpress.com/?p=4</guid>
		<description><![CDATA[Why are you messing with my wire? Sometimes in the field of networking, you are forced into a sub-optimal scenario. In this case, I am dealing with something I call link-layer abstraction. Normally, an Ethernet link interconnects two devices, and &#8230; <a href="http://netsack.wordpress.com/2009/09/23/dealing-with-nsrp-bgp-and-link-layer-shenanigans/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netsack.wordpress.com&amp;blog=9616414&amp;post=4&amp;subd=netsack&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align:left;">Why are you messing with my wire?</h3>
<p style="text-align:left;">Sometimes in the field of networking, you are forced into a sub-optimal scenario. In this case, I am dealing with something I call <em><strong>link-layer abstraction</strong></em>.</p>
<p style="text-align:left;">Normally, an Ethernet link interconnects two devices, and when either of them disconnect, the link goes down on both sides. This can be seen when you link a computer into a switch; unplug the wire from the computer, and the switch knows straight away. You can be confident that there is no other equipment involved in this link; it&#8217;s a true point-to-point piece of wire.</p>
<p style="text-align:left;">There are certain situations where this doesn&#8217;t, or can&#8217;t happen. As a result one side of the link may assume the far end is still connected. This is what I mean by link-layer abstraction; there is no guarantee of an end-to-end signal to signify both devices are connected with each other.</p>
<p style="text-align:left;">Some typical examples of that cause link-layer abstraction are:</p>
<ul style="text-align:left;">
<li>VPLS</li>
<li>Ethernet-over-SDH</li>
<li>Use of intermediate switches to overcome 100m distance limits on cat5e</li>
</ul>
<p style="text-align:left;">In all of the above examples, you can only establish a true physical link to the provider equipment. This could be the near end mux at either side of the link in the case of Ethernet over SDH.</p>
<h3 style="text-align:left;">Firewalls don&#8217;t appreciate this</h3>
<p style="text-align:left;">Of course, all of this is bad for failover systems that rely on link-state. Juniper firewalls that run NSRP are usually configured to rely on link-state to determine a cluster failover. This would work just great if the mux near your firewall had a problem; the firewall would detect your link as being down and failover to the standby node. However, should the same happen at the far end of the link, your firewall would still be sitting there assuming all is well, as the your end of the link going to the local mux would still be up.</p>
<p style="text-align:left;">One obvious solution would be to set up IP tracking on the interface, but there are situations where this isn&#8217;t possible. For example, setting a track-IP is impossible on a /30 link-net that is typical when you have a BGP feed (because you also need a &#8216;manage-ip&#8217; on the network to send the pings from).</p>
<p style="text-align:left;">In my case, I&#8217;m dealing with two SDH-over-Ethernet links which suffer from this problem. I am also running BGP routing to the provider from my Juniper firewall cluster. The diagram below shows how I plan to overcome the issues:</p>
<p style="text-align:center;"><img class="size-full wp-image-5 aligncenter" title="Redundant BGP using NSRP in a link-layer abstraction scenario" src="http://netsack.files.wordpress.com/2009/09/gif_11.gif?w=500&#038;h=307" alt="Redundant BGP using NSRP in a link-layer abstraction scenario" width="500" height="307" /></p>
<p style="text-align:left;">Running with standard NSRP, I have two firewalls. The lines shown in blue represent the primary /30 link to provider router 1, and the red represent the backup /30 link to provider router 2.</p>
<p style="text-align:left;">Each of the links terminate on a switch, using a private VLAN to link to both firewalls simultaneously. Remember, only one of these firewalls will be active at any time.</p>
<h3 style="text-align:left;">And the BGP?</h3>
<p style="text-align:left;">With this topology, I&#8217;m able to run a BGP session from the active firewall to both provider routers, giving maximum redundancy with the setup. Although I have abstracted the links further myself by running them through switches, the situation is no worse than it was already.</p>
<p style="text-align:left;">Running both BGP sessions on the same firewall isn&#8217;t much of a problem. To do this, you need to configure a loopback group, and make the physical interfaces part of it. Here&#8217;s a config snippet showing this:</p>
<pre style="text-align:left;padding-left:30px;">set interface loopback.1 ip 1.2.3.0/26</pre>
<pre style="text-align:left;padding-left:30px;">set interface ethernet0/1 ip 2.2.2.2/30</pre>
<pre style="text-align:left;padding-left:30px;">set interface ethernet0/2 ip 3.2.2.2/30</pre>
<pre style="text-align:left;padding-left:30px;">set interface "ethernet0/1" loopback-group "loopback.1"</pre>
<pre style="text-align:left;padding-left:30px;">set interface "ethernet0/2" loopback-group "loopback.1"</pre>
<p style="text-align:left;">The loopback interface has the IP of the block that&#8217;s being announced via BGP. The physical interfaces are numbered with their /30 IP addresses. Then they are bound together using a loopback group. Just add the necessary BGP config to set up the sessions and away you go.</p>
<p style="text-align:left;">Using a loopback group is a great way of running a dynamic routing protocol with NSRP. If you configure your VPNs, DIPs and other NAT to use IPs within the loopback network range, then your failover will be totally seamless. This applies equally to a link-net failure and a firewall device failure.</p>
<p style="text-align:left;">Although failure detection can no longer rely on link-state, it&#8217;s better than no failover at all. However, this does mean relying on the BGP hold timer expiry to stop traffic from being black-holed for a while. To get over this, the BGP hold timer is set to 6 seconds, which implies a hello timer of 2 seconds (hold-timer/3).</p>
<h3 style="text-align:left;">Other tricks</h3>
<p style="text-align:left;">It&#8217;s also possible to employ a neat trick on Cisco switches called Link-State Tracking. This<a title="Link State Tracking" href="http://www.xpresslearn.com/cisco/switching/link-state-tracking" target="_blank"> tutorial</a> goes into some detail about this feature. The idea would be to speed up failover time in the case of a local mux failure. The &#8216;upstream&#8217; port would be configured as the link to the mux, and the downlink ports the links to the firewalls. If the local mux has a problem, the firewall links are downed straight away and the BGP session can drop immediately without waiting for hold-timer expiry.</p>
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netsack.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netsack.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netsack.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netsack.wordpress.com&amp;blog=9616414&amp;post=4&amp;subd=netsack&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://netsack.wordpress.com/2009/09/23/dealing-with-nsrp-bgp-and-link-layer-shenanigans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fb4dc5760267f69fb1f584011eb5203?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">netsack</media:title>
		</media:content>

		<media:content url="http://netsack.files.wordpress.com/2009/09/gif_11.gif" medium="image">
			<media:title type="html">Redundant BGP using NSRP in a link-layer abstraction scenario</media:title>
		</media:content>
	</item>
	</channel>
</rss>
