BGP Neighbor: Technologies
BGP Neighbor: Technologies
ZOOM
BGP Neighbor
Technologies
ZOOM
1.81 S0 1.82 S1
In router B Router BGP 110 neighbor 1.93 ? or neighbor 1.90 ?
A AS 110 IBGP
1.94 S1 1.93 S0
1.85 S0
C
1.86 S1 1.89 S0 1.90 S1
BGP Neighbor
1.81 S0 1.82 S1
ZOOM
A AS 110 IBGP
B
In router B Interface loopback 12 IP add 10.10.0.1/24 Router BGP 110 neighbor 10.20.0.1
1.85 S0
C
1.86 S1 1.89 S0 1.90 S1 In router C
Interface loopback 1 IP add 10.20.0.1/24 Router BGP 110 neighbor 10.10.0.1
Loopback interface should be used for forming neighbor relationship. BGP messages Destination IP = Neighbor IP Source IP = Primary IP of Outgoing Interface BGP check source IP in its neighbor command, if no match Message will be discarded.
BGP Neighbor
1.81 S0 1.82 S1 1.94 S1 1.93 S0
Technologies
ZOOM
A AS 110 IBGP
B
In router B Interface loopback 12 IP add 10.10.0.1/24 Router BGP 110 neighbor 10.20.0.1
1.85 S0
C
1.86 S1 1.89 S0 1.90 S1 In router C
Interface loopback 1 IP add 10.20.0.1/24 Router BGP 110 neighbor 10.10.0.1
On Router B B(config)#router BGP 110 B(config-router)#neighbor 10.20.0.1 remote-as 110 B(config-router)#neighbor 10.20.0.1 update-source loopback 12 B(config)#int loopback 12 B(config-if)#ip add 10.10.0.1 255.255.255.0
EBGP Neighbor
10.0.1.1/30 S0 10.0.1.2/30 S0 S1 10.0.2.2/30
Technologies
ZOOM
A
AS 278
S1 10.0.2.1/30
AS 523
On Router A A(config)#router BGP 278 A(config-router)#neighbor 10.20.0.1 remote-as 523 A(config-router)#neighbor 10.20.0.1 update-source loopback 12 A(config-router)#neighbor 10.20.0.1 ebgp-multihop 2 A(config)#int loopback 12 A(config-if)#ip add 10.10. 0.1 255.255.255.0 A(config)#ip route 10.20. 0.0 255.255.255.0 s 0 A(config)#ip route 10.20.0.0 255.255.255.0 s 1
Technologies
ZOOM
S2 S0 2.2
IBGP C EBGP
S1 3.1 3.2 S0
EBGP
F 11.0.0.0/8 AS 5252
E AS 2121
BGP is an AS-by-AS routing protocol, not a router-byrouter routing protocol. next hop next router, the Next-hop IP address used to reach the next AS.
Technologies
ZOOM
S0 1.2 S1 1.1
S1 3.1 3.2 S0
EBGP
EBGP
F 11.0.0.0/8 AS 5252
E AS 2121
If Router C doesn't know how to reach 1.1 it cannot reach 11.0.0.0 network. B(config-router)#neighbor 192.168.2.2 next-hop-self
BGP Troubleshooting
Technologies
ZOOM
R#clear ip bgp *| <neighbor IP> BGP resets connection and starts from Idle State. R#clear ip bgp *| <neighbor IP> soft out|in Clear only BGP updates, TCP connection will not be reset. If BGP State is Idle or Active for long time. Check for neighbor command in both route. Check for route exist in routing table to reach neighbor.
BGP Summarization
Technologies
ZOOM
BGP Supports auto and manual summary. Manual summary can be done at any point in network.
Summary can carry network belonging to multiple A.S.
R(config-Router)#aggregate-address <network> <mask> [summary-only]
BGP Metric
Technologies
ZOOM
Optional
May not be recognized by every vendor
Mandatory
Must be present in updates.
Discretionary
May be present in updates
Transitive
Send to other neighbors.
Non transitive
Only for that router should not be pass to neighbors.
Partial
Proprietary
BGP Attributes
Technologies
ZOOM
BGP Attributes contain following AS Path Next hop Origin Local preference Multi Exit Discriminator Weight
AS Path
Technologies
ZOOM
List of AS through which updates has traversed. Path with shortest AS path list is more desirable. AS Path is Well known, mandatory and transitive attribute.
AS path : 2007
AS 2007 11.0.0.0/8 12.0.0.0/8
11.0.0.0/8 12.0.0.0/8
AS200
AS2003
Next Hop
Technologies
ZOOM
BGP is AS by AS routing Protocol Next hop next router Next hop = IP to reach next AS Next hop well known, mandatory and transitive attribute.
AS 123 11.0.0.0/8 F
AS 123 NH 192.168.1.1 B 11.0.0.0/8 AS 123 NH 192.168.1.1 B 11.0.0.0/8
AS 110
S1 1.1
S0 1.2
S2 2.1
IBGP
S0 2.2
Origin
Technologies
ZOOM
Origin inform all AS in Internetwork how network got introduced into BGP.
IGP (i)
network command
EGP (e)
Redistributed from EGP
Incomplete (?)
Redistributed from IGP or static
Local Preference
Technologies
ZOOM
Local preference define how data traffic should exit from an AS. Path with highest preference value is more desirable. It is advertised only to IBGP neighbor within an AS. Default value is 100 Local preference is Well known, discretionary and transitive only to IBGP neighbor.
Local Preference
Technologies
ZOOM
A My AS 123 B C AS 21117
AS 1220
AS 125
AS 179 11.0.0.0/8
Local Preference
Technologies
ZOOM
A My AS 123 B
11.0.0.1
LP 100 AS 21117
LP 250
AS 1220
AS 125
AS 179 11.0.0.0/8
Technologies
ZOOM
A My AS 123 192.15.2.0/24
C AS 12200 B
Technologies
ZOOM
A My AS 123 192.15.2.0/24
192.15.2.1
C AS 12200 B
Technologies
ZOOM
MED define how the data traffic should enter an AS. MED is used to advertised to EBGP neighbor only. Path with less MED is more desirable. Default is value 0. MED is optional and non transitive.
Weight
11.0.0.1
ZOOM
AS 1220
AS 179 11.0.0.0/8
Weight
Technologies
ZOOM
Weight is Ciscos attribute. Path with the highest weight is more desirable. Default weight is 32768 for local network and 0 for other. Weight is configured locally to each router, it is not advertised to any neighbor. Weight is partial attribute.
Technologies
ZOOM
BGP Consider only (synchronized), no AS loops and a valid next hop route for path selection processes: Prefer highest weight (local to router) Prefer highest local preference (global within AS) Prefer route originated by the local router (next hop = 0.0.0.0) Prefer shortest AS path Prefer lowest origin code (IGP < EGP < incomplete) Prefer lowest MED (from other AS) Prefer a path from EBGP neighbor over IBGP neighbor Prefer the path through the closest IGP neighbor Prefer oldest route for EBGP neighbor Prefer the path with the lowest neighbor BGP router ID
Technologies
ZOOM
A My AS 123 B LP 250 C
AS 1220 14.0.0.0/8
AS 125 13.0.0.0/8
AS 179 11.0.0.0/8
Technologies
ZOOM
A My AS 123 B Route-map BGP Match IP add 11.0.0.0 Set Local preference 250 C
LP 100 AS 21117
AS 1220
AS 125
AS 179 11.0.0.0/8
Multi-homing AS
Technologies
ZOOM
Global ISP X
Global ISP Y