<?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>Networking with Cisco &#187; foundry configuration</title>
	<atom:link href="http://www.gho.no/category/foundry-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gho.no</link>
	<description>How to get the best networks!</description>
	<lastBuildDate>Wed, 02 Sep 2009 18:10:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>BGP Configuration: Basic example in Cisco IOS</title>
		<link>http://www.gho.no/2008/09/bgp-configuration-basic-example-in-cisco-ios/</link>
		<comments>http://www.gho.no/2008/09/bgp-configuration-basic-example-in-cisco-ios/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 22:53:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco configuration]]></category>
		<category><![CDATA[foundry configuration]]></category>
		<category><![CDATA[bgp]]></category>
		<category><![CDATA[bgp4]]></category>
		<category><![CDATA[foundry]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.gho.no/?p=65</guid>
		<description><![CDATA[		
		
		
		A lot of people are looking for bgp configuration information for cisco and foundry, so I&#8217;ll explain a bit about the different statements and also post a couple of configuration examples.
Cisco
01: ip route 10.0.0.0 255.0.0.0 null 0
02: router bgp 65000
03:    network 10.0.0.0 mask 255.0.0.0
04:    neighbor 192.168.0.1 remote-as 65001

Line 01 [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.gho.no/2008/09/bgp-configuration-basic-example-in-cisco-ios/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "BGP+Configuration%3A+Basic+example+in+Cisco+IOS";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>A lot of people are looking for bgp configuration information for cisco and foundry, so I&#8217;ll explain a bit about the different statements and also post a couple of configuration examples.</p>
<p><strong>Cisco</strong></p>
<blockquote><p>01: ip route 10.0.0.0 255.0.0.0 null 0<br />
02: router bgp 65000<br />
03:    network 10.0.0.0 mask 255.0.0.0<br />
04:    neighbor 192.168.0.1 remote-as 65001</p></blockquote>
<ol>
<li><strong>Line 01</strong> adds a route to 10.0.0.0/8 to null, this will make BGP announce this prefix as it will per default on cisco not announce networks it does not reach.</li>
<li><strong>Line 02</strong> starts a BGP process with a local AS number of 65000.</li>
<li><strong>Line 03</strong> adds the network 10.0.0.0/8 to the local BGP table, the router will now announce this network into BGP.</li>
<li><strong>Line 04</strong> sets up a peering session with 192.168.0.1 with their AS number defined as 65001.</li>
</ol>
<p><strong>Security issues in peering</strong><br />
I wrote a <a href="http://blog.arpa.no/index.php?entry=entry080827-150346">rant</a> about this in August when the news papers put up their big posters about the Internet dying (again.) <img src='http://www.gho.no/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Peering sessions should have a password and it might also be wise to filter the outbound announcements with a prefix-list, to make sure not to announce full transit to every peering partner.<br />
Also, you do not want this to happen to you either, so you should at least configure a maximum prefix count.</p>
<p><strong>Cisco, more BGP configuration statements (beginning in global config)</strong></p>
<blockquote><p>ip prefix-list AS65000 seq 5 permit 10.0.0.0/8<br />
ip prefix-list AS65000 seq 1000 deny 0.0.0.0/0 le 32<br />
router bgp 65000<br />
neighbor 192.168.0.1 password oursecret<br />
neighbor 192.168.0.1 prefix-list AS65000 out<br />
neighbor 192.168.0.1 maximum-prefix 5</p></blockquote>
<p>The first two lines will define a prefix list which will match only 10.0.0.0/8<br />
The third line enters BGP configuration while the fourth line sets a password, the same password has to be configured on the other end (for AS65000 on the remote peer) for the peering session to become active.<br />
Line number 5 will apply a prefix-list and the last line will make the router accept NO MORE than 5 prefixes from this peering partner.</p>
<p><strong>Foundry BGP Configuration</strong><br />
This is mostly the same, but the dry basics is as follows:</p>
<blockquote><p>ip route 10.0.0.0/8 null0<br />
router bgp<br />
local-as 65000<br />
neighbor 192.168.0.1 remote-as 65001<br />
network 10.0.0.0 255.0.0.0</p></blockquote>
<p><strong>And the filtering BGP4 statements for Foundry</strong></p>
<blockquote><p>ip prefix-list AS65000 seq 5 permit 10.0.0.0/8<br />
ip prefix-list AS65000 seq 1000 deny 0.0.0.0/0 le 32<br />
router bgp<br />
neighbor 192.168.0.1 password oursecret<br />
neighbor 192.168.0.1 prefix-list AS65000 out<br />
neighbor 192.168.0.1 maximum-prefix 5</p></blockquote>
<p>So as you can see, the BGP configuration is mostly the same for both routers, so lets focus our attention to more BGP configurations on Cisco IOS.</p>
<p><strong>BGP Peering From a Loopback Interface</strong><br />
Per default routers always use the IP address on interface directly connected to the peer as the source address for the peering session.  Sometimes this is prefered configurable, for example not to drop peerings due to hardware failure, or when doing eBGP multihop peering.</p>
<p>This is very configurable in BGP configuration in Cisco IOS</p>
<blockquote><p>neighbor 192.168.0.1 update-source Loopback0</p></blockquote>
<p><strong>Verification</strong><br />
At last, we need to verify the peering session.  I usually use this command:</p>
<blockquote><p>show ip bgp sum | i REMOTEAS</p></blockquote>
<p>Substitute &#8216;REMOTEAS&#8217; with the AS number of which you want to check, for example it will show this for AS65001 from our lab. (I will include the header also because it is usefull in this example, even though it won&#8217;t show up in your show command.)</p>
<blockquote><p>Router#sh ip bgp sum | i 65001<br />
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd<br />
192.168.0.1    4 65001      28      27        3    0    0 00:24:15        2</p></blockquote>
<p>This session is now established and I receive two prefixes from the remote peer.<br />
If you enable &#8216;<strong>neighbor 192.168.0.1 soft-reconfiguration inbound</strong>&#8216; you will also be able to check announcements.</p>
<blockquote><p>Router#show ip bgp neighbors 192.168.0.1 routes<br />
BGP table version is 3, local router ID is 192.168.0.2<br />
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i &#8211; internal,<br />
r RIB-failure, S Stale<br />
Origin codes: i &#8211; IGP, e &#8211; EGP, ? &#8211; incomplete</p>
<p>Network          Next Hop            Metric LocPrf Weight Path<br />
*&gt; 10.0.0.0         192.168.0.1             0             0 65001 ?<br />
*&gt; 192.168.0.0      192.168.0.1             0             0 65001 ?</p>
<p>Total number of prefixes <strong>2</strong></p></blockquote>
<p>Two prefixes received from 192.168.0.1, and you can also use the command <strong>show ip bgp neighbors 192.168.0.1 advertised-routes</strong> to check what your router is announcing to the remote peer.</p>
<p>That was it for today, hopefully the newer ones out there will have a better understanding of the BGP configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gho.no/2008/09/bgp-configuration-basic-example-in-cisco-ios/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

