bgp routing configuration lab using packet tracer

Posted: 19 Feb 2018 in CCNP
Tags: , , ,

bgp configuration lab using cisco packet tracer

In this article I am going to show you how to configure bgp step by step.This is a bgp configuration example lab showing bgp configuration using cisco packet tracer.I will show you how to configure bgp routing protocols on cisco router using three router.This is an example lab showing bgp configuration.Here in This Lab I have taken  3 AS they are 1,71 and 79 respectively

BGP neighbors can be of two types:

  • IBGP neighbors – when two neighbors are in the same AS(Autonomous System);

  • EBGP neighbors – when two neighbors belong to different AS(Autonomous System).

You can Download bgp configuration Lab file: Click here to Download 

Step 1:Draw BGP Topology Diagram.

bgp configuration

Step 2: Assign ip address on each device as mentioned in Diagram.

bgp and computer

Step 3: bgp configuration on Router R1:

 

R1(config)#router bgp 1

R1(config-router)#neighbor 172.16.0.2 remote-as 71

R1(config-router)#network 10.0.0.0 mask 255.0.0.0

R1(config-router)#exit

R1(config)#do write

Building configuration...

[OK]

R1(config)#

Step 4: bgp configuration on Router R2:

 

R2(config)#router bgp 71

R2(config-router)#neighbor 172.16.0.1 remote-as 1

R2(config-router)#%BGP-5-ADJCHANGE: neighbor 172.16.0.1 Up

R2(config-router)#neighbor 172.14.0.2 remote-as 79

R2(config-router)#network 40.0.0.0 mask 255.0.0.0

R2(config-router)#exit

R2(config)#do write

Building configuration...

[OK]

R2(config)#

Step 5:  bgp configuration on Router R3:

 

R3(config)#router bgp 79

R3(config-router)#neighbor 172.14.0.1 remote-as 71

R3(config-router)#%BGP-5-ADJCHANGE: neighbor 172.14.0.1 Up

R3(config-router)#network 40.0.0.0 mask 255.0.0.0

R3(config-router)#exit

R3(config)#do write

Building configuration...

[OK]

R3(config)#

Step 6: bgp configuration Testing and troubleshooting.

 

Fot bgp testing we will ping both pc and check the network communication.

Now I am on PC2:

 

PC>ipconfig

FastEthernet0 Connection:(default port)

Link-local IPv6 Address.........: FE80::20A:F3FF:FE25:3462

IP Address......................: 40.0.0.2

Subnet Mask.....................: 255.0.0.0

Default Gateway.................: 40.0.0.1
PC>ping 10.0.0.2

Pinging 10.0.0.2 with 32 bytes of data:

Reply from 10.0.0.2: bytes=32 time=11ms TTL=125

Reply from 10.0.0.2: bytes=32 time=10ms TTL=125

Reply from 10.0.0.2: bytes=32 time=5ms TTL=125

Reply from 10.0.0.2: bytes=32 time=13ms TTL=125

Ping statistics for 10.0.0.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 5ms, Maximum = 13ms, Average = 9ms

 

Step 7: check bgp route on router R1:

R1#show ip route

C 10.0.0.0/8 is directly connected, FastEthernet0/0

B 40.0.0.0/8 [20/0] via 172.16.0.2, 00:22:11

C 172.16.0.0/16 is directly connected, Serial0/0/0

Step 8: Check whether bgp protocols configure or not on Routre R1:

 

R1#show ip protocols

Routing Protocol is "bgp 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

IGP synchronization is disabled

Automatic route summarization is disabled

Neighbor(s):

Address FiltIn FiltOut DistIn DistOut Weight RouteMap

172.16.0.2

Maximum path: 1

Routing Information Sources:

Gateway Distance Last Update

172.16.0.2 20 00:22:41

Distance: external 20 internal 200 local 200

Step 9: Show BGP Status

R1#show ip bgp summary

BGP router identifier 172.16.0.1, local AS number 1

BGP table version is 3, main routing table version 6

2 network entries using 264 bytes of memory

2 path entries using 104 bytes of memory

1/1 BGP path/bestpath attribute entries using 184 bytes of memory

3 BGP AS-PATH entries using 72 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory

BGP using 656 total bytes of memory

BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

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

172.16.0.2 4 71 42 40 3 0 0 00:38:02 4

 

Show bgp neighbors status:

 

R1#show ip bgp neighbors

BGP neighbor is 172.16.0.2, remote AS 71, external link

BGP version 4, remote router ID 172.16.0.2
BGP state = Established, up for 00:39:03

Last read 00:39:03, last write 00:39:03, hold time is 180, keepalive interval is 60 seconds

Neighbor capabilities:

Route refresh: advertised and received(new)

Address family IPv4 Unicast: advertised and received

Message statistics:

InQ depth is 0
OutQ depth is 0

Sent Rcvd

Opens: 1 1

Notifications: 0 0

Updates: 1 2

Keepalives: 40 40

Route Refresh: 0 1

Total: 42 44
Default minimum time between advertisements runs is 30 seconds

For address family: IPv4 Unicast

BGP table version 3, neighbor version 6/0

Output queue size : 0

Index 1, Offset 0, Mask 0x2

1 update-group member

Sent Rcvd

Prefix activity: ---- ----

Prefixes Current: 1 1 (Consumes 46 bytes)

Prefixes total: 1 1

Implicit Withdraw: 0 0

Explicit Withdraw: 0 0
Used as bestpath: n/a 1

Used as multipath: n/a 0

Outbound Inbound

Local Policy Denied Prefixes: -------- -------

Total: 0 0

Number of NLRIs in the update sent: max 3, min 1

Address tracking is enabled, the RIB does have a route to 172.16.0.2

Connections established 1; dropped 3

Last reset never

Transport(tcp) path-mtu-discovery is enabled
Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Connection is ECN Disabled, Minimum incoming TTL 0, Outgoing TTL 1

Local host: 172.16.0.1, Local port: 179

Foreign host: 172.16.0.2, Foreign port: 1025

Connection tableid (VRF): 0

Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)

Event Timers (current time is 0xC69F4):

Timer Starts Wakeups Next

Retrans 0 0 0x0

TimeWait 0 0 0x0

AckHold 42 0 0x0

SendWnd 0 0 0x0

KeepAlive 40 0 0x0

GiveUp 0 0 0x0

PmtuAger 0 0 0x0

DeadWait 0 0 0x0
Linger 0 0 0x0

ProcessQ 0 0 0x0

iss: 2057115318 snduna: 2057115748 sndnxt: 2057115748 sndwnd: 15955

irs: 3480424370 rcvnxt: 3480424751 rcvwnd: 16004 delrcvwnd: 380

SRTT: 259 ms, RTTO: 579 ms, RTV: 320 ms, KRTT: 0 ms

minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms

Status Flags: passive open, gen tcbs

Option Flags: nagle, path mtu capable

IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):

Rcvd: 43 (out of order: 0), with data: 1, total data bytes: 24

Sent: 41 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 1, total data bytes: 24

Packets received in fast path: 0, fast processed: 0, slow path: 0

fast lock acquisition failures: 0, slow path: 0

 

Similarly we check bgp route on Router R2:

 

R2#show ip route

B 10.0.0.0/8 [20/0] via 172.16.0.1, 00:24:09

B 40.0.0.0/8 [20/0] via 172.14.0.2, 00:24:09

C 172.14.0.0/16 is directly connected, Serial0/0/1

C 172.16.0.0/16 is directly connected, Serial0/0/0

 

 

 

R2#show ip protocols

Routing Protocol is "bgp 71"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

IGP synchronization is disabled

Automatic route summarization is disabled

Neighbor(s):

Address FiltIn FiltOut DistIn DistOut Weight RouteMap

172.16.0.1

172.14.0.2

Maximum path: 1

Routing Information Sources:

Gateway Distance Last Update

172.16.0.1 20 00:24:36

172.14.0.2 20 00:24:36

Distance: external 20 internal 200 local 200

 

Similarly check bgp route on Router R3:

 

R3#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

B 10.0.0.0/8 [20/0] via 172.14.0.1, 00:24:56

C 40.0.0.0/8 is directly connected, FastEthernet0/0

C 172.14.0.0/16 is directly connected, Serial0/0/0

R3#

 

R3#show ip protocols

Routing Protocol is "bgp 79"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

IGP synchronization is disabled

Automatic route summarization is disabled

Neighbor(s):

Address FiltIn FiltOut DistIn DistOut Weight RouteMap

172.14.0.1

Maximum path: 1

Routing Information Sources:

Gateway Distance Last Update

172.14.0.1 20 00:25:19

Distance: external 20 internal 200 local 200

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.