0% found this document useful (0 votes)
6 views52 pages

BGP 1

The document provides a comprehensive overview of the Border Gateway Protocol (BGP), detailing its characteristics, message types, path attributes, and route selection process. It explains BGP's operational mechanisms, including neighbor relationships, route reflection, and various attributes used for routing decisions. Additionally, it covers BGP configurations, including multipath settings and route manipulation techniques.

Uploaded by

sudeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views52 pages

BGP 1

The document provides a comprehensive overview of the Border Gateway Protocol (BGP), detailing its characteristics, message types, path attributes, and route selection process. It explains BGP's operational mechanisms, including neighbor relationships, route reflection, and various attributes used for routing decisions. Additionally, it covers BGP configurations, including multipath settings and route manipulation techniques.

Uploaded by

sudeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

BORDER GATEWAY ROUTING PROTOCOL

Characteristic of BGP
 BGP also known as path vector protocol
 BGP is the most tunable protocol
 BGP is the slowest protocol
 BGP use policy base routing
 BGP is a application layer protocol
 BGP use tcp port number 179.
 Automatically neighbors discover is not exist in BGP, you have to define neighbor
statically.
 BGP also create 3 tables :-
1) Neighbor table
2) BGP table
3) Routing table
 Neighbor table contain information of BGP neighbor that can be directly connected or
cannot be directly connected
 BGP table contain information of network IDS along with BGP attributes
 Routing table has the best routes
 In case of BGP after neighbor adjacency BGP table will exchange.
 There is no periodic update in BGP but BGP have batches update, in case of IBGP
batches update timer is 5 sec while in case of EBGP update times is 30 sec.
 AD of IBGP(same as) is 200 and EBGP(different as) is 20.
 Metric of BGP is attributes also known as rich metric
 BGP message types is OK NOT UPDATE .
O=open message (a) open sent (b) open confirm
K= keepalive, Not= notification message, UPDATE=update message .
❑ IGP ROUTE=20,000 routes
❑ BGP ROUTE=780,000 routes
❑ Maximum path = default 1
❑ Classless routing protocol
❑ Auto summarization is disabled.
TYPE OF AS

❑ 2-BYTE AS ( 16 bit range )


Public AS= 0-65535
Private AS= 65512-65534
❑ 4-BYTE AS ( 32 bit range )
Public AS= 0-4,294,967,295
Private AS= 4,200,000,000–4,294,967,294
TYPE OF CUSTOMER
1.SINGLE HOMED CUSTOMER--→ Customer is connected to single ISP
with single link.
2.DUAL HOMED NETWORK--→ customer is connected to single ISP with a backup
Link.
3.SINGLE MULTI-HOMED CUSTOMER-→ customer is connected to two ISP with single
link.
4.DUAL MULTI-HOMED NETWORK--→ customer is connected to two ISP with
backup link.
BGP SYCRONIZATION
 Frist R2 establish TCP connection by sending syn bit 1 with using random port number.
 Then R1 send TCP message with ack. Of R2 and syn bit 1.
 Then R2 send acknowledgment of R1 .
BGP MESSAGE TYPE
1. 1.OPEN MESSAGE
2. 2.KEEPALIVE MESSAGE
3. UPDATE MESSAGE
4. 3.NOTIFICATION MESSAGE
5. 4.ROUTE-REFRESH MESSAGE
OPEN MESSAGE
 OPEN MESSAGE is responsible for maintain neighborship with BGP peers.
 INFORMATION---→
KEEPALIVE MESSAGE
 IT is responsible for identify that BGP neighbor is still alive or not.
 KEEPALIVE MESSAGE TIMER:60seconds
 INFORMATION:
UPDATE MESSAGE
 Update messages are used to exchange routing information between BGP neighbor.
Update message contains two more info like (path attributes and NLRI (ROUTE
INFORMATION).
 INFORMATION
NOTIFICATION MESSAGE
 Notification messages are sent when there is a error condition. If a notification message
is sent then the BGP peer session is going to down and reset.

ROUTE-REFRESH MESSAGE
This message is sent when BGP process reset like hard reset or soft reset.
VERIFY: debug ip bgp in or out
BGP PATH ATTRIBUTES ( FSM )
 BGP metrics are called Path Attributes
 Path attributes are used to calculate the best path when multiple paths to the
particular destination exists
 BGP attributes are divided into 2 parts
1.Well known attributes
2.Optional attributes
Well known attributes

 Supported by each BGP router i.e attributes are required to be recognized by


all BGP implementation
 All well-known attributes are sent to BGP speakers
 Well-known attributes are further dived into two parts:-
1. Well known mandatory
2. Well known discretionary
Well known mandatory

 Must be include in every single BGP routing table update.


 These well-known mandatory attributes are:-
1.Origin
2. Next-hop
3.AS Path
Origin
 When BGP router originates a route, it well set origin attributes.
 Origin attributes are:-
1.IGP :- If ip subnet publish via network statement or via aggregation
2.EGP: - Today nobody in word uses EGP that was in use till 1990 before BGP. BGP is
an EGP but BGP is not a part of EGP.
 Unknown:- If ip subnet will inject via redistribution it will display via ? in “sh ip
BGP”.
NEXT-HOP
Ip address of the next hop router to which receiver router will forward packet to
the destination network.
1.Next hop will change in EBGP on point to point link.
2.Next hop will not change in EBGP on BMA.
3.Next hop will not change in EBGP on NBMA
4.Next hop will not change in IBGP
AS PATH
 Series or sequence of AS
 AS Path is used as a loop-prevention mechanism in BGP. If a BGP router receives a
prefix advertisement with its AS listed in the AS Path attribute, it discards the prefix
because the router thinks the advertisement forms a loop.
Well Known Discretionary

 They are optional, could be present or not in BGP routing updates i.e they are not
required.
 Basically it depends upon you, if you are the network administrator whether you
want to send it or not. Discretionary are two types:-
1. Local Preference
2. Atomic aggregate
Local Preference

 It is use in BGP route selection process


 It will remove within another-AS
 Router prefer route with highest local preference value
 Default value of local preference is 100
 With the help of local preference we can change routing decision of entire local AS
Atomic Aggregate

 It is a result of route summarization called aggregation in BGP


 It will attached with summarized route when BGP router will send update to
BGP speakers
 Atomic aggregate will informs router that a route has been summarized
Optional attributes

 Does not have to be supported by all the router manufacturers


 Optional attributes are private attributes that can be vendor specific. You can
create own router and decide if you want to support BGP or do not want to
support some of the optional attributes
 Optional attributes are two types:-
1.Transitive optional attributes
2.Non-transitive optional
Transitive optional attributes
 Continue traveling to the systems whether they are recognized by the router or
notes
1.If a router propagates an unknown transitive optional attributes, it will set an
additional bit in the attributes header, known as partial bits to indicates that one
of the router in the path did not recognize the meaning of a transitive optional
attributes
 Transitive optional attributes are two types
1.Aggregator
2.Community
Aggregator
 It will tell you the ip address (RID) and AS of the router that will generate the BGP
summarization or aggregate address

Community
 It is use for route tagging i.e identification or masking
 Community is a numerical values that can be attached to the certain routes as they
will move from the router. Other routes that will receive route with tag, apply filter
process according to task
Non-Transitive Optional
 Stripped off by the router if does not understand it or does not want to propagate that
attributes
 MED is a Non-transitive optional attributes
MED (Multi – Exit Discriminator)
 Med is useful to influence the BGP route selection process
 When multiple links are connected between 2 AS. One AS can change the routing
policy of another AS. i.e it can break the GOLDEN RULE OF BGP.
BGP Route Selection Process
1. If next hop is unreachable packet will be dropped
2. Highest weight path will be preferred
3. Highest local preference path will be preferred
4. Originated locally will be preferred
5. Shortest AS path
6. Origin code
7. Lowest MED
8. EBGP over > IBGP
9. Closest IGB neighbor (IBGP)
10. Oldest path in EBGP
11. Lowest RID in IBGP
12. Lowest interface IP in IBGP if RID is tie.
When neighborship will not formed

 If neighbor ip address is not reachable


 Port number 179 is blocked
 Wrong AS define
 Next-hop is not present.
 TTL-SECURITY is present
IBGP Implementation
R1#conf t
#router BGP 12
#neighbor 12.1.1.6 remote-as 12
(agar as same Hai means IBGP peering)
R2#conf t
#router BGP 12
#neighbor 12.1.1.5 remote-as 12
R1#sh ip BGP summary
12.1.16 v4 ……………….state/prefix (agar state ke niche kuch nahi likha
matlab neighborship)
State / Prefix receive (agar prefix receive ke neeche 0 hai to
matlab koi bhi network receive nahi hua hai.)
#sh ip BGP (it will show BGP table)
Publish network in BGP
➢ 1.network 192.168.100.0 (BGP me classful network publish karne
ke liye subnet mask nahi dena padta hai)
➢ 2.network 12.1.1.4 mask 255.255.255.252 (classless network publish
karne ke liye subnet mask dena padta hai)
➢ R1# sh ip BGP
*> 192.168.100.0
➢ 3.* ka matlab hai Best aur > is ka matlab hai valid (Best and
Valid)
➢ 4.*> jab tak ye dono symbol nahi hogenge BGP router us route ko
doosre router ko nahi bhejega.
➢ (Jab BGP table me ye dono symbol *> hote hai tabhi wo routing table
me bhejega.)
IBGP=internal BGP
5.Jo network khud generate ki jati hai unka weight 32768 hota hai
BGP NEIGHBOUR STATE

1. Idle
2. Connect
3. Active
4. Open sent
5. Open confirm
6. Establish
Verification
Route-reflector server and client

BGP Route Reflector (RR) is a BGP Mechanism used to bypass this iBGP Full Mesh
requirement and provide all iBGP Routing information to all iBGP peers. With this
mechanism less bandwidth and CPU usage is provided in BGP Topology. And also it is
loop-avoidance mechanism in BGP.
ROUTE-REFLECTOR ROUTER ROLES
1.ROUTE-REFLECTOR SERVER
2.ROUTE-REFLECTOR CLEINT
3.ROUTE-REFLECTOR NON-CLIENT
➢ Router that will be a Route Reflector (RR) become RR Server and the other iBGP
neighbors are configured as RR Clients on this RR Server. And iBGP non-neighbors
become non-client.
IMPORTANT RULES----→
1. If a Route comes from a Non Client BGP Peer, Route Reflector Server reflects this to all the
RR Clients in the Cluster.
2. If a Route comes from a Client BGP Peer, Route Reflector reflects this to all the RR Clients
in the Cluster.
3. If a Route comes from a Non Client BGP Peer, Route Reflector server doesn’t reflect this to
Non Client BGP Peer.

R2 IS RR-SERVER

R2-RR(config)#router bgp 100
R2-RR(config-router)#neighbor 10.1.1.1 remote-as 100
R2-RR(config-router)#neighbor 10.1.1.1 route-reflector-client
R2-RR(config-router)#neighbor 10.2.2.3 remote-as 100
R2-RR(config-router)#neighbor 10.2.2.3 route-reflector-client
BGP MULTIPATH CONFIGURATION

R1(config)#router bgp 1
R1(config-router)#maximum-path ibgp 3
VEIRFY
ROUTE MANUPULAT ION
1.WEIGHT
R1(config)#router bgp
R1(config-router)#neighbor 4.4.4.2 weight 10
Weight will be change in LOCAL-ROUTER.

2.LOCAL-PREFERENCE
R1(config)#router bgp
R1(config-router)#bgp default local-preference 110
Local preference will be change in NEIGH-ROUTER.
3.MED
MED manipulation is based on IGP METRIC. If you change IGP metric then BGP metric will be
changed.
4.AS-PATH
R1(config)#access-list 10 permit 3.3.3.3 0.0.0.255
R1(config)#route-map ipst permit 20
R1(config-route-map)#match ip add 10
R1(config-route-map)#set as-path prepend 10 20 30 40
R1(config-route-map)#exit
R1(config)#router bgp 1
R1(config-router)#neighbor 4.4.4.1 route-map ipst in
4. MED MANUPULATION---→
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#route-map CCNA permit 10
R1(config-route-map)#set metric 10
R1(config-route-map)#exit
R1(config)#router bgp 100
R1(config-router)#neighbor 12.12.12.2 route-map CCNA in (could be done inbound or
outbound)
R1(config-router)#end
R1#clear ip bgp * 12.12.12.2 soft in
TTL SECURITY
It is machinsam to prevent unnecessary flooding of packets . Also it uses for security
purpose.
FEATURES-→
1. IBGP -255 and EBGP -1
2. INCOMING TTL-1(minimum TTL)
3. OUTGOING TTL-255
4. VERIFY-sh ip bgp neighbor
5. Note: any packet in bgp not forwarded with TTL value 0.

TTL MAUNUPULATION
router bgp [AS-number]

neighbor [IP-address] ebgp-multihop [hop-count] – outgoing ttl


neighbor 192.168.10.1 ttl-security hops 3 – for security purpose.-- incoming ttl
BGP TABLE
1.BGP FORWARDING TABLE
2.BGP TOPOLOGY DATABASE
3.BGP TABLE(routing table)
4.BGP PEER TABLE
✓ sh ip bgp neighbor 192.168.10.1 – To check data flow in bgp
✓ sh ip bgp all summary – for link monitoring

You might also like