Python Notes for mca i year students osmania university.docx
bgp protocol
1. BGP (Border Gateway Routing Protocol) is a standardized exterior
gateway protocol designed to exchange routing and accessibility
information between autonomous systems (AS) on the Internet.
The Border Gateway Protocol makes routing decisions based on
paths, network policies or rule-sets configured by a network
administrator, and are involved in making core routing decisions.
BGP is a very robust and scalable routing protocol, as evidenced by
the fact that BGP is the routing protocol employed on the Internet.
2. INTRODUCTION
It is a routing protocol.
RIP and OSPF are interior for exchanging routing information between
gateways (commonly routers) within an Autonomous System (for example, a
system of corporate local area networks). so BGP is different from these
protocols.
it is ERP(exterior routing protocol) which is used to connect two or more
autonomous systems.
it connects two or more organization networks with each other and may be
used by a single big organization to connect their systems.
It is used by ISP(internet service provider) like(BSNL,MTNL,DOLPHIN
etc.)that's why it is also known as routing protocol of internet.
3. Introduction(Conti…)
If any big organization having two or more internet
connections then in this situation they can also use this
BGP protocol to connect with more than one ISPs to keep
connection with all ISP’s internet connection.
This is known as multi homing.
Multi homing refers to a computer or device connected to
more than one
computer network. It can be used, for example, to
increase the reliability of an Internet Protocol network,
such as a user served by more than one Internet service
provider.
4. History
Before bgp there was an exterior gateway protocol(egp).
It got replaced by BGP and since 1994 we are using BGPv4. And it
supports CIDR method means classless internet domain routing with
the help of this we can perform subnetting and supernetting.
we can also keep our routing table small and effective.
OSPF is link state protocol and RIP is a distance vector protocol.
But BGP is neither link state or distance vector.it is path vector routing
protocol.
routing decisions are made based on:
1.path
2.network policies.
3.rules
5. 4 Types of messages
1.Open:
In this firstly we create a connection with TCP.
After this we can send an open message.
Open message carries several parameters thorough which they check
validity of each of them
These parameters decide that we should communicate or not .
That can be agreed by BGP neighbors(AS).
2.Update:
After getting open message we can send update message.
It contains the actual rout updates.
It composed of:
o NLRI(network layer reachability ).
o AS-path.
o AS-attribute.
6. Types of messages
3.Keep alive:
Keep the session running when there are no updates.
Let BGP speakers know that they are still there.
If we don’t get any keepalive message then BGP will remove
all the informations about that particular peer which was
stored in the routing table.
4.Notification:
It is used to send the error message.
It may be any kind of message like:
o Update corrupt message.
o If router needs to turn off a session unexpectedly.
7. BGP states
Idle:it starts TCP conn with BGP peers.it won’t accept BGP
connetion until Tcp conn is established.
Connect:after tcp connect,.peer sends open msg to peer.
Active state:if tcp is unsuccessful then it stays in active state .
Restart the process.
Open sent :if connect state is sucessful.open msg are listened
and validity is of msg is checked.
If open sent is successful send keepalive messsage
Keepalive msg:maintains the sessions .contains timer .
Open confirm:bgp router recieves keepalive msg. If success the
established state;
Established:if successful ,Bgp protocol exchanges updated
routing info. Among routers involved in the communication.
8. Communication
It uses TCP port no 179.
TCP used for reliability. Because it sends acknowledgment.
Slowest routing protocol. Actually it is design intentionally
to be slow because by this it can take routing decision
slowly because in internet ,links and networks goes up and
down time by time if it will take fast decision then may be
which link or network went down will go up after some
time then it has to take routing decision again. So it will
consume more energy to route and we wouldn't be use
other network resources properly.
9. BGP terminology
BGP Peers and peering:
*BGP neighbors are known as BGP peers.
*when BGP routers exchange routes with another BGP
called peering.
*in this we can establish peering by manual
configuration.
10. BGP AS(Autonomous system)
Autonomous systems are group of routers.
They share similar routing policies.
Operate within a single administrative domain.
Typically belongs to one organization.
AS numbers can be between 1 to 65535.
11. TYPES OF AS
Types of AS system:
1.Stub AS: it has only connection to the another AS.
The host in the AS can send data traffic to other AS similary it can
receive data coming from other AS.
However, the data can’t be pass through the stub AS because it acts as
a source or a sink.
Ex: local ISP.
2.Multi homing:Multi homing refers to a computer or device connected
to more than one computer network. It can be used, for example, to
increase the reliability of an Internet Protocol network, such as a user
served by more than one Internet service provider.
3.Transient:it also a multihome ISP that supports transient data.
Ex:NSPs and ISPs.
12. IASA and RIRs
IASA: The Internet Assigned Numbers Authority (IANA) is
a department of ICANN, a nonprofit private American
corporation that oversees global IP address allocation,
autonomous system number allocation, root zone
management in the Domain Name System (DNS), media
types, and other Internet Protocol-related symbols and
numbers.
RIRs: A regional Internet registry (RIR) is an organization
that manages the allocation and registration of Internet
number resources within a particular region of the world.
Internet number resources include IP addresses and
autonomous system (AS) numbers.
13. BGP NLRI
The Network Layer Reachability Information (NLRI) is exchanged
between BGP routers using UPDATE messages. An NLRI is composed
of a LENGTH and a PREFIX.
The length is a network mask in CIDR notation (eg. /25) specifying the
number of network bits, and the prefix is the Network address for that
subnet.
The NLRI is unique to BGP version 4 and allows BGP to carry
supernetting information, as well as perform aggregation.
The NLRI would look something like one of these:
/25, 204.149.16.128
/23, 206.134.32
/8, 10
Only one NLRI is included in an UPDATE Message, though there may
be multiple AS-paths and AS-path attributes.
14. BGP Types
1.internl BGP(iBGP):
Neighbors that belong to the same AS.
These neighbors needn't to be directly connected.
2.External BGP(eBGP):
Neighbors that belong to the different AS.
These neighbors need to be directly connected.
15. BGP Attributes
The matrix used by BGP are called path attributes.
-as path.
-next hop.
-local preference , etc.