<?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>x83.net &#187; static</title>
	<atom:link href="http://www.x83.net/tag/static/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Redistribute route Juniper</title>
		<link>http://www.x83.net/redistribute-route-juniper/</link>
		<comments>http://www.x83.net/redistribute-route-juniper/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:47:54 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[connected]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[redistribute]]></category>
		<category><![CDATA[reject]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=110</guid>
		<description><![CDATA[Lets say you have set some dynamic routing (RIP,OSPF,BGP,IS-IS..) and you want to redistribute routes into them. redistribute connected set policy-options policy-statement Connected term connected { from protocol direct; then accept; } redistribute static set policy-options policy-statement Static term static { from protocol static; then accept; } redistribute local set policy-options policy-statement Local term local [...]]]></description>
			<content:encoded><![CDATA[<p>Lets say you have set some dynamic routing (RIP,OSPF,BGP,IS-IS..) and you want to redistribute routes into them.</p>
<p><strong>redistribute connected</strong></p>
<pre>
set policy-options policy-statement Connected
    term connected {
        from protocol direct;
        then accept;
}
</pre>
<p><strong>redistribute static</strong></p>
<pre>
set policy-options policy-statement Static
    term static {
        from protocol static;
        then accept;
}
</pre>
<p><strong>redistribute local</strong></p>
<pre>
set policy-options policy-statement Local
    term local {
        from protocol local;
        then accept;
}
</pre>
<p><strong>reject anything else</strong></p>
<pre>
term else {
    then reject
}
</pre>
<p>And all the policy will look like:</p>
<pre>

policy-statement distribute-routes
    term connected {
        from protocol direct;
        then accept;
    }
    term static {
        from protocol static;
        then accept;
    }
    term local {
        from protocol local;
        then accept;
    }
    term else {
        then reject
    }
</pre>
<p>It looks easy I guess..but what if you want to redistribute ospf routes?</p>
<p><strong>redistribute ospf routes</strong></p>
<p>If you are using OSPF for IGP and BGP as a EGP and you want to export ospf routes to BGP peers then you have to create a policy for that.<br />
Smth like :</p>
<pre>
policy-statement ospf-routes {
    term 1 {
        from {
            protocol ospf;
            area 0.0.0.0;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}
</pre>
<p><strong>send default route to bgp peer</strong></p>
<p>Lets assume you want to send to send to a BGP peer 0.0.0.0/0 (default route).</p>
<p>First you need to have a route for 0.0.0.0/0 before you can export it to a peer. I guess this is the difference between the Juniper and Cisco configs, Cisco provides you a shortcut with the &#8216;default-originate&#8217; keyword which does it all in one step. If you don&#8217;t have a route for 0.0.0.0/0 defined somewhere that is at least part of the problem.</p>
<p>First we generate the default route (if you dont have one yet) :</p>
<pre>
routing-options {
    generate {
        route 0.0.0.0/0 discard;
    }
}
</pre>
<p>then we create a policy for 0/0 :</p>
<pre>
policy-options {
    policy-statement default-originate {
        from {
            route-filter 0.0.0.0/0 exact;
        }
        then accept;
    }
}
</pre>
<p>A simple BGP neighbour will have smth like:</p>
<pre>
neighbor aaa.bbb.ccc.ddd {
    export default-originate;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/redistribute-route-juniper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a default route</title>
		<link>http://www.x83.net/adding-a-default-route/</link>
		<comments>http://www.x83.net/adding-a-default-route/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 03:55:20 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[0.0.0.0/0]]></category>
		<category><![CDATA[adding]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[default route]]></category>
		<category><![CDATA[next-hop]]></category>
		<category><![CDATA[routing-options]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=73</guid>
		<description><![CDATA[Adding a default route set routing-options static route 0.0.0.0/0 next-hop 10.1.1.1]]></description>
			<content:encoded><![CDATA[<p><strong>Adding a default route </strong></p>
<p><a href="http://www.juniper.net/techpubs/software/junos/junos90/swconfig-routing/configuring-a-default-route.html"></p>
<pre>
set routing-options static route 0.0.0.0/0 next-hop 10.1.1.1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/adding-a-default-route/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

