Professional Documents
Culture Documents
Bachelor of Engineering
In
Submitted by
R SUJITH 2GI17EC090
PRAJWAL H 2GI17EC075
PRATIBHA PB 2GI17EC081
2
INTRODUCTION
Border Gateway Protocol is the protocol that makes the Internet work. Networks or
autonomous systems that need to interact with each other do so through peering, which
is made possible with BGP.
When one network router is connected to other networks it cannot determine which
network is the best network to send its data to by itself. Border Gateway Protocol
considers all peering partners that a router has and sends traffic to the router that is
closest to the data’s destination. This communication is possible because, at boot, BGP
allows peers to communicate their routing information and then stores that information
in a Routing Information Base (RIB).
Border Gateway Protocol was originally created in 1989 as a quick fix for the Internet
but it has remained the primary protocol for long distance traffic. Since then, however,
cyber threats have evolved and BGP has not kept up.
Border Gateway Protocol abuse is called BGP hijacking which is possible because the
protocol relies on trusting advertised routes. There have been multiple attempts at
making a more secure version of BGP but implementation is extremely problematic.
Most of the new versions are unable to communicate with standard BGP which means
that every AS across the world would have to adopt the new protocol simultaneously.
A few BGP incidents that have taken place in the past include:
In 2004, TTNet, a Turkish Internet service provider (ISP), advertised bad BGP
routes that claimed they were the best destination for all traffic on the Internet.
The issues only lasted one day but many people across the world were unable to
access the Internet.
In 2008, a Pakistani ISP attempted to block Pakistani users from accessing
YouTube by routing traffic to a black hole. The route was accidentally advertised
to neighboring routers which propagated the route across the world. In this
instance, YouTube was only inaccessible for several hours.
In 2018 attackers deliberately created bad BGP routes to redirect traffic meant
for Amazon’s DNS service. By redirecting the traffic to themselves, they were
able to steal $100,000 of cryptocurrency.
3
WORKING
The previous section covers how Border Gateway Protocol allows autonomous systems
to interact; this section will give a small insight into how to actually implement the
protocol and create peering relationships.
One of the most popular networking equipment companies in the world is Cisco.
The below shows how to enable BGP and configure a peer on a Cisco Nexus 7000
series switch.
[enter configuration mode] switch# configure terminal [enable BGP and assign
the ASN 64496] switch(config)# router bgp 64496 [configure the IP and ASN for
a peer] switch(config-router)# neighbor 209.165.201.1 remote-as 64497 [add a
description for the peer] switch(config-router-neighbor)# description Peer
Router B [enter the neighbor address family configuration mode] switch(config-
router-neighbor)# address-family ipv4 unicast [save configuration changes]
switch(config-router-neighbor-af) copy running-config startup-config
Another popular vendor is Juniper Networks which has its own operating system called
Junos OS. The operating system’s command line varies slightly from Cisco’s. To
configure a peering relationship that is the same as the example above you would issue
the following commands:
[enable BGP and assign the ASN 64496] set routing-options autonomous-system
64496 [define the external-peers group and type] set protocols bgp group
external-peers type external [add a neighbor to external-peers] set protocols
bgp group external-peers neighbor 209.165.201.1 peer-as 64497
Examples of Border Gateway Protocol
Border Gateway Protocol use cases can be found anywhere that two networks need to
exchange traffic such as Internet exchange points (IXPs). They can also be found within
a single meshed network where routers need to communicate information to forward
traffic.
ADVATAGES
With the separation of core and edge routing into two routing protocols, your network core
becomes more stable, as the edge problems cannot disrupt the core. This design has been used
very successfully in large enterprise networks with haphazard addressing schemes that defied
attempts at route summarization. It should also be used in almost all service provider
environments. You should never carry your customers' routes in your core routing protocol, as
customer's internal problems could quickly affect the stability of your own network.
I must note that it's amazing what you can see in the field. I saw an ISP running OSPF with its
customers a few years ago. In that setup, a rogue or ignorant customer could have easily
disrupted the whole service provider network.
Please note that you don't have to migrate your routing to BGP if you want to use these
mechanisms. To implement remote blackholes, it's enough that you deploy BGP on strategic
points in your network and link them via BGP sessions with a central router through which you'll
insert the IP addresses to block.
A few technologies completely unrelated to BGP allow you to use these attributes to implement
large-scale designs. For example, Quality-of-Service Policy Propagation with BGP
(QPPB) allows you to set QoS bits for specific BGP destinations based on BGP communities and
other BGP attributes. Similarly, you can control the Web Cache Communication Protocol
(WCCP)-based web caching policy with BGP.
ALGORTIHM
1 .Start.
3. Read the distance between one node to the other for every node.
5. Find the shortest path from the given node to other node and assign the same as
distance.
6. Print the distance from one node to every other node in form of a matrix.
7. Stop.
6
C Program To Simulate
#include<stdio.h>
int main()
{
int b[10][10],n,i,j,k,a[10][10];
printf("\nEnter the number of nodes: ");
scanf("%d",&n);
for(i=0; i<n; i++)
{
for(j=0; j<n; j++)
{
printf("\nEnter the distance between the host %d%d:", i+1,j+1);
scanf("%d",&a[i][j]);
}
}
for(i=0; i<n; i++)
{
for(j=0; j<n; j++)
printf("%d\t",a[i][j]);
printf("\n");
}
for(k=0; k<n; k++)
{
for(i=0; i<n; i++)
{
for(j=0; j<n; j++)
{
if(a[i][j]>a[i][k]+a[k][j])
a[i][j]=a[i][k]+a[k][j];
}
}
}
for(i=0; i<n; i++)
{
for(j=0; j<n; j++)
{
b[i][j]=a[i][j];
if(i==j)
b[i][j]=0;
}
}
printf("\nThe output matrix is:\n");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
7
printf("%d\t",b[i][j]);
printf("\n");
}
return 0;
}
RESULTS/OUTPUT
Border Gateway Protocol use cases can be found anywhere that two networks need to
exchange traffic such as Internet exchange points (IXPs). They can also be found within
a single meshed network where routers need to communicate information to forward
traffic.
ADVATAGES
enterprise markets. Enterprise-focused ISPs have to run BGP from the start to support their
multi-homed customers).
2. Layer 3 VPN services
With the separation of core and edge routing into two routing protocols, your network core
becomes more stable, as the edge problems cannot disrupt the core. This design has been used
very successfully in large enterprise networks with haphazard addressing schemes that defied
attempts at route summarization. It should also be used in almost all service provider
environments. You should never carry your customers' routes in your core routing protocol, as
customer's internal problems could quickly affect the stability of your own network.
I must note that it's amazing what you can see in the field. I saw an ISP running OSPF with its
customers a few years ago. In that setup, a rogue or ignorant customer could have easily
disrupted the whole service provider network.
Please note that you don't have to migrate your routing to BGP if you want to use these
mechanisms. To implement remote blackholes, it's enough that you deploy BGP on strategic
points in your network and link them via BGP sessions with a central router through which you'll
insert the IP addresses to block.
A few technologies completely unrelated to BGP allow you to use these attributes to implement
large-scale designs. For example, Quality-of-Service Policy Propagation with BGP
(QPPB) allows you to set QoS bits for specific BGP destinations based on BGP communities and
other BGP attributes. Similarly, you can control the Web Cache Communication Protocol
(WCCP)-based web caching policy with BGP.