{"id":811,"date":"2021-08-20T03:10:59","date_gmt":"2021-08-20T03:10:59","guid":{"rendered":"http:\/\/feralpacket.org\/?p=811"},"modified":"2021-08-20T03:10:59","modified_gmt":"2021-08-20T03:10:59","slug":"bgp-filtering-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=811","title":{"rendered":"BGP Filtering Notes"},"content":{"rendered":"<p><b>BGP Filtering<\/b><\/p>\n<p>IP address based (numerical):<\/p>\n<p>&nbsp;&#8211; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; prefix-list &lt;name&gt; in | out<\/span><\/p>\n<p>&nbsp;&#8211; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; distribute-list &lt;acl&gt; in | out<\/span><\/p>\n<p>&nbsp;&#8211; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; route-map &lt;name&gt; in | out<\/span><\/p>\n<p>AS Path based (string):<\/p>\n<p>&nbsp;&#8211; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; filter-list &lt;as-path acl number&gt; in | out<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; e.g. &#8211; 100 200 300 i<\/p>\n<p>Regular Expressions are required to match and filter AS-PATH<\/p>\n<p>ACL filtering in BGP with distribute-list<\/p>\n<p>&nbsp;&#8211; Use extended ACLs<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/6d4731678b5979ed54562e9c31db6970.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/f7af5b25839c16225291806d5f2010a7.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p>Source doesn&#8217;t need to be specified in the ACL because the ACL is referenced in the neighbor command.<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list &lt;number&gt; permit | deny &lt;protocol&gt; &lt;network&gt; &lt;wildcard&gt; &lt;subnet&gt; &lt;wildcard&gt;<\/span><\/p>\n<p>Filter-&gt; Any network starting with 10.x.x.x and subnet mask of 255.255.255.0.<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 100 deny ip 10.0.0.0 0.255.255.255 255.255.255.0 0.0.0.0<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 100 permit ip any any<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/94edaab032d7f26c9a277336184b6a4c.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 100 deny ip 10.0.0.0 0.255.255.255 255.0.0.0 0.255.0.0<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 100 permit ip any any<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/cf2152c649dc74a219cdac6cffd5468e.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p>Prefix-list and distribute-list cannot be applied to the same neighbor in the same direstion.<\/p>\n<p>&nbsp; &nbsp; &nbsp; -&gt; A route-map with multiple statements can get around this.<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; filter-list &lt;as-path acl&gt; in | out<\/span><\/p>\n<p>&nbsp;&#8211; as-path ACL can patch the as&#8211;path by using regular expressions<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip as-path access-list &lt;number&gt; permit | deny REXEXP<\/span><\/p>\n<p>REGEXP works on character strings<\/p>\n<p>&nbsp;&#8211; Every string has a start of the string and an end of the string<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; ^ &#8211; start<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; $ &#8211; end<\/p>\n<p>^100 200$ &#8211; 9 character string (including the space between 100 and 200)<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip as-path access-list 1 deny 100<\/span><\/p>\n<p>&nbsp;&#8211; Will match<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 100<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 1100<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 1008<\/p>\n<p>REGEXP Operators \/ Delimiters<\/p>\n<p>&nbsp; &nbsp; &nbsp;? &#8211; 0 or 1&nbsp;occurrence&nbsp;of the character<\/p>\n<p>&nbsp; &nbsp; &nbsp;. &#8211; any character 0 &#8211; 9, but not a space<\/p>\n<p>&nbsp; &nbsp; &nbsp;_ &#8211; start of string, end of string, or a space<\/p>\n<p>&nbsp; &nbsp; &nbsp;^ &#8211; start of string<\/p>\n<p>&nbsp; &nbsp; &nbsp;$ &#8211; end of string<\/p>\n<p>&nbsp; &nbsp; &nbsp;[] &#8211; specific single character range, [123], [1-5]<\/p>\n<p>&nbsp; &nbsp; &nbsp;^$ &#8211; locally originated<\/p>\n<p>&nbsp; &nbsp; &nbsp;+ &#8211; 1 or more occurrences<\/p>\n<p>&nbsp; &nbsp; &nbsp;* &#8211; 0 or more occurrences<\/p>\n<p>&nbsp; &nbsp; &nbsp;.* &#8211; any number<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip &nbsp;as-path access-list 1 denty ^100_<\/span><\/p>\n<p>&nbsp;&#8211; Will match:<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 100 200 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8211; yes<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 100 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8211; yes<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 100 800 900 &nbsp; &nbsp;&#8211; yes<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 1008 500 &nbsp; &nbsp; &nbsp; &nbsp; &#8211; no<\/p>\n<p>^1[2-5]8$<\/p>\n<p>&nbsp;&#8211; Will match:<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 128<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 138<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 148<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 158<\/p>\n<p>5?<\/p>\n<p>&nbsp;&#8211; 5 will be there one time or will be missing<\/p>\n<p>Match -&gt; 100 200 300 or 100 300<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; ^100_200_300$<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; ^100_300$<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; or &#8211;<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; ^100(_200)?_300$<\/p>\n<p>Match -&gt; ^100$, ^100_100$, and ^100_100_100$<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; ^(100_)+<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; or &#8211;<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; (100_)+$<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp regexp _100_<\/span><\/p>\n<p><b>BGP Community<\/b><\/p>\n<p>&nbsp;&#8211; Standard Community<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 32-bit value<\/p>\n<p>&nbsp;&#8211; Extended Community<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 64-bit value<\/p>\n<p>&nbsp;&#8211; Can be sent with updates and can be used to change path attributes<\/p>\n<p>&nbsp;&#8211; Every router must have send-community set for all neighbors, otherwise the community values will be removed<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/c125eb96da64d95c7789494569c49d82.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p>Match a community and take action<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; if 100:50, increase local preference to 500<\/p>\n<p>Set community<\/p>\n<p>&nbsp;&#8211; In a route-map<\/p>\n<p>Match community<\/p>\n<p>&nbsp;&#8211; Community list, called in a route-map<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip community-list { 1-99 | 100-500 } permit | deny &lt;community value&gt;<\/span><\/p>\n<p>&nbsp;&#8211; 1 &#8211; 99<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Standard ACL<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Simple numeric value<\/p>\n<p>&nbsp;&#8211; 100 &#8211; 500<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Extended ACL<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; REGEXP can be used<\/p>\n<p>R3(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 1 permit 5.5.5.5<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map COMMUNITY<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">match ip add 1<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set community 100:50<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map COMMUNITY permit 20<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 200<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 13.0.0.1 route-map COMMUNITY out<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 13.0.0.1 send-community<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">clear ip bgp 13.0.0.1 out<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">clear ip bgp 13.0.0.1 in<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">clear ip bgp 13.0.0.1<\/span><\/p>\n<p>R1(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip community-list 1 permite 100:50<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map MATCH_COMM<\/span><\/p>\n<p>&nbsp; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">match community 1<\/span><\/p>\n<p>&nbsp; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set local-preference 500<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map MATCH_COM permit 20<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 13.0.0.3 route-map MATCH_COMM<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp 5.5.5.5<\/span><\/p>\n<p>&nbsp;&#8211; Community: ______<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; will display 32-bit number<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; old format<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip bgp-community new-format<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp 5.5.5.5<\/span><\/p>\n<p>&nbsp;&#8211; Community: 100:50<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; new format<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/ae9009fe1aeeb878991e42f147cc1cd9.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><b>Well Known Community Values<\/b><\/p>\n<p>no-export<\/p>\n<p>&nbsp;&#8211; Update will not be sent to any eBGP neighbor<\/p>\n<p>no-advertise<\/p>\n<p>&nbsp;&#8211; Update will not be sent to any iBGP or eBGP neighbor<\/p>\n<p>LOCAL-AS<\/p>\n<p>&nbsp;&#8211; Update will not be sent to another confederation<\/p>\n<p>additive<\/p>\n<p>&nbsp;&#8211; Will add community to the existing list<\/p>\n<p>R1(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map COMMUNITY<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set community no-export<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set community 100:50 additive<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/03cd7cf9d953bdcbeb6dcafb1cd036fe.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><b>Deleting Community Values<\/b><\/p>\n<p>R2(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">ip community-list 1 permit 100:60<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map DELETE<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set com-list 1 delete<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 200<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 23.0.0.3 route-map DELETE<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 23.0.0.3 send-community<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/e7164ce106c66eabb6ac646fde893409.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><b>BGP Remove Private-AS<\/b><\/p>\n<p>&nbsp;&#8211; AS<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 2 bytes<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 1 &#8211; 65535<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 64512 &#8211; 65534<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; Private AS numbers<\/p>\n<p>&nbsp;&#8211; Removes any AS in the private AS range before sending updates to a neighbor<\/p>\n<p>R3(config)# router bgp 100<\/p>\n<p>&nbsp;neighbor 36.0.0.6 remove-private-as<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/f8aba42073166b50c521063aea90ae0e.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><b>BGP Default Routing<\/b><\/p>\n<p>&nbsp;1. <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">network 0.0.0.0 mask 0.0.0.0<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Injects a default route to all neighbors<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Needs a default route to be present in the routing table<\/p>\n<p>&nbsp;2. <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor &lt;ip add&gt; default-originate [route-map &lt;name&gt;]<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Per neighbor<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Default route does not need to be present in the routing table<\/p>\n<p><b>BGP Dampening<\/b><\/p>\n<p>&nbsp;&#8211; It is a procedure to&nbsp;suppress&nbsp;flapping routes<\/p>\n<p>&nbsp;&#8211; It uses a penalty system where on every flap, a penalty value 1000 is associated with the route<\/p>\n<p>&nbsp;&#8211; The moment the value is associated with the route, it starts decreasing on an exponential decay rate<\/p>\n<p>&nbsp;&#8211; If the route gains a penalty value of 2000, the route is&nbsp;suppressed<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Value called suppress limit<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Can be changed<\/p>\n<p>&nbsp;&#8211; Value has to decrease to 750 before the route is no longer suppressed<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Value called the reuse limit<\/p>\n<p>suppress limit<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; {P(0)}<\/p>\n<p>reuse limit<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; {P(t)}<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; t in minutes<\/p>\n<p>half-life<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; The time in minutes the router will take to reduce the penalty to half of the suppress limit<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; default is 15 minutes<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/3a1327e05d437e06410e1e61e2d9b220.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p>Max suppress time<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 4 * half-life<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; 60 minutes by default<\/p>\n<p>Scenario -&gt; Configure BGP Dampening on R1 so that if a route flaps 6 times, it is suppressed; &nbsp;the penalty should reach 3000 after 40 minutes; &nbsp;the route should be reusable after the penalty reaches 2000. &nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp;suppress limit -&gt; 6000<\/p>\n<p>&nbsp; &nbsp; &nbsp;half-life -&gt; 40 minutes<\/p>\n<p>&nbsp; &nbsp; &nbsp;reuse limit -&gt; 2000<\/p>\n<p>&nbsp; &nbsp; &nbsp;max suppress time -&gt; 160 minutes<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">bgp dampening 40 2000 6000 160<\/span><\/p>\n<p>Scenario -&gt; Dampen route 5.5.5.5 if it flaps 3 times, unsuppress it when the penalty reaches 1000, half-life is 20 minutes<\/p>\n<p>R1(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">access-list 1 permit 5.5.5.5<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map DAMPENING<\/span><\/p>\n<p>&nbsp; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">match ip add 1<\/span><\/p>\n<p>&nbsp; <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">set dampening 20 1000 3000 80<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">route-map DAMPENING permit 20<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">bgp dampening route-map DAMPENING<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/b9f4970c6a44ee1e1877e98b1b7089fb.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp dampening parameters<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp dampening dampened-paths<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp dampening flap-statistics<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">sh ip bgp<\/span><\/p>\n<p>&nbsp;d&gt; 5.5.5.5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; dampened, currently up<\/p>\n<p>&nbsp;h&gt; 5.5.5.5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; history, another router suppressed, currently down<\/p>\n<p><b>BGP Timers<\/b><\/p>\n<p>&nbsp;&#8211; Keepalive<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 60 seconds<\/p>\n<p>&nbsp;&#8211; Holddown<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 180 seconds<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">bgp timer 30 90<\/span><\/p>\n<p><b>Batch Updates<\/b><\/p>\n<p>&nbsp;&#8211; BGP holds the new updates to be sent to a neighbor according to the following timer<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; iBGP &#8211; 5 seconds<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; eBGP &#8211; 30 seconds<\/p>\n<p>&nbsp;&#8211; Also called advertise-interval<\/p>\n<p>&nbsp;&#8211; If set to 0, updates are sent immediately<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">&nbsp;neighbor &lt;ip add&gt; advertisement-interval &lt;seconds&gt;<\/span><\/p>\n<p><b>BGP Scan Time<\/b><\/p>\n<p>&nbsp;&#8211; By default, BGP scans the BGP table for changes every 60 seconds<\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">bgp scan-time &lt;seconds&gt;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/513d561047cc560d4315d7309250e472.jpeg\" style=\"height: auto;\" width=\"\" height=\"\"><\/p>\n<p><b>BGP AS-Override \/ AllowAS-In<\/b><\/p>\n<p>&nbsp;&#8211; If the link between R4 &lt;-&gt; R5 is goes down, R6 will not be able to reach R7<\/p>\n<p>R1(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 100<\/span><\/p>\n<p><span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">&nbsp;neighbor 13.0.0.2 as-override<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 13.0.0.3 as-override<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; update to R3<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; 6.6.6.6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100 100 i<\/p>\n<p>&nbsp; &nbsp; &nbsp;&#8211; or &#8211;<\/p>\n<p>R2(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 200<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 12.0.0.1 allowas-in<\/span><\/p>\n<p>R3(config)# <span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">router bgp 200<\/span><\/p>\n<p>&nbsp;<span style=\"background-color:rgb(255, 250, 165);-evernote-highlight:true;\">neighbor 13.0.0.1 allowas-in<\/span><\/p>\n<p>Allowas-in<\/p>\n<p>&nbsp;&#8211; Accept updates that contain our own AS in the path<\/p>\n<p>&nbsp;&#8211; Should be used as a temporary solution only while the link between R4 &lt;-&gt; R5 is down<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BGP Filtering<\/p>\n","protected":false},"author":1,"featured_media":799,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[39,31,10,57],"class_list":["post-811","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-bgp","tag-published","tag-service-provider","tag-share"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=811"}],"version-history":[{"count":1,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":981,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions\/981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/media\/799"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}