BGP For Beginners-CCNA as Career

  • By
  • September 26, 2019
  • CCNACisco
BGP For Beginners-CCNA as Career

BGP For Beginners (i.e for CCNA Students)

First time in the CCNA Cisco added this protocol in CCNA R and S exam ( and ICND2 Exam)

In previous CCNA syllabus within CCNA Course in Pune, it was just mentioned as IGP i.e Interior Gateway Protocol, but working was not discussed in that old syllabus. Current new syllabus of CCNA Training in Pune discusses this protocol with its working & its there in the upcoming syllabus as well, which will be effective from the year 2020.

What is the Role of Routing Protocol,

  1. Learn routes: Learn about subnets/masks, and calculate the local router’s route for that subnet, with outgoing interface and next-hop router.
  2. Choose the best route: If one routing protocol learns of multiple routes exist for a

single subnet, pick the best route, using some kind of metric

  1. Converge: When network changes happen, converge—either remove routes, add new ones, or change a failed route with a working route

What is BGP?

BGP stands for Border Gateway Protocol.

We need to understand connection types first in order to understand BGP

These are following internet connection types,

  1. Dual Homed
  2. Single Multihomed
  3. Dual Multihomed

Diagrammatically it is represented as follows,

Diagrammatically

In an enterprise or company means within an autonomous system we use IGP i.e Interior Gateway Protocol like RIP, OSPF & EIGRP.

BGP means Border Gateway Protocol is an only protocol which works between multiple AS i.e autonomous system, means between multiple companies. So whole INTERNET is basically working on BGP

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Website Like

Traffic from your computer to a website like Google or Facebook has traveled over the internet to reach there via BGP.

Internet To Reach There

BGP has to advertise routes on the internet as well as learn routes from the internet to provide connectivity.

Bgp Needs

BGP needs to choose the best route among numbers of available routes based on metric i.e selection criteria.

BGP needs to converge i.e remove, update or replace routes.

BGPs internet routing table is massive as compared to the routing table of IGP like OSPF or EIGRP.

ACTIVE BGP Entries from 1989 to 2019

Reference

We can access bgp routes reviews i.e publically accessible routers of ISP,

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

*********************************************************************

Oregon Exchange BGP Route Viewer

route-views.oregon-ix.net / route-views.routeviews.org

route views data is archived on http://archive.routeviews.org

This hardware is part of a grant by the NSF.

Please contact help@routeviews.org if you have questions, or

if you wish to contribute your view.

This router has views of full routing tables from several ASes.

The list of peers is located at http://www.routeviews.org/peers

in route-views.oregon-ix.net.txt

NOTE: The hardware was upgraded in August 2014.

To login, use the username “rviews”.

**********************************************************************

User Access Verification

Username: rviews

route-views>

route-views>show ip bgp

Network          Next Hop        Metric LocPrf Weight Path

*   1.0.0.0/24               194.85.40.15               0         0 3267 13335 i

*                      193.0.0.56                               0 3333 1257 13335 i

*                      91.218.184.60                         0 49788 13335 i

*                      137.39.3.55                             0 701 3356 13335 i

*                      207.172.6.20               0         0 6079 13335 i

*                      207.172.6.1                 0          0 6079 13335 i

*                      195.208.112.161                    0 3277 3267 13335 i

*                      94.142.247.3               0         0 8283 13335 i

*                      212.66.96.126                         0 20912 13335 i

*                      134.222.87.1               700                  0 286 13335 i

*                      202.93.8.242                           0 24441 13335 i

*                      162.251.163.2                         0 53767 13335 i

*                      12.0.1.63                                 0 7018 6453 13335 i

*                      198.58.198.255                       0 1403 13335 i

*                      198.58.198.254                       0 1403 13335 i

*                      162.250.137.254                    0 4901 6079 13335 i

*                      37.139.139.17             0         0 57866 13335 i

*                      89.149.178.10             10                    0 3257 13335 i

*                      173.205.57.234                       0 53364 3257 13335 i

*                      209.124.176.223                    0 101 101 13335 i

*                      144.228.241.130         80                    0 1239 2914 13335 i

*                      140.192.8.16                           0 54728 20130 6939 13335 i

*                      203.62.252.83                         0 1221 13335 i

*                      208.51.134.254           0         0 3549 3356 13335 i

*                      114.31.199.1                           0 4826 13335 i

*                      154.11.12.212             0         0 852 13335 i

*                      206.24.210.80                         0 3561 209 3356 13335 i

*>                   202.232.0.2                             0 2497 13335 i

*                      132.198.255.253                    0 1351 13335 i

*                      64.71.137.241                         0 6939 13335 i

*                      217.192.89.50                         0 3303 13335 i

*   1.0.4.0/24               193.0.0.56                               0 3333 6939 4826 38803 56203 i

*                      91.218.184.60             0         0 49788 6939 4826 38803 56203 i

*                      137.39.3.55                             0 701 174 4826 38803 56203 i

–More–

route-views>sh ip bgp summary

BGP router identifier 128.223.51.103, local AS number 6447

BGP table version is 285650008, main routing table version 285650008

814776 network entries using 202064448 bytes of memory

24723576 path entries using 2966829120 bytes of memory

3824642/138368 BGP path/bestpath attribute entries using 948511216 bytes of memory

3514524 BGP AS-PATH entries using 180352888 bytes of memory

5 BGP ATTR_SET entries using 200 bytes of memory

126987 BGP community entries using 15799630 bytes of memory

1147 BGP extended community entries using 72912 bytes of memory

BGP using 4313630214 total bytes of memory

BGP activity 8090382/7197301 prefixes, 833184086/805021444 paths, scan interval  60 secs

 

Peer    V       AS          MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State  /PfxRcd

4.69.184.193   4     3356         0          0          1          0          0 35w4d          Active

5.101.110.2     4    14061        0          0          1          0          0 never            Active

12.0.1.63         4    7018     11315115   45715 285649834     0          0 4w0d   757803

–More–

BGP Neighbor 12.0.1.63

AS 14061

Routes Learned 757803

BGP Router ID 128.223.51.103

BGP Table Version 285641878

202064448 Bytes of Memory Consumed

Memory Consumption is as follows

route-views>sh ip route summary

IP routing table name is default (0x0)

IP routing table maximum-paths is 32

Route Source  Networks         Subnets           Replicates  Overhead Memory (bytes)

connected       0          2          0          192      576

static                1          86        0          8352                25056

application       0          0          0          0          0

bgp 6447         204774            609952            0          78213696        234641088

External: 814726 Internal: 0 Local: 0

internal            9469                                                    63390712

Total                214244            610040            0          78222240        298057432

route-views>

Types of BGP

Types Of Bgp

iBGP = Internal BGP

eBGP = External BGP

In our studies of CCNA we have to deal with eBGP only means scenario as follows,

Scenario

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Config

ENT(config)#int s0/0/0

ENT(config-if)#ip add 100.1.1.2 255.255.255.0

ENT(config-if)#no shutdown

ENT(config)#int f0/0

ENT(config-if)#ip add 192.0.1.1 255.255.255.0

ENT(config-if)#no shutdown

ENT#sh ip int br

Interface                      IP-Address      OK? Method Status                            Protocol

FastEthernet0/0          192.0.1.1         YES manual up                                   up

FastEthernet0/1          unassigned      YES unset    administratively down    down

Serial0/0/0                   100.1.1.2         YES manual up                                   up

Serial0/0/1                   unassigned      YES unset administratively down       down

Vlan1                           unassigned      YES unset administratively down       down

ENT#

ENT#show ip route

Gateway of last resort is not set

100.0.0.0/24 is subnetted, 1 subnets

C 100.1.1.0 is directly connected, Serial0/0/0

C 192.0.1.0/24 is directly connected, FastEthernet0/0

ISP End Config

ISP>en

ISP#conf t

Enter configuration commands, one per line. End with CNTL/Z.

ISP(config)#int s0/0/0

ISP(config-if)#ip add 100.1.1.1 255.255.255.0

ISP(config-if)#no sh

ISP(config-if)#exit

ISP(config)#int f0/0

ISP(config-if)#ip add 9.1.1.1 255.0.0.0

ISP(config-if)#no sh

ISP(config-if)#exit

ISP(config)#exit

ISP#

%SYS-5-CONFIG_I: Configured from console by console

ISP#sh ip int br

Interface                      IP-Address      OK? Method   Status                          Protocol

FastEthernet0/0          9.1.1.1             YES manual    up                                up

FastEthernet0/1          unassigned      YES unset       administratively down down

Serial0/0/0                   100.1.1.1         YES manual    up                                up

Serial0/0/1                   unassigned      YES unset       administratively down down

Vlan1                           unassigned      YES unset       administratively down down

ISP#

ISP#

ISP#conf t

Enter configuration commands, one per line. End with CNTL/Z.

ISP(config)#ip route 0.0.0.0 0.0.0.0 9.1.1.2

ISP(config)#

ISP#

%SYS-5-CONFIG_I: Configured from console by console

sh

ISP#show ip route

Gateway of last resort is 9.1.1.2 to network 0.0.0.0

C 9.0.0.0/8 is directly connected, FastEthernet0/0

100.0.0.0/24 is subnetted, 1 subnets

C 100.1.1.0 is directly connected, Serial0/0/0

S* 0.0.0.0/0 [1/0] via 9.1.1.2

ISP#

Now we will look at BGP config,

ENT#conf t

Enter configuration commands, one per line. End with CNTL/Z.

ENT(config)#router bg

ENT(config)#router bgp 1

ENT(config-router)#neigh

ENT(config-router)#neighbor 100.1.1.1 re

ENT(config-router)#neighbor 100.1.1.1 remote-as 2

ENT(config-router)#exit

ENT(config)#exit

ENT#

%SYS-5-CONFIG_I: Configured from console by console

ISP(config)#router bgp 2

ISP(config-router)#neighbor 100.1.1.2 remote-as 1

ISP(config-router)#

%BGP-5-ADJCHANGE: neighbor 100.1.1.2 Up

Now we will look at BGP verification commands,

ENT#sh ip bgp summary

BGP router identifier 192.0.1.1, local AS number 1

0 network entries using 0 bytes of memory

0 path entries using 0 bytes of memory

0/0 BGP path/bestpath attribute entries using 0 bytes of memory

0 BGP AS-PATH entries using 0 bytes of memory

BGP using 32 total bytes of memory

Peer V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

100.1.1.1 4 2 4 4 1 0 0 00:02:36 4

Only one neighbor i.e ISP end IP address 100.1.1.1

Now we will add 192.0.1.0/24 and start advertising to ISP

ENT(config)#router bgp 1

ENT(config-router)#network 192.0.1.0 mask 255.255.255.0

ENT(config-router)#

ENT#sh ip bgp

BGP table version is 2, local router ID is 192.0.1.1

Network                      Next Hop         Metric LocPrf Weight Path

*> 192.0.1.0/24           0.0.0.0             0          0          32768              i

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

ENT#

This is local route so next hop is 0.0.0.0 means this ENT router itself generating this routes.

But if you run this command on ISP, see the difference

ISP#sh ip bgp

BGP table version is 2, local router ID is 100.1.1.1

Network                      Next Hop         Metric LocPrf Weight Path

*> 192.0.1.0/24           100.1.1.2         0          0          0          1 i

ISP#

Observe the next hop 100.1.1.2 i.e ENT router ip address, but we are not receiving from ISP end to ENT end, so now we will give default route from ISP to ENT

ISP#sh ip route

Gateway of last resort is 9.1.1.2 to network 0.0.0.0

C 9.0.0.0/8 is directly connected, FastEthernet0/0

100.0.0.0/24 is subnetted, 1 subnets

C 100.1.1.0 is directly connected, Serial0/0/0

B 192.0.1.0/24 [20/0] via 100.1.1.2, 01:15:47

S* 0.0.0.0/0 [1/0] via 9.1.1.2

ISP#conf t

Enter configuration commands, one per line. End with CNTL/Z.

ISP(config)#router bgp 2

ISP(config-router)#network 0.0.0.0 mask 0.0.0.0

ISP(config-router)#

ISP#

This will get reflected on Enterprise end router ENT,

ENT>sh ip bgp

BGP table version is 4, local router ID is 192.0.1.1

Network            Next Hop       Metric LocPrf             Weight Path

*> 0.0.0.0/0       100.1.1.1       0          0          0          2 i

*> 192.0.1.0/24 0.0.0.0           0          0          32768 i

ENT>

That’s how we can learn & advertise routes in BGP.

Now we will see how BGP forms neighbor-ship

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

BGP Neighbor State Details
IDLE Peer administratively disabled (neighbor shutdown), or

the router is waiting before the next retry.

CONNECT TCP connection attempted but has not completed.
ACTIVE TCP connection completed, but no BGP messages have been sent yet.
OPENSENT TCP connection is there, router has sent the OPEN message to

establish the BGP neighborship.

OPENCONNECT TCP connection exists, local router has received an Open

message from the other router. The neighbor relationship may still be

rejected.

ESTABLISHED The routers are now peers and can exchange update messages.

 

It means TCP used in layer 4 and manually we need to configure BGP peer its not possible to dynamic neighbor discovery.

BGP is vast topic but still I tried to explain it with one scenario, explore it in more detail within CCNA Classes in Pune as the whole internet is working on this protocol.

Call the Trainer and Book your free demo Class for now!!!

call icon© Copyright 2019 | Sevenmentor Pvt Ltd.

 

Submit Comment

Your email address will not be published. Required fields are marked *

*
*