Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 81

Page |

CONFIGURATION OF MULTIPLE EXIT


DISCRIMINATOR ATTRIBUTE OF BORDER
GATEWAY PROTOCOL

(SOFTWARE BASED)
BY

NAUMAN HAIDER 14-FA-57065 SUIT-14-01-007-0024

SAJJAD ALI KHOKHAR 14-FA-57068 SUIT-14-01-007-0027

SAGHEER AHMED 14-FA-57067 SUIT-14-01-077-0026

SUPERVISED BY

ENGR. ALAMGIR SAFI

Session:2014-2018

A Report submitted to the Department of Electronics and Telecom

Sarhad University of Science and Information Technology Peshawar


Page |

in partial fulfillment of the requirement for the degree of B-Tech(E&T)


Page |

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).

__________________ __________________

Head of Department Supervisor

__________________ __________________

Internal Examiner External Examiner


Page |

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.

Date: _____________ Signature of student:

_________________
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.2.1 RULES FOR IP ADDRESSING:..............................................................................3

1.2.2 IPv4 (Internet Protocol Version 4):...........................................................................3

1.2.3 IPv6(Internet Protocol Version 6):............................................................................5

1.3 Routing Protocol...............................................................................................................5

1.3.1 IGP and EGP:............................................................................................................6

1.3.2 Distance-vector routing protocol:..............................................................................7

1.3.3 Working of Distance Vector Routing Protocol:........................................................7

1.4 EIGRP.............................................................................................................................10

1.4.1 Introduction..............................................................................................................10

1.4.2 EIGRP Process:.......................................................................................................11


Page |

1.4.3 EIGRP Message Format:.........................................................................................12

1.4.4 EIGRP Packet Type:................................................................................................14

1.4.5 EIGRP Metrics:.......................................................................................................14

1.4.6 EIGRP Configuration:.............................................................................................15

1.5 OSPF...............................................................................................................................16

1.5.1 Introduction..............................................................................................................16

1.5.2 OSPF Message Encapsulation:................................................................................18

1.5.3 OSPF Hierarchy:......................................................................................................20

1.5.4 OSPF Area Types:...................................................................................................22

1.6 Border Gateway Protocol................................................................................................24

1.6.1 Introduction..............................................................................................................24

1.6.2 BGP message types..................................................................................................26

1.6.3 BGP Attributes:.......................................................................................................30

1.6.4 BGP path selection process with the priority..........................................................32

1.7 MED attribute:................................................................................................................33

1.8 Project Objective:............................................................................................................33

1.9 Problem statement:..........................................................................................................34

Chapter 2 Literature Review....................................................................................................36

Chapter 3 Methodology............................................................................................................39

3.1 Scenario:..........................................................................................................................39

3.2 BGP basic configuration:................................................................................................41

3.3 MED configuration.........................................................................................................47

Chapter 4 Results......................................................................................................................49

4.1 BGP configuration results:..............................................................................................49


Page |

4.2 MED configuration results:.............................................................................................54

Chapter 5 Conclusion and Future Enhancement......................................................................59

5.1 Conclusion:.....................................................................................................................59

5.2 Future Enhancement:......................................................................................................60

References......................................................................................................................................61
Page |

LIST OF TABLES

Table 1.1 Classes and their specification.........................................................................................4

Table 1.2 Transition in Routing Table of Router D.........................................................................8

Table 1.3 Routing table at node A, B, and C after convergence.....................................................9

Table 1.4 Routing table at node D and E after convergence.........................................................10

Table 1.5 EIGRP Message Format................................................................................................12

Table 1.6 EIGRP Parameter TLV..................................................................................................13

Table 1.7 EIGRP internal routes TLV...........................................................................................13

Table 1.8 Default Administrative distance....................................................................................17

Table 1.9 Hello packet format.......................................................................................................19

Table 1.10 Open message format information (BGP)...................................................................27

Table 1.11 Notification message format........................................................................................30

Table 1.12 BGP attributes list........................................................................................................31

Table 1.13 BGP Selection Criteria................................................................................................32

Table 3.1 Routers autonomous system..........................................................................................39

Table 3.2 Router A interface IP address and Subnet Mask...........................................................39

Table 3.3 Router B interface IP address and Subnet Mask...........................................................40

Table 3.4 Router C interface, IP address, and subnet mask..........................................................40

Table 3.5 Router D interface, IP address, and subnet mask..........................................................40


Page |

LIST OF FIGURES

Figure 1.1 Multi-Backbone Internet................................................................................................2

Figure 1.2 Subcategories of Routing Protocol.................................................................................6

Figure 1.3 Interior vs Exterior Gateway Routing Protocol..............................................................6

Figure 1.4 Node Diagram DVRP.....................................................................................................8

Figure 1.5 EIGRP process timeline...............................................................................................11

Figure 1.6 EIGRP configuration....................................................................................................16

Figure 1.7 OSPF Router types.......................................................................................................21

Figure 1.8 OSPF Hierarchy...........................................................................................................23

Figure 1.9 EBGP and IBGP...........................................................................................................26

Figure 3.1 Block diagram..............................................................................................................41


Page |

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?

BGP[2]is a protocol which offers loop-free routing connection between organizational


networks. BGP work on reliable TCP[3] which is connection-oriented protocol. BGP assumes
the internet as the interconnection of ASes.

AS are classified into three types:

 Stub Autonomous System (AS)


 Multi-homed AS
 Transit-AS

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 |

Figure 1.1 Multi-Backbone Internet

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.

1.2.1 RULES FOR IP ADDRESSING:

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 |

1.2.2 IPv4 (Internet Protocol Version 4):

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.

An IP address is a unique identification number which is given to a computer or node. An IP


address is 32-bits logical address number more over we divide a 32-bits into four periods/octets.
In the 32-bits IP address or four octets, every octet is a binary number which is 0 or 1. One octet
is 8-bits long.

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.

There are 5 classes of IPv4 shown in table 1.1.

Table 1.1 Classes and their specification

CLASS ADDRESS RANGE USAGE

A 0.0.0.0 to 127.255.255.255 Very large network

B 128.0.0.0 to 191.255.255.255 Medium network

C 192.0.0.0 to 223.255.255.255 Small network

D 224.0.0.0 to 239.255.255.255 Multicast

E 240.0.0.0 to 247.255.255.255 Experimental


Page |

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.

The TCP/IP protocol is used mostly because it is an acknowledgment.

1.2.3 IPv6(Internet Protocol Version 6):

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.

1.3 Routing Protocol

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.

Routing Protocol is divided into two main categories.

I) Interior Gateway Protocol

ii) Exterior Gateway Protocol

These protocols are further divided into subcategories.


Page |

Fig 1.2 will elaborate on the types of routing protocols.

Figure 1.2 Subcategories of Routing Protocol

1.3.1 IGP and EGP:

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

I. Distance Vector Routing Protocol


II. Link state routing protocol

Figure 1.3 Interior vs Exterior Gateway Routing Protocol


Page |

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.

1.3.2 Distance-vector routing protocol:

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).

1.3.3 Working of Distance Vector Routing Protocol:

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.

 Information to be shared (format of the packet)


 Response to any message
 When to send any messageEach node maintains its own routing table. Routing table
consists of three components, destination, estimated the cost to the destination and next
hop via which data is to be sent for the destination.
Page |

Figure 1.4 Node Diagram DVRP


The DVRP use the following formula for the best cost path to the destination.

dx(y)=minv{current estimate, c(x,v)+dv(y)} (1.1)

where dx(y) is a minimum distance from x to y node.

And minvrepresent equation to use for all of the x neighbors. v is a number of x’s neighbors.

Table 1.2 Transition in Routing Table of Router D

Destination Cost Next Hop

Initial Routing Table at D

B 6 B

C 5 C

E 1 E

Final Routing Table at D

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.

Table 1.3 Routing table at node A, B, and C after convergence

Destination Cost Next Hop


Routing table at node A
B 1 B
C 3 C
D 5 C
E 6 C
Routing table at node B
A 1 A
C 4 C
D 5 A
E 7 D
Routing table at node C
A 3 A
B 4 B
D 2 D
E 3 D
Page |

Table 1.4 Routing table at node D and E after convergence

Destination Cost Next Hop

Routing table at node D

A 5 C

B 6 B

C 2 C

E 1 E

Routing table at node 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.

Following are the properties of EIGRP

 It is an advanced version of IGRP


 It is an advanced distance vector routing protocol
 The administrative distance for EIGRP is 90
 Hop count of 255 is supported
 Use the best methodology for loop prevention

1.4.2 EIGRP Process:

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
 

Figure 1.5 EIGRP process timeline


1.4.3 EIGRP Message Format:

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.

Table 1.5 EIGRP Message Format

0 7 8 16 24 31
15 23

Version Opcode Checksum

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 |

Table 1.6 EIGRP Parameter TLV

0 7 8 16 24 31
15 23

Type = 0x0001 Length

K1 K2 K3 K4

K5 Reserved Hold Time

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.

Table 1.7 EIGRP internal routes TLV

0 7 8 16 24 31
15 23

Type = 0x0102 Length

Next Hop

Delay

Bandwidth

MTU Hop Count

Reliability Load Reserved

Prefix Length Destination


Page |

Table 1.7 represents the update use for an internal route in EIGRP domain. Each field in the
above table is self-explanatory.

1.4.4 EIGRP Packet Type:

There are generally five types of EIGRP packets.

 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.

1.4.5 EIGRP Metrics:

There are five different metrics on which EIGRP can decide the best route to the destination
network.
Page |

 Bandwidth  Load  Reliability

 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.

The formulae that decide the path is given as,

[K1 * bandwidth * 256 + (K2 * bandwidth) / (256 - load)

+ K3 * delay * 256] * [K5 / (reliability + K4)]

As we know that only K1 and K3 are 1 and other are zero for default condition and the formula
simplifies as,

[bandwidth + delay] *256

1.4.6 EIGRP Configuration:

Following command are used in global configuration mode to configure EIGRP as shown in fig
1.6.

On Router A

Router A(config) # router eigrp 10

Router A(config-router) # network 192.168.10.0 0.255.255.255

Router A(config-router) # network 192.168.11.0 0.255.255.255

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

Router B(config) # router eigrp 10

Router B(config-router) # network 192.168.11.0 0.255.255.255

Router B(config-router) # network 192.168.12.0 0.255.255.255

 A S0  192.168.10.0/24  C
S0

S1
E0 S1
 192.168.11.0/24  192.168.12.0/24
E0
 B

Figure 1.6 EIGRP configuration

On Router C

Router C(config) # router eigrp 10

Router C(config-router) # network 192.168.10.0 0.255.255.255

Router C(config-router) # network 192.168.12.0 0.255.255.255

1.5 OSPF
1.5.1 Introduction

OSPF is a standard link state protocol. OSPF is used where there is a large network.

Following are the properties of OSPF routing protocol

 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.

Table 1.8 Default Administrative distance

Connected 0

Static 1

EIGRP summary route 5

External BGP 20

Internal EIGRP 90

IGRP 100

RIP 120

OSPF 110

IS-IS 115

External EIGRP 170

Internal BGP 200


Page |

5.1

5.2

5.3

5.4

5.5

5.6

5.7

1.5.2 OSPF Message Encapsulation:

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.

Code for OSPF type areas:

 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

Detail of OSPF Packet areas:

1. Hello: use to create a neighbor relationship between OSPF routers


2. Database Description (DBD): It Comprises the list of the sending router’s link-state
database and receiving routers compare it with local link-state database
3. Link-state request (LSR): It is requested for further information about an entry in the
database description
4. Link-state update (LSU): To respond LSRs as well as to convey new information
5. Link-state acknowledgment LSAck): Confirmation of an LSU

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

Hello packet is some other parameter, which are

 Router ID
 Router priority
 DR
 BDR

Table 1.9 Hello packet format


Page |

Network mask

Hello Interval Option Router priority

Router dead interval

Designated router

Backup 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.

Link state advertisement is of various types

 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.

1.5.3 OSPF Hierarchy:

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.

b) Area Border Routers:

Area Border Routers provide inter-area communication. Area border is a router


containing a minimum of two interfaces in different OSPF area. Area border router
generates LSA 3 and LSA 4. In fig 1.6 router B is ABRs.
Page |

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.

d) The autonomous system border 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

Figure 1.7 OSPF Router types

1.5.4 OSPF Area Types:

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

Router(config)# router ospf 1


Page |

Router(config-router) # network 20.0.0.0 0.255.255.255 area 10

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.

The configuration of stub areas is

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

c) Totally Stub Area:

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.

Configuration of totally stub areas is

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

Figure 1.8 OSPF Hierarchy

d) Not So Stubby Area:

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.

Router(config)# router ospf 1

Router(config-router) # network 20.0.0.0 0.255.255.255 area 1

Router(config-router) # area 1 nssa


Page |

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.

e) Totally Not So Stub Area:

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

Router(config)# router ospf 1

Router(config-router) # network 20.0.0.0 0.255.255.255 area 1

Router(config-router) # area 1 nssa no summary

All other routers in the TNSSA area are configured with the command same as NSSA.

1.6 Border Gateway Protocol


1.6.1 Introduction

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.

Border gateway routing protocol has mainly come in two types

 Interior gateway routing protocol (IBGP)


 Exterior gateway routing protocol (EBGP)
Page |

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.

Autonomous system number is assigned to an enterprise network allocated by IANA. Previously


for several years, 16 Bit autonomous system number used but today due to a shortage in
autonomous number a 32 Bit autonomous system number is being used.

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 start the BGP process on any router following command is used

Router(config)# router bgp<as-number>

To make the neighbor relationship between two routers following command is used

Router(config)# neighbor <ip-address> remote-as <as-number>

To advertise any network in BGP following command is used

Router(config)# network <network-id> mask <subnet-mask>


Page |

Autonomous sys Autonomous sys


10 20
 A
 C

iBGP iBGP
D
 B C
G P

eB
eB

GP
 E F 
C C
G

iBGP
A H

Autonomous sys
30

Figure 1.9 EBGP and IBGP

1.6.2 BGP message types

There are four types of messages forwarded between the BGP peers.

 Open
 Update
 Notification
 Keep alive

Following is the detail of the above-mentioned messages.

1.6.2.1 Open Message Format

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.

Table 1.10 Open message format information (BGP)


Page |

Information Size

BGP version (8 bits)

AS number (16 bits)

Hold down timer (16 bits)

BGP identifier (32 bits)

Optional parameters length (8 bits)

Optional parameter (variable bytes)

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.

c) Hold down timer

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.

e) Optional parameter length

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.

1.6.2.2 Update message format:

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.

Unfeasible route length;

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>.

Total Path Attribute Length (2 bytes):


This field in update message represents the total of the path Attribute field. And this field
consists of two bytes. The length of the network layer reachability field of its value must
be allowed to determine as,
Page |

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>

Network Layer Reachability Information(variable):

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.

1.6.2.3 Notification message format:

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 an error is occurred or detected, Then the BGP session is closed.

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.

Table 1.11 Notification message format


Page |

Error Error Sub-code

1 Message Header 1-Connection not synchronized

2 Open 1-Unsupported Version

3 Update 1-Malformed attribute list

4 Hold Timer No subcode


Expired
5 Finite State Error No subcode

6 Cease No subcode

1.6.2.4 keepalive message format:

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.

1.6.3 BGP Attributes:

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 BGP attribute types:

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.

Table 1.12 BGP attributes list

Category Attribute name


Well-known mandatory origin
as-path
next Hop
Well-known discretionary Local-pref
Atomic-Aggregate
Optional transitive Aggregator
community
Optional non-transitive Multi-exit-disc (MED)
Originator-ID
The list of path attributes is used by each BGP router along the path to compared different
network paths and select the ones to move to the BGP table to the routing table.

BGP Path Selection Process:


Page |

BGP selects the best on the basis of different attributes which are given in the table below with
the priority.

1.6.4 BGP path selection process 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.

Table 1.13 BGP Selection Criteria

S No. Attribute

1 Weight

2 Local Preference

3 Originate

4 AS path length

5 Origin code

6 MED

7 EBGP path over IBGP path

8 Shortest IGP path to BGP next hop

9 Oldest path

10 Router ID

11 Neighbor IP address

1.7 MED attribute:

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.

1.8 Project Objective:

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.

1.9 Problem statement:

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 |

Chapter 2 Literature Review


In [2] basic information related to the implementation of BGP on the internet was given
which is very helpful in understanding the BGP protocol. This document also defines the format
of the message which was shared between different BGP peers. Notification, keepalive, and open
message format are clearly elaborated in this document.

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 [8]communication between ASes is discussed. How to message update is shared between


routers is clearly described in this document. Path attributes take the role in path selection
criteria. When a primary route fails then the second route is used. It also defines an algorithm
which is used to reduce the routing traffic volume which flows between BGP peers. This BGP
feature is being used commercially.

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 [12]RFC 4456, BGP Route Reflection: An Alternative to Full-Mesh IBGP – it is an advanced


version of RFC 2791. This document is used to employ IP source address spoofing. The
practice of this document help in incoming traffic filtration.[13]

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.

Table 3.14 Routers autonomous system

Router Autonomous system

Router A 50

Router B 100

Router C 100

Router D 100

Table 3.15 Router A interface IP address and Subnet Mask

Interface IP address Subnet Mask

Serial 2/0 1.0.0.10 255.0.0.0

Serial 2/1 2.0.0.10 255.0.0.0

Loopback 1 10.10.10.10 255.255.255.255

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.

Table 3.16 Router B interface IP address and Subnet Mask

Interface IP address Subnet Mask

Serial 2/0 3.0.0.20 255.0.0.0

Serial 2/1 2.0.0.20 255.0.0.0

Loopback 1 20.20.20.20 255.255.255.255

Table 3.17 Router C interface, IP address, and subnet mask

Interface IP address Subnet Mask

Serial 2/0 1.0.0.30 255.0.0.0

Serial 2/1 4.0.0.30 255.0.0.0

Loopback 1 30.30.30.30 255.255.255.255

Table 3.18 Router D interface, IP address, and subnet mask

Interface IP address Subnet Mask

Serial 2/0 3.0.0.40 255.0.0.0

Serial 2/1 4.0.0.40 255.0.0.0

Loopback 1 40.40.40.40 255.255.255.255

The Router A form configured with EBGP neighbor relationship with Router B and Router C.
Page |

Figure 3.10 Block diagram


Page |

3.2 BGP basic configuration:

Basic configuration of Router A:


Page |

Basic configuration of Router B:


Page |
Page |

Basic configuration of Router C:


Page |

Basic configuration of Router D:

Configure OSPF on Router B:


Page |

Configure OSPF on Router C:

C(config)#router ospf 1

C(config-router)#network 1.0.0.0 0.255.255.255 area 0

C(config-router)#network 4.0.0.0 0.255.255.255 area 0

C(config-router)#exit

Configure OSPF on Router D:

Configure EBGP on Router A:


Page |

Configure EBGP on Router B:

Configure IBGP on Router B:

Configure EBGP on Router C:

Configure IBGP on Router C:


Page |

Configure IBGP on Router D:

3.3 MED configuration

CREATING ACCESS LIST ON ROUTER-A:


Page |

CREATING ROUTE-MAP ON ROUTER-A:

APPLYING ROUTE-MAP TO NEIGHBORS:

Chapter 4
Page |

Results
Page |

Chapter 4 Results
1.

2.

3.

4.

5.

6.

4.1 BGP configuration results:

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 |

Network 20.20.20.20/32, 30.30.30.30/32 and 40.40.40.40/32 are local to autonomous system


number 100. 10.10.10.10/32 is learned from AS-50 through BGP has two path one through
1.0.0.10 and other through 2.0.0.10. Network through 2.0.0.10 is best route.

20.20.20.20/32 is directly connected neighbor to the Router B. 30.30.30.30/32 and


40.40.40.40/32 is learned through IBGP and has administrative distance of 200. 10.10.10.10/32
is learned through EBGP and has administrative distance of 20.

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.

30.30.30.30/32 has weight of 32768 because it is directly connected network to router C.


Page |

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 |

4.2 MED configuration results:

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.

The results of the preformed configuration are given below.

BGP TABLE OF ROUTER-B, C AND D:

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 |

Network 10.10.10.10/32 has administrative distance of 20 because it is learned from BGP.

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 |

Now we explore the routing table of Router D.

Network 10.10.10.10/32 is learned through IBGP neighbor, therefore, it has an administrative


distance of 200. And the Next Hop for the same is 1.0.0.10 which was earlier 2.0.0.10 before
MED configuration on Router A.
Page |

Chapter 5

Conclusion and Future


Enhancement
Page |

Chapter 5 Conclusion and Future Enhancement


7.

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.

5.2 Future Enhancement:

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

[1] C. Huitema, Routing in the Internet, Prentice Hall, 2000.

[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 |

Engineering Task Force, 2004.

[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.

[14] D. McPherson, “RFC 4451: BGP MULTI_EXIT_DISC (MED) Considerations,” Internet


Engineering Task Force, 2006.

[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.

[19] T. Support, “cisco,” 2019. [Online]. Available:


https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13759-
37.html. [Accessed 10 july 2019].

[20] H. Garden, “HowStuffWorks,” 2019. [Online]. Available:


https://computer.howstuffworks.com/internet/basics/internet-infrastructure5.htm. [Accessed
10 july 2019].

[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.

You might also like