<?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>BGP &#8211; www.expertcisco.fr</title>
	<atom:link href="https://www.expertcisco.fr/category/bgp/feed" rel="self" type="application/rss+xml" />
	<link>https://www.expertcisco.fr</link>
	<description>CCIE Routing and Switching Lab Exam</description>
	<lastBuildDate>Sun, 16 Dec 2012 21:51:30 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.4</generator>
	<item>
		<title>BGP Allow-as</title>
		<link>https://www.expertcisco.fr/bgp/bgp-allow-as</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Tue, 20 Mar 2012 21:29:52 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=560</guid>

					<description><![CDATA[Dans cette configuration, R1 R2 et R3 forment l&#8217;AS 200 et n&#8217;annoncent aucun prefix : R4 et R5 forment l&#8217;AS 100 et annoncent respectivement les prefix 4.0.0.0 et 5.0.0.0 R1#show ip bgp &#124; be Net Network Next Hop Metric LocPrf &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-allow-as">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Dans cette configuration, R1 R2 et R3 forment l&rsquo;AS 200 et n&rsquo;annoncent aucun prefix :</p>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab22.png" width="335" height="202" /></p>
<p>R4 et R5 forment l&rsquo;AS 100 et annoncent respectivement les prefix 4.0.0.0 et 5.0.0.0</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt;i4.0.0.0          10.1.24.4                0    100      0 100 i
*&gt;i5.0.0.0          10.1.35.5                0    100      0 100 i</pre>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 4.0.0.0          10.1.24.4                0             0 100 i
*&gt;i5.0.0.0          10.1.35.5                0    100      0 100 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt;i4.0.0.0          10.1.24.4                0    100      0 100 i
*&gt; 5.0.0.0          10.1.35.5                0             0 100 i</pre>
<h3></h3>
<h3>Problème :</h3>
<p style="padding-left: 30px;">R4 n&rsquo;apprend pas le prefix 5.0.0.0 de R5 :</p>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 4.0.0.0          0.0.0.0                  0         32768 i</pre>
<p style="padding-left: 30px;">R5 n&rsquo;apprend pas le prefix 4.0.0.0 de R4 :</p>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<h3></h3>
<h3>Vérification des annonces :</h3>
<p style="padding-left: 30px;">R2 annonce correctement le prefix 5.0.0.0 à R4</p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.24.4 advertised-routes</span>
BGP table version is 5, local router ID is 10.1.123.2
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*&gt;i5.0.0.0          10.1.35.5                0    100      0 100 i

Total number of prefixes 1</pre>
<p style="padding-left: 30px;">R3 annonce correctement le prefix 4.0.0.0 à R5</p>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.35.5 advertised-routes</span>
BGP table version is 5, local router ID is 10.1.123.3
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*&gt;i4.0.0.0          10.1.24.4                0    100      0 100 i

Total number of prefixes 1</pre>
<h3></h3>
<h3>Solution: « allawas-in »</h3>
<pre><span style="color: #ff0000;">R4</span>#conf t
R4(config)#router bgp 100
R4(config-router)#neighbor 10.1.24.2 allowas-in</pre>
<pre><span style="color: #ff0000;">   
R5</span>#conf t
R5(config)#router bgp 100
R5(config-router)#neighbor 10.1.35.3 allowas-in</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications:</strong></span></p>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 4.0.0.0          0.0.0.0                  0         32768 i
*&gt; 5.0.0.0          10.1.24.2                              0 200 100 i</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 4.0.0.0          10.1.35.3                              0 200 100 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab22.png" width="335" height="202" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Confederation BGP</title>
		<link>https://www.expertcisco.fr/bgp/confederation-bgp</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Tue, 20 Mar 2012 21:18:08 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=556</guid>

					<description><![CDATA[La confédération BGP permet de regrouper un ensemble d&#8217;AS (privé) en un seul AS (publique) confederation identifier confederation peers Exemple : R1#show ip bgp &#124; be Net Network Next Hop Metric LocPrf Weight Path *&#62; 1.0.0.0 0.0.0.0 0 32768 i &#8230; <a href="https://www.expertcisco.fr/bgp/confederation-bgp">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>La confédération BGP permet de regrouper un ensemble d&rsquo;AS (privé) en un seul AS (publique)</p>
<ul>
<li>confederation identifier</li>
<li>confederation peers</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Exemple :</strong></span></p>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab20.png" width="335" height="201" /></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 65522 i
*&gt; 3.0.0.0          10.1.12.2                              0 65522 65534 i
*&gt; 4.0.0.0          10.1.12.2                              0 65522 65534 i
*&gt; 5.0.0.0          10.1.12.2                              0 65522 65534 500 i</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.45.4                              0 65534 65522 65511 i
*&gt; 2.0.0.0          10.1.45.4                              0 65534 65522 i
*&gt; 3.0.0.0          10.1.45.4                              0 65534 i
*&gt; 4.0.0.0          10.1.45.4                0             0 65534 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<h3></h3>
<h3>Configuration de la confegaration de l&rsquo;AS 100</h3>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show run | be router bgp</span>
router bgp 65511
 no synchronization
 bgp log-neighbor-changes
 bgp <span style="color: #00ffff;">confederation identifier</span> 100
 bgp <span style="color: #00ffff;">confederation peers</span> 65522
 network 1.0.0.0
 neighbor 10.1.12.2 remote-as 65522
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show run | be router bgp</span>
router bgp 65522
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 100
 bgp confederation peers 65511 65534
 network 2.0.0.0
 neighbor 10.1.12.1 remote-as 65511
 neighbor 10.1.23.3 remote-as 65534
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show run | be router bgp</span>
router bgp 65534
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 100
 bgp confederation peers 65522
 network 3.0.0.0
 neighbor 10.1.23.2 remote-as 65522
 neighbor 10.1.34.4 remote-as 65534
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show run | be router bgp</span>
router bgp 65534
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 100
 network 4.0.0.0
 neighbor 10.1.34.3 remote-as 65534
 neighbor 10.1.45.5 remote-as 500
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show run | be router bgp</span>
router bgp 500
 no synchronization
 bgp log-neighbor-changes
 network 5.0.0.0
 neighbor 10.1.45.4 remote-as 100
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications :</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0    100      0 (65522) i
*  3.0.0.0          10.1.23.3                0    100      0 (65522 65534) i
*&gt; 4.0.0.0          10.1.34.4                0    100      0 (65522 65534) i
*&gt; 5.0.0.0          10.1.45.5                0    100      0 (65522 65534) 500 i</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">sh ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.45.4                              0 100 i
*&gt; 2.0.0.0          10.1.45.4                              0 100 i
*&gt; 3.0.0.0          10.1.45.4                              0 100 i
*&gt; 4.0.0.0          10.1.45.4                0             0 100 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab20.png" width="335" height="201" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP Distance Administrative</title>
		<link>https://www.expertcisco.fr/bgp/distance</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Tue, 20 Mar 2012 20:44:12 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=544</guid>

					<description><![CDATA[Valeur par défaut de l&#8217;administrative distance BGP : Protocol  Administrative distance  Directly connected route   0  Static route   1  EIGRP summary route   5  External BGP   20  Internal EIGRP   90  IGRP   100  OSPF   110  IS-IS   &#8230; <a href="https://www.expertcisco.fr/bgp/distance">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Valeur par défaut de l&rsquo;administrative distance BGP :</p>
<table border="1" cellspacing="0">
<tbody>
<tr>
<td style="background-color: #000000;"><strong><span style="color: #ffffff;">Protocol</span></strong></td>
<td style="background-color: #000000;"><strong><span style="color: #ffffff;"> Administrative distance</span></strong></td>
</tr>
<tr>
<td> Directly connected route</td>
<td>  0</td>
</tr>
<tr>
<td> Static route</td>
<td>  1</td>
</tr>
<tr>
<td> EIGRP summary route</td>
<td>  5</td>
</tr>
<tr>
<td><strong><span style="color: #ff0000;"> External BGP</span></strong></td>
<td> <strong><span style="color: #ff0000;"> 20</span></strong></td>
</tr>
<tr>
<td> Internal EIGRP</td>
<td>  90</td>
</tr>
<tr>
<td> IGRP</td>
<td>  100</td>
</tr>
<tr>
<td> OSPF</td>
<td>  110</td>
</tr>
<tr>
<td> IS-IS</td>
<td>  115</td>
</tr>
<tr>
<td> RIP</td>
<td>  120</td>
</tr>
<tr>
<td> EGP</td>
<td>  140</td>
</tr>
<tr>
<td> ODR</td>
<td>  160</td>
</tr>
<tr>
<td> External EIGRP</td>
<td>  170</td>
</tr>
<tr>
<td><strong><span style="color: #ff0000;"> Internal BGP</span></strong></td>
<td> <strong><span style="color: #ff0000;"> 200</span></strong></td>
</tr>
<tr>
<td> DHCP-learned</td>
<td>  254</td>
</tr>
<tr>
<td> Unknown</td>
<td>  255</td>
</tr>
</tbody>
</table>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab19.png" width="335" height="201" /></p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip route bgp</span>
B    1.0.0.0/8 [<span style="color: #00ffff;">200</span>/0] via 10.1.12.1, 00:00:04
B    33.0.0.0/8 [<span style="color: #00ffff;">20</span>/0] via 10.1.23.3, 00:00:04
B    3.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
B    4.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
B    11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04
B    44.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04</pre>
<h3></h3>
<h3>Modification de la distance administrative d&rsquo;un voisin</h3>
<pre>R2#conf t
R2(config)#router bgp 120
R2(config-router)#<span style="color: #00ffff;">distance 150 10.1.23.3 0.0.0.0</span></pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification</strong></span></p>
<pre>R2#<span style="color: #ff0000;">show ip route bgp</span>
B    1.0.0.0/8 [200/0] via 10.1.12.1, 00:00:44
B    33.0.0.0/8 [<span style="color: #00ffff;">150</span>/0] via 10.1.23.3, 00:00:44
B    3.0.0.0/8 [<span style="color: #00ffff;">150</span>/0] via 10.1.23.3, 00:00:44
B    4.0.0.0/8 [<span style="color: #00ffff;">150</span>/0] via 10.1.23.3, 00:00:44
B    11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:44
B    44.0.0.0/8 [<span style="color: #00ffff;">150</span>/0] via 10.1.23.3, 00:00:44</pre>
<h3></h3>
<h3>Modification de la distance administrative d&rsquo;un prefix</h3>
<pre>R2#conf t
R2(config)#access-list 33 permit 33.0.0.0
R2(config)#router bgp 120
R2(config-router)#no distance 150 10.1.23.3 0.0.0.0
R2(config-router)#distance <span style="color: #00ffff;">155</span> 10.1.23.3 0.0.0.0 33</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification</strong></span></p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip route bgp</span>
B    1.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04
B    33.0.0.0/8 [<span style="color: #00ffff;">155</span>/0] via 10.1.23.3, 00:00:04
B    3.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
B    4.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04
B    11.0.0.0/8 [200/0] via 10.1.12.1, 00:00:04
B    44.0.0.0/8 [20/0] via 10.1.23.3, 00:00:04</pre>
<p>&nbsp;</p>
<h3>Modification de la distance administrative par défaut du routeur BGP</h3>
<p style="padding-left: 30px;">« distance bgp » permet de modifier les 3 valeurs de distance administrative par défaut :</p>
<ul>
<li>eBGP</li>
<li>iBGP</li>
<li>local routes</li>
</ul>
<pre><span style="color: #ff0000;">R2</span>#conf t
R2(config)#router bgp 120
R2(config-router)#no distance 155 10.1.23.3 0.0.0.0 33
R2(config-router)#<span style="color: #00ffff;">distance bgp 60 90 20</span>

     &lt;1-255&gt; Distance for routes external to the AS
     &lt;1-255&gt; Distance for routes internal to the AS
     &lt;1-255&gt; Distance for local routes</pre>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip route bgp</span>
B    1.0.0.0/8 [90/0] via 10.1.12.1, 00:00:07
B    33.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07
B    3.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07
B    4.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07
B    11.0.0.0/8 [90/0] via 10.1.12.1, 00:00:07
B    44.0.0.0/8 [60/0] via 10.1.23.3, 00:00:07</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Advance BGP configuration</title>
		<link>https://www.expertcisco.fr/bgp/advance-bgp-configuration</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 20:00:04 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=537</guid>

					<description><![CDATA[Dans cette configuration, 3 AS sont des AS privés remove-private timers advertisement-interval disable-connected-check ttl-security local-as no-prepend replace-as no-prepend replace-as dual-as maxas-limit default-originate Configuration de R2: router bgp 65502 no synchronization no bgp fast-external-fallover bgp log-neighbor-changes network 2.0.0.0 neighbor 10.1.12.1 remote-as &#8230; <a href="https://www.expertcisco.fr/bgp/advance-bgp-configuration">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img style="float: right;" alt="" src="/images/BGP-Lab18.png" width="335" height="201" />Dans cette configuration, 3 AS sont des AS privés</p>
<ul>
<li>remove-private</li>
<li>timers</li>
<li>advertisement-interval</li>
<li>disable-connected-check</li>
<li>ttl-security</li>
<li>local-as</li>
<li>no-prepend replace-as</li>
<li>no-prepend replace-as dual-as</li>
<li>maxas-limit</li>
<li>default-originate</li>
</ul>
<p style="padding-left: 30px;"><strong>Configuration de R2:</strong></p>
<pre>router bgp 65502
 no synchronization
 no bgp fast-external-fallover
 bgp log-neighbor-changes
 network 2.0.0.0
 neighbor 10.1.12.1 remote-as 65501
 neighbor 10.1.12.1 timers 60 300
 neighbor 10.1.23.3 remote-as 65503
 neighbor 10.1.23.3 timers 60 300
 no auto-summary</pre>
<p style="padding-left: 30px;"><strong>Topologie BGP de R5</strong></p>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.45.4                              0 400 65503 65502 65501 i
*&gt; 2.0.0.0          10.1.45.4                              0 400 65503 65502 i
*&gt; 3.0.0.0          10.1.45.4                              0 400 65503 i
*&gt; 4.0.0.0          10.1.45.4                0             0 400 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<h3></h3>
<h3>remove-private</h3>
<p style="padding-left: 30px;">« remove-private » permet de « masquer » les AS privés en modifiant l&rsquo;attribut « AS Path » et de ne pas les annoncer</p>
<pre><span style="color: #ff0000;">R4</span>
router bgp 400
 no synchronization
 bgp log-neighbor-changes
 network 4.0.0.0
 neighbor 10.1.34.3 remote-as 65503
 neighbor 10.1.45.5 remote-as 500
 neighbor 10.1.45.5 remove-private-as
 no auto-summary</pre>
<p style="padding-left: 30px;"><strong>Vérifications</strong>: R5 ne voit plus que l&rsquo;AS 400</p>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.45.4                              0 400 i
*&gt; 2.0.0.0          10.1.45.4                              0 400 i
*&gt; 3.0.0.0          10.1.45.4                              0 400 i
*&gt; 4.0.0.0          10.1.45.4                0             0 400 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">ping 1.1.1.1 source 5.5.5.5</span>

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/116/116 ms</pre>
<h3></h3>
<h3>timers &amp; advertisement-interval</h3>
<p style="padding-left: 30px;"><strong>« timers »</strong> permet d&rsquo;ajuster la valeur du keepalive et du holdtime</p>
<ul>
<ul>
<li>keepalive par default : 60 seconds</li>
<li>holdtime par defaut : 180 seconds</li>
</ul>
</ul>
<p style="padding-left: 30px;"><strong>« advertisement-interval »</strong> permet ajuster la fréquence des annonces<br />
valeur par défaut :</p>
<ul>
<ul>
<li>External peers : 30 seconds</li>
<li>Internal peers : 5 seconds</li>
</ul>
</ul>
<pre>router bgp 65501
 no synchronization
 bgp log-neighbor-changes
 network 1.0.0.0
 neighbor 10.1.12.2 remote-as 65502
 neighbor 10.1.12.2 timers 60 300
 neighbor 10.1.12.2 advertisement-interval 60
 no auto-summary</pre>
<p>&nbsp;</p>
<h3>disable-connected-check</h3>
<p style="padding-left: 30px;">Par défaut, une session eBGP doit être du type « single-hop » (ttl à 1 )<br />
La session eBGP ne peut donc pas s&rsquo;établir lors de l&rsquo;utilisation de loopback entre 2 AS</p>
<p style="padding-left: 30px;">disable-connected-check peut être utilisé pour modifier ce comportement</p>
<pre><span style="color: #ff0000;">R4</span>
router bgp 400
 no synchronization
 bgp log-neighbor-changes
 network 4.0.0.0
 neighbor 10.1.34.3 remote-as 65503
 neighbor 55.5.5.5 remote-as 500
 neighbor 55.5.5.5 disable-connected-check
 neighbor 55.5.5.5 update-source Loopback1
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R5</span>
router bgp 500
 no synchronization
 bgp log-neighbor-changes
 network 5.0.0.0
 neighbor 44.4.4.4 remote-as 400
 neighbor 44.4.4.4 disable-connected-check
 neighbor 44.4.4.4 update-source Loopback1
 no auto-summary</pre>
<p>&nbsp;</p>
<h3>ttl-security</h3>
<p style="padding-left: 30px;">lors de l&rsquo;utilisation de « disable-connected-check » une sécurité peut être mise en place en spécifiant le nombre de saut max</p>
<pre><span style="color: #ff0000;">R1</span>#conf t
R1(config)#router bgp 65501
R1(config-router)#neighbor 10.1.12.2 ttl-security hops 2</pre>
<pre><span style="color: #ff0000;">R2</span>#conf t
R2(config)#router bgp 65502
R2(config-router)#neighbor 10.1.12.1 ttl-security hops 2</pre>
<p>&nbsp;</p>
<h3>local-as</h3>
<p style="padding-left: 30px;">« local-as » permet de modifié le numéro d&rsquo;AS selon le voisin</p>
<pre><span style="color: #ff0000;">R4</span>
router bgp 400
 no synchronization
 bgp log-neighbor-changes
 network 4.0.0.0
 neighbor 10.1.34.3 remote-as 65503
 neighbor 10.1.45.5 remote-as 555
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R5</span>
router bgp 500
 no synchronization
 bgp log-neighbor-changes
 network 5.0.0.0
 neighbor 10.1.45.4 remote-as 400
 neighbor 10.1.45.4 local-as 555
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications :</strong></span></p>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.34.3                              0 65503 65502 65501 i
*&gt; 2.0.0.0          10.1.34.3                              0 65503 65502 i
*&gt; 3.0.0.0          10.1.34.3                0             0 65503 i
*&gt; 4.0.0.0          0.0.0.0                  0         32768 i
*&gt; 5.0.0.0          10.1.45.5                0             0 555 500 i</pre>
<pre><span style="color: #ff0000;">R5</span>#<span style="color: #ff0000;">show ip bgp  | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.45.4                              0 555 400 65503 65502 65501 i
*&gt; 2.0.0.0          10.1.45.4                              0 555 400 65503 65502 i
*&gt; 3.0.0.0          10.1.45.4                              0 555 400 65503 i
*&gt; 4.0.0.0          10.1.45.4                0             0 555 400 i
*&gt; 5.0.0.0          0.0.0.0                  0         32768 i</pre>
<p>&nbsp;</p>
<h3>no-prepend replace-as</h3>
<p style="padding-left: 30px;">lors de l&rsquo;utilisation de « local-as », l&rsquo;id réel de AS peut être complétement dissimulé :</p>
<pre><span style="color: #ff0000;">R3</span>
router bgp 65503
 no synchronization
 bgp log-neighbor-changes
 network 3.0.0.0
 neighbor 10.1.23.2 remote-as 65502
 neighbor 10.1.23.2 timers 60 300
 neighbor 10.1.34.4 remote-as 400
 neighbor 10.1.34.4 local-as 300 no-prepend replace-as
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R4</span>
router bgp 400
 no synchronization
 bgp log-neighbor-changes
 network 4.0.0.0
 neighbor 10.1.34.3 remote-as 300
 neighbor 10.1.45.5 remote-as 555
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span></p>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.34.3                              0 300 65502 65501 i
*&gt; 2.0.0.0          10.1.34.3                              0 300 65502 i
*&gt; 3.0.0.0          10.1.34.3                0             0 300 i
*&gt; 4.0.0.0          0.0.0.0                  0         32768 i
*&gt; 5.0.0.0          10.1.45.5                0             0 555 500 i</pre>
<p>&nbsp;</p>
<h3>no-prepend replace-as dual-as</h3>
<p style="padding-left: 30px;">L&rsquo;ajout de l&rsquo;option « dual-as » permet aux voisins d&rsquo;établir une relation de voisinage sur les 2 id d&rsquo;AS ( le réel et l&rsquo;alias)</p>
<h3></h3>
<h3>maxas-limit</h3>
<p style="padding-left: 30px;">Par défaut, le nombre AS possible dans l&rsquo;attribut « AS Path » est de 75<br />
Cette valeur peut-être modifié avec « maxas-limit »</p>
<pre><span style="color: #ff0000;">R3</span>#conf t
R3(config)#router bgp 65503
R3(config-router)#bgp maxas-limit 2</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification dans les logs</strong></span></p>
<pre><span style="color: #ff0000;">R3</span>#
*Mar 10 11:34:54.772: %BGP-6-ASPATH: Long AS path 65502 65503 400 received from 10.1.23.2: More than
 configured MAXAS-LIMIT</pre>
<p>&nbsp;</p>
<h3>default-originate</h3>
<p style="padding-left: 30px;">« default-originate » Permet d&rsquo;infecter une route par défaut au voisin SI la condition « route-map » est vrai ( présence du prefix 2.0.0.0 dans l&rsquo;exemple)</p>
<pre><span style="color: #ff0000;">R3</span>(config)#access-list 2 permit 2.0.0.0

R3(config)#route-map TEST permit 10
R3(config-route-map)#match ip address 2
R3(config-route-map)#exit

R3(config)#router bgp 65503
R3(config-router)#neighbor 10.1.34.4 default-originate route-map TEST</pre>
<pre><span style="color: #ff0000;">R4</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 0.0.0.0          10.1.34.3                0             0 300 i
*&gt; 1.0.0.0          10.1.34.3                              0 300 65502 65501 i
*&gt; 2.0.0.0          10.1.34.3                              0 300 65502 i
*&gt; 3.0.0.0          10.1.34.3                0             0 300 i
*&gt; 4.0.0.0          0.0.0.0                  0         32768 i
*&gt; 5.0.0.0          10.1.45.5                0             0 555 500 i</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP Regular Expressions</title>
		<link>https://www.expertcisco.fr/bgp/bgp-regular-expressions</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 19:41:21 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=533</guid>

					<description><![CDATA[Les expressions régulières permettent de réaliser des filtres sur l&#8217;attribut « AS Path » as-path filter-list show ip bgp regexp &#160; Dans cette exemple, le router R1 obtient la topologie suivante : R1#show ip bgp &#124; be Net Network Next Hop Metric &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-regular-expressions">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img style="float: right;" alt="" src="/images/BGP-Lab17.png" width="335" height="201" />Les expressions régulières permettent de réaliser des filtres sur l&rsquo;attribut « AS Path »</p>
<ul>
<li>as-path</li>
<li>filter-list</li>
<li>show ip bgp regexp</li>
</ul>
<p>&nbsp;</p>
<p>Dans cette exemple, le router R1 obtient la topologie suivante :</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i
*&gt; 3.0.0.0          10.1.12.2                              0 200 300 i
*&gt; 4.0.0.0          10.1.12.2                              0 200 300 400 i</pre>
<h3></h3>
<h3>Configurations :</h3>
<h3>Filtre les prefix avec l&rsquo;attribut « AS Path » terminant par 300</h3>
<pre><span style="color: #ff0000;">R1</span>#
ip as-path access-list 1 <span style="color: #00ffff;">deny _300$</span>
ip as-path access-list 1 permit .*
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.0.0.0
 network 11.0.0.0
 neighbor 10.1.12.2 remote-as 200
 neighbor 10.1.12.2 filter-list 1 in
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i
*&gt; 4.0.0.0          10.1.12.2                              0 200 300 400 i</pre>
<h3></h3>
<h3>Filtre les prefix contenant 300 dans l&rsquo;attribut « AS Path »</h3>
<pre>ip as-path access-list 1 <span style="color: #00ffff;">deny _300_</span>
ip as-path access-list 1 permit .*
!</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span></p>
<pre>R1#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i</pre>
<h3 style="padding-left: 30px;"></h3>
<h3>Filtre les prefix locaux dans les annonces</h3>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.23.2 advertised-routes | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.23.2                              0 200 100 i
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i
*&gt; 3.0.0.0          0.0.0.0                  0         32768 i
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Configuration</strong></span></p>
<pre>ip as-path access-list 1 deny ^$
ip as-path access-list 1 permit .*
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 3.0.0.0
 network 33.0.0.0
 neighbor 10.1.23.2 remote-as 200
 neighbor 10.1.23.2 filter-list 1 out
 neighbor 10.1.34.4 remote-as 400
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span></p>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.23.2 advertised-routes | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i

Total number of prefixes 1</pre>
<h3></h3>
<h3>show ip bgp regexp</h3>
<p style="padding-left: 30px;">La commande « show ip bgp regexp » permet de verifier (de tester) une expression régulière avant sont implémentation</p>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.23.2                              0 200 100 i
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i
*&gt; 3.0.0.0          0.0.0.0                  0         32768 i
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">sh ip bgp regexp ^$</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 3.0.0.0          0.0.0.0                  0         32768 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">sh ip bgp regexp ^200$</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">sh ip bgp regexp ^200_</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.23.2                              0 200 100 i
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">sh ip bgp regexp ^[0-9]+$</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">sh ip bgp regexp ^200_100$</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          10.1.23.2                              0 200 100 i</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP Filtering</title>
		<link>https://www.expertcisco.fr/bgp/bgp-filtering</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 19:22:20 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=529</guid>

					<description><![CDATA[Filtering &#8211; Utilisation des ACLs &#38; Prefix-lists access-list distribute-list prefix-list ORF feature &#160; Dans cet exemple, le routeur R2 a constitué la topologie suivante : &#160; R2#show ip bgp &#124; be Net Network Next Hop Metric LocPrf Weight Path *&#62; &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-filtering">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<h3>Filtering &#8211; Utilisation des ACLs &amp; Prefix-lists<img style="float: right;" alt="" src="/images/BGP-Lab16.png" width="335" height="201" /></h3>
<ul>
<li>access-list</li>
<li>distribute-list</li>
<li>prefix-list</li>
<li>ORF feature</li>
</ul>
<p>&nbsp;</p>
<p>Dans cet exemple, le routeur R2 a constitué la topologie suivante :</p>
<p>&nbsp;</p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.0.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.1.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.2.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.3.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.4.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*  3.0.0.0          10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i
*  4.0.0.0          10.1.12.1                              0 100 400 i
*&gt;                  10.1.23.3                              0 300 400 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i
*  33.0.0.0         10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i</pre>
<h3></h3>
<h3>« distribute-list » pour filtrer un prefix</h3>
<pre>R2(config)#access-list 4 <span style="color: #00ffff;">deny</span> 1.1.4.0 0.0.0.255
R2(config)#access-list 4 <span style="color: #00ffff;">permit any</span>

R2(config)#router bgp 200
R2(config-router)#neighbor 10.1.12.1 <span style="color: #00ffff;">distribute-list 4 in</span>
R2(config-router)#neighbor 10.1.23.3 <span style="color: #00ffff;">distribute-list 4 in
</span></pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification:</strong></span></p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.0.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.1.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.2.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.3.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*  3.0.0.0          10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i
*  4.0.0.0          10.1.12.1                              0 100 400 i
*&gt;                  10.1.23.3                              0 300 400 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i
*  33.0.0.0         10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i</pre>
<h3></h3>
<h3>« distribute-list » pour n&rsquo;autoriser que les prefix souhaité</h3>
<pre>R2#conf t
R2(config)#no access-list 4
R2(config)#access-list 4 <span style="color: #00ffff;">permit</span> 1.1.4.0 0.0.0.255
R2(config)#access-list 4 <span style="color: #00ffff;">deny</span> any</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification :</strong></span></p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.4.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i</pre>
<p style="padding-left: 30px;">Utilisation d&rsquo;un acces-list nommée</p>
<pre>R2#conf t
R2(config)#ip access-list standard <span style="color: #00ffff;">TOTO</span>
R2(config-std-nacl)#10 permit 1.1.3.0 0.0.0.255
R2(config-std-nacl)#20 deny any
R2(config-std-nacl)#exit

R2(config)#router bgp 200
R2(config-router)#neighbor 10.1.12.1 distribute-list <span style="color: #00ffff;">TOTO</span> in
R2(config-router)#neighbor 10.1.23.3 distribute-list <span style="color: #00ffff;">TOTO</span> in
R2(config-router)#^Z</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification:</strong></span></p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.3.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i</pre>
<h3></h3>
<h3>Utilisation des « prefix-list »</h3>
<pre>R2#conf t
R2(config)#<span style="color: #00ffff;">ip prefix-list</span> TOTO seq 10 deny 1.1.4.0/24
R2(config)#<span style="color: #00ffff;">ip prefix-list</span> TOTO seq 20 permit 0.0.0.0/0 le 32

R2(config)#router bgp 200
R2(config-router)#neighbor 10.1.12.1 <span style="color: #00ffff;">prefix-list</span> TOTO in
R2(config-router)#neighbor 10.1.23.3 <span style="color: #00ffff;">prefix-list</span> TOTO in</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span></p>
<pre>R2#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.0.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.1.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.2.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 1.1.3.0/24       10.1.12.1                0             0 100 i
*                   10.1.23.3                              0 300 400 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*  3.0.0.0          10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i
*  4.0.0.0          10.1.12.1                              0 100 400 i
*&gt;                  10.1.23.3                              0 300 400 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i
*  33.0.0.0         10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i</pre>
<pre>R2#<span style="color: #ff0000;">show ip prefix-list</span>
ip prefix-list TOTO: 2 entries
   seq 10 deny 1.1.4.0/24
   seq 20 permit 0.0.0.0/0 le 32</pre>
<h3></h3>
<h3>Utilisation des « prefix-list »</h3>
<pre>R2#conf t
R2(config)#ip prefix-list TOTO seq 11 deny 1.1.0.0/24
R2(config)#ip prefix-list TOTO seq 12 deny 1.1.1.0/24
R2(config)#ip prefix-list TOTO seq 13 deny 1.1.2.0/24
R2(config)#ip prefix-list TOTO seq 14 deny 1.1.3.0/24
R2(config)#^Z</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications:</strong></span></p>
<pre>R2#<span style="color: #ff0000;">show ip prefix-list</span>
ip prefix-list TOTO: 6 entries
   seq 10 deny 1.1.4.0/24
   seq 11 deny 1.1.0.0/24
   seq 12 deny 1.1.1.0/24
   seq 13 deny 1.1.2.0/24
   seq 14 deny 1.1.3.0/24
   seq 20 permit 0.0.0.0/0 le 32</pre>
<pre>R2#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*  3.0.0.0          10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i
*&gt; 4.0.0.0          10.1.12.1                              0 100 400 i
*                   10.1.23.3                              0 300 400 i
*&gt; 22.0.0.0         0.0.0.0                  0         32768 i
*  33.0.0.0         10.1.12.1                              0 100 400 300 i
*&gt;                  10.1.23.3                0             0 300 i</pre>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>Note: les prefix sont filtrés mais toujours annoncés aux les voisins R1 &amp; R3 :</strong></span></p>
<pre>R1#<span style="color: #ff0000;">show ip bgp neighbors 10.1.12.2 advertised-routes</span>

   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.0.0/24       0.0.0.0                  0         32768 i
*&gt; 1.1.1.0/24       0.0.0.0                  0         32768 i
*&gt; 1.1.2.0/24       0.0.0.0                  0         32768 i
*&gt; 1.1.3.0/24       0.0.0.0                  0         32768 i
*&gt; 1.1.4.0/24       0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i
*&gt; 3.0.0.0          10.1.14.4                              0 400 300 i
*&gt; 4.0.0.0          10.1.14.4                0             0 400 i
*&gt; 22.0.0.0         10.1.12.2                0             0 200 i
*&gt; 33.0.0.0         10.1.14.4                              0 400 300 i

Total number of prefixes 10</pre>
<pre>R3#<span style="color: #ff0000;">show ip bgp neighbors 10.1.23.2 advertised-routes</span>

   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.1.0.0/24       10.1.34.4                              0 400 100 i
*&gt; 1.1.1.0/24       10.1.34.4                              0 400 100 i
*&gt; 1.1.2.0/24       10.1.34.4                              0 400 100 i
*&gt; 1.1.3.0/24       10.1.34.4                              0 400 100 i
*&gt; 1.1.4.0/24       10.1.34.4                              0 400 100 i
*&gt; 2.0.0.0          10.1.23.2                0             0 200 i
*&gt; 3.0.0.0          0.0.0.0                  0         32768 i
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i
*&gt; 22.0.0.0         10.1.23.2                0             0 200 i
*&gt; 33.0.0.0         0.0.0.0                  0         32768 i

Total number of prefixes 10</pre>
<h3></h3>
<h3>ORF feature</h3>
<p>Le filtrage mis en place sur R2 peut être pris en compte par ces voisins R1 et R3 en implémentant ORF sur chaque routeur:</p>
<pre><span style="color: #ff0000;">R1</span>#conf t
R1(config)#router bgp 100
R1(config-router)#address-family ipv4 unicast
R1(config-router-af)#neighbor 10.1.12.2 capability orf prefix-list receive

<span style="color: #ff0000;">R3</span>#conf t
R3(config)#router bgp 300
R3(config-router)#address-family ipv4 unicast
R3(config-router-af)#neighbor 10.1.23.2 capability orf prefix-list receive

<span style="color: #ff0000;">R2</span>#conf t
R2(config)#router bgp 200
R2(config-router)#address-family ipv4 unicast
R2(config-router-af)#neighbor 10.1.12.1 capability orf prefix-list send
R2(config-router-af)#neighbor 10.1.23.3 capability orf prefix-list send</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications:</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.12.2 advertised-routes</span>

   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 3.0.0.0          10.1.14.4                              0 400 300 i
*&gt; 4.0.0.0          10.1.14.4                0             0 400 i
*&gt; 33.0.0.0         10.1.14.4                              0 400 300 i

Total number of prefixes 3</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp neighbors 10.1.23.2 advertised-routes</span>

   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 3.0.0.0          0.0.0.0                  0         32768 i
*&gt; 4.0.0.0          10.1.34.4                0             0 400 i
*&gt; 33.0.0.0         0.0.0.0                  0         32768 i

Total number of prefixes 3</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP MED</title>
		<link>https://www.expertcisco.fr/bgp/bgp-med</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 16:47:44 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=523</guid>

					<description><![CDATA[Multi Exit Discriminator (MED) Attribute L&#8217;attribut « MED » (ou metric) est transmis aux voisins BGP, il permet de suggérer aux AS voisin une préférence pour le trafic entrant. &#160; Codé sur 32bits la valeur la pus petite est préférée &#160; Routage &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-med">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<h3>Multi Exit Discriminator (MED) Attribute</h3>
<p><img style="float: right;" alt="" src="/images/BGP-Lab15.png" width="335" height="201" /></p>
<p>L&rsquo;attribut « MED » (ou metric) est transmis aux voisins BGP, il permet de suggérer aux AS voisin une préférence pour le trafic entrant.</p>
<p>&nbsp;</p>
<ul>
<li>Codé sur 32bits</li>
<li>la valeur la pus petite est préférée</li>
</ul>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Routage par défaut de R1:</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">sh ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.12.2                0             0 200 i
*&gt;                  10.1.14.4                              0 200 i
*  3.0.0.0          10.1.12.2                              0 200 i
*&gt;                  10.1.14.4                              0 200 i
*  4.0.0.0          10.1.12.2                              0 200 i
*&gt;                  10.1.14.4                0             0 200 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.12.2                0             0 200 i
*&gt;                  10.1.14.4                              0 200 i
*  33.0.0.0         10.1.12.2                              0 200 i
*&gt;                  10.1.14.4                              0 200 i</pre>
<h3></h3>
<h3>Configuration</h3>
<p style="padding-left: 30px;">L&rsquo;AS 200 transmet à l&rsquo;AS100 les metric de ses prefix :</p>
<pre><span style="color: #ff0000;">R2</span>#conf t
R2(config)#route-map TEST permit 10
R2(config-route-map)#set metric 100
R2(config)#router bgp 200
R2(config-router)#neighbor 10.1.12.1 route-map TEST out</pre>
<ul>
<li>10.1.12.1 = R1</li>
</ul>
<pre><span style="color: #ff0000;">R4</span>#conf t
R4(config)#route-map TEST permit 10
R4(config-route-map)#set metric 50
R4(config)#router bgp 200
R4(config-router)#neighbor 10.1.14.1 route-map TEST out</pre>
<ul>
<li>10.1.14.1 = R1</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification :</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">sh ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.12.2              100             0 200 i
*&gt;                  10.1.14.4               50             0 200 i
*  3.0.0.0          10.1.12.2              100             0 200 i
*&gt;                  10.1.14.4               50             0 200 i
*  4.0.0.0          10.1.12.2              100             0 200 i
*&gt;                  10.1.14.4               50             0 200 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.12.2              100             0 200 i
*&gt;                  10.1.14.4               50             0 200 i
*  33.0.0.0         10.1.12.2              100             0 200 i
*&gt;                  10.1.14.4               50             0 200 i</pre>
<h3></h3>
<h3>Configuration par Prefix</h3>
<pre><span style="color: #ff0000;">R2</span>
access-list 3 permit 3.0.0.0 0.255.255.255
access-list 33 permit 33.0.0.0 0.255.255.255
!
route-map TEST1 permit 10
 match ip address 3
 <span style="color: #00ffff;">set metric 50</span>
!
route-map TEST1 permit 20
 match ip address 33
 <span style="color: #00ffff;">set metric 100</span>
!
route-map TEST1 permit 30
!
router bgp 200
 neighbor 10.1.12.1 route-map TEST1 out
 .../...</pre>
<pre><span style="color: #ff0000;">R4</span>
access-list 3 permit 3.0.0.0 0.255.255.255
access-list 33 permit 33.0.0.0 0.255.255.255
!
route-map TEST permit 10
 match ip address 3
 <span style="color: #00ffff;">set metric 100</span>
!
route-map TEST permit 20
 match ip address 33
 <span style="color: #00ffff;">set metric 50</span>
!
route-map TEST permit 30
!
router bgp 200
 neighbor 10.1.14.1 route-map TEST out
 .../...</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification :</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | b Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i
*&gt; 3.0.0.0          10.1.12.2               <span style="color: #00ffff;">50            </span> 0 200 i
*                   10.1.14.4              <span style="color: #00ffff;">100            </span> 0 200 i
*&gt; 4.0.0.0          10.1.14.4                0             0 200 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*&gt; 22.0.0.0         10.1.12.2                0             0 200 i
*  33.0.0.0         10.1.12.2              <span style="color: #00ffff;">100            </span> 0 200 i
*&gt;                  10.1.14.4               <span style="color: #00ffff;">50            </span> 0 200 i</pre>
<h3></h3>
<h3>Autre exemple</h3>
<p style="padding-left: 30px;">Scénario à 4 AS :</p>
<p style="padding-left: 30px;"> <img class="aligncenter" alt="" src="/images/BGP-Lab15-2.png" width="335" height="201" /></p>
<p style="padding-left: 30px;">Par défaut, sur R1 :</p>
<pre>R1#<span style="color: #ff0000;">show ip bgp | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0             0 200 i
*                   10.1.14.4                              0 400 300 200 i
*  3.0.0.0          10.1.12.2                              0 200 300 i
*&gt;                  10.1.14.4                              0 400 300 i
*  4.0.0.0          10.1.12.2                              0 200 300 400 i
*&gt;                  10.1.14.4                0             0 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*&gt; 22.0.0.0         10.1.12.2                0             0 200 i
*                   10.1.14.4                              0 400 300 200 i
*  33.0.0.0         10.1.12.2                              0 200 300 i
*&gt;                  10.1.14.4                              0 400 300 i</pre>
<p>&nbsp;</p>
<h3>Configurations</h3>
<p style="padding-left: 30px;">R2 annonce un metric de 120 à R1</p>
<pre>route-map TEST permit 10
 <span style="color: #ff0000;">set metric 120</span>
!
route-map TEST permit 20
!
router bgp 200
 neighbor 10.1.12.1 route-map TEST out</pre>
<p style="padding-left: 30px;">R4 annonce un metric de 100 à R1</p>
<pre>route-map TEST permit 10
 set metric 100
!
route-map TEST permit 20
!
router bgp 400
 neighbor 10.1.14.1 route-map TEST out</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification</strong></span></p>
<p style="padding-left: 30px;">Rappel</p>
<ul>
<ul>
<li>la valeur la pus petite de MED est préférée</li>
<li>la valeur « AS Path » est comparée avant le MED , l&rsquo;AS Path le plus court est préféré</li>
</ul>
</ul>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp  | be Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.14.4              100             0 400 300 200 i
*&gt;                  10.1.12.2              120             0 200 i
*&gt; 3.0.0.0          10.1.14.4              100             0 400 300 i
*                   10.1.12.2              120             0 200 300 i
*&gt; 4.0.0.0          10.1.14.4              100             0 400 i
*                   10.1.12.2              120             0 200 300 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.14.4              100             0 400 300 200 i
*&gt;                  10.1.12.2              120             0 200 i
*&gt; 33.0.0.0         10.1.14.4              100             0 400 300 i
*                   10.1.12.2              120             0 200 300 i</pre>
<h3></h3>
<h3>Utilisé MED et ignorer AS Path</h3>
<pre><span style="color: #ff0000;">R1</span>#conf t
R1(config)#router bgp 100
R1(config-router)#bgp always-compare-med
R1(config-router)#bgp bestpath as-path ignore

R1(config-router)#bgp bestpath ?
  compare-routerid  Compare router-id for identical EBGP paths
  cost-community    cost community
  med               MED attribute</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérification</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | b Net</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.12.2              120             0 200 i
<span style="color: #00ffff;">*&gt;                  10.1.14.4              100             0 400 300 200 i</span>
*  3.0.0.0          10.1.12.2              120             0 200 300 i
*&gt;                  10.1.14.4              100             0 400 300 i
*  4.0.0.0          10.1.12.2              120             0 200 300 400 i
*&gt;                  10.1.14.4              100             0 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.12.2              120             0 200 i
<span style="color: #00ffff;">*&gt;                  10.1.14.4              100             0 400 300 200 i</span>
*  33.0.0.0         10.1.12.2              120             0 200 300 i
*&gt;                  10.1.14.4              100             0 400 300 i</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP Weight Attribue</title>
		<link>https://www.expertcisco.fr/bgp/bgp-weight-attribue</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 16:05:12 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=521</guid>

					<description><![CDATA[L&#8217;attribut « Weight » est un attribut implémenté par CISCO , il est en première position dans le processus de sélection de la meilleure route. L&#8217;attribut « Weight » est local au routeur et n&#8217;est pas transmis aux voisins iBGP ou eBGP, il permet &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-weight-attribue">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img style="float: right;" alt="" src="/images/BGP-Lab14.png" width="335" height="201" />L&rsquo;attribut « Weight » est un attribut implémenté par CISCO , il est en première position dans le processus de sélection de la meilleure route.</p>
<p>L&rsquo;attribut « Weight » est local au routeur et n&rsquo;est pas transmis aux voisins iBGP ou eBGP, il permet d&rsquo;influencer le routage sortant.</p>
<p>La route comportant la plus grande valeur « Weight » est installé dans la table de routage.</p>
<p>Routage par défaut de R1:</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.14.4                              0 400 300 200 i
*&gt;                  10.1.12.2                0             0 200 i
*  3.0.0.0          10.1.14.4                              0 400 300 i
*&gt;                  10.1.12.2                              0 200 300 i
*&gt; 4.0.0.0          10.1.14.4                0             0 400 i
*                   10.1.12.2                              0 200 300 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.14.4                              0 400 300 200 i
*&gt;                  10.1.12.2                0             0 200 i
*  33.0.0.0         10.1.14.4                              0 400 300 i
*&gt;                  10.1.12.2                              0 200 300 i</pre>
<p>Les prefix de R3 et R2 sont atteints via R2</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip route bgp</span>
B    2.0.0.0/8 [20/0] via 10.1.12.2, 00:02:20
B    33.0.0.0/8 [20/0] via 10.1.12.2, 00:01:16
B    3.0.0.0/8 [20/0] via 10.1.12.2, 00:01:16
B    4.0.0.0/8 [20/0] via 10.1.14.4, 00:00:46
B    22.0.0.0/8 [20/0] via 10.1.12.2, 00:02:20</pre>
<h3></h3>
<h3>Configuration</h3>
<pre>R1#conf t
R1(config)#router bgp 100
R1(config-router)#neighbor 10.1.14.4 weight 40000</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications:</strong></span></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*  2.0.0.0          10.1.12.2                0             0 200 i
*&gt;                  10.1.14.4                          40000 400 300 200 i
*  3.0.0.0          10.1.12.2                              0 200 300 i
*&gt;                  10.1.14.4                          40000 400 300 i
*  4.0.0.0          10.1.12.2                              0 200 300 400 i
*&gt;                  10.1.14.4                0         40000 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*  22.0.0.0         10.1.12.2                0             0 200 i
*&gt;                  10.1.14.4                          40000 400 300 200 i
*  33.0.0.0         10.1.12.2                              0 200 300 i
*&gt;                  10.1.14.4                          40000 400 300 i</pre>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip route b</span>
B    2.0.0.0/8 [20/0] via 10.1.14.4, 00:01:15
B    33.0.0.0/8 [20/0] via 10.1.14.4, 00:01:15
B    3.0.0.0/8 [20/0] via 10.1.14.4, 00:01:15
B    4.0.0.0/8 [20/0] via 10.1.14.4, 00:01:15
B    22.0.0.0/8 [20/0] via 10.1.14.4, 00:01:15</pre>
<h3></h3>
<h3>Configuration de l&rsquo;attribut « Weight » par prefix ou par AS</h3>
<pre>ip as-path access-list 1 permit ^200$
!
access-list 1 permit 33.0.0.0 0.255.255.255
access-list 1 permit 4.0.0.0 0.255.255.255
access-list 2 permit 3.0.0.0 0.255.255.255
!
route-map TEST2 permit 10
 match ip address 2
 set weight <span style="color: #00ffff;">55000</span>
!
route-map TEST2 permit 20
 match as-path 1
 set weight <span style="color: #00ffff;">60000</span>
!
route-map TEST1 permit 20
!
route-map TEST1 permit 10
 match ip address 1
 set weight <span style="color: #00ffff;">45000</span>
!
route-map TEST1 permit 20
!
R1(config)#router bgp 100
R1(config-router)#neighbor 10.1.14.4 route-map TEST1 in
R1(config-router)#neighbor 10.1.12.2 route-map TEST2 in</pre>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp | b Ne</span>
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 1.0.0.0          0.0.0.0                  0         32768 i
*&gt; 2.0.0.0          10.1.12.2                0         <span style="color: #00ffff;">60000 </span>200 i
*                   10.1.14.4                              0 400 300 200 i
*&gt; 3.0.0.0          10.1.12.2                          <span style="color: #00ffff;">55000</span> 200 300 i
*                   10.1.14.4                              0 400 300 i
*&gt; 4.0.0.0          10.1.14.4                0         <span style="color: #00ffff;">45000</span> 400 i
*&gt; 11.0.0.0         0.0.0.0                  0         32768 i
*&gt; 22.0.0.0         10.1.12.2                0         60000 200 i
*                   10.1.14.4                              0 400 300 200 i
*&gt; 33.0.0.0         10.1.14.4                          45000 400 300 i</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP AS-Path</title>
		<link>https://www.expertcisco.fr/bgp/bgp-as-path</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 15:57:41 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=515</guid>

					<description><![CDATA[&#160; L&#8217;attribut « AS-PATH » est transmis aux AS voisins BGP qui doivent le prendre ne charge et permet d’influencer le routage entrant Par défaut, R2 et R3 préférèrent atteindre l&#8217;AS 100 (prefix 1.0.0.0 et 11.0.0.0) directement par R1 : &#160; R2#show &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-as-path">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span style="background-color: #888888;"><img class="alignright" alt="" src="/images/BGP-Lab13.png" width="335" height="201" /></span></p>
<p>&nbsp;</p>
<p>L&rsquo;attribut « AS-PATH » est transmis aux AS voisins BGP qui doivent le prendre ne charge et permet d’influencer le routage entrant</p>
<p>Par défaut, R2 et R3 préférèrent atteindre l&rsquo;AS 100 (prefix 1.0.0.0 et 11.0.0.0) directement par R1 :</p>
<p>&nbsp;</p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
<span style="color: #00ffff;">* i1.0.0.0 </span>         10.1.14.1                0    100      0 100 i
<span style="color: #00ffff;">*&gt;                  10.1.12.1 </span>               0             0 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt;i3.0.0.0          10.1.23.3                0    100      0 i
*&gt;i4.0.0.0          10.1.34.4                0    100      0 i
* i11.0.0.0         10.1.14.1                0    100      0 100 i
<span style="color: #00ffff;">*&gt;                  10.1.12.1</span>                0             0 100 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp 1.0.0.0</span>
BGP routing table entry for 1.0.0.0/8, version 2
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Not advertised to any peer
  100
    10.1.14.1 (metric 1) from 10.1.34.4 (10.1.34.4)
      Origin IGP, metric 0, localpref 100, valid, internal
  100
    10.1.12.1 (metric 1) from 10.1.23.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal, <span style="color: #00ffff;">best
</span></pre>
<p>R1 (AS100) annonce maintenant son prefix 1.0.0.0 avec une valeur « AS-PATH » plus élevée à R2</p>
<pre>access-list 1 permit <span style="color: #00ffff;">1.0.0.0</span> 0.255.255.255
!
route-map TEST permit 100
 match ip address 1
 <span style="color: #00ffff;">set as-path prepend 100 100 100 100</span>
!
route-map TEST permit 200
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.0.0.0
 network 11.0.0.0
 neighbor 10.1.12.2 remote-as 200
 <span style="color: #00ffff;">neighbor 10.1.12.2 route-map TEST out</span>
 neighbor 10.1.14.4 remote-as 200
 no auto-summary</pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications:</strong></span><br />
1.0.0.0 est maintenant atteint via R4</p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
<span style="color: #00ffff;">*&gt;i1.0.0.0          10.1.14.1                0    100      0 100 i</span>
<span style="color: #00ffff;">*                   10.1.12.1                0             0 100 100 100 100 100</span> i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt;i3.0.0.0          10.1.23.3                0    100      0 i
*&gt;i4.0.0.0          10.1.34.4                0    100      0 i
* i11.0.0.0         10.1.14.1                0    100      0 100 i
*&gt;                  10.1.12.1                0             0 100 i</pre>
<pre><span style="color: #ff0000;">R3</span>#<span style="color: #ff0000;">show ip bgp 1.0.0.0</span>
BGP routing table entry for 1.0.0.0/8, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  100
    10.1.14.1 (metric 1) from 10.1.34.4 (<span style="color: #00ffff;">10.1.34.4</span>)
      Origin IGP, metric 0, localpref 100, valid, internal, <span style="color: #00ffff;">best
</span></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>BGP Local-Preference</title>
		<link>https://www.expertcisco.fr/bgp/bgp-local-preference</link>
		
		<dc:creator><![CDATA[Fred J.]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 14:16:17 +0000</pubDate>
				<category><![CDATA[BGP]]></category>
		<guid isPermaLink="false">http://www.expertcisco.fr/?p=509</guid>

					<description><![CDATA[Local-Preference est un attribut local à l&#8217;AS permettant d’influencer le routage sortant en positionnant une valeur à un prefix à atteindre. &#160; Valeur par défaut « local-preference » : 100 Valeur supérieure préférée Par défaut, R2 atteint l&#8217;AS100 directement par R1 R2#show &#8230; <a href="https://www.expertcisco.fr/bgp/bgp-local-preference">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img style="float: right;" alt="" src="/images/BGP-Lab11.png" width="335" height="201" />Local-Preference est un attribut local à l&rsquo;AS permettant d’influencer le routage sortant en positionnant une valeur à un prefix à atteindre.</p>
<p>&nbsp;</p>
<ul>
<li>Valeur par défaut « local-preference » : 100</li>
<li>Valeur supérieure préférée</li>
<li></li>
</ul>
<p style="padding-left: 30px;">Par défaut, R2 atteint l&rsquo;AS100 directement par R1</p>
<pre>R2#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
* i1.0.0.0          10.1.14.1                0    100      0 100 i
<span style="color: #00ffff;">*&gt;                  10.1.12.1 </span>               0             0 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt;i3.0.0.0          10.1.23.3                0    100      0 i</pre>
<p style="padding-left: 30px;">R4 augmente le local-pref du prefix 1.0.0.0 :</p>
<pre><span style="color: #ff0000;">R4</span>
access-list 1 permit <span style="color: #00ffff;">1.0.0.0</span> 0.255.255.255
!
route-map TEST permit 10
 match ip address 1
 <span style="color: #00ffff;">set local-preference 400</span>
!
route-map TEST permit 20
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 4.0.0.0
 neighbor 10.1.14.1 remote-as 100
 neighbor 10.1.14.1 <span style="color: #00ffff;">route-map TEST in</span>
 neighbor 10.1.23.2 remote-as 200
 neighbor 10.1.34.3 remote-as 200
 no auto-summary</pre>
<p style="padding-left: 30px;">Maintenant, R2 préfère éteindre l&rsquo;AS 100 par R4 :</p>
<pre><span style="color: #ff0000;">R2</span>#<span style="color: #ff0000;">show ip bgp</span>
   Network          Next Hop            Metric LocPrf Weight Path
<span style="color: #00ffff;">*&gt;i1.0.0.0          10.1.14.1                0    400      0 100</span> i
*                   10.1.12.1                0             0 100 i
*&gt; 2.0.0.0          0.0.0.0                  0         32768 i
*&gt;i3.0.0.0          10.1.23.3                0    100      0 i
*&gt;i4.0.0.0          10.1.34.4                0    100      0 i</pre>
<p>&nbsp;</p>
<h3>Autre Exemple</h3>
<p><img class="aligncenter" alt="" src="/images/BGP-Lab12.png" width="335" height="201" /><br />
l&rsquo;attribut « local-preference » est positionné en sortie (route-map out), vers R1, et n’influence donc le routage que de R1</p>
<p>Les routeurs de bordure R1, R3, R4 atteignent l&rsquo;AS 200 directement<br />
R1 atteint l&rsquo;AS 200 via R3</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp</span>

   Network          Next Hop            Metric LocPrf Weight Path
* i<span style="color: #00ffff;">5.0.0.0 </span>         10.1.1.3                 0    100      0 200 i
* i                 10.1.1.4                 0    100      0 200 i
<span style="color: #00ffff;">*&gt;i                 10.1.1.2                 0    100      0 200 i</span>
* i10.1.1.0/24      10.1.1.3                 0    100      0 i
* i                 10.1.1.4                 0    100      0 i
* i                 10.1.1.2                 0    100      0 i
*&gt;                  0.0.0.0                  0         32768 i</pre>
<pre><span style="color: #ff0000;">R2</span>
access-list 1 permit <span style="color: #00ffff;">5.0.0.0</span>
!
route-map TEST permit 10
 match ip address 1
 <span style="color: #00ffff;">set local-preference 200</span>
!
router bgp 100
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 10.1.1.0 mask 255.255.255.0
 neighbor 10.1.1.1 remote-as 100
 neighbor 10.1.1.1 next-hop-self
 <span style="color: #00ffff;">neighbor 10.1.1.1 route-map TEST out</span>
 neighbor 10.1.1.3 remote-as 100
 neighbor 10.1.1.4 remote-as 100
 neighbor 10.1.25.5 remote-as 200
 no auto-summary</pre>
<pre><span style="color: #ff0000;">R3</span>
access-list 1 permit<span style="color: #00ffff;"> 5.0.0.0</span>
!
route-map TEST permit 10
 match ip address 1
<span style="color: #00ffff;"> set local-preference 300</span>
!
route-map TEST permit 20
!
router bgp 100
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 network 10.1.1.0 mask 255.255.255.0
 neighbor 10.1.1.1 remote-as 100
 neighbor 10.1.1.1 next-hop-self
<span style="color: #00ffff;"> neighbor 10.1.1.1 route-map TEST out</span>
 neighbor 10.1.1.2 remote-as 100
 neighbor 10.1.1.4 remote-as 100
 neighbor 10.1.35.5 remote-as 200
 no auto-summary</pre>
<p style="padding-left: 30px;"><strong>Résultat</strong></p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp</span>

   Network          Next Hop            Metric LocPrf Weight Path
* i<span style="color: #00ffff;">5.0.0.0</span>          10.1.1.2                 0    200      0 200 i
* i                 10.1.1.3                 0    300      0 200 i
<span style="color: #00ffff;">*&gt;i                 10.1.1.4                 0    400      0 200</span> i
* i10.1.1.0/24      10.1.1.3                 0    100      0 i
* i                 10.1.1.4                 0    100      0 i
*&gt;                  0.0.0.0                  0         32768 i</pre>
<p>&nbsp;</p>
<h3>bgp default local-preference</h3>
<h3><img class="aligncenter" alt="" src="/images/BGP-Lab12.png" width="335" height="201" /></h3>
<p>Autre exemple,</p>
<p style="padding-left: 30px;">Par défaut, R1 atteint l&rsquo;AS 100 via R2 , seul le routeur ID permet d&rsquo;effectuer un choix de routage</p>
<pre><span style="color: #ff0000;">R1</span>#<span style="color: #ff0000;">show ip bgp 5.0.0.0</span>
BGP routing table entry for 5.0.0.0/8, version 18
Paths: (3 available, best #1, table Default-IP-Routing-Table)
Multipath: iBGP
  Not advertised to any peer
  200
    10.1.1.2 from 10.1.1.2 (<span style="color: #00ffff;">2.2.2.2</span>)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath, <span style="color: #00ffff;">best</span>
  200
    10.1.1.3 from 10.1.1.3 (<span style="color: #00ffff;">3.3.3.3</span>)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath
  200
    10.1.1.4 from 10.1.1.4 (<span style="color: #00ffff;">4.4.4.4</span>)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath</pre>
<p style="padding-left: 30px;">Configuration du « local-preference » par défaut sur les routeurs de bordure :</p>
<pre><span style="color: #ff0000;">R2</span>(config)#
R2(config)#router bgp 100
R2(config-router)#<span style="color: #00ffff;">bgp default local-preference 200</span>

<span style="color: #ff0000;">R3</span>(config)#
R3(config)#router bgp 100
R3(config-router)#<span style="color: #00ffff;">bgp default local-preference 300</span>

<span style="color: #ff0000;">R4</span>(config)#
R4(config)#router bgp 100
R4(config-router)#<span style="color: #00ffff;">bgp default local-preference 400
</span></pre>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>Vérifications</strong></span>:</p>
<pre>R1#<span style="color: #ff0000;">show ip bgp 5.0.0.0</span>
BGP routing table entry for 5.0.0.0/8, version 2
Paths: (3 available, best #1, table Default-IP-Routing-Table)
Multipath: iBGP
Flag: 0x820
  Not advertised to any peer
  200
    10.1.1.4 from 10.1.1.4 (4.4.4.4)
      Origin IGP, metric 0, <span style="color: #00ffff;">localpref 400</span>, valid, internal, <span style="color: #00ffff;">best</span>
  200
    10.1.1.2 from 10.1.1.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 200, valid, internal
  200
    10.1.1.3 from 10.1.1.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 300, valid, internal</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
