If you are going to use "clear ip bgp x.x.x.x soft in / out" you must enable the ability first.
Router BGP 1
neighbor x.x.x.x soft-reconfiguration in
Route-Filtering 101
access-list 1 deny 3.3.3.0 0.0.0.255
access-list 1 permit any
Router bgp 1
neighbor x.x.x.x distribute-list 1 in
(Note: If you have more than (1) BGP neighbor that you can learn this prefix from, then you need to add it to all neighbors.
_________
ip prefix-list oscar deny 3.3.3.0/24
ip prefix-list oscar permit 0.0.0.0/0 le 32
Router bgp 1
neighbor x.x.x.x prefix-list oscar in
(Note: If you have more than (1) BGP neighbor that you can learn this prefix from, then you need to add it to all neighbors.
________
access-list 1 deny 3.3.3.0 0.0.0.255
access-list 1 permit any
Route-map oscar permit 10
match ip address 1
Route-map oscar permit 20
Router bgp 1
neighbor x.x.x.x route-map oscar in
(Note: If you have more than (1) BGP neighbor that you can learn this prefix from, then you need to add it to all neighbors.)
You can also use a DENY route-map and a PERMIT route-map instead.
________
Filtering route's by telling the eBGP neighbor to not send them in the first place.
Router BGP 1
address-family ipv4
neighbor 10.1.23.2 capability orf prefix-list both
ip prefix-list oscar deny 3.3.3.0/24
ip prefix-list oscar permit 0.0.0.0/0 le 32
(Note: If you have more than (1) BGP neighbor that you can learn this prefix from, then you need to add it to all neighbors.)
________
Monday, October 18, 2010
BGP - Part 1
* Note: Outgoing route advertisements directly affect incoming traffic.
* Note: MED is considered a metric so a lower value is better.
Path Attributes
==> 3 _ 2 _ 2 _ 3 <==
1. Origin (WKM)
2. AS_Path(WKM)
3. Next_Hop (WKM)
4. Local_pref (WKD)
5. Atomic_aggregate (WKD)
6. Aggregate (OT)
7. Community (OT)
8. Originator_ID(ONT)
9. MED (ONT)
10. Cluster_List (ONT)
Origin (WKM) -
IGP / EGP / Incomplete
IGP - NLRI was learned from a protocol internal to the AS is gets the highest preference.
EGP - NLRI was learned from the exterior gateway protocol and gets medium preference.
Incomplete - NLRI was learned from some other means which could be redistribution but there is no real way to know how it got there and gets the lowest preference.
AS_Path (WKM)-
This uses a sequence of AS paths through which the NLRI was received. Beginning with the most recent and ending with the originating AS. The BGP router will only prepend its AS if it being advertised to an EBGP neighbor and NOT an iBGP neighbor. This is considered a loop avoidance mechinism.
Next_Hop (WKM) -
Community (OT) -
Internal BGP - TTL of 255
External BGP - TTL of 1
iBGP and IGP Syncronization
BGP does NOT advertise routes that have been learned from other iBGP peers.
BGP Syncronization: Before a route learned from an iBGP neighbor is entered into the routing table or is advertised to a BGP peer, the route must first be known via an IGP.
Confederations:
AS_Path contains (2) additional attributes:
i. AS_CONFED_SEQUENCE ii. AS_CONFED_SET
Route Selection is as follows inside a confederation.
1. EBGP routes are prefered over member AS then iBGP is last.
NEXT_HOP AND MED can be advertised unchanged along with the ability to send local_pref. Usually peering with an eBGP peer, local_pref means nothing.
Neighbor x.x.x.x default-originate is the same as OSPFs default-information-originate-always in that a default is advertised whether the router has a default route or not.
If only the default is to be sent, you must use a route-filter to suppress all more-specific route's.
neighbor x.x.x.x distribute-list 1 out
access-list 1 per 0.0.0.0
access-list 1 deny any
You can run an IGP to run in passive mode on external eBPG interfaces or can redistribute connected interfaces on AS border routers.
(2) Ways to create an aggregate address under BGP
i. Create a static route and advertise it with the network command.
ii. Use the aggregate-address command
ip route 192.168.192.0 255.255.248.0 null 0
Router BGP 1
network 192.168.192.0 mask 255.255.248.0
The route to null 0 is a safe guard should there not be a more specific match in the routing table.
* Note: MED is considered a metric so a lower value is better.
Path Attributes
==> 3 _ 2 _ 2 _ 3 <==
1. Origin (WKM)
2. AS_Path(WKM)
3. Next_Hop (WKM)
4. Local_pref (WKD)
5. Atomic_aggregate (WKD)
6. Aggregate (OT)
7. Community (OT)
8. Originator_ID(ONT)
9. MED (ONT)
10. Cluster_List (ONT)
Origin (WKM) -
IGP / EGP / Incomplete
IGP - NLRI was learned from a protocol internal to the AS is gets the highest preference.
EGP - NLRI was learned from the exterior gateway protocol and gets medium preference.
Incomplete - NLRI was learned from some other means which could be redistribution but there is no real way to know how it got there and gets the lowest preference.
AS_Path (WKM)-
This uses a sequence of AS paths through which the NLRI was received. Beginning with the most recent and ending with the originating AS. The BGP router will only prepend its AS if it being advertised to an EBGP neighbor and NOT an iBGP neighbor. This is considered a loop avoidance mechinism.
Next_Hop (WKM) -
- If the advertising router and receiving router are in different ASs, the next_hop is the IP address of the advertising routers interface.
- If the advertising router and the recieiving router are in the same AS and the NLRI of the update referes to a destination with the same AS, the next_hop is the IP address of the neighbor that advertised the route.
- If the advertising router and the receiving router are internal peers and the NLRI of the update refers to a destination in a different ASm the nest_hop is the IP address of the external peer from which the route was learned.
Community (OT) -
- Identifies a destination as a member of some community of destinations that share one or more common properties.
- The Community attribute is a set of (4) octet values (AA:NN)
- The first (2) are the AS number.
- The second (2) are the administratively defined identifier.
- The default is (NN:AA) which can be changed with " ip bgp-community new-format".
- INTERNET - Doe's not have a value and all routes belong to this community by default.
- NO_EXPORT - Can not be advertised to an EBGP peer or if a confederation is configured, cant be advertised outside of a confederation.
- NO_ADVERTISE - Routes received with this attribute cant be advertised at all.
- LOCAL_AS - Cant be advertised to EBGP peers including peer in other ASs within a Confederation.
Internal BGP - TTL of 255
External BGP - TTL of 1
iBGP and IGP Syncronization
BGP does NOT advertise routes that have been learned from other iBGP peers.
BGP Syncronization: Before a route learned from an iBGP neighbor is entered into the routing table or is advertised to a BGP peer, the route must first be known via an IGP.
Confederations:
AS_Path contains (2) additional attributes:
i. AS_CONFED_SEQUENCE ii. AS_CONFED_SET
Route Selection is as follows inside a confederation.
1. EBGP routes are prefered over member AS then iBGP is last.
NEXT_HOP AND MED can be advertised unchanged along with the ability to send local_pref. Usually peering with an eBGP peer, local_pref means nothing.
Neighbor x.x.x.x default-originate is the same as OSPFs default-information-originate-always in that a default is advertised whether the router has a default route or not.
If only the default is to be sent, you must use a route-filter to suppress all more-specific route's.
neighbor x.x.x.x distribute-list 1 out
access-list 1 per 0.0.0.0
access-list 1 deny any
You can run an IGP to run in passive mode on external eBPG interfaces or can redistribute connected interfaces on AS border routers.
(2) Ways to create an aggregate address under BGP
i. Create a static route and advertise it with the network command.
ii. Use the aggregate-address command
ip route 192.168.192.0 255.255.248.0 null 0
Router BGP 1
network 192.168.192.0 mask 255.255.248.0
The route to null 0 is a safe guard should there not be a more specific match in the routing table.
Subscribe to:
Posts (Atom)