Sei sulla pagina 1di 7

BGP (Border Gateway Protocol)

BGP is a complex, advanced distance Exterior Gateway Protocol (EGP), BGP exchange routing
information between Autonomous Systems (ASs).

Unlike Interior routing protocols such as RIP, EIGRP, and OSPF that run inside a companys
network, BGP uses a different basic algorithm for building a loop-free topology than any of the
above mentioned protocols.

BGP is especially used for exchanging routing information between all of the major Internet
Service Providers (ISPs), as well between larger client sites and their respective ISPs. And, in
some large enterprise networks, BGP is used to interconnect different geographical or
administrative regions.

BGP is Primarily used to support the complexity of the public Internet, Cisco has added several
clever and useful features to its BGP implementation (BGP 4). Some of the primary attributes of
BGP is the use of pieces of information about a known route, where it came from, and how to
reach it, A BGP router will also generate an error message if it receives a route that is missing
these are mandatory attributes.

Clients/ Corporate Networks being connected by BGP

Types of BGP

There are different terms used when describing BGP. these including:

1.Internal BGP (iBGP) operates inside an autonomous System (AS)


2. External BGP (eBGP), which is also known as an interdomain routing protocol, operates
outside an AS and connects one AS to another. These terms are just used to describe the same
protocol just the area of operation is what differs.

Autonomous Systems (AS)


An autonomous system can be a company, ISP or an entire corporate network comprised of
multiple locations connecting to the network. Each autonomous System (AS) uses BGP to
advertise routes in its network that need to be visible outside of the network; it also uses BGP to
learn about the reachability and routes by listening to advertisement announcements from other
autonomous systems. Each of these enterprise network, commercial enterprise or ISP must be
identified by an autonomous system number (ASN). This number allows a hierarchy to be
maintained when sharing route information.

There are 65,535 (from 0to 65,535) available autonomous system numbers that can be assigned.
BGP assigns 64,512 - 65,534 ASNs to be private. Being private means this ASN connect to only
one other ASN (sometimes multiple ASN) and these ASNs cant cause loop by themselves

Characteristics of BGP-4

The key features of BGP-4 include and not limited to these:


It is an advanced distance-vector protocol.
BGP sends full routing updates at the start of the session, trigger updates are sent afterward.
BGP maintains connection by sending periodic keepalives.
It creates and maintains connections between peers, using TCP port 179.
BGP sends a triggered update when a keepalive, an update, or a notification is not received
It has its own routing table, although it is capable of both sharing and inquiring of the
interior IP routing table.
BGP uses a very complex metric, and is the source of its strength. The metric, referred to as
attributes, allows great flexibility in path selection.

External Border Gateway Protocol (eBGP).

External Border Gateway Protocol (eBGP) is a BGP term or process used that refers to BGP
peers or neighbors that are in a different Autonomous System and Number (ASN).

In other words, eBGP is used to exchange route information between different autonomous
systems. When only one link connects two autonomous systems, the IP addresses of the
connected interfaces are used to establish a BGP session between the two. You can use any other
IP address on the interfaces, but the address must be reachable without using internal Gateway
Protocol IGP configuration.

There are basic needs to be met when using eBGP to inject routes owned by one Autonomous
System (AS) through the enterprise network and into another AS, such as:

i, A local routers ASN must match the neighboring routers reference to that ASN, also its
neighbor remote-as asn command.
ii, The neigboring BGP router IDs must not be the same..
iii, Each BGP neighboring router must be part of a TCP connection with each other. The remote
or neighboring routers IP address used in that TCP connection must match with the local router
configuration in a BGP neighbor remote-as command.
Example topology:

The Configuration:

R1>enable
R1#config t
R1(config)#interface se0/0/0
R1(config-if)#iip address 192.168.100.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router bgp 556
R1(config-router)#neighbor 192.168.100.2 remote-as 255
R1(config-router)#end
R1#

R2>enable
R2#config t
R2(config)#interface se0/0/0
R2(config-if)#iip address 192.168.100.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router bgp 255
R2(config-router)#neighbor 192.168.100.1 remote-as 556
R2(config-router)#end
R2#
R1 and R2 belong to different autonomous systems 556 and 255, respectively.
The peer relationship between R1 and R2 in the above example is established because; R1
peering IP address is in the same subnet as its own physical interface.

When BGP neighbor are not directly connected, you will have to use the eBGP
multichip command to establish connectivity.

External Border Gateway Protocol (eBGP).

External Border Gateway Protocol (eBGP) is a BGP term or process used that refers to BGP
peers or neighbors that are in a different Autonomous System and Number (ASN).

In other words, eBGP is used to exchange route information between different autonomous
systems. When only one link connects two autonomous systems, the IP addresses of the
connected interfaces are used to establish a BGP session between the two. You can use any other
IP address on the interfaces, but the address must be reachable without using internal Gateway
Protocol IGP configuration.

There are basic needs to be met when using eBGP to inject routes owned by one Autonomous
System (AS) through the enterprise network and into another AS, such as:

i, A local routers ASN must match the neighboring routers reference to that ASN, also its
neighbor remote-as asn command.
ii, The neigboring BGP router IDs must not be the same..
iii, Each BGP neighboring router must be part of a TCP connection with each other. The remote
or neighboring routers IP address used in that TCP connection must match with the local router
configuration in a BGP neighbor remote-as command.
Example topology:
The Configuration:

R1>enable
R1#config t
R1(config)#interface se0/0/0
R1(config-if)#iip address 192.168.100.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router bgp 556
R1(config-router)#neighbor 192.168.100.2 remote-as 255
R1(config-router)#end
R1#

R2>enable
R2#config t
R2(config)#interface se0/0/0
R2(config-if)#iip address 192.168.100.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router bgp 255
R2(config-router)#neighbor 192.168.100.1 remote-as 556
R2(config-router)#end
R2#

R1 and R2 belong to different autonomous systems 556 and 255, respectively.


The peer relationship between R1 and R2 in the above example is established because , R1
peering IP address is in the same subnet as its own physical interface.

When BGP neighbor are not directly connected, you will have to use the eBGP
multihop command to establish connectivity.
Setting IP router
Router 0 se2/0 192.168.10.1 ; fa0/0 192.168.1.1
Router 1 se2/0 192.168.10.2 ; se3/0 192.168.20.1 ; fa0/0 192.168.2.1
Router 2 se2/0 192.168.20.2 ; fa0/0 192.168.3.1

Setting IP komputer (PC)


PC0 192.168.1.2 ; gateway 192.168.1.1
PC1 192.168.2.2 ; gateway 192.168.2.1
PC2 192.168.3.2 ; gateway 192.168.3.1

Setelah IP semua sudah tersetting sekarang waktunya untuk setting router satu persatu

Setting ROUTER 0 (router bgp 10)


Router>
Router>enable
Router#configure terminal
Router(config)#router bgp 100
Router(config-router)#no synchronization
Router(config-router)#bgp log-neighbor-changes
Router(config-router)#neighbor 192.168.10.2 remote-as 11
Router(config-router)#network 192.168.10.0 mask 255.0.0.0
Router(config-router)#network 192.168.1.0 mask 255.0.0.0

Setting ROUTER 101


Router>
Router>enable
Router#configure terminal
Router(config)#router bgp 101
Router(config-router)#no synchronization
Router(config-router)#bgp log-neighbor-changes

Router(config-router)#neighbor 192.168.10.1 remote-as 10


Router(config-router)#neighbor 192.168.20.2 remote-as 12
Router(config-router)#network 192.168.10.0 mask 255.0.0.0
Router(config-router)#network 192.168.20.0 mask 255.0.0.0
Router(config-router)#network 192.168.1.0 mask 255.0.0.0
Setting ROUTER 102
Router>
Router>enable
Router#configure terminal
Router(config)#router bgp 102
Router(config-router)#no synchronization
Router(config-router)#bgp log-neighbor-changes

Router(config-router)#neighbor 192.168.20.2 remote-as 12


Router(config-router)#network 192.168.10.0 mask 255.0.0.0
Router(config-router)#network 192.168.20.0 mask 255.0.0.0
Router(config-router)#network 192.168.1.0 mask 255.0.0.0

Potrebbero piacerti anche