In this CCNP Route tutorial Article you will learn What is Border gateway Protocol. BGP Routing Protocol used to manage entire network that how packet will route across network and also responsible for exchange Routing and reachability information in network.
What Is Border Gateway Protocol
- It is an EGP Protocol (it can form neighborship between two different AS’s)
- It is a Path Vector routing Protocol (it uses multiple attribute to select best path)
- It is highly scalable than IGP (it can have lakhs of routes in its BGP table)
- It is reliable protocol (it uses TCP)
- It uses TCP port number 179 before establish neighborship it have to form TCP connection (three way hand shake process).
- Only BGP is fully reliable routing protocol.
- It is more secure than any other routing protocol because all messages will travel on TCP protocol
- It is a classless routing protocol
- It support manual summarization
- Administrative Distance: IBGP 200, EBGP 20.
- S. size is 2bytes(0-65535) and 4bytes(0.0-65535.65535).
- Public A.S= 1 to 64511, Private AS=64512 to 65534.
- BGP doesn’t support dynamic neighbor discovery.
- it supports only md5 authentication
- BGP convergence is slow as compare to IGP.
Note: we can’t configure more than one AS on a single router.
Note: BGP sends all type of packets as unicast.
Why we use BGP
- IGP’s were developed for to handling upto 1000 of routes inside their routing table. therefore can’t be implement in very large networks.
- BGP can contain lakh’s of routes inside their BGP table or routing table.
- we never use default route in ISP router to other ISP router.
- In IGP’s if any link (prefix) goes down then it effects to complete routing structure(topology). but in BGP, it not affects other routers BGP table.
- When we are service provider or network size is very large.
- When we have multiple connections for internet or multiple service provider.
What is BGP
Types of customers
- Single homed customer
- Dual Homed customer
- Single multi-homed
- Dual multi-homed
Types of messages in BGP
There is four types of messages in BGP, each type of BGP packet will travel over TCP. it is not possible to transmit any single message of BGP without forming TCP connection.
1 Open message
- Open message send only once when neighbourship comes up. than after BGP will not send any open message.
- Open message will be used by BGP to exchange initial configuration between two BGP peers which is require to form BGP neighbourship
Contents of bgp
- Version 4
- Own AS
- Hold down timer (180sec)
After exchanging open messages successfully between both router, router will start to send keep-alive Message periodically after every 60sec just to inform its neighbor that im still awake.
if any router doesn’t receive keep alive message from its neighbor within 180sec (hold down time) than router will break down the neighborship
Update packets will be responsible to carry routes information. update packet having some components
Path Attributes: some crieteria used by selection of best path.
prefix info/NLRI: network layer reachability information.
withdrawn routes: the prefix that goes down.
- If peering goes down than it will generate notification msg and it will contain the cause of problem.
FSM(finite state mechanism) of BGP / BGP neighborship states
1 Idle: neighbor shutdown / waiting for start 3-way handshake.
2 Connect: try to form TCP connection, but want be confirmed
3 Active: TCP connection not completed, retrying to form tcp connection
4 Open-sent: TCP connection completed and sent open message.
5 Open-confirm: exchanged open messages , parameter agreed, send keep-alive after 60sec
6 Established: peering completed, update is exchanged.
Types of neighbor in BGP
IBGP: Internal border gateway protocol
EBGP: external border gateway protocol
How to establish neighborship in BGP
router#debug ip tcp packet
router#debug ip bgp all
router(config)#router bgp 100
router(config-router)#neighbor 188.8.131.52 remote-as 200
router#show tcp brief
router#show ip bgp neighbor
router#show ip route
router#show ip bgp
how to advertise prefix
router(config)#router bgp 100
router(config-router)#network 172.16.0.0 mask 255.255.0.0
Note: we can advertise network but its prefix length should be match in its routing table connected route.
Note: it will install only best route of BGP table into routing table.
Now you have learn that What is Border gateway Protocol and How BGP Routing Protocol work. In Next Tutorial will be How to configure BGP Routing Protocol in network. For More Click Here