Documente Academic
Documente Profesional
Documente Cultură
-Rahul Kachalia.
Routing loop occurs between redundant RR in cluster, 2 attributes used to prevent it:
ORIGINATING_ID is a route originator’s RID within the local-AS. RR doesn’t advertise route back
to the originator of the route & if originator receives an Update with its own RID, then it’s ignored.
CLUSTER_LIST tracks cluster Ids the same was as AS_PATH tracks AS numbers. When RR
reflects route from client to non-RR-client or another RR it appends its cluster ID to
CLUSTER_LIST. Upon receiving IBGP Update RR checks CLUSTER_LIST if its sees its own
cluster ID in list, RR understand routing loop has occurred & Update is ignored.
o Confederations – An AS that has been subdivided into multiple sub-AS called member-AS. BGP
speakers within member-AS forms standard IBGP connection & EBGP (confederation-EBGP)
between member-AS. Confederation-EBGP modifies AS_PATH attribute when Update is sent to other
member-AS but while sending to non-confederation AS it removes all confederation-AS numbers &
prepends original external AS. The confederation is assigned a confederation Id, which is represented
to peers outside of confederation as the AS number of the entire confederation. All the routers in
confederation MUST support & configure confederation functionality else relationship will be
terminated. Both RR & Confederation can be coexist in sub-AS. With Confederation route
summarization again becomes issue to could lead to routing loop problem, with 2 type of AS_PATH
attributes it can be prevented:
AS_CONFED_SEQUENCE – Ordered list of sub-AS numbers along the path to a destination.
Used same as AS_SEQUENCE attribute, but when Update is sent to peer outside the confederation
AS_CONFED_SEQUENCE attribute is stripped off.
AS_CONFED_SET – In-ordered list of sub-AS along a path to a destination. Used same as
AS_SET attribute, but when Update is sent to peer outside the confederation AS_CONFED_SET
attribute is stripped off.
Confederation AS v/s standard AS:
BGP decision process for confederation is same as standard AS type, especially specified in Rule#7.
BGP decision process chooses normal EBGP routes over Confederation-EBGP routes &
Confederation-EBGP routes over IBGP routes. And member-AS length will not be considered for
best AS-path calculations.
IGP can be the same in entire confederation-AS or running different in each member-AS.
When Confederation-EBGP sessions are opened between loopback interfaces, the “ebgp-multihop”
command must be used; else it always remains in IDLE state.
(This document will never be final) 7
NEXT-HOP, LOCAL_PREF & MED can be advertised unchanged to EBGP peers to another sub-
AS within confederation.
• BGP Stability – Every time BGP neighbor establishes relationship exchanges configured attributes,
routing policies, timers etc, If any of such parameters are modified requires reset of TCP connection
which includes routing instabilities. Similarly when a route flaps on network frequent updates causes
core network instable. Possible solution are mentioned below:
o Link Failure Detection – By default when link between peer is down BGP wont reset peer connection
immediately, but with bgp fast-external-failure command it will tear down connection immediately.
o Soft Reconfiguration – When BGP routing policies have modified it requires connection reset to
make new policies effective. With Soft-Reconfiguration new policies is applied for specific direction
without resetting established TCP connection, which prevents route cache to get clear. If outbound
policy is applied on prefix than BGP router automatically applies new policies & re-sends entire BGP
table to all peers. If inbound policies applied on prefix after learning from peers will not make new
policies affective, hence the solution is BGP router will apply new inbound policies to prefix in
memory till connection is reset & a router applies inbound policies on prefix.
o Route Dampening – Method to track & unstable routes & prevent sending Update into core, which
helps to bring stability. Unstable routes are penalized whenever the penalty reaches a predefined
threshold the route is suppressed. Decay algorithm is used to reduce penalty after a route remains for
certain period in suppress mode. Only EBGP routes can be dampened, IBGP is not applicable. Router
assigns dynamic metrics to each flapping route & if a route stops flapping after dynamic timer route
start re-advertising. BGP uses multiple variables to manage route flapping:
Penalty is assigned to a route whenever it flaps; penalty value per flap is 1000.
Suppress limit if penalty crosses suppress limit value then the route is suppressed. Default is 2000.
Half-Time configurable timer that router waits to reduce the penalty by half. Default is 15 min.
Reuse limit configurable timer that is compared with penalty. If current penalty is less than re-use
limit than a suppressed route will be unsuppressed & advertised to peer. Default is 750.
Routes cannot be suppressed beyond Maximum Suppress Time default is 60 minutes.
In example if a prefix flapped thrice 3000 penalty is assigned which higher than default suppress limit,
hence route will be not be advertised to peer. After Half-Time meaning after 15 min penalty will be
reduced half to 1500 but still route is suppressed, after one more Half-Time if current penalty is 1500
than it further cuts to 750 which is equivalent to Reuse-limit meaning prefix will be unsuppressed &
now it will be advertised. Up to 60 minutes if penalty value of prefix failed to match or lower than
Reuse-limit than it will be flush from BGP table.
• Configuring Basic BGP – This section of configuration will include BGP configuration, peering with
neighbors, managing IBGP routes & connection in AS, EBGP connection, aggregation routes etc.
o Peering BGP – First step to enable BGP process in router:
Router(config)router bgp <as #> - Enables BGP process on router by providing local AS #. Only
single BGP routing process can be configure on router.
Router(config-router)#bgp router-id <ip_addr> - Overrides legacy method of RID selection
process. Requires BGP reset if applied after establishing connections or by changing RID value.
Router(config-router)neighbor <intf_ipaddr> remote-as <as#> - If neighbor AS # is same as local,
BGP considers as IBGP, else EBGP if its different. Neighbor IP address & remote as must match
else relationship wont get established. Multiple neighbor statement with same & different AS # can
be specified.
Router(config-router)#timers bgp <keepalive> <hold-time> - Modifies default BGP timers.
Router#show ip bgp neighbors <ip_addr> - Displays all or specific neighbor with detail info.
o Injecting IGP into BGP – Injecting IGP routes into BGP has advantages & disadvantages:
Advantages –
1. Simple Configuration – By redistribution all IGP routes are automatically known by BGP peers.
2. Automatic Convergence - Any IGP route becomes unavailable will get converge automatically by
sending withdrawn between BGP peers.
Disadvantages –
1. Illegal networks – AS border wont advertise illegal IGP networks & need additional configuration.
2. Subset advertisement – With redistribution all routes in IGP table will be redistributed even if
subset of routes required. Routing policy configuration requires to achieve such goals.
(This document will never be final) 8
3. Instability – Frequent unstable IGP routes will make core routers unstable.
4. Loosing control – With redistributing BGP loose precise control over IGP routes, which may
require additional configurations to prevent any type of failure in local or remote AS. Alternative
is to use network command that advertise IGP routes only if they are available in routing table.
When network command used with IGP it specifies the address of interface/s on which routing to
be enabled, but when used with BGP it specifies prefix to be advertised by looking into routing
table. Regardless if its locally configured on interface or learned via IGP.
Configuration – Redistribution of OSPF/IS-IS into BGP behaves different than EIGRP/IGRP/RIP:
Router(config-router)#network <local or EBGP net_addr> mask <net_mask> route-map
<map_name> backdoor – Prefix could be local network address on BGP router, learned via
IGP or via backdoor, this prefix must exist in RIB before its advertised. Announcing prefix with
network command varies depending whether auto-summarization is enabled or not. Prefix will be
entered into BGP table ONLY if following 3 conditions are met:
1. Auto-summarization is enabled. It will automatically summarize to major net & advertise prefix.
2. Exact matching network entry in routing table as specified using network statement.
3. Classful or classless mask specified with matching network in statement.
When auto-summary is disabled, the routes introduced locally into BGP table will not summarized
to their classful boundaries. With network 0.0.0.0 default-route is send to all peers. Only selective
prefix is advertised instead all by redistribution CLI. Origin is IGP (“i”). See Backdoor
Configuration.
Router(config-router)#redistribute <RP> <pid> - Redistributes all routes learned by specified
RP & PID. If metrics is specified than default is 0 for local networks & same metrics as entered in
IGP table. Metrics in BGP is considered as MED value. Origin type is Incomplete (“?”). Use route
filter to advertise subset of routes.
Router(config-router)#no auto-summary – BGP auto-summarize networks at boundaries, this
CLI will turn off auto-summarization. Also disable on EIGRP/RIPv2 it they are redistribution RP.
o Injecting BGP into IGP – EBGP routes can be redistributed into any type of IGP in 2 ways, with
redistribution command into RP & second way is to creating & redistributing static route pointing to
EBGP neighbor into RP. Redistributing BGP into IGP will lost BGP path attributes. Similarly default
route can be injected on per neighbor basis or to all peers:
Router(config-router)#redistribute bgp <as#> - Redistributes BGP routes installed in global routing
table to other routing process. Associate metric else use default-metric command.
Router(config-router)#neighbor <ip_addr> default-originate – Advertises default-route to single
neighbor only.
Router(config)ip route 0.0.0.0 0.0.0.0 Null0 – Create a static route pointing to null interface & then
advertise default network with network 0.0.0.0 command.
o IBGP without IGP – Every IBGP peer must establish either full-mesh relationship or directly connect
to RR. No special configuration is required, basic BGP configuration is used to establish peer
connection. Points to remember, when designing AS without IGP:
No Synchronization – Because no IGP configured there is no need to synchronize with routing table
to forward routes to EBGP peers. Requires resetting BGP connection to make it effective.
Full-mesh IBGP peers – Requires all IBGP peer to establish full mesh connectivity or configure RR
in AS. This way all IBGP can exchange learn route & have perfect picture of internal & external
network.
All networks & subnets connecting IBGP peers must be known – It requires for establishing logical
BGP connection when there is no physical connectivity between IBGP peers. IBGP peers do not
change NEXT-HOP attributes in IBGP peers, if NEXT-HOP is unreachable then prefix will not get
install in routing table.
o Route Aggregation – IGP or BGP routes can be aggregated or summarized in 2 different ways, first is
to create summarized static route & other is with aggregate command. Aggregate command provides
much better way to control summary network:
Router(config)#ip route <summary_net> <summary_mask> Null0 – Create summarized network
static route pointing to Null interface & than advertise same network with network statement.
Router(config)#aggregate-address <summary_net> <summary_mask>
advertise-map <route_map_name> – By default aggregator router inherits all attributes attached
to each prefix which can create problem, for example if one of the route has COMMUNITY
(This document will never be final) 9
attribute of NO_EXPORT then aggregator will inherit such attribute which stops sending
aggregated route to peer. Such prefixes can be blocked by this parameter used with route-map. It
also used for conditional aggregate address advertisement by matching prefix using route-map.
as-set – Includes AS-SET attribute with list of unordered AS# to specified aggregated prefix
which prevents routing loop.
attribute-map <route_map_name>– Modifies / applies attribute to aggregated prefix.
Redistributed route has ORIGIN type “?” but when they are aggregated, BGP creates new prefix
& it has ORIGIN type “i”. Any new attribute can be applied or existing can be modified with this
command & associating with route-map.
route-map <route_map_name>– Associate route-map to police summary network.
summary-only <route_map_name>–By default both non-summarized & summarized prefix is
advertise. With this parameter only summary route will be advertised to peer & others will be
suppressed. Verify with “sh ip bgp” command, status code with “s” means its suppressed.
suppress-map<route_map_name> – Useful only when summary-only option is not used. Router
advertises aggregated + non-summarized prefixes but filtering certain non-summarized prefix that
matches ACL.
o Neighbor statement – Unlike other routing protocols, BGP configuration is different since it
establishes peer connection in different way. In major all BGP features are configured based on per
neighbor, except some configuration is for router itself. Following are list of possible parameter used
for per neighbor basis configuration:
Advertisement-interval – Certain period of gap between updates is introduced. Convergence could
affect if gap or delay high. Default Updates gap is 5 sec for IBGP & 30 sec for EBGP peers.
Advertise-map – See Configuring Conditional Routing.
Allowas-in <1-10> – BGP accepts Update with its own AS# from specified peer.
Default-originate <route-map-name> – Sends default-route only to single neighbor.
Description – Description to each neighbor can be applied with up to 80 characters.
Distribute-list <acl#> <in | out> - Use it to filter prefix from peers for in or outbound direction.
Ebgp-multihop <1-255> – Use when EBGP peer is not directly connected when away from no. of
hop count. Always use when remote-ip-address is loopback interface.
Filter-list <acl#> <in | out> - Filters ALL routes based on AS # included in AS-PATH, AS-PATH
ACL is used filter prefixes. Always check AS-PATH in BGP table before creating AS-PATH list.
Maximum-prefix <prefix#> <%> warning-only – Restricts to receive specified number of prefix
from peer, router disables BGP connection with peer if it receives higher number than its configured
which requires to be manually cleared. By specifying warning-only parameter router will not disable
BGP connection, rather generates warning message when it receives prefix of 75% & above
configured value. By specifying percent value default 75% will be changed.
Next-hop-self – Router swaps NEXT-HOP attribute for EBGP prefix to its own before advertised to
IBGP peers. Alternative is to sync with IGP, primarily used in NBMA partial-meshed network. See
Configuring Route-Map using other way to modify NEXT-HOP attribute.
Next-hop-unchanged –
Password – Configure identical MD5 password between peer or peer-group.
Peer-group <group-name> – See Configuring peer group
Prefix-list <list_name> <in | out> – Same as distribution-list but more powerful to match exact
tuple information from Update. Both cannot co-exist for same neighbor & filtering direction.
Remote-as <1-65535> – Range from 64512-65535 is used private-as & should not be forwarded
into Internet. If remote-as is same as local as # then IBGP connection is established else EBGP.
Remove-private-as – Private-AS are used in single-homed ISP network. With this parameter ISP
removes private AS #, prepend its own AS # & sends prefix to peers. Rules of remove-private-as#:
1. Only be used with EBGP peers.
2. If Update has private AS# in AS-PATH, it will be removed.
3. If Update has private & public AS# in AS-PATH then private AS# will not be removed.
4. If AS-PATH contains AS# of EBGP peer, then private AS# will not be removed.
5. In confederation, it works as long as private AS# are after confederation portion of AS-PATH.