<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Cisco%3A_BGP_prevent_transit</id>
	<title>Cisco: BGP prevent transit - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Cisco%3A_BGP_prevent_transit"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Cisco:_BGP_prevent_transit&amp;action=history"/>
	<updated>2026-04-20T07:09:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=Cisco:_BGP_prevent_transit&amp;diff=53685&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;sumber: https://networkdirection.net/articles/routingandswitching/bgppreventtransitas/  What is a Transit Area?  An enterprise will often want to peer with more than one inter...&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Cisco:_BGP_prevent_transit&amp;diff=53685&amp;oldid=prev"/>
		<updated>2018-12-27T00:48:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;sumber: https://networkdirection.net/articles/routingandswitching/bgppreventtransitas/  What is a Transit Area?  An enterprise will often want to peer with more than one inter...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;sumber: https://networkdirection.net/articles/routingandswitching/bgppreventtransitas/&lt;br /&gt;
&lt;br /&gt;
What is a Transit Area?&lt;br /&gt;
&lt;br /&gt;
An enterprise will often want to peer with more than one internet provider, usually for redundancy, but also for some type of load balancing. An example of this is shown below, where the enterprise (AS 555) is peering with provider-A and provider-B (AS 100 and AS 200 respectively). These providers are then used to access other customers networks, such as AS 444 and AS 333.&lt;br /&gt;
&lt;br /&gt;
Providers will have high-speed links between each other, so a customer on one provider (such as AS 444) can access networks for another customer (such as AS 333) on another provider.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[File:TransitAS 1.png|center|300px|thumb]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In the minimal BGP configuration, routers in AS 555 (CE routers) will peer with the provider routers (PE routers). The PE routers will then send all their prefixes to the CE routers, allowing the Enterprise to decide the best path to each route. The enterprise will then add it’s AS number to the AS path for each of the prefixes that it learned, and then advertise them to other peers.&lt;br /&gt;
&lt;br /&gt;
But what would happen if the link between the providers were to go down, as shown below?&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[File:TransitAS 2.png|center|300px|thumb]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Imagine customer AS 444 wants to access a network in AS 333. It will have learned the path to this network from it’s provider, and know that AS 100 will be the next-hop. When AS 100 receives the traffic, it will see AS 555 as being a valid path and send traffic that way. If this happens with enough traffic, the links into AS 555 will likely get overwhelmed. This is not a good situation for an enterprise customer to be in, and should be avoided.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Is This a Likely Scenario?&lt;br /&gt;
This may not be a common occurrence with large ISPs, but it could happen as a result of a misconfiguration, or perhaps in the case where the routers are peering with another customer directly, rather than through an ISP.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Preventing Transit&lt;br /&gt;
&lt;br /&gt;
There are four methods which may be used to prevent transit AS:&lt;br /&gt;
&lt;br /&gt;
    Filtering based on the AS-PATH, so routes received from one AS will not be advertised to another AS&lt;br /&gt;
    Using the no-export community, so prefixes received from an AS are tagged, and prevented from being advertised outside the AS&lt;br /&gt;
    Prefix-list filtering, which identifies all the prefixes that shouldn’t be advertised to a peer&lt;br /&gt;
    Distribute list filtering, which also identifies each prefix that should not be advertised&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Filter list with AS-PATH==&lt;br /&gt;
&lt;br /&gt;
The idea behind AS-Path filtering, is that the AS-Path is checked to be sure that only routes originating within the local AS are advertised. This means that nothing learned from Provider-A can be advertised to Provider-B.&lt;br /&gt;
&lt;br /&gt;
This is configured using reg-ex, which can get tricky in more advanced cases. However, this is highly scalable, as adding and removing routes will not affect this configuration.&lt;br /&gt;
&lt;br /&gt;
The example below shows the filter-list matching ^$, which is an empty AS-Path (which covers locally originated routes). If there is a value in the AS-Path, this is denied from being advertised out.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
AS-Path Filtering&lt;br /&gt;
&lt;br /&gt;
 ip as-path access-list 1 permit ^$&lt;br /&gt;
 neighbor x.x.x.x filter-list 1 out&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==No-export Community==&lt;br /&gt;
&lt;br /&gt;
Incoming prefixes can be tagged with the no-export community. This community tells BGP that the prefix can only bet advertised within the AS, and not to external AS’s. This is a simple solution with little configuration and maintenance.&lt;br /&gt;
&lt;br /&gt;
To configure this, incoming prefixes need to have this community set. The send-community command needs to be enabled on each peer.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
No-Export Community&lt;br /&gt;
&lt;br /&gt;
 ip bgp-community new-format&lt;br /&gt;
 route-map NO-EXPORT&lt;br /&gt;
   ​set community no-export&lt;br /&gt;
 neighbor x.x.x.x route-map NO-EXPORT in&lt;br /&gt;
 neighbor x.x.x.x send-community&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Prefix-list Filtering==&lt;br /&gt;
&lt;br /&gt;
Using prefix-lists for filtering inbound and outbound is quite common. It can also be used to prevent transit areas, however it needs to match all prefixes that are learned from internal sources, then filter any other prefixes in an outbound direction. For this reason, it is very granular, but is not very scalable.&lt;br /&gt;
&lt;br /&gt;
The configuration may need to be changed every time prefixes are added, removed, or changed on the network.&lt;br /&gt;
 &lt;br /&gt;
Prefix-list Filtering&lt;br /&gt;
&lt;br /&gt;
 ip prefix-list NO-TRANSIT permit x.x.x.x/x&lt;br /&gt;
 neighbor x.x.x.x prefix-list NO-TRANSIT out&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Distribute List Filtering==&lt;br /&gt;
&lt;br /&gt;
Distribute list filtering uses the same principal as prefix-list filtering. It is just another way to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
Distribute List Filtering&lt;br /&gt;
&lt;br /&gt;
 access-list x deny x.x.x.x y.y.y.y&lt;br /&gt;
 neighbor x.x.x.x distribute-list x out&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Summary&lt;br /&gt;
&lt;br /&gt;
There are several options available, but in most cases either AS-Path filtering or the no-export community will be the best solution&lt;br /&gt;
Method 	Scalable 	Complexity 	Notes&lt;br /&gt;
AS-Path Filtering 	Yes 	Potentially Complex 	Simple for Enterprises, harder for providers&lt;br /&gt;
No-Export Community 	Yes 	Simple 	Easy to use, scalable, but not very granular&lt;br /&gt;
Prefix-list Filtering 	No 	High 	Highly granular&lt;br /&gt;
Distribute List Filtering 	No 	High 	Highly granula&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://networkdirection.net/articles/routingandswitching/bgppreventtransitas/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pranala Menarik==&lt;br /&gt;
&lt;br /&gt;
* [[Quagga]]&lt;br /&gt;
* [[Mikrotik]]&lt;br /&gt;
* [[Cisco]]&lt;br /&gt;
* [[Juniper]]&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>