Professional Documents
Culture Documents
Border Gateway Protocol Research
Border Gateway Protocol Research
(SOFTWARE BASED)
BY
SUPERVISED BY
Session:2014-2018
CERTIFICATE
We accept the work contained in this report as a confirmation to the required standard for the
partial fulfillment of the degree of B-Tech(E&T).
__________________ __________________
__________________ __________________
DEDICATION
We dedicate this small piece of the effort to our parents and supervisor as well as our colleagues,
who encouraged and supported us during the whole tenure. Without their support and sincere
advise, it could not possible to complete within the given period.
Page |
DECLARATION OF AUTHORSHIP
We Nauman Haider #14-FA-57065, Sagheer Ahmed #14-FA-57067 and Sajjad Ali Khokhar
#14-FA-57068 hereby declare that content of this thesis is our own work and that it is the result
of work done during the period of registration. To the best of our knowledge, it contains no
material previously published or written by another person nor material which to a substantial
extent has been accepted for the award of any other degree or diploma of the university or other
institutes of higher learning, except where due acknowledgment has been made in the text.
_________________
Nauman Haider
Suit-14-01-077-0024
_________________
Sagheer Ahmed
Suit-14-01-077-0026
_________________
Sajjad Ali Khokhar
Suit-14-01-077-0027
Page |
ACKNOWLEDGMENTS
Firstly, we thank Allah Almighty, as he has provided us the golden opportunity and
ability, continual inspiration, intellectual ability, and determination to complete our B-Tech
degree (electronics and telecom). With Allah almighty blessing, he provided whole necessary
thing fall on the right time into the right place and make a possible us with enormously
supportive, cooperative and unexcitable people, mainly during the period of this research work.
Therefore, we would like to give our hearty gratitude and thankfulness to these people. Deprived
of whom this achievement would have not been achievable.
Engr. Alamgir Safi who is the key person of the thesis project, who arises at the idea of
this research work. and all this is due to his endless effort and support throughout the
competition of this project research work. His supervision and visions were priceless and his
efficient and well-defined approach of working paid a countless deal to the achievements of this
project research work. we’ll be awfully thankful to my department teachers for their support and
providing their expert opinions on research data analysis.
Page |
ABSTRACT
Provision of multiple paths between two Autonomous Systems is a process for the
stability of the network. But when there are multiple paths to the same Autonomous System (AS)
then it is critical for other A.S to select a suitable path according to path characteristics. There
are many factors like link bandwidth, load balancing, etc. which decide the path characteristics.
Considering such a factor into account path selection is a sophisticated process. In this project,
we have proposed that choose Multiple Exit Discriminator (MED) as a tool for path selection
between two A.S having same prior attributes of BGP like local preference, etc. The MED
provides a dynamic way to influence another AS in the way to reach a certain route when there
are multiple entry points for that autonomous system. MED is configured only on the border
router of an autonomous system.We use a Graphical Network simulator-3 (GNS3) to simulate
the effects of MED implementation on the ASes. First, we configure BGP on the router given in
the scenario and find how the router has formed the path to other AS. Then we have
implemented MED on the border router of one AS. In the results has found that internal Routers
in other AS change their path to their connected AS which has been configured with MED
policies. Finally, we have configured the BGP and MED.
Page |
TABLE OF CONTENTS
Certificate........................................................................................................................................ii
Dedication......................................................................................................................................iii
Declaration of Authorship..............................................................................................................iv
Acknowledgments...........................................................................................................................v
Abstract...........................................................................................................................................vi
Table of Contents..........................................................................................................................vii
List of Tables...................................................................................................................................x
List of figures..................................................................................................................................xi
Chapter 1 Introduction................................................................................................................2
1.1 Background.......................................................................................................................2
1.2 IP Protocol.........................................................................................................................3
1.4 EIGRP.............................................................................................................................10
1.4.1 Introduction..............................................................................................................10
1.5 OSPF...............................................................................................................................16
1.5.1 Introduction..............................................................................................................16
1.6.1 Introduction..............................................................................................................24
Chapter 3 Methodology............................................................................................................39
3.1 Scenario:..........................................................................................................................39
Chapter 4 Results......................................................................................................................49
5.1 Conclusion:.....................................................................................................................59
References......................................................................................................................................61
Page |
LIST OF TABLES
LIST OF FIGURES
Chapter 1
Introduction
Page |
Chapter 1 Introduction
1.1 Background
In the 1960s the internet began and become a worldwide data network. Internet is owned
by not a single organization but a large number of the organization. Routing is used to send the
data from the host to the destination network on an optimal path. There are two basic activities
related to routing one is to select the path from the host to destination and other is transport the
packet on that. This path selection is based on various protocols and is a very complicated
process. There are two levels of routing in the internet one is intra-domain routing and other is
inter-domain routing. Interior gateway routing protocol (IGPs) like RIP, OSPF[1] and EIGRP
for intra-domain routing. Where for inter-domain routing Border Gateway Protocol is used?
Stub AS is one which is connected to single AS, Multi-homed AS is connected to more than AS
but doesn’t carry traffic from one AS to other AS, transit-AS is one which is connected to more
than one AS and can carry traffic from one AS to other as shown in fig 1.1.
Page |
1.2 IP Protocol
The IP is the abbreviation of Internet Protocol. For the networkconnection, we need an IP address
which is a unique global address. An IP address is also known as a unique identifier.
The IPv4 address is 32-bits long identifier including two parts, one is network part and second is
host network.
The network prefix is an identifier of a network and the host number identifier for a fixed
number of the host.
As we mention that the IPv4 address is 32-bits long and it is divided into two parts are
1. Network ID Part
2. Host ID Part
The IP address is used to identifying the devices on the network. An IP address is also used to
make a communication connection between the network devices. The network devices are
computer, router, switches, bridges, and hubs.
When the devices need to communication they must need protocols, by using TCP/IP then they
must need an IP address. For the communication the devices must have specific appropriate
software and hardware, then it can be sent and receive the packets on the network. The IP
address is consisting of 32-bits (ipv4) which is written in dotted decimal notations. In the
decimal part each byte of 8-bits of the 32-bits address.
The “dots” are used to separate the octet of 8-bits from the other octet number.
For example,192.168.1.201.
Page |
It is the fourth version of the internet protocol. It was first deployed in the ARPANET in 1983.
It is still being used internet protocol but due to large internet traffic ipv6 is also deployed. IPv4
protocol is used on a packet switched network.
Example:
In Decimal 170.10.16.204
In Binary 10101010.00001010.00010000.11001100
In 32-bits some bits belong to network part and some bits belong to the Host part and the
arrangement through which these are arranged make them classified into classes.
When there is a small number of the hosts in the larger network then to save the IP address we
use the concept of subnetting in which we divide the large networks into smaller networks.
After subnetting, we are no more in a classful domain now we are in the classless domain.
The IP address is work on TCP/IP network layer (Layer 3) receive and send the packets from one
device to another device.
IPv4 has been a solid and highly useful part of the growth of TCP/IP and the internet. IPv6 is
using a 128-bits rather than the 32-bits IPv4 address.
The IPv6 is a replacement protocol for the IPv4, the main purpose of the IPv6 is the same
purpose of the IPv4 protocol. IPv6 is the successor to internet protocol version 4 (IPv4). It was
outlined as a transformative move up to the internet protocol and will, actually, exist together
with the more seasoned IPv4 for require a while. IPv6 is intended to enable the internet to
develop consistently, both as far as the number of hosts associated and the aggregate sum of
information movement transmitted.
Routing Protocol helps the routers to share the useful information about network among
themselves which make the routers capable of optimal path selection between any two end nodes
on any computer network.
Routers share information about directly connected neighbors to router next to it and this process
goes on until all the router in the network gets knowledge of the topology of the network.
Routing Protocol uses the mechanism to avoid network loops and find a less cost path for better
communication.
An interior gateway routing protocol (IGP) is a type of protocol which is used for exchanging
routing information between networks under the same autonomous system. There are various
IGP protocol run on two main algorithms which are as under
An exterior gateway routing protocol used for used the routing between different autonomous
systems. In fig 1.3 there are four different autonomous system and solid arrow show the IGP
routing but the dotted arrows show the EGP routing. In EGP only one main routing protocol is
used which is border gateway routing protocol.
Routing RIP, OSPF, and ISIS are the examples of the interior gateway routing protocols which
we will discuss in the later chapters.
Distance vector routing protocol is used in a packet switched network. Distance vector routing
protocol is used to find the shortest path for data packets based on the distance as a metric. In
distance, vector routing protocol routers share routing table with each other and compare the cost
to the destination and reset the routing table as shown in fig 1.4. Usually, the path with the
lowest cost is considered as the best link. Routers advertise its routing table to all its neighbor
routers periodically. Distance vector routing protocol uses the Bellman-Ford algorithm and
calculates the best path. Distance vector routing protocol does not know the whole topology of
the network. Distance vector routing has no information about the whole path to the destination
node. The thing that it does knows is the destination network and how far it is (in term of cost).
There are two stages one is initial and second is the final state. At the initial stage at any node
distance(cost) is known only to the neighbors. But at the final stage distance(cost) to all node is
known and next hop for the destination is also known to all the nodes. There are three basic
things to handle for DVRP.
And minvrepresent equation to use for all of the x neighbors. v is a number of x’s neighbors.
B 6 B
C 5 C
E 1 E
B 6 B
C 3 E
E 1 E
A 6 E
Page |
This algorithm defines the process of maintaining the entire routing table of the node in the
network. This defines how to send and receive the routing information and use to calculate the
best path to the destination network and it also maintains the routing table of the routers. This
algorithm has a mechanism for detection and reaction to the topology changes. After only a
single message a node knows the node two hops away. And after the two message node get
know the node three hop away from it and this process carries on. Some time is needed for the
convergence. The network must converge to start the normal operation. The routing protocol
which has less convergence time is preferable in computer networking.
By continuing with the previous example we have the final routing table of the network will be
as follows when the entire network fully converges.
A 5 C
B 6 B
C 2 C
E 1 E
A 6 B
B 5 C
C 1 E
D 1 D
1.4 EIGRP
1.4.1 Introduction
EIGRP is the most widely used routing protocol. It was earlier Cisco proprietary protocol but
today it becomes a standard protocol. It is an advanced version of IGRP protocol which was
classful routing protocol later on modified become EIGRP. EIGRP supports classless routing.
Page |
EIGRP uses an algorithm, DUAL (Diffusion Update Algorithm). EIGRP doesn’t use periodic
updates. EIGRP creates a topology table which comprises the best path and loop-free backup
path. Convergence time of EIGRP is much lesser as compared to another routing algorithm e.g.
RIP. Due to non-periodic update nature of EIGRP, it is susceptible to loops. To avoid loop in
EIGRP router many other mechanisms are used.
EIGRP configured router sends hello packet to multicast address 224.0.0.10 and form neighbor
relationship with the routers. The router in EIGRP create a neighbor table and maintain the
neighbor table. Then router shares their complete routing information to neighbor routers and
receiver acknowledge that. Hence all the router in the EIGRP domain completes their topology
table which consists of the best route as well as backup paths. At last routing tables are
maintained.
Page |
R1 R2
Hello
1
I am R1 who is on that link? Neighbor
Neighbor Table
Table
Hello
2
Hello, I am R2.
update
Topology my complete routing information 3
Topology
Table
Table
ack
4 Thanks for information
update
5 Here is my complete routing information
ack
Thanks for information 6
Routing
Routing Table
Table
converged
EIGRP packet consists of various fields, one is EIGRP packet header and another field
type/length/values type. In IP packet header protocol field is 88, and Multicast address is
224.0.0.10 for EIGRP.
EIGRP header consists of version, Opcode, checksum, flag, sequence, acknowledgment, and the
autonomous system as shown in table 1.5.
0 7 8 16 24 31
15 23
Flag
Sequence
Page |
Acknowledgment
Autonomous system
The important parameters are represented by bold words in EIGRP header. The opcode in
EIGRP header represents the packet type.
Update
Query
Reply
Hello
Page |
0 7 8 16 24 31
15 23
K1 K2 K3 K4
K1 represents bandwidth and K3 represent delay. These two are the parameter which is set to 1
and all other metrics are set to 0 by default. Hold time represent the time after which a route is
selected to be down as shown in table 1.6.
0 7 8 16 24 31
15 23
Next Hop
Delay
Bandwidth
Table 1.7 represents the update use for an internal route in EIGRP domain. Each field in the
above table is self-explanatory.
Hello packets
Update packets
Query packets
Reply packets
Acknowledgment packet
a) Hello packets
These packets are multicast to 224.0.0.10 to form the neighbor relationship between the
routers.
b) Update packets
When there are changes come up in the topology of the network then the router sends
update packets to the multicast address. These packets are also unicasted to newly router
in the network.
c) Query packets
Query packets are sent by the router to the neighbor router to provides the alternative
route to any network which is no more accessible from the sender router. Query packet is
multicast to the 224.0.0.10.
d) Reply packets
These packets are sent in the response of the query packet only when there is an
alternative route to the destination network.
There are five different metrics on which EIGRP can decide the best route to the destination
network.
Page |
Delay MTU
By default, bandwidth and delay metricsare used and other metrics are set to off state. Other
metrics can be turned on by the network administrator.
As we know that only K1 and K3 are 1 and other are zero for default condition and the formula
simplifies as,
Following command are used in global configuration mode to configure EIGRP as shown in fig
1.6.
On Router A
The first command configures the EIGRP process on router A, 10 represent the autonomous
system. The router under the same autonomous system will form a neighbor relationship with
each other.
The second command represents the network to be advertised and also help in forming a
neighbor relationship. The interface which is configured with the network advertised is allowed
to form a neighbor relationship with the adjacent routers.
Page |
On Router B
A S0 192.168.10.0/24 C
S0
S1
E0 S1
192.168.11.0/24 192.168.12.0/24
E0
B
On Router C
1.5 OSPF
1.5.1 Introduction
OSPF is a standard link state protocol. OSPF is used where there is a large network.
It is a link state routing protocol which is based on well-known Dijkstra Shortest Path
First algorithm
OSPF make neighbor the directly connected routers and send updates on them
OSPF advertises LSA (link state advertisement) to maintain the LSD
OSPF sends triggered updates when there is any change in link or update and also send
periodic updates after every 30 minutes.
Page |
OSPF sends traffic to multicast address 224.0.0.5 (all OSPF router) or 224.0.0.6 (in case
of DR)
It is classless protocol and supports CIDR and VLSM
Administrative distance in case of OSPF is 110 which is less than routing RIP. The
administrative distance for different routing table is shown in the table
Metric for OSPF is ‘cost’ which can be calculated by the bandwidth of the link
There are three types of the routing table in the OSPF
o Neighbor table
o Topology table
o Routing table
The neighbor table consists of a list of neighboring routers, topology table consists of all
the routes to the all the network in the OSPF area, routing table possess only the best
route to known networks
Default administrative distances are shown in table 1.8.
Connected 0
Static 1
External BGP 20
Internal EIGRP 90
IGRP 100
RIP 120
OSPF 110
IS-IS 115
5.1
5.2
5.3
5.4
5.5
5.6
5.7
The OSPF data is encapsulated in a packet. There are five types of OSPF packets.
In OSPF message IP Packet Header consist of source IP address, destination IP address, for
multicast address destination address is 224.0.0.5 or 224.0.0.6. Protocol field must contain 89
for OSPF. OSPF Packet Header type code for OSPF packet type, router-id and area id of sender
router.
0x01 Hello
0x02 Database Description
0x03 Link State Request
0x04 Link State Update
0x05 Link State Acknowledgement
Page |
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet
Header Data
Hello, the packet has various parameters within it. To become neighbor router must match these
parameters which are
Hello Interval
Dead Interval
Area ID
Authentication
Password
Subnet mask
Stub area flag
Router ID
Router priority
DR
BDR
Network mask
Designated router
List of neighbors
When a routerreceives a hello packet then it confirms that there is another OSPF router on that
interface. OSPF then make both the router neighbor of each other. For the neighborrelationship,
they must agree upon the parameter which is given in table 1.9.
Hello, interval describes after how long OSPF send hello packets. By default, OSPF sends hello
packet after every 10 second on point to point segment and after 30 second on NBMA.
The dead interval is time, in which if a router doesn’t receive any hello message from neighbor
then this neighbor is considered ‘down’. By default, its value is 120 second.
To reduce the amount of traffic on multi-access network OSPF select a router as designated
router who update all other routers. BDR take observation of DR to become DR in case of
failure.
Link state update consists of different link state advertisements which make the database similar
on all the router in an area.
Type 1 (Router LSA) This LSA is generated by each and every router available on
the local area. This advertisement consists of link local to the router and cost of those
links.
Type 2 (Network LSA) Designated router to generate this LSA to those routers which
are connected to it.
Page |
Type 3 (Network summary LSA) This LSA makes the inter-area communication
possible. This LSA is originated by area border routers.
Type 4 (ASBR summary) This type of LSA are generated by area border router to its
own local network. This type of LSA contains the IP address of ASBR which help the
internal router to find the exit path from the autonomous system.
Type 5 (External LSA) This type of LSA are generated by ASBR which are
flooded into each area of OSPF. These LSAs contain the path information to network
outside the autonomous system.
There are other LSA which are beyond the scope of this chapter.
Using OSPF routing protocol single autonomous system is divided into multiple areas. OSPF
traffic can be inter-area traffic, intra-area traffic or external. To handle different type of traffic
we have a different type of OSPF routers.
a) Internal Router
b) Area Border Routers
c) Backbone Routers
d) Autonomous System Border Router
a) Internal Routers:
Those router having all the interface belongs to a single area are called internal router to
this area. Internal routers generate LSA 1 and LSA 2. All internal router belong to the
same area will have the same topology table. In fig 1.7 router A and router B are internal
routers to area 1 and area 2.
c) Backbone Routers:
The router which contains minimum one interface in area 0 is called a backbone router.
In fig 1.6 router A and router B is a backbone router.
The router which is placed between two different autonomous systems, use to
communicate between these routers. In fig 1.7 router D is ASBR.
OSPF C RIP
D E
A
Area 0 Area 1
B
Autonomous system 10 Autonomous sys 20
Different areas are used in OSPF to control the flow of LSAs in OSPF domain which help in
management.
a) Standard Area:
There is no limitation to any type of LSA to propagate in this type of area. A router in
this area share the LSA 1 and 2 and maintain the topology table synchronized with each
other. LSA 3 and 4 can flood into a standard area which helps for inter-area
communication. LSA 5 also can propagate into the standard area to communicate outside
the autonomous system. Configuration command for the standard area is
b) Stub Area:
There is no restriction on LSA 1 and LSA 2 within the stub area, but LSA 4 and LSA 5
are restricted to enter the stub area. A stub area is used to reduce the size of the topology
table for efficiency. This type of area is used to reduce the bandwidth usage and CPU
process. Instead of exterior routes, ABR will automatically inject a default route, so the
internal router can reach the network outside the autonomous system. ABR will act as
next hop for default routes for internal routers. Area 0 cannot become stub because the
stub area has only one exit point but the backbone area is used as a transit area between
other areas.
In totally stub area only LSA 1 and LSA 2 are allowed to propagate and other LSAs can’t
be flooded. Reason to make an area totally stub is to conserve the bandwidth and
processing. Thus the number of LSAs become lesser, hence produce less overhead. The
area border router injects a default route to TSA and the router use this default route to
access the other area routers and external networks. To form an area totally stub same
command use as stub area command only border router is configured with extra
command i.e.
Router(config)#router ospf 1
Router(config-router) # network 20.0.0.0 0.255.255.255 area 10
Router(config-router) # area 1 stub no-summary
Page |
Area 1 Area 2
A
C
D
B C J
E F
C C
G External Networks
External Networks I
C A H
Area 0
In NSSA only LSA 1, LSA 2, and LSA 7 are allowed to flood. LSA 1 and LSA 2 form
the topology table in topology table LSA 7 is used to introduce the external route to the
area by converting them to LSA 7, this action is performed by ASBR. LSA 7 are not
directly forwarded to other areas by ABR, first LSA 7 is converted to LSA 5. In area 2 is
formed as NSSA then ASBR router J will inject external routes by converting them into
LSA 7 but when router F send this type of LSA first convert them into LSA 5.
To configure an area with NSSA following command are used, which must be
implemented on all the routers in NSSA areas.
The area 1 NSSA command must be applied to all routers in the NSSA area
In fig 1.8 router I will act as ASBR and transmit the LSA 7 into the NSSA area 0. But
the router E and F will this update in the form of LSA 5 into area 1 and area 2.
TNSSA is similar to NSSA, in TNSSA external routes are allowed in the form of LSA 7
but only when it is generated by ASBR.
The configuration of TNSSA is very simple it is same as NSSA only with the exception
that ABR is configured with the following command
All other routers in the TNSSA area are configured with the command same as NSSA.
It is the only exterior gateway protocol using in today world. Border gateway protocol is used to
communicate between different autonomous systems. Border gateway protocol is used because
it can handle a very large number of routes, which can’t be handled by IGPs.Border gateway
protocol comes with different versions but today version 4 is being used. It is a path vector
routing protocol that is the backbone of the internet. Border gateway routing protocol uses TCP
Port 179 for work. BGPv4 is a classless routing protocol and support CIDR.
The main difference between interior and exterior gateway routing protocol is that interior
gateway routing protocol focuses on shortest path manipulation but exterior gateway routing
protocol concentrate to just find the path to the destination.
When border gateway is used within an autonomous system then BGP is said to be IBGP. When
BGP is used to communicate between two different autonomous systems then BGP is said to
EBGP.
Interior gateway routing protocol is used in a transit autonomous system. Transit autonomous
system is used to connect the two different autonomous systems. If we did not use IBGP we
would have to use redistribution which will become a more complex process.
BGP share it routing information to its neighbor only just like other IGPs. In BGP you have
manually configured the neighbor opposite to IGP which form neighbor adjacencies
dynamically.
There are
In fig 1.8 router A and router B in the same autonomous system (AS-10) form an IBGP
relationship with each other. Router B and router G in the different autonomous system hasan
EBGP relationship with each other.
To make the neighbor relationship between two routers following command is used
iBGP iBGP
D
B C
G P
eB
eB
GP
E F
C C
G
iBGP
A H
Autonomous sys
30
There are four types of messages forwarded between the BGP peers.
Open
Update
Notification
Keep alive
When TCP connection is established then the open message is sent at the start. The open
message consists of the following information to initiate the TCP session.
Information Size
a) BGP version
The BGP OPEN message's Version field represent the BGP version using in the sender
router.
b) AS-number
This field represents the autonomous system number of the sender router this field also
decides whether BGP session is interior or exterior.
This field after how long a session should terminate, when Hold down time approaches to
zero then the router learns from BGP neighbor is removed. When any type of message
update or keepalive is received then this timer is reset to zero.
d) BGP identifier
BGP identifier of any router is same as router-id in OSPF. The process of selection of the
router-id is same, the highestIP address in the loopback interface is selected as the BGP
Page |
identifier. If there doesn’t exist any loopback interface, then selection process applies on
interface IP address.
It represents the size of the optional parameter field. The size of the optional parameter
varies according to conditions and type of the message to be sent.
f) Optional parameters
This field various optional parameter like authentication, multiprotocol support, etc.
The update message is used to transfer the routing information between BGP peers. The Update
message is used to develop the information of various Autonomous system. The update message
isused to update the BGP route table. When BGP session is started then update messages are
transferred from one BGP peer to another BGP peer.
An update message determines the feasibility of the route whether to keep or withdraw any route
from the BGP route table. Update message has fixed sized BGP header and the other field.
This 2-bytes unsigned integer number determines the complete length of the Withdrawn
Routes field in bytes. Withdrawn routes are the routes which are down or no longer
reachable.
A value of 0 in an unfeasible route length shows that withdrawn routes field is empty in
this UPDATE message.
Withdrawn Routes:
The list of IP address prefixes for the routes that are withdrawn from services is
contained by the variable length field. EachIP address prefix encoded as form <length,
prefix>.
If Total Path Attribute Length consists of zero value, then there is neither NLRI or path
attribute present in the in updates message.
Path Attributes:
The path attributes of a variable length sequence are present in every update. The variable
length of each path attribute has a triple <attribute type, attribute length, attribute value>
The IP address prefix is contained by the variable length field. The length in the bytes of
the network layer reachability information is not encoded expressly, but can be calculated
as, Update message length -23 - unfeasible routes length - total path attributes length
where UPDATE message Length is encoded in the fixed size BGP header, Total Path
Attribute Length and Unfeasible Route Length are the qualities encoded in the variable
part of the UPDATE message, and 23 is a joined length of the fixed. Reachability
information is encoded as form <length, prefix> measure BGP header, the Total Path
Attribute Length field, and the Unfeasible Routes Length field.
The BGP notification is sent when an error condition is detected by the BGP process. After
sending the notification message the TCP connection with that BGP peer is closed. Usually, the
BGP process will log this notification with the system log, which helps us to identify the reason
why the BGP session was brought down.
The BGP header (length and type field, fixed 19 bytes which has marker) + Notification message
{Error subcode + Error + Data field (Variable length)}. Data field depends on Error subcode and
Error.
When a notification is received and send, The BGP system log message is displayed on the
console/ vty line are shown in Table 1.11.
6 Cease No subcode
The keep-alive message is used to maintain the connectivity between the BGP neighbors. The
BGP sends a keep-alive message of 19 bytes long at an interval specified by the keepalive
interval timer in the BGP configuration. Keep alive messages are sent periodically (the default is
60 second) to ensure that the remote peer is available. If a router does not receive a keep alive
from a peer for a Hold-time (by default 180 seconds), the router shows that peer is dead. If the
Hold-time is set to zero, then there is no keep alive message is sent between the BGP neighbors.
BGP selects the best path on the basis of different attributes given in table 1.12. In every update
message, the sequence of BGP attributes is variable except that one which carries only
withdrawn routes. When BGP sent any update packet to a peer, it also sent path attributes
associated with the prefix. These path attributes are then used by the BGP to choose the best
route to a destination. BGP attributes are similar to metrics in OSPF and EIGRP in the way it
uses to decide for the best route.
Every attribute is a TLV that which contain that the attribute type, attribute value and attribute
length. Every attribute type contains two octets, the one is for the flag and the other is the type as
defined in the following section. The BGP attributes having different unique types that describe
how the routes are used and propagate a certain attribute to its neighbors. There are four
categories of path attribute.
Page |
Well-known mandatory:
Such types of attributes must be understood by all the BGP routers and must be present in all
BGP update messages.
Well-known discretionary:
These types of attributes must be understood by all BGP routers but they didn’t exist necessarily
in all BGP updates.
Optional transitive:
This sort of attributes doesn’t need to be understood by all BGP peeps, but these attribute will be
passed on to other neighbors.
Optional non-transitive:
This sort of attributes is also optional as its name denotes these attribute will not be passed to
other neighbors.
BGP selects the best on the basis of different attributes which are given in the table below with
the priority.
When there are multiple paths to the same destination then BGP uses an algorithm to select the
best path. Weight has maximum priority, a route with maximum weight will be preferred to any
other route. When there are two routes with the same weight then Local preference will be used
as a tiebreaker. When there are multiple routes with the same weight and Local preference then
originate will select the best path.
S No. Attribute
1 Weight
2 Local Preference
3 Originate
4 AS path length
5 Origin code
6 MED
9 Oldest path
10 Router ID
11 Neighbor IP address
The BGP Multi-Exit Discriminator (MED) that determines the exit point in an autonomous
system. The MED or metric attribute is used as a suggestion to an external AS, regarding the
preferred route into the AS that is advertising the metric. The MED is a non-transitive attribute
Page |
and it is not propagating throughout the internet, but only to an adjacent autonomous
system(AS). The MED is an optional BGP attribute which is used when there are multiple
external points for a single AS. The purpose of the MED is to guide how to 0ther autonomous
system is entered in your autonomous system to reach a certain prefix. The MED attribute has a
value is referred to as a metric. If all other factors are determining the exit point are equal, then
the lowest value or metric of an exit point will be preferred. The MED limited propagation is to
allow directing traffic over the desired link if there are multiple links between two autonomous
systems. If a MED is received an external BGP link, it is propagated over the internal links to
other BGP enabled a device with the AS. The MED attribute is used to choose the best exit point
or route path between the two autonomous systems.
The MED attribute is applied to the outbound interface and it shows the inbound interface in its
autonomous systems. If BGP best path selection by MED attribute, then the lowest MED value is
better and it is selected as the BGP path.
The objective of this project is to configure MED attributes of EBGP and IBGP. When a route
advertisement through an autonomous system (AS), the AS number is added to an ordered list of
AS numbers that the route advertisement has traversed. The MED provides a dynamic way to
influence another AS in the way to reach a certain route when there are multiple entry points of
that AS. Border Gateway Protocol (BGP) follows a systematic procedure for choosing the best
path. Border gateway protocol (BGP) is the protocol that addresses the routing of packets among
different autonomous systems (AS) to connect them. BGP uses the autonomous system number
(ASN) to uniquely identify each system.
The problem statement of MED attribute is, When there are multiple entriespoints to an
Autonomous system (AS) it will be critical for the router to choose the best path to the
destination. The MED is an optional non-transitive attribute that guides external neighbors about
the preferred path into an autonomous system (AS) that has multiple entry points. The MED is
also known as the external metric of a route. The MED attribute provides a mechanism for BGP
Page |
speakers to convey to an adjacent autonomous system (AS) the optimal entry point into the local
autonomous system (AS).
Page |
Chapter 2
Literature Review
Page |
In [4] application of the Border Gateway Protocol on the Internet was discussed which helps in
implementation of BGP on routers. Establishment of the BGP connection is also discussed in the
document. Various topological consideration is also discussed in this document. Properties
regarding circuit management, TCP are also given.
In [5]guidelines for the creation, selection, and registration of an Autonomous System (AS) are
given –when this is implemented on routers help in the selection of an autonomous system.
In [6]RFC 2270, Using a Dedicated AS for Sites Homed to a Single Provider – This document is
still not a standard but a very important document which providesa guideline for the designer to
remove problem regarding single ISP connection.
In [7] RFC2283 Multiprotocol Extensions for BGP-4 – this document contains the routing
information for IPv6 and other important network layer protocols.
In [9]RFC 2918 – Route Refresh Capability for BGP-4 – this document defines when BGP
speaker request BGP router must capable to provide route refresh information.
In [10]RFC 4271, A Border Gateway Protocol 4 (BGP-4) – it consists of methods which support
Classless Inter-Domain Routing (CIDR). It is an advanced version of RFC 1771.
In [11]RFC 3768, Virtual Router Redundancy Protocol – this document provides a method to
overcome the problem in case of disability of any router.
Page |
In [13]RFC 3065, Autonomous System Confederations for BGP – defines an extension to BGP
that can be used to create a confederation of multiple autonomous systems. Administrative and
maintenance cost can be reduced using the implement of this document.
In [14]information about the implementation of MED is given. This document describes the
issue related to MED attribute and BGP. The method of comparing the MED belong to different
ASes.
In [15] this paper elaborates the growth in the route selection regarding BGP. The problem
regarding the routing system and path selection of BGP is described. An algorithm for route
selection was also discussed named BGP-FRP. This algorithm advertises many routes for the
current destination network.
Page |
Chapter 3
Methodology
Page |
Chapter 3 Methodology
2
3.1 Scenario:
As shown in fig 3.1 Router A has an autonomous system (AS) 50, Router B, Router C, and
Router D for under the same autonomous system (AS) 100. Each Router has loopback interface
1. The detail of the autonomous system is given in table 3.1.
Router A 50
Router B 100
Router C 100
Router D 100
The interface, IP address and subnet mask of router A is shown in table 3.2.The basic
configuration of Router B, C and D are shown in table 3.3. 3.4 & 3.5respectively. Router A is
configured only with the border gateway protocol. OSPF is configured on all the Router.1
Page |
Router C, Router B, and Router D are configured with IBGP neighbor relationship. The detail of
the scenario is shown in the block diagram 3.1.
The Router A form configured with EBGP neighbor relationship with Router B and Router C.
Page |
C(config)#router ospf 1
C(config-router)#exit
Chapter 4
Page |
Results
Page |
Chapter 4 Results
1.
2.
3.
4.
5.
6.
After basic BGP configuration on all the four router BGP table will be created on the routers and
best route will be selected according to path attribute criterion. In the next chapter, we will use a
metric attribute to change the best route path to the destination network. The symbol (*>)
represent the best and the valid path to the destination.
On Router A
After basic configuration and BGP configuration Router A will maintain its BGP table a route
with the highest weight will be consider as best. After weight attribute local preference will be
next tie breaker. Best path selection will be carried out according to (Table 1 .13 BGP
Selection Criteria).
Page |
10.10.10.10/32 is local to the autonomous system that’s why has no AS path number.
20.20.20.20/32, 30.30.30.30/32 and 40.40.40.40/32 is advertised from autonomous system 100
and advertised through EBGP relationship.
After basic BGP configuration, on router A 30.30.30.30/32 and 40.40.40.40/32 has best path via
next hop 1.0.0.30.
Page |
B in routing table represent the routes learned from BGP. In routing table of router, prefix
20.20.20.20/32, 30.30.30.30/32 and 40.40.40.40/32 represent the routes learned from BGP.
Where administrative distance for 20.20.20.20/32, 30.30.30.30/32 and 40.40.40.40/32 is 20.
On Router B
After basic BGP configuration of Router B, Router B also maintains it BGP and routing table
which are as,
Page |
On Router C
After basic BGP configuration Router C also maintains it BGP and routing table. Network
30.30.30.30/32 is directly connected to Router C. Network 40.40.40.40/32 and 20.20.20.20/32 is
learned from BGP neighbors. In BGP table ‘i' represents the routes which are advertised in
BGP. All the network in BGP table of the router C have origin attribute with ‘i" mean that each
route learned from BGP is advertised in BGP.
Now we explore the routing of the router C for assessment of the result of BGP configuration.
Network 10.10.10.10/32 is learned from EBGP neighbor which is obvious from its
administrative distance of 20. The next hop for 10.10.10.10/32 is 1.0.0.10.
Page |
On Router D
After basic BGP configuration Router D also maintains it BGP and routing table which are as,
Network 40.40.40.40/32 is directly connected to Router D and has weight of 32768. Network
10.10.10.10/32 is an external network learned from EBGP has two path. With Next Hop
2.0.0.10 it is best path for 10.10.10.10/32. Routing table for Router D is as,
Page |
MED is an optional and non-transitive attribute of BGP. MED help the external neighbor to
select the path to an autonomous system which has multiple exit point. MED attribute is
advertised locally to the autonomous system. Any route with the smallest metric value will be
preferred. In BGP table MED is represented by word metric. Default value of MED is zero.
Here in the given scenario, we have to change the metric value of the particular route which is
selected as the best route.
On Router B
When a specific prefix has same attributes prior to MED in BGP table, then MED will be tie
breaker.
After configuration of BGP configuration 10.10.10.10/32 had best path through Next Hop
2.0.0.10. Now we have configured MED on Router A, BGP table of Router B is as
By MED configuration on Router A 1.0.0.10 is selected as best route for the prefix
10.10.10.10/32 therefore now on Router B, the best route for the network 10.10.10.10/32 is
through Next Hop 1.0.0.10.
The Metric value of the network for Next Hop 1.0.0.10 is 10 which is less than other route. Path
attribute for the same is 50, which mean network is originated from AS 50.
Page |
Network 10.10.10.10/32 is learned through IBGP because the administrative distance for this
network is 200.
On Router C
After configuration of BGP Next Hop 1.0.0.10 was selected as best route due to priority of
EBGP over IBGP. We have also done the same configuration and set the less metric value for
the 1.0.0.10.
After MED configuration, on Router C BGP table remain same just metric value for the prefix
10.10.10.10/32 will change to 10.
Page |
On Router D
After completion of BGP, configuration Router selected the best path to network 10.10.10.10/32
through Next Hop 2.0.0.10. After configuration of MED on Router A BGP table of Router D
will be as,
Router D selected the best path to the network 10.10.10.10/32 through Next Hop 1.0.0.10. Now
the metric value for the same is 10.
Page |
Chapter 5
8.
9.
10.
11.
12.
5.1 Conclusion:
In this work, MED which is an attribute of BGP has been presented. BGP is only inter-
domain routing protocol used various type of attribute to calculate the best path to the destination
network.
The MED provides a dynamic way to influence another AS in the way to reach a certain
route when there are multiple entry points for that AS. BGP follows a systematic procedure for
choosing the best path. There are other important attributes such as weight, local preference,
originate the route, and AS path that is taken into account before considering the MED attribute.
So, if any of these criteria matches, the MED attribute will not be considered.
we discussa various topic related to interior and exterior routing for better understanding of
BGP. Different classes of IP are discussed in this chapter. EIGRP is an interior gateway
protocol used for intra AS routing. EIGRP is an advanceddistance vector routing protocol.
OSPF is another interior gateway routing protocol which is based Dijkstra SPF algorithm also
briefly discussed in this chapter. At last introduction to BGP and its various attribute which were
essential to be illustrated are included.
We have also discussed important work performed by different authors and engineers.
Various book, reports and general have been quoted to give the overview of the work done in the
field of networking. To resolve the given problem, we have purposed the solution. A scenario of
Page |
4 routers is taken for this purpose. First, all the routers are configured with IP address and
OSPF. Then EBGP configuration is deployed on routers. By changing the path attribute of BGP
we have diverted the path of the specified network. Result of the configuration performed on
routers in this project.
Using MED, we can perform path manipulation for any prefix available in an autonomous
system. Whichcan help in better administration? Performance and security issue can be rectified
using better understanding and implementation of these attributes.
The future direction of the work initiated by this thesis can be expanded by considering the
security aspect related to BGP.Security related to AS and BGP router can be ensured using wise
pathmanipulation.
Efficient use of this attribute will reduce the congestion from the link to the speed of the network
will increase, hence the performance of the network can be increased.
A more secure, efficient and reliable network is the need of the today world which can be
ensured by future work on that.
There are other important attributes such as weight, local preference, origin, and autonomous
system (AS) path that is taken into account before considering the MED attribute. So, in future
local preference can also be taken for path management.
Page |
REFERENCES
[2] Y. Rekhter, “RFC 1771; A Border Gateway Protocol 4 (BGP-4),” Internet Engineering
Task Force, 1995.
[3] Doyle and J. D. Carroll, Routing TCP/IP, vol. II, Indianapolis: Cisco Press, 2001.
[4] Y.Rekhter, “RFC 1772; Application of the Border Gateway Protocol in the Internet,”
Internet Engineering Task Force, 1995.
[5] J.Hawkinson, “RFC 1930; Guidelines for creation, selection, and registration of an
Autonomous system,” Internet Engineering Task Force, 1996.
[6] J.Stewart, T.Bates, R.Chandra and E.Chen, “RFC 2270; Using a Dedicated AS for Sites
Homed to a Single Provider,” Internet Engineering Task Force, 1998.
[7] T.Bates, R.Chandra, D.Katz and Y.Rekhter, “RFC 2283; Multiprotocol Extensions for
BGP-4,” Internet Engineering Task Force, 1998.
[8] C.Villamizar, R.Chandra and R.Govindan, “RFC 2439; BGP Route Flap Damping,”
Internet Engineering Task Force, 1998.
[9] E.Chen, “RFC 2918; Route Refresh Capability for BGP-4,” Internet Engineering Task
Force, 2000.
[10] Y. Rekhter, T. Li and S. Hares, “RFC 4271: a Border Gateway Protocol 4 (BGP-4),”
Internet Engineering Task Force, 2006.
[11] R. Hinden, “RFC 3768; Virtual Router Redundancy Protocol (VRRP),” Internet
Page |
[12] T.Bates, E.Chen and R.Chandra, “RFC 4456; BGP Route Reflection An Alternative to Full
Mesh Internal BGP (IBGP,” Internet Engineering Task Force, 2006.
[13] P.Traina, D.McPherson and J.Scudder, “RFC 3065; Autonomous System Confederations
for BGP,” Internet Engineering Task Force, 2001.
[15] A. Cvjetic and A. Smiljanic, “Improving BGP Protocol to Advertise Multiple Routes for the
Same Destination Prefix,” IEEE Communications Letters, vol. 18, pp. 106-109, 2014.
[16] R. Zhang and M. Bartell, BGP Design and Implementation, Indianapolis: Cisco Press,
2003.
[17] P. Loshin, Big Book of Border Gateway Protocol (BGP), Charlottesville: Morgan
Kaufmann, 2009.
[18] R. White, D. Mcpherson and S. Srihari, Practical BGP, Ann Arbor: Addison Wesley, 2007.
[21] I. Gupta, “BIGP- A New Single Protocol that can work as an IGP (Interior Gateway
Protocol) as well as EGP (Exterior Gateway Protocol),” International Journal of Research
in Computer Science, vol. 2, no. 4, pp. 13-17, 2012.
Page |
[22] P. Traina, D. McPherson and J. Scudder, “RFC 5065: Autonomous System Confederations
for BGP,” Internet Engineering Task Force, 2007.
[23] J.Stewart, T. Bates and R. Chandra, “Using a Dedicated AS for Sites Homed to a Single
Provider,” Internet Engineering Task Force, 1998.