{"id":327,"date":"2017-09-25T21:31:09","date_gmt":"2017-09-25T19:31:09","guid":{"rendered":"http:\/\/www.quisted.net\/?p=327"},"modified":"2017-09-25T21:31:09","modified_gmt":"2017-09-25T19:31:09","slug":"bgp-filtering","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2017\/09\/25\/bgp-filtering\/","title":{"rendered":"BGP Filtering"},"content":{"rendered":"<ul>\n<li>BGP filtering can be done on any routers<\/li>\n<li>Filtering can be done inbound and outbound<\/li>\n<li>After filtering is applied BGP neighbor must be reset or cleared for the filter to take effect\n<ul>\n<li><strong>clear ip bgp 20.20.20.20 in\/out\u00a0 <\/strong>preferred<\/li>\n<li>clear ip bgp *\u00a0\u00a0 (hard reset)<\/li>\n<li>clear ip bgp 20.20.20.20 soft in\/out<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>How to filter:<\/p>\n<p><strong>Distribute lists<\/strong><\/p>\n<pre>access-list 1 deny 30.30.30.0 0.0.0.255\naccess-list 1 permit any any\nR2#(config)router bgp 20\nR2#(config-router)neighbour 20.20.20.20 distribute-list 1 in\n<\/pre>\n<p><strong>Prefix-lists<\/strong><\/p>\n<pre>ip prefix-list CCNP deny 30.30.30.0\/24 le 32\nip prefix-list CCNP permit 0.0.0.0\/0 le 32\nR2#(config)router bgp 20\nR2#(config-router)neighbour 20.20.20.20 prefix-list CCNP in\n<\/pre>\n<p><strong>Filter-lists<\/strong><\/p>\n<pre>ip as-path access-list 1 permit ^10_\nip as-path access-list 1 permit _10$\nR2#(config)router bgp 20 \nR2#(config-router)neighbour 20.20.20.20 filter-list 1 in\n<\/pre>\n<p><strong>Route-map<\/strong><\/p>\n<pre><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BGP filtering can be done on any routers Filtering can be done inbound and outbound After filtering is applied BGP neighbor must be reset or cleared for the filter to take effect clear ip bgp 20.20.20.20 in\/out\u00a0 preferred clear ip bgp *\u00a0\u00a0 (hard reset) clear ip bgp 20.20.20.20 soft in\/out<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[12,8],"tags":[],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-bgp","category-route"],"_links":{"self":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":0,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}