BGP – iBGP and eBGP configuration

December 14, 2016 by Neel Rao

Filed under Network

Last modified December 14, 2016

If an Autonomous System has multiple BGP speakers, it could be used as a transit service for other ASs. As you see below, AS200 is a transit autonomous system for AS100 and AS300. It is necessary to ensure reachability for networks within an AS before sending the information to other external ASs. This is done by a combination of Internal BGP peering between routers inside an AS and by redistributing BGP information to Internal Gateway protocols running in the AS.

As far as this paper is concerned, when BGP is running between routers belonging to two different ASs we will call it EBGP (Exterior BGP) and for BGP running between routers in the same AS we will call it IBGP (Interior BGP)

ibgp-ebgp

R1# conf t

# int s0/0

# ip add 169.1.1.1 255.255.255.252

# no shut

# int loop 0

# ip add 10.1.1.1 255.255.255.0

#end

R2# conf t

# int s0/0

# ip add 169.1.2.1 255.255.255.252

# no shut

# int loop 0

# ip add 2.2.2.2 255.255.255.0

#end

R3# conf t

# int s0/0

# ip add 169.1.1.2 255.255.255.252

# no shut

# int s0/1

# ip add 172.16.1.1 255.255.255.0

# no shut

# int loop 0

# ip add 3.3.3.3 255.255.255.0

# end

R4# conf t

# int s0/0

# ip add 169.1.2.2 255.255.255.252

# int s0/1

# ip add 172.16.1.2 255.255.255.0

# int loop 0

# ip add 4.4.4.4 255.255.255.0

# end

 

Step 1 :  Configure IGP

 

R3# conf t

# router eigrp 100

# no auto

# net 172.16.0.0

# net 3.0.0.0

# end

R4# conf t

# router eigrp 100

# no auto

# net 4.0.0.0

# net 172.16.0.0

# end

Verify the routes

R3#sh ip route eigrp

4.0.0.0/24 is subnetted, 1 subnets

D       4.4.4.0 [90/2297856] via 172.16.1.2, 00:21:39, Serial0/1

R3#

R4#sh ip route eigrp

3.0.0.0/24 is subnetted, 1 subnets

D       3.3.3.0 [90/2297856] via 172.16.1.1, 00:18:45, Serial0/1

R4#

R4#ping 3.3.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/23/48 ms

R4#

Step 2: Configure EGP

R1# conf t

# router bgp 100

# nei 169.1.1.2 remote 300

# nei 169.1.1.2 next-hop-self

# net 169.1.1.2 ebgp 5

#end

R3# conf t

# router bgp 300

# nei 169.1.1.1 remote 100

# nei 169.1.1.1 next-hop-self

# nei 169.1.1.1 ebgp 5

# end

R4# conf t

# router bgp 300

# nei 169.1.2.1 remote 200

# nei 169.1.2.1 next-hop-self

#end

R2# conf t

# router bgp 200

# nei 169.1.2.2 remote 300

# nei 169.1.2.2 next-hop-self

# nei 169.1.2.2 ebgp 5

# end

Step 3: iBGP Configuration

R3# conf t

# router bgp 300

# nei 4.4.4.4 remote 300

# nei 4.4.4.4 next-hop-self

# nei 4.4.4.4 update-source loop 0

#end

R4# conf t

# router bgp 300

# nei 3.3.3.3 remote 300

# nei 3.3.3.3 next-hop-self

# nei 3.3.3.3 update-source loop 0

# end

Verification Command :

R4#sh ip bgp sum

BGP router identifier 4.4.4.4, local AS number 300

BGP table version is 3, main routing table version 3

2 network entries using 234 bytes of memory

2 path entries using 104 bytes of memory

3/2 BGP path/bestpath attribute entries using 372 bytes of memory

2 BGP AS-PATH entries using 48 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

BGP using 758 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

3.3.3.3         4   300      35      35        3    0    0 00:30:16        1

169.1.2.1       4   200      36      36        3    0    0 00:32:13        1

R4#

R4#sh ip bgp

BGP table version is 3, local router ID is 4.4.4.4

Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,

r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path

*> 2.2.2.0/24       169.1.2.1                0             0 200 i

*>i10.1.1.0/24      3.3.3.3                  0    100      0 100 i

R4#

R1#sh ip bgp

BGP table version is 3, local router ID is 10.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,

r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path

*> 2.2.2.0/24       169.1.1.2                              0 300 200 i

*> 10.1.1.0/24      0.0.0.0                  0         32768 i

R1#

 

R2#sh ip bgp

BGP table version is 3, local router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,

r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path

*> 2.2.2.0/24       0.0.0.0                  0         32768 i

*> 10.1.1.0/24      169.1.2.2                              0 300 100 i

R2#

R2#ping 10.1.1.1 source loop 0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

Packet sent with a source address of 2.2.2.2

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/38/60 ms

R2#

 

By N.R.Rao

For SkyBird Technology Solutions Pvt Ltd.

 

 

 

 

Leave a Comment