Showing posts with label BGP. Show all posts
Showing posts with label BGP. Show all posts

Tuesday, October 20, 2020

iBGP Route Reflector

 

Previous | Cisco | Next


 

So far, building our BGP network I have accomplished the following:

  • Created eBGP peering between R2 (AS65100) and R8 (AS65089).
  • Created iBGP peering between R2 and R4 using their respective Loopback0 interfaces to form a BGP session.

Now, let's fix the problem of BGP prefixes advertisement between R1 and R4 over iBGP.

Here's the BGP table on R1:

R1#show ip bgp
BGP table version is 13, 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, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  10.1.1.1/32      0.0.0.0                  0         32768 i
 *>i 10.2.2.2/32      172.16.123.2             0    100      0 i
 *>i 10.8.0.0/28      172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.16/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.32/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.48/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.8.8/32      172.16.123.2             0    100      0 65089 i
 *>i 10.8.80.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.81.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.82.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.83.0/24     172.16.123.2             0    100      0 65089 i
 *>i 198.51.100.0     172.16.123.2             0    100      0 65089 i
R1#

Clearly, all is good here. R1 has 172.16.123.2 as its next hop IP towards the destination (next-hop-self command on R2). It receives all the prefixes that R2 is getting over eBGP from R8.

But what does the BGP table look like on R4 that is peering with R1?

R4#show ip bgp
BGP table version is 2, local router ID is 10.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.1.1.1/32      10.1.1.1                 0    100      0 i
R4#

There are no BGP routes we expect to see. There is only 10.1.1.1 (R1's Loopback0). Since we are getting it via EIGRP as well, the lower AD of EIGRP will make this entry 'rib-failure' in BGP. The BGP protocol will not be used on R4 to install this one. R2 will rather rely on EIGRP as a better source of routing information.

R4#show ip bgp rib-failure 
  Network            Next Hop                      RIB-failure   RIB-NH Matches
10.1.1.1/32        10.1.1.1            Higher admin distance              n/a
R4#
R4#show ip route 10.1.1.1
Routing entry for 10.1.1.1/32
  Known via "eigrp 10", distance 90, metric 409600, type internal
  Redistributing via eigrp 10
  Last update from 172.16.14.1 on Ethernet0/0.14, 01:07:02 ago
  Routing Descriptor Blocks:
  * 172.16.104.1, from 172.16.104.1, 01:07:02 ago, via Ethernet0/1
      Route metric is 409600, traffic share count is 1
      Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    172.16.14.1, from 172.16.14.1, 01:07:02 ago, via Ethernet0/0.14
      Route metric is 409600, traffic share count is 1
      Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
R4#

That, we already know.

Is R1 even trying to advertising prefixes learned from R2 towards R1?

R1#show ip bgp neighbor 10.4.4.4 advertised-routes 
BGP table version is 13, 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, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  10.1.1.1/32      0.0.0.0                  0         32768 i


It does not advertise them at all. But why?

In order to avoid internal routing loops, BGP uses its own 'bgp split-horizon' rule. It stipulates that prefixes learned via iBGP, CANNOT be advertised over an iBGP session.

There are a number of ways around that.

  • Use BGP Route-Reflectors (explained in this post).
  • Use iBGP full-mesh connectivity. This one may be hard to implement with a lot of routers as it falls under n(n-1)/2 formula, where 'n' is the number of routers involved.
  • Use BGP Confederations.

I will tackle the last two options in later posts, but for now in order to enable connectivity between R4 and AS 65089, I will use Route-Reflector. 

In the simplest scenario, BGP Route-Reflector is a router that has iBGP sessions established to all other neighbors that need the prefixes. It will a 'sort of' break the rule of split-horizon and forward the prefixes to other neighbors based on the admin's configuration.

Simply put, Route-Reflector is the central router that can advertise BGP prefixes to all other routers.

Route-Reflector can have three types of neighbors:

  • eBGP Peer
  • Client Peer
  • Non-client Peer

Given that, RR (route-reflector) will follow a few rules:

 

Routes learned from eBGP neighbors will be forwarded to ALL peers (eBGP, client, non-client).

Routes learned from client peers will be forwarded to All peers (eBGP, client, non-client).

Routes learned from non-client peers, will be forwarded to eBGP and clients.


Take a look at the above topology. R1 has currently an iBGP connectivity with R2 and R4. In a moment I will add R5 to the mix (blue arrows indicate iBGP sessions). It is a candidate to become a Route-Reflector.

I am going to start with advertising Loopback0 from R4, so that AS 65089 is receiving.

R4#show run | s router bgp 
router bgp 65100
 bgp log-neighbor-changes
 network 10.4.4.4 mask 255.255.255.255
 neighbor 10.1.1.1 remote-as 65100
 neighbor 10.1.1.1 update-source Loopback0
R4#


The BGP table on R4 looks like this:

R4#show ip bgp | begin Network 
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.1.1.1/32      10.1.1.1                 0    100      0 i
 *>  10.4.4.4/32      0.0.0.0                  0         32768 i
R4#

I am ready to advertise (reflect) routes learned from AS 65089 towards R4. The R1 router will become a route reflector with R4 (and later R5) as its client.

R1#show run | section router bgp
router bgp 65100
 bgp log-neighbor-changes
 network 10.1.1.1 mask 255.255.255.255
 neighbor 10.4.4.4 remote-as 65100
 neighbor 10.4.4.4 update-source Loopback0
 neighbor 10.4.4.4 route-reflector-client
 neighbor 172.16.123.2 remote-as 65100
R1#

BGP session between R1 and R4 has been re-established upon this change. What are the results then?

Since the output of 'show ip bgp neighbor 10.4.4.4' is rather large, I will check it this way:

R1#show ip bgp neighbors 10.4.4.4 | include Route-Reflector
  Route-Reflector Client
R1#

R4 is now a route-reflector client.

So, can R4 see all the prefixes previously missing?

R4#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.1.1.1/32      10.1.1.1                 0    100      0 i
 *>i 10.2.2.2/32      172.16.123.2             0    100      0 i
 *>  10.4.4.4/32      0.0.0.0                  0         32768 i
 *>i 10.8.0.0/28      172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.16/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.32/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.0.48/28     172.16.123.2             0    100      0 65089 i
 *>i 10.8.8.8/32      172.16.123.2             0    100      0 65089 i
 *>i 10.8.80.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.81.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.82.0/24     172.16.123.2             0    100      0 65089 i
 *>i 10.8.83.0/24     172.16.123.2             0    100      0 65089 i
 *>i 198.51.100.0     172.16.123.2             0    100      0 65089 i
R4#
It worked.

Now onto the iBGP session between R1 and R5. This time I will ensure that R5 is a route-reflector client.

Let's start with removing 'passive-interface' command on R1 in order to establish EIGRP adjacency:

Configuration on R1:

router eigrp 10
 network 10.1.1.1 0.0.0.0
 network 172.16.0.0
 passive-interface Ethernet0/0.15
 eigrp router-id 10.1.1.1


Removing the command is simple:

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router eigrp 10
R1(config-router)#no passive-interface ethernet0/0.15
R1(config-router)#
R1(config-router)#
R1(config-router)#do show ip eigrp interfaces
EIGRP-IPv4 Interfaces for AS(10)
                              Xmit Queue   PeerQ        Mean   Pacing Time   Multicast    Pending
Interface              Peers  Un/Reliable  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Lo0                      0        0/0       0/0           0       0/0            0           0
Et0/0.14                 1        0/0       0/0           4       0/2           50           0
Et0/0.123                1        0/0       0/0           5       0/2           50           0
Et0/1                    1        0/0       0/0           6       0/2           50           0
Et0/0.15                 0        0/0       0/0           0       0/0            0           0          

In the above output it is clear that R1 will start sending 'hello' packets over its Ethernet0/0.15 interface.

Now, onto the R1 BGP configuration:

R1#show run | s router bgp 
router bgp 65100
 bgp log-neighbor-changes
 network 10.1.1.1 mask 255.255.255.255
 neighbor 10.4.4.4 remote-as 65100
 neighbor 10.4.4.4 update-source Loopback0
 neighbor 10.4.4.4 route-reflector-client
 neighbor 172.16.15.5 remote-as 65100
 neighbor 172.16.15.5 route-reflector-client
 neighbor 172.16.123.2 remote-as 65100
R1#

Obviously, R5 needs a respective eigrp and BGP configuration.

R5#show run | section router eigrp
router eigrp 10
network 172.16.0.0
R5#

R5#show run | section router bgp router bgp 65100 bgp log-neighbor-changes network 10.5.5.5 mask 255.255.255.255 neighbor 172.16.15.1 remote-as 65100 R5#

When RR receives a route over iBGP session, it tags it internally to know that it comes from a client. This way it know which neighbors the prefix should be forwarded to.

R1#show ip bgp 10.5.5.5
BGP routing table entry for 10.5.5.5/32, version 17
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     1          2         
  Refresh Epoch 1
  Local, (Received from a RR-client)
    172.16.15.5 from 172.16.15.5 (10.5.5.5)
      Origin IGP, metric 0, localpref 100, valid, internal, best
R1#

Apart from that, when RR is advertising prefixes it will include two extra attributes (more on those in later posts).

  • Originator ID
  • Cluster List

They will ensure a loop free topology.

R2#show ip bgp 10.5.5.5
BGP routing table entry for 10.5.5.5/32, version 15
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     1         
  Refresh Epoch 2
  Local
    172.16.15.5 (metric 307200) from 172.16.123.1 (10.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Originator: 10.5.5.5, Cluster list: 10.1.1.1
R2#

A final connectivity test between the two Autonomous Systems.

Ping from R4 to R8:

R4#ping 10.8.8.8 source loopback0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.8.8.8, timeout is 2 seconds:
Packet sent with a source address of 10.4.4.4 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
R4#

And ping test from R5.

R5#ping 10.8.8.8 source loopback0 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.8.8.8, timeout is 2 seconds:
Packet sent with a source address of 10.5.5.5 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
R5#

Onto the next one :)


Monday, October 19, 2020

BGP Upate Source

 




BGP protocol uses TCP for transportation. We have already observed that BGP server must approve IP address of the client packet. We use 'neighbor ip-address' command to accomplish that.


The IP address of the SYN packet from the client will be the address of the outgoing (Egress) interface according to the routing table. Let's see that in the example.

From the previous lab we got R2 to peer with R8 and R1 using eBGP. Also R2 has R1 as it BGP neighbor using iBGP connections (they are both in the same AS 65100).

R2#show ip bgp summary
BGP router identifier 10.2.2.2, local AS number 65100
BGP table version is 13, main routing table version 13
12 network entries using 1776 bytes of memory
12 path entries using 768 bytes of memory
3/3 BGP path/bestpath attribute entries using 408 bytes of memory
1 BGP AS-PATH entries using 24 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 2976 total bytes of memory
BGP activity 12/0 prefixes, 12/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.28.8     4        65089      26      26       13    0    0 00:20:11       10
172.16.123.1    4        65100      25      26       13    0    0 00:19:33        1
R2#

Also, in the previous lab we learned that eBGP learned prefixes are propagated to other iBGP Peers. R2 learn prefixes from R8 are going to be passed onto R1 (iBGP peer) unchanged. Since R1 does not know how to reach 172.16.28.8 (next-hop for the prefixes advertised to R2 from R8), it would not install them into the routing table as the next hop is unreachable).

To alleviate this, we have explored a bunch of methods (check previous lab) and in this configuration I have left the 'next-hop-self' to rectify that). The config of R2 looks like so: 

R2#show run | section router bgp 
router bgp 65100
 bgp log-neighbor-changes
 network 10.2.2.2 mask 255.255.255.255
 neighbor 172.16.28.8 remote-as 65089
 neighbor 172.16.123.1 remote-as 65100
 neighbor 172.16.123.1 next-hop-self
R2#

Now, let's consider another iBGP peering between R1 and R4. 

There are two directly connected paths between R1 and R4. R1 can use the subnet 172.16.14.0/24 or 172.16.104.0/24 to reach R4.

In order to facilitate what comes next, let's create a EIGRP AS 10 process in our BGP AS 65100. This will involve EIGRP configuration on R1, R2, and R4 like so:

R1#show run | section router eigrp 
router eigrp 10
 network 172.16.0.0
passive-interface Ethernet0/0.15 eigrp router-id 10.1.1.1 R1#

I have chosen to use one network command rather than ip addresses with network wildcard mask. The implication of that approach is that eigrp 'hello' packets will be sent out of all interfaces with IP address 172.16.x.y. I intend to build eigrp adjacency with R2 and R4. For the moment, I do not want to establish eigrp adjacency with R5 though. In order to stop sending 'hello' packets to R5, I am making Eth0/0/15 a 'passive-interface' in eigrp.

The interfaces that participate in eigrp are as follows:

R1#show ip eigrp interfaces  
EIGRP-IPv4 Interfaces for AS(10)
                              Xmit Queue   PeerQ        Mean   Pacing Time   Multicast    Pending
Interface              Peers  Un/Reliable  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Et0/0.14                 0        0/0       0/0           0       0/0            0           0
Et0/0.123                0        0/0       0/0           0       0/0            0           0
Et0/1                    0        0/0       0/0           0       0/0            0           0
R1#

   

Let's complete the EIGRP configuration on R2.

R2#show run | section router eigrp 
router eigrp 10
 network 172.16.0.0
 eigrp router-id 10.2.2.2
R2#

And finally the EIGRP configuration on R4 node. This time, I would like to be more precise in terms of interfaces running EIGRP. I want only interfaces towards R1 to send/receive hellos. Here is the configuration:

R4#show run | section router eigrp 
router eigrp 10
 network 172.16.14.4 0.0.0.0
 network 172.16.104.4 0.0.0.0
 eigrp router-id 10.4.4.4
R4#

A quick verification on R1 to see if all the EIGRP neighbors are set up shows this:

R1#show ip eigrp neighbors 
EIGRP-IPv4 Neighbors for AS(10)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
2   172.16.104.4            Et0/1                    12 00:03:09    1   100  0  8
1   172.16.14.4             Et0/0.14                 14 00:03:21   10   100  0  7
0   172.16.123.2            Et0/0.123                14 00:06:35    8   100  0  3
R1#

All seems to be in order.

Now, that basic EIGRP is fully functional, let's advertise Loopback0 interfaces into EIGRP on R1 and R4.

R1#show run | section router eigrp
router eigrp 10
 network 10.1.1.1 0.0.0.0
 network 172.16.0.0
 passive-interface Ethernet0/0.15
 eigrp router-id 10.1.1.1
R1#

I will do the same on R4. Why I am doing this? You will see in a moment.

R4#show run | section router eigrp  
router eigrp 10
 network 10.4.4.4 0.0.0.0
 network 172.16.14.4 0.0.0.0
 network 172.16.104.4 0.0.0.0
 eigrp router-id 10.4.4.4
R4#

The reasons to advertise Loopback0 interfaces on both is to create two equal paths between them. Check this out:

R1#show ip route 10.4.4.4
Routing entry for 10.4.4.4/32
  Known via "eigrp 10", distance 90, metric 409600, type internal
  Redistributing via eigrp 10
  Last update from 172.16.14.4 on Ethernet0/0.14, 00:02:36 ago
  Routing Descriptor Blocks:
  * 172.16.104.4, from 172.16.104.4, 00:02:36 ago, via Ethernet0/1
      Route metric is 409600, traffic share count is 1
      Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    172.16.14.4, from 172.16.14.4, 00:02:36 ago, via Ethernet0/0.14
      Route metric is 409600, traffic share count is 1
      Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
R1#

In the same way, R4 has two paths to Loopback0 of R1 router.

This is done for a reason. When I establish iBGP peering between R1 and R4, I am going to use Loopback0 interface to do so. This way, in case of any of the interfaces (Ethernet0/1 or Ethernet0/0.14) failure, the iBGP session will remain intact using the alternate route that is still working between those two Loopback0 interfaces.

Here's is the BGP configuration on R1 towards R4.

R1#show run | section router bgp
router bgp 65100
 bgp log-neighbor-changes
 network 10.1.1.1 mask 255.255.255.255
 neighbor 10.4.4.4 remote-as 65100
 neighbor 10.4.4.4 update-source Loopback0
 neighbor 172.16.123.2 remote-as 65100
R1#

Notice, that R1 is going to try to establish TCP (and eventually iBGP) session with R2 using its source ip address 10.1.1.1 (its loopback0 interface). To see that happen, let's go extra mile and check this using debug.

R1(config)#access-list 100 permit ip any host 10.4.4.4
R1(config)#end
R1#debug ip packet detail 100
IP packet debugging is on (detailed) for access list 100
R1#
FIBipv4-packet-proc: route packet from (local) src 10.1.1.1 dst 10.4.4.4
FIBfwd-proc: Default:10.4.4.4/32 process level forwarding
FIBfwd-proc: depth 0 first_idx 1 paths 2 long 0(0)
FIBfwd-proc: try path 1 (of 2) v4-anh-172.16.104.4-Et0/1 first short ext 0(-1)
FIBfwd-proc: v4-anh-172.16.104.4-Et0/1 valid
FIBfwd-proc: ip_pak_table 0 ip_nh_table 65535 if Ethernet0/1 nh 172.16.104.4 deag 0 chg_if 0 via fib 0 path type attached nexthop
FIBfwd-proc: packet routed to Ethernet0/1 172.16.104.4(0)
FIBipv4-packet-proc: packet routing succeeded
FIBfwd-proc: ip_pak_table 0 ip_nh_table 65535 if Ethernet0/1 nh 172.16.104.4 uhp 1 deag 0 ttlexp 0
R1#
FIBfwd-proc: sending link IP ip_pak_table 0 ip_nh_table 65535 if Ethernet0/1 nh 172.16.104.4 uhp 1 deag 0 chgif 0 ttlexp 0 rec 0
IP: s=10.1.1.1 (local), d=10.4.4.4 (Ethernet0/1), len 44, sending
    TCP src=62126, dst=179, seq=4214154337, ack=0, win=16384 SYN
IP: s=10.1.1.1 (local), d=10.4.4.4 (Ethernet0/1), len 44, sending full packet
    TCP src=62126, dst=179, seq=4214154337, ack=0, win=16384 SYN
R1#u all
All possible debugging has been turned off
R1#

If R4 is to accept this invitation, it must authorize the attempt sourced from 10.1.1.1.

The following configuration on R4 should do the trick.

R4#show run | section router bgp
router bgp 65100
 bgp log-neighbor-changes
 neighbor 10.1.1.1 remote-as 65100
 neighbor 10.1.1.1 update-source Loopback0
R4#

The iBGP session is now fully established.

R1#show ip bgp summary | begin Neighbor
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.4.4.4        4        65100       9      11       13    0    0 00:04:41        0
172.16.123.2    4        65100     268     267       13    0    0 03:58:50       11
R1#


R4#show ip bgp summary | begin Neighbor
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4        65100       9       7        2    0    0 00:03:04        1
R4#

At this stage, there are two questions that might pop in your mind. 

Why does R4 learn only 1 prefix? The answer to that question deserves another post.

The second question regards R1 advertising the 10.1.1.1/32 towards R2. Now, R1 uses both BGP and EIGRP, what will R2 accept into its routing table?

Let's see what happened there:

R2#show ip bgp | i 10.1.1.1
 r>i 10.1.1.1/32      172.16.123.1             0    100      0 i
R2#
R2#
R2#
R2#show ip route 10.1.1.1
Routing entry for 10.1.1.1/32
  Known via "eigrp 10", distance 90, metric 409600, type internal
  Redistributing via eigrp 10
  Last update from 172.16.123.1 on Ethernet0/0.123, 01:24:55 ago
  Routing Descriptor Blocks:
  * 172.16.123.1, from 172.16.123.1, 01:24:55 ago, via Ethernet0/0.123
      Route metric is 409600, traffic share count is 1
      Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
R2#

The BGP table on R2 show this prefix. However it is marked with r> which stands for 'rib failure' ( routing information base failure). Instead, R2 installs that using EIGRP, But why is that?

Do you remember the Cisco 'Administrative Distance', arbitrarily set for different routing protocols?

iBGP AD = 200
EIGRP AD = 90

The lower the value of AD, the more likely it is for the router to install the prefix.

The EIGRP AD of () is lower than iBGP 200. Thus, EIGRP wins here.

Tuesday, August 4, 2020

BGP Next Hop Attribute




Let's see the behavior of next hop for advertised prefixes over eBGP.


First, let's advertise Loopback0 on R2 so that R8 is receiving at least one prefix from R2.


R2(config)#router bgp 65100
R2(config-router)#neighbor 172.16.28.8 remote-as 65089 R2(config-router)#network 10.2.2.2 mask 255.255.255.255 R2(config-router)#end R2#

R8 is receiving prefix 10.2.2.2/32:



On R8 we can use another, fancy way to extract what prefixes are learned from a direct neighbor AS 65100 like so:

show ip bgp regex ^65100_

 

Now, on to configuring R1 and R2 iBGP peering.

R2 Configuration:

R2(config)#router bgp 65100
R2(config-router)#neighbor 172.16.123.1 remote-as 65100
R2(config-router)#end
R2#

R1 Configuration:


R1(config)#router bgp 65100
R1(config-router)#bgp router-id 10.1.1.1
R1(config-router)#neighbor 172.16.123.2 remote-as 65100
R1(config-router)#network 10.1.1.1 mask 255.255.255.255
R1(config-router)#end
R1#

First let's take a peek at R8 BGP table.

All looks good. The next hop is 172.16.28.2 which is reachable via direct link.

What about R1 BGP table?
R1 shows 11 prefixes received. However, in the above output there is no '>' (greater than) symbol next to the asterisk. The '>' symbol indicates the best path that is currently missing for all prefixes advertised by R8. As a result of that, none of the prefixes listed will be installed in the routing table.

Notice the 'next-hop-value' for these prefixes!


R1#show ip route 172.16.28.8
% Subnet not in table
R1#
R1#
R1#show ip bgp 10.8.0.0
BGP routing table entry for 10.8.0.0/28, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  Refresh Epoch 1
  65089
    172.16.28.8 (inaccessible) from 172.16.123.2 (10.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal
R1

The next hop is preserved in eBGP advertisements (R8's interface IP address that is used for peering with R2). And it is not reachable. That is why, BGP prefixes won't get installed in the routing table.

R1#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 2 subnets
B        10.2.2.2 [200/0] via 172.16.123.2, 00:12:00
R1#

There are a few ways of dealing with this issue.


Method 1

Use 'next-hop-self' Command on R2 for peer R1. It is the recommended command on the router that connects eBGP with iBGP peers.

router bgp 65100
 bgp router-id 10.2.2.2
 bgp log-neighbor-changes
 network 10.2.2.2 mask 255.255.255.255
 neighbor 172.16.28.8 remote-as 65089
 neighbor 172.16.123.1 remote-as 65100
 neighbor 172.16.123.1 next-hop-self
R2(config-router)#

The result on R1 is this:




R1 finds next-hop-ip reachable (direct link).
Removing this command and trying a second method.


R2(config)#router bgp 65100
R2(config-router)#no neighbor 172.16.123.1 next-hop-self
R2(config-router)#

After a 15 or so seconds the '>' best path shows up in the BGP table on R1:


And the prefixes will be installed in the routing table on R1:


Remove configuration in BGP process:

no neighbor 172.16.123.1 next-hop-self


Method 2

Change 'next-hop' attribute using route-map.


route-map NEXT_HOP permit 10
 set ip next-hop 172.16.123.2
!
router bgp 65100
 bgp router-id 10.2.2.2
 bgp log-neighbor-changes
 network 10.2.2.2 mask 255.255.255.255
 neighbor 172.16.28.8 remote-as 65089
 neighbor 172.16.123.1 remote-as 65100
 neighbor 172.16.123.1 route-map NEXT_HOP out

Remove the configuration and try the third method.


Method 3

Advertise link (IP) between R2 and R8 using an IGP protocol (for instance EIGRP/OSPF/IS-IS, etc).


R1 EIGRP Configuration:

router eigrp 100
 network 172.16.123.1 0.0.0.0
 eigrp router-id 10.1.1.1

R2 EIGRP Configuration:

router eigrp 100
 network 172.16.28.2 0.0.0.0
 network 172.16.123.2 0.0.0.0
 eigrp router-id 10.2.2.2

That does the trick as well. R1 learns how to reach next-hop 172.16.28.8 via EIGRP.

R1#show ip route 172.16.28.8
Routing entry for 172.16.28.0/24
  Known via "eigrp 100", distance 90, metric 307200, type internal
  Redistributing via eigrp 100
  Last update from 172.16.123.2 on Ethernet0/0.123, 00:04:23 ago
  Routing Descriptor Blocks:
  * 172.16.123.2, from 172.16.123.2, 00:04:23 ago, via Ethernet0/0.123
      Route metric is 307200, traffic share count is 1
      Total delay is 2000 microseconds, minimum bandwidth is 10000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
R1#

And the last method would be to redistribute connected network 172.16.28.0 into IGP protocol.

BGP Network Statement




As of now, there are a number of Loopback interfaces in R8's configuration.


These loopback subnets have different mask length to illustrate an important point: BGP can only advertise the networks/subnets with exact mask found in the routing table. Also, if the network/mask pair of the interface being advertised is not a classful network, the keyword 'mask' mast be present as shown below BGP configuration. All below interfaces are subnets of class A network.


interface Loopback0
 ip address 10.8.8.8 255.255.255.255
!
interface Loopback10
 ip address 10.8.0.1 255.255.255.240
!
interface Loopback11
 ip address 10.8.0.17 255.255.255.240
!
interface Loopback12
 ip address 10.8.0.33 255.255.255.240
!
interface Loopback13
 ip address 10.8.0.49 255.255.255.240
!
interface Loopback14
 ip address 10.8.80.1 255.255.255.0
!
interface Loopback15
 ip address 10.8.81.1 255.255.255.0
!
interface Loopback16
 ip address 10.8.82.1 255.255.255.0
!
interface Loopback17
 ip address 10.8.83.1 255.255.255.0

 Here's the R8 Configuration that advertises those prefixes:

R8(config)#router bgp 65089
R8(config-router)#network 10.8.8.8 mask 255.255.255.255
R8(config-router)#network 10.8.0.0 mask 255.255.255.240
R8(config-router)#network 10.8.0.16 mask 255.255.255.240
R8(config-router)#network 10.8.0.32 mask 255.255.255.240
R8(config-router)#network 10.8.0.48 mask 255.255.255.240
R8(config-router)#network 10.8.80.0 mask 255.255.255.0  
R8(config-router)#network 10.8.81.0 mask 255.255.255.0
R8(config-router)#network 10.8.82.0 mask 255.255.255.0
R8(config-router)#network 10.8.83.0 mask 255.255.255.0
R8(config-router)#

First a quick check in the BGP routing table of R8 reveals the following:



There are three things that are important to notice. They all indicate that the prefixes have been advertised into BGP on the local router:
  1. Next Hop is 0.0.0.0.
  2. In the 'Path', there is no AS numbers.
  3. The 'Weight' attribute takes default 32768 value.
R2 shows the AS 65089 originating prefixes. The local AS number is 65100. 

 Let's add one more loopback on R8 with a class C network and advertise this one into BGP as well. Notice, there is no 'mask' keyword as the network/mask pair are both class C.

interface Loopback18
 ip address 198.51.100.1 255.255.255.0

BGP prefix advertisement is going to be this:


R8(config)#router bgp 65089
R8(config-router)#network 198.51.100.0 

The alternative way of advertising subnets/networks would be to redistribute them into BGP. I will practice that a bit later.

Saturday, July 25, 2020

iBGP Neighbor Address




When establishing BGP sessions between two nodes, there is one more thing worth noting.



 Let's remove previous configuration and start from scratch.


R1:
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#no router bgp 65104


R4:
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#no router bgp 65104

 Let's rebuild this iBGP peering between R1 and R4, but incorrectly this time. 

First, on R1:
R1(config)#router bgp 65104
R1(config-router)#neighbor 172.16.14.4 remote-as 65104
R1(config-router)#end
R1#

So far, so good. But now, R4's configuration is going to teach us a lesson.


R4(config)#router bgp 65104
R4(config-router)#neighbor 172.16.104.1 remote-as 65104
R4(config-router)#end
R4#

This is not working. iBGP Session is not getting established. What is wrong here?

First debug shows this:

R4#debug ip tcp transactions 
TCP special event debugging is on
R4#u all                     
Reserved port 0 in Transport Port Agent for TCP IP type 0
TCP: connection attempt to port 179
TCP: sending RST, seq 0, ack 1549513988
TCP: sent RST to 172.16.14.1:47137 from 172.16.14.4:179
Released port 0 in Transport Port Agent for TCP IP type 0 delay 240000
TCP0: state was LISTEN -> CLOSED [0 -> UNKNOWN(0)]
TCB 0xF3E55AD0 destroyed
R4#u all
R4#

R4 is sending TCP RST. But why? It is configured to run BGP AS 65104 after all!

Let's tear R1's configuration apart. 

The router process is configured to be AS 65401. So is the AS number on R4. All in order here.

R1 configuration contains the 'neighbor 172.16.14.4 remote-as 65401'. This means, that R1 is going to try to establish iBGP session with R4. Since R1 has two interfaces towards R4, it is going to use the one that routing table uses as best path towards 172.16.14.4. Here it is:

R1#show ip route 172.16.14.4   
Routing entry for 172.16.14.0/24
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Ethernet0/0.14
      Route metric is 0, traffic share count is 1
R1#

In order to send TCP SYN R1 will use its Ethernet0/0.14 to reach 172.16.14.4. It is going to source this request with IP address found on this interface: 172.16.14.1.

A temporary ACL and debug ip packet detail (use in lab only), are going to help see what is going on.

R4(config)#access-list 101 permit ip host 172.16.14.1 any
R4(config)#access-list 101 permit ip host 172.16.14.4 any
R4(config)#

This ACL will be used in the debug.

R4#debug ip packet detail 101
IP packet debugging is on (detailed) for access list 101
R4#
IP: s=172.16.14.1 (Ethernet0/0.14), d=172.16.14.4, len 44, input feature
    TCP src=41155, dst=179, seq=702428119, ack=0, win=16384 SYN, MCI Check(88), rtype 0, forus FALSE, sendself FALSE, mtu 0, fwdchk FALSE
FIBipv4-packet-proc: route packet from Ethernet0/0.14 src 172.16.14.1 dst 172.16.14.4
FIBfwd-proc: Default:172.16.14.4/32 receive entry
FIBipv4-packet-proc: packet routing failed
IP: tableid=0, s=172.16.14.1 (Ethernet0/0.14), d=172.16.14.4 (Ethernet0/0.14), routed via RIB
IP: s=172.16.14.1 (Ethernet0/0.14), d=172.16.14.4 (Ethernet0/0.14), len 44, rcvd 3
    TCP src=41155, dst=179, seq=702428119, ack=0, win=16384 SYN
IP: s=172.16.14.1 (Ethernet0/0.14), d=172.16.14.4
R4#, len 44, stop process pak for forus packet
    TCP src=41155, dst=179, seq=702428119, ack=0, win=16384 SYN
FIBipv4-packet-proc: route packet from (local) src 172.16.14.4 dst 172.16.14.1
FIBfwd-proc: packet routed by adj to Ethernet0/0.14 172.16.14.1
FIBipv4-packet-proc: packet routing succeeded
IP: s=172.16.14.4 (local), d=172.16.14.1 (Ethernet0/0.14), len 40, sending
    TCP src=179, dst=41155, seq=0, ack=702428120, win=0 ACK RST
IP: s=172.16.14.4 (local), d=172.16.14.1 (Ethernet0/0.14), len 40, sending full packet
    TCP src=179, dst=41155, seq=0, ack=702428120, win=0 ACK RST
R4#u all
All possible debugging has been turned off
R4# 

Clearly R4 does not like the request sent by R1. 

The reason is that R4 BGP configuration has the following line:

R4(config)#router bgp 65104
R4(config-router)#neighbor 172.16.104.1 remote-as 65104
R4(config-router)#end
R4#

R4 will try to establish the TCP (BGP) session with R1 using its outgoing interface Ethernet0/0.104.

It expects to receive TCP SYN from R1 with the source IP address 172.16.104.1, not currently seen 172.16.14.1. Establishing session fails on both routers due to the neighbor IP address misconfiguration.

Conclusion

BGP neighbor IP address configured must match IP address of the incoming TCP SYN (port 179) from the peer. If not here's what we see:


R1#show ip bgp summary
BGP router identifier 10.1.1.1, local AS number 65104
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.14.4     4        65104       0       0        1    0    0 never    Idle
R1#

R4#show ip bgp summary
BGP router identifier 10.4.4.4, local AS number 65104
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.104.1    4        65104       0       0        1    0    0 never    Idle
R4#

 Remove the configuration from this (and previous lab). Up next, eBGP session.

Saturday, July 18, 2020

Building iBGP Peering

Previous | Cisco | Next



Key points


BGP Protocol does not discover the neighboring routers running BGP (Peers). Administrator statically defines neighbor IP addresses for the BGP protocol to establish connection.

It uses TCP for transportation with destination port 179 (performs 3-way handshake)

Since BGP protocol uses TCP for transportation, the routers rely on IGP (OSPF/EIGRP/ISIS) to reach each other.

In an unlikely case both BGP peers initiated TCP session at exact same time, only the session originated by the higher BGP Router-ID is maintained. The other TCP session will be dropped.

An iBGP Peering (Internal BGP Peering) is built when the routers share the same AS number (Autonomous System number) which has certain consequences in relation to BGP operation.

If the routers forming BGP session do not share the same AS, they establish eBGP (External BGP) peering). There are some important differences between iBGP and eBGP operation (more on that in future labs).

Router allows only one AS to be configured.

BGP Router ID is chosen in the following order (the same as OSPF selection process):
  1. Prefer, manually assigned Router ID.
  2. If there is no manually assigned Router ID, use the highest IP address of configured Loopback interface.
  3. If there is no manually configured Router ID, and no Loopback with configured IP address, use the highest IP address found on the physical interface.

Lab Topology



Here’s the R1 BGP configuration:

R1#conf t
R1(config)#router bgp 65100
R1(config-router)#bgp router-id 10.1.1.1
R1(config-router)#neighbor 172.16.14.4 remote-as 65100
R1(config-router)#end
R1#


In English this would, more or less, mean this:

Enter the global confiugation mode (conf t).

Start BGP process with AS number 65100 (router bgp 65100).

Manually assign BGP router id to be 10.1.1.1 (bgp router-id 10.1.1.1). 

Initiate iBGP session to the IP address 172.16.14.4 (neighbor 172.16.14.4 remote-as 65100)

Get back to privileged mode (end).

What happens now with ‘neighbor 172.16.14.4 remote-as 65100’ statement, is that R1 is going to perform a routing table lookup trying to determine if it knows how to reach the neighbor. It does know the path to the neighbor as shown below:

R1#show ip route 172.16.14.4
Routing entry for 172.16.14.0/24
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Ethernet0/0.14
      Route metric is 0, traffic share count is 1
R1#

Since this is a lab not a production equipment I can use all sorts of methods to inspect what’s happening behind the curtain. Let’s take a sneak peek using ‘debug ip tcp transactions’ enabled on both R1 and R4.

R1 Debug Output:

  
R1#debug ip tcp transactions
TCP special event debugging is on
R1#
TCBF316C348 created
TCBF316C348 setting property TCP_VRFTABLEID (20) F3ED29DC
TCBF316C348 setting property TCP_MD5KEY (4) 0
TCBF316C348 setting property TCP_ACK_RATE (37) F31765E8
TCBF316C348 setting property TCP_TOS (11) F3176604
TCBF316C348 setting property TCP_PMTU (45) F3176590
TCBF316C348 setting property TCP_IN_TTL (34) F31765A4
TCBF316C348 setting property TCP_OUT_TTL (35) F31765A4
TCBF316C348 setting property TCP_OUT_TTL (35) F3ED2BF2
TCBF316C348 setting property TCP_RTRANSTMO (36) F31765E4
TCP: Random local port generated 44659, network 1
TCBF316C348 bound to 172.16.14.1.44659
Reserved port 44659 in Transport Port Agent for TCP IP type 1
R1#
TCP: sending SYN, seq 2088596354, ack 0
TCP0: Connection to 172.16.14.4:179, advertising MSS 1460
TCP0: state was CLOSED → SYNSENT [44659 → 172.16.14.4(179)]
Released port 44659 in Transport Port Agent for TCP IP type 1 delay 240000
TCP0: state was SYNSENT  CLOSED [44659  172.16.14.4(179)]
TCP0: bad seg from 172.16.14.4 -- closing connection: port 44659 seq 0 ack 2088596355 rcvnxt 0 rcvwnd 0 len 0
TCP0: connection closed - remote sent RST
TCB 0xF316C348 destroyed
R1#u all
All possible debugging has been turned off

TCP block is created and bound to local IP 172.16.14.1, TCP source port 44659 is randomly chosen.
The source IP 172.16.14.1 is going to be used to communicate with the neighbor (IP address of the outgoing interface towards 172.16.14.4 - Ethernet0/0.14).

R1 is using TCP trying to establish session src: 172.16.14.1:44659 dst: 172.16.14.4:179.

This attempt fails due to TCP RST sent by 172.16.14.4. The reason RST is sen is that R4 has the port 179 currently closed. R4 BGP configuration is missing. TCP Control Block is destroyed. And shortly R1 is going to repeat the same process in an endless loop.

Let’s configure R4 to complete iBGP session with R1.

R4 - BGP Configuration:

  
router bgp 65104
 bgp router-id 10.4.4.4
 neighbor 172.16.14.1 remote-as 65104

Now, with proper BGP configuration on both devices, R1 shows the following output in the debug:
  

R1#debug ip tcp transactions 
TCP special event debugging is on
R1#
TCBF316C998 created
TCBF316C998 setting property TCP_VRFTABLEID (20) F3ED29DC
TCBF316C998 setting property TCP_MD5KEY (4) 0
TCBF316C998 setting property TCP_ACK_RATE (37) F3F83DA0
TCBF316C998 setting property TCP_TOS (11) F3F83DBC
TCBF316C998 setting property TCP_PMTU (45) F3F83D48
TCBF316C998 setting property TCP_RTRANSTMO (36) F3F83D9C
TCP: Random local port generated 24819, network 1
TCBF316C998 bound to 172.16.14.1.24819
Reserved port 24819 in Transport Port Agent for TCP IP type 1
TCP: sending SYN, seq 3941922061, ack 0
TCP0: Connection to 172.16.14.4:179, advertising MSS 1460
TCP0: state was CLOSED → SYNSENT [24819 → 172.16.14.4(179)]
TCP0: state was SYNSENT → ESTAB [24819 → 172.16.14.4(179)]
TCP: tcb F316C998 connection to 172.16.14.4:179, peer MSS 1460, MSS is 1460
TCBF316C998 connected to 172.16.14.4.179
TCBF316C998 setting property TCP_NO_DELAY (0) F3F83D9C
TCBF316C998 setting property TCP_RTRANSTMO (36) F3F83D9C
R1#
%BGP-5-ADJCHANGE: neighbor 172.16.14.4 Up 
R1#u all
All possible debugging has been turned off


And below is R4 output. Both are self-explanatory

R4#debug ip tcp transactions
TCP special event debugging is on
R4#
TCBF31AB410 created
TCBF31AB410 setting property TCP_PMTU (45) F31764C8
TCBF31AB410 setting property TCP_TOS (11) F31764F0
TCBF31AB410 setting property TCP_VRFTABLEID (20) F31AB0D4
TCBF31AB410 bound to 0.0.0.0.179
TCBF31AB410 setting property TCP_ACCESS_CHECK (5) 8F076F8
TCBF31AB410 setting property TCP_MD5KEY (4) 0
Reserved port 179 in Transport Port Agent for TCP IP type 1
TCBF31AB410 listening with queue 1

TCBF31C6948 created
TCP0: state was LISTEN → SYNRCVD [179 → 172.16.14.1(24819)]
TCP: tcb F31C6948 connection to 172.16.14.1:24819, peer MSS 1460, MSS is 516
TCP: sending SYN, seq 991876611, ack 3941922062
TCP0: Connection to 172.16.14.1:24819, advertising MSS 1460
TCP0: state was SYNRCVD → ESTAB [179 → 172.16.14.1(24819)]
TCBF31AB410 accepting F31C6948 from 172.16.14.1.24819
TCBF31C6948 setting property TCP_VRFTABLEID (20) F31AB0D4
TCBF31C6948 setting property TCP_PMTU (45) F3F0A150
TCBF31C6948 setting property TCP_NO_DELAY (0) F3F0A178
TCBF31C6948 setting property TCP_ACK_RATE (37) F3F0A180
TCBF31C6948 setting property TCP_RTRANSTMO (36) F3F0A178
%BGP-5-ADJCHANGE: neighbor 172.16.14.1 Up 
R4#
TCP0: ACK timeout timer expired
R4#u all
All possible debugging has been turned off


Another lab trick (do not attempt to use such debugs on the production equipment as they may crash), is to use ‘debug ip packet detail’ to see that exchange.

Here it is on R4:

R4(config)#access-list 100 permit tcp any host 172.16.14.1
R4(config)#access-list 100 permit tcp host 172.16.14.1 any

R4(config)#router bgp 65104
R4(config-router)#no neighbor 172.16.14.1
R4(config-router)#do debug ip packet detail 100
R4(config-router)#neighbor 172.16.14.1 remote-as 65104
R4(config-router)#end
R4#


This produces rather large output. But here is the gist:


  
R4#
FIBipv4-packet-proc: route packet from (local) src 172.16.14.4 dst 172.16.14.1
FIBfwd-proc: packet routed by adj to Ethernet0/0.14 172.16.14.1
FIBipv4-packet-proc: packet routing succeeded
IP: s=172.16.14.4 (local), d=172.16.14.1 (Ethernet0/0.14), len 44, sending
    TCP src=35036, dst=179, seq=3608906138, ack=0, win=16384 SYN
IP: s=172.16.14.4 (local), d=172.16.14.1 (Ethernet0/0.14), len 44, sending full packet
    TCP src=35036, dst=179, seq=3608906138, ack=0, win=16384 SYN
IP: s=172.16.14.1 (Ethernet0/0.14), d=172.16.14.4, len 44, rcvd 0
    TCP src=179, dst=35036, seq=2263598807, ack=3608906139, win=16384 ACK SYN
FIBipv4-packet-proc: route packet from (local) src 172.16.14.4 dst 172.16.14.1
FIBfwd-proc: packet routed by adj to Ethernet0/0.14 172.16.14.1
FIBipv4-packet-proc: packet routing succeeded
IP: s=172.16.14.4 (local), d=172.16.14.1 (Ethernet0/0.14), len 40, sending
    TCP src=35036, dst=179, seq=3608906139, ack=2263598808, win=16384 ACK


The take away from this TCP 3-way exchange is that R4 becomes a client, R1 is a server, and the TCP session has been established.

Here is the proof:

  
R4#show tcp brief
TCB       Local Address               Foreign Address             (state)
F31F82F0  172.16.14.4.35036           172.16.14.1.179              ESTAB
R4#

R4#show ip bgp neighbor 172.16.14.1
BGP neighbor is 172.16.14.1,  remote AS 65104, internal link
  BGP version 4, remote router ID 10.1.1.1
  BGP state = Established, up for 00:11:43
[snip]
Local host: 172.16.14.4, Local port: 35036
Foreign host: 172.16.14.1, Foreign port: 179
[snip]


The ‘internal link’ means it is an iBGP sessions. Both R1 and R4 share the same AS number 65104.

In the following output, notice two things:
  • State shows nothing (it means it is established)
  • PfxRcd (prefixes received) is 0

  
R4#show ip bgp summary
BGP router identifier 10.4.4.4, local AS number 65104
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.14.1     4        65104      23      23        1    0    0 00:16:56        0
R4#


Unlike IGP routing protocols (OSPF/ISIS/EIGRP/RIP), BGP does not advertise any network prefixes. They will need to be advertised manually by the admin.

Cisco Is Easy - Main

  Cisco Basics (CCNA level)  Lessons: Watch Video Tutorials on Youtube 01 - Connecting to Cisco Console Port with MINICOM 02 - Navigatin...