BGP Routing Protocol: BY: Gebretinsae G
BGP Routing Protocol: BY: Gebretinsae G
BGP Routing Protocol: BY: Gebretinsae G
BY: Gebretinsae G.
P_002
Network Div | 02 April 2012 | P001
BGP
Internet development
P_003
Network Div | 02 April 2012 | P001
BGP
How big is the Internet?
A router running BGP in Internet has:
The size of the routing table is bigger than 70 Mb
There are more than 500,000 routes
More than 65,000 AS numbers
P_005
Network Div | 02 April 2012 | P001
BGP
AS ( Autonomous Systems )
Every AS network has its own AS number
Routing policy in each AS is independent
AS number range : 1 ~ 65535--
P_007
Network Div | 02 April 2012 | P001
BGP
BGP is used among ASs
P_009
Network Div | 02 April 2012 | P001
BGP
Huawei
P_0010
Network Div | 02 April 2012 | P001
BGP
P_0011
Network Div | 02 April 2012 | P001
BGP
BGP routing, foundation concepts
Border Gateway Protocol is a standardized exterior gateway protocol
designed to exchange routing and reach ability information between
autonomous systems on the Internet.
BGP is often classified as a path vector protocol, but is sometimes also
classed as a distance vector routing protocol
BGP is more scalable
The place of BGP in your routed world
EGP-BGP for the internet
To make your ISP typically redundant
To Connect your enterprise’s network to ISP
internal BGP in your ISP or enterprise
P_0012
Network Div | 02 April 2012 | P001
BGP
The facts about BGP
• BGP runs on top of TCP(port 179)
• TCP used for reliability
• Updates are incremental and triggered
• Metric is the biggest you have ever seen( so many attributes)
• Slowest routing protocol on the planet to converge
• One of the most tunable protocol
• Without tuning, BGP behaves just like RIP
P_0013
Network Div | 02 April 2012 | P001
BGP
When to use BGP?
P_0014
Network Div | 02 April 2012 | P001
BGP
When we don’t use BGP?
P_0016
Network Div | 02 April 2012 | P001
BGP
BGP Facts
P_0018
Network Div | 02 April 2012 | P001
BGP
Peers = Neighbors
Two routers establish TCP connection between
each other to exchange BGP route information after TCP
connection is established.
The relationship between them is peer or neighbor.
BGP neighbors is divided into two types: IBGP and EBGP.
P_0019
Network Div | 02 April 2012 | P001
BGP
External BGP
Neighbors are in different ASs ( autonomous systems )
Neighbors are usually directly connected
P_0020
Network Div | 02 April 2012 | P001
BGP
Internal BGP
Neighbors are in the same AS
Neighbors do not need to be directly connected
P_0021
Network Div | 02 April 2012 | P001
BGP
Internal BGP
There can be several non-BGP routers between peers
BGP information can be passed through non-BGP topology
P_0022
Network Div | 02 April 2012 | P001
BGP
BGP message types
P_0023
Network Div | 02 April 2012 | P001
BGP
OPEN Messages
OPEN message is used to establish BGP connection.
It includes following contents:
Version number
AS number
Keep time
BGP identification
Optional parameters
P_0024
Network Div | 02 April 2012 | P001
BGP
BGP KEEPALIVE Message
By default keep alive message are sent every 60
seconds(between peers)
Hold time interval is 180 seconds
Keep alive message will reset Hold timer to 0 If Hold
timer expires, the peer will be regarded as dead
Keep alive and Hold timer can be changed When
establishing BGP, the two parts will use the less value of
hold time
Keep alive message is 19 bytes long
P_0025
Network Div | 02 April 2012 | P001
BGP
BGP UPDATE Messages
The route with same attributes can be sent out in one
update message
Update message can also be used to withdraw those
unreachable routes
If the route is stable there is no update message
Update can only be aimed at the attributes of the routes
Update packets have the same function as keep alive
packets to reset hold timer
P_0026
Network Div | 02 April 2012 | P001
BGP
BGP NOTIFICATION Messages
When error is detected, Notification message is sent out
Notification message will close BGP session
Possible error information : certification failure, route
loop etc.
P_0027
Network Div | 02 April 2012 | P001
BGP
BGP connection status
Idle : This is the first status when BGP initiates
Connect : the status when BGP is waiting for the success of TCP
connection
Active : the status when BGP restart to establish TCP connection
Open sent : when TCP establishing succeeds , BGP begin to send
OPEN message and wait for OPEN message from counterpart
P_0030
Network Div | 02 April 2012 | P001
BGP
BGP route announcing method
2—route redistribution
P_0031
Network Div | 02 April 2012 | P001
BGP
P_0032
Network Div | 02 April 2012 | P001
BGP
P_0033
Network Div | 02 April 2012 | P001
BGP
BGP route announcing principles
When there are multiple paths, BGP Speaker will use the
best one for itself;
BGP Speaker will only announce the routes that it is
using to their neighbors;
BGP Speaker will announce the routes that it gets from EBGP
neighbor to all the BGP neighbors, including EBGP and IBGP
neighbors;
BGP Speaker will not announce the routes that it gets from IBGP
neighbor to all the other IBGP neighbors;
The BGP Speaker will announce the routes that it learns from
IBGP neighbor to its EBGP neighbor
Once the connection is established, BGP Speaker will announce all
the BGP routes to the neighbors
P_0034
Network Div | 02 April 2012 | P001
BGP
P_0035
Network Div | 02 April 2012 | P001
BGP
P_0036
Network Div | 02 April 2012 | P001
BGP
P_0037
Network Div | 02 April 2012 | P001
BGP
P_0038
Network Div | 02 April 2012 | P001
BGP
P_0039
Network Div | 02 April 2012 | P001
BGP
P_0040
Network Div | 02 April 2012 | P001
BGP
BGP routes take effect condition
P_0042
Network Div | 02 April 2012 | P001
BGP
IBGP full mesh
Inside AS, all the routers which BGP routes pass through should
establish IBGP neighbor between each other, to ensure that
packets still have route guide after disabling BGP
synchronization
P_0043
Network Div | 02 April 2012 | P001
BGP
How BGP finds the best path in Cisco/ZTE
0. Ignore routes with inaccessible next hope address
1. Prefer the path with the highest weight
2. Prefer the path with the highest Local-preference
3. Prefer the path that was locally originated via a network command
4. Prefer the path with shortest AS-path
5. Prefer the path with lowest origin type(where IGP is lower than EGP,
and EGP is lower than Incomplete).
6. Prefer the path with the lowest multi-exit discriminator (MED)
7. Prefer eBGP over iBGP paths
8. Prefer the path with the lowest IGP metric to the BGP next hope
(prefer the path through the closest IGP neighbor).
9. Determine if multiple paths require installation in the routing table for
BGP multipath
10. When both paths are external, prefer the path that was received first
(the oldest one) Network Div | 02 April 2012 | P001
P_0044
BGP
11. Prefer the route that comes from with the lowest router ID
12. If the originator or router ID is the same for multiple paths, prefer the
path with the minimum cluster list length
13. Prefer the path that comes from the lowest neighbor address
P_0046
Network Div | 02 April 2012 | P001
BGP
P_0047
Network Div | 02 April 2012 | P001
BGP
P_0048
Network Div | 02 April 2012 | P001
BGP
P_0049
Network Div | 02 April 2012 | P001
BGP
BGP Tables:
P_0050
Network Div | 02 April 2012 | P001
BGP
BGP configuration steps
Enable BGP routing process, <as-number> is the AS system ID of router,
1~65535.
IPCORE Private AS# 65108
Addis Ababa IPRAN Private AS# 65109
IPCORE Public AS# 24757
P_0051
Network Div | 02 April 2012 | P001
BGP
Establishing EBGP Neighbor
EBGP : physical connected directly
--Use IP addresses of interconnected interfaces to create BGP connection
--Use IP addresses of loopback interfaces to create BGP connection
P_0052
Network Div | 02 April 2012 | P001
BGP
Configuration EBGP Neighbor
Using Direct Connected Address
P_0053
Network Div | 02 April 2012 | P001
BGP
Verifying EBGP Neighbor
Using --Show IP BGP neighbor
P_0054
Network Div | 02 April 2012 | P001
BGP
Establishing EBGP Neighbor
Using --Loopback address
P_0055
Network Div | 02 April 2012 | P001
BGP
Verifying EBGP Neighbor
Using --Show IP BGP neighbor
P_0056
Network Div | 02 April 2012 | P001
BGP
Establishing IBGP Neighbor
IBGP : physical connected directly or not connected directly
-- Use IP addresses of loopback interfaces to create BGP connection
-- valuable next hop ( have reachable route )
-- Synchronization
-- Full mesh(RR)
P_0057
Network Div | 02 April 2012 | P001
BGP
Establishing IBGP Neighbor
Using --Loopback address
P_0058
Network Div | 02 April 2012 | P001
BGP
Verifying IBGP Neighbor
Using --Show IP BGP neighbor
P_0059
Network Div | 02 April 2012 | P001
BGP
Configuring BGP Route Advertisement
1. Use network command to advertise route
Advertise the physical network routes
2. Use redistribute command to advertise route
Redistribute all the routes learned from IGP
protocol(s) ( static , RIP 、 OSPF 、 ISIS etc )
3. BGP route aggregation
Aggregate the routes to one summary route and
advertise to other BGP neighbors, therefore can reduce
the size of IP routing table significantly.
Make sure the mask of all the routes are equal while
configuring route aggregation on routers, in order to
avoid black hole route Network Div | 02 April 2012 | P001
P_0060
BGP
Using network to Advertise Route
P_0061
Network Div | 02 April 2012 | P001
BGP
Verifying Advertise Route
Using -- Show IP BGP route
P_0062
Network Div | 02 April 2012 | P001
BGP
Using redistribute to Advertise Route
R2 runs OSPF as IGP protocol.
Now it needs to redistribute all
OSPF routes information on R2 into BGP.
P_0063
Network Div | 02 April 2012 | P001
BGP
Verifying redistribute to Advertise Route
Using - Show IP BGP Route
P_0064
Network Div | 02 April 2012 | P001
BGP
Configuring Route Aggregation
P_0065
Network Div | 02 April 2012 | P001
BGP
Verifying Route Aggregation
P_0066
Network Div | 02 April 2012 | P001
BGP
Internet Service Design
Internet Service general connection
As shown in the following figure, all internet Broad bands are aggregated at
the
Core Switches (T160G/T64G) which are connected to the PE router, and a GER
router is connected to the PE to provide the NAT service.
P_0067
Network Div | 02 April 2012 | P001
BGP
IGW ( International Gateway )
All the traffics go to the internet through our international
Gateways.
In ET Network, we have four international Gateway sites.
Addis Ababa(Bole)
Bahirdar
Diredawa
Shashemene.
P_0068
Network Div | 02 April 2012 | P001
BGP
IGW ( International Gateway )…
Internet Service Traffic Flow
Broad-Band User Traffic Flow Network Topology
P_0069
Network Div | 02 April 2012 | P001
BGP
Leased line Traffic Flow Network Topology
P_0070
Network Div | 02 April 2012 | P001
BGP
Public IP User Traffic Flow Network topology
P_0071
Network Div | 02 April 2012 | P001
BGP
International Customer VPN Traffic Flow Network topology
P_0072
Network Div | 02 April 2012 | P001
BGP
BGP Troubleshooting Commands
5 show ip bgp neighbor out 197.254.194.21 This displays all Prefix List
advertised through this neighbor
P_0073
Network Div | 02 April 2012 | P001
BGP
International GW Troubleshooting Commands
BL-GW-1#show running-config bgp
! <BGP>
router bgp 24757
no synchronization
maximum-paths 6
redistribute ospf-ext 2
aggregate-address 213.55.64.0 255.255.192.0 count 0
aggregate-address 213.55.64.0 255.255.224.0
aggregate-address 213.55.89.0 255.255.255.0 count 0 summary-only
aggregate-address 213.55.104.0 255.255.248.0 count 0
aggregate-address 213.55.76.0 255.255.254.0 count 0
aggregate-address 197.156.68.0 255.255.255.0 count 0 summary-only
aggregate-address 213.55.104.0 255.255.255.0 count 0 summary-only
aggregate-address 213.55.96.0 255.255.255.0 count 0 summary-only
aggregate-address 213.55.90.0 255.255.255.0 count 0 summary-only
aggregate-address 197.156.67.0 255.255.255.0 count 0 summary-only
aggregate-address 197.156.64.0 255.255.192.0 count 0
aggregate-address 213.55.108.0 255.255.255.0 count 0 summary-only
.
. Network Div | 02 April 2012 | P001
P_0074
. BGP
International GW Troubleshooting Commands
neighbor 105.16.0.137 remote-as 37100
neighbor 105.16.0.137 activate
neighbor 105.16.0.137 ebgp-multihop ttl 2
neighbor 105.16.0.137 password SEAC7/IPTR/99802
neighbor 105.16.0.137 prefix-list ONLY_DEFAULT in
neighbor 105.16.0.137 prefix-list CAT-4xSTM4-SEACOM-1 out
neighbor 105.16.0.137 update-source loopback13
neighbor 105.22.120.5 remote-as 37100
neighbor 105.22.120.5 activate
neighbor 105.22.120.5 password SEAC7-IPTR-99803
neighbor 105.22.120.5 prefix-list ONLY_DEFAULT in
neighbor 105.22.120.5 prefix-list CAT-WEREDANET-1 out
neighbor 41.189.225.25 remote-as 30990
neighbor 41.189.225.25 activate
neighbor 41.189.225.25 ebgp-multihop ttl 2
neighbor 41.189.225.25 password 20#DtEtc13
neighbor 41.189.225.25 prefix-list ONLY_DEFAULT in
neighbor 41.189.225.25 prefix-list CAT-DJibouti_2xSTM4 out
neighbor 41.189.225.25 route-map Set_Default_Nexthop_DjiboutTel in
neighbor 41.189.225.25 update-source loopback6
P_0075
. Network Div | 02 April 2012 | P001
BGP
.
International GW Troubleshooting Commands
BL-GW-1#show ip bgp summary
Neighbor Ver As MsgRcvd MsgSend Up/Down State/Pfx
Rcd
10.1.0.2 4 65108 3049585 2408277 39w5d 319
3
10.1.0.90 4 24757 1306832 1283222 46w3d 207
3
41.189.225.25 4 30990 63891 58607 2w6d 0
P_0077
Network Div | 02 April 2012 | P001
BGP
BGP Troubleshooting Commands
KK-ER-DATA-A#show ip bgp summary
Neighbor Ver As MsgRcvd MsgSend Up/Down State/Pfx
Rcd
10.153.192.44 4 64520 232468 237545 3w4d 1
P_0080
Network Div | 02 April 2012 | P001
BGP
BGP Troubleshooting Commands
P_0082
Network Div | 02 April 2012 | P001
BGP
BGP Troubleshooting Commands
P_0083
Network Div | 02 April 2012 | P001
BGP
BGP Troubleshooting Commands
OA-ER-DATA-B#show ip forwarding route summary
The total routes of global and all VPNs:
Route Source Count
static: 579
direct: 640
martian: 0
address: 641
ospf: 0
bgp: 119878
rip: 0
isis-level1: 0
isis-level2: 2204
icmp: 0
snmp: 0
nat: 0
pat: 0
vrrp: 236
ppp: 0
asbrvpn: 0
rsvpte: 0
user-ipaddr: 0
user-network: 0
static-vrf: 2
ipsec: 0
perVrf-label: 0
ps-busi: 0
ps-user: 0
ldp-area: 0
user-special: 0
dhcp-dft: 0
dhcp-static: 0
nat64-sl: 0
P_0084
ves: 0 Network Div | 02 April 2012 | P001
Total: 124180 BGP
BGP Troubleshooting Commands
BGP
Configuration
bgp neighbor commands
Route distinguisher
Route target
Import/export route target
Address family ipv4
Troubleshooting
bgp neighbor commands
Route distinguisher
Route target
Import/export route target
Address family ipv4
P_0085
Network Div | 02 April 2012 | P001
BGP
BGP Summary
P_0086
Network Div | 02 April 2012 | P001
BGP
THANK YOU!