Categories R&S

BGP – implement and troubleshoot Peerings – EBGP Peerings

We will now have a look at eBGP peering

 

Requirements:

Configure eBGP on R6 (AS 100) to peer with R10 (AS 10) and R3 (AS100) to peer with R20 (AS 20).

 

Diagram:

eBGP Peerings

 

Configuration and verification:

 

Let’s start with the peering between R6 and R10.

R6(config)#router bgp 100
R6(config-router)#neigh 192.168.10.1 remote-as 10

R10(config)#router bgp 10
R10(config-router)#neighbor 192.168.10.0 remote-as 100

 

The log message indicates that BGP session is UP:

%BGP-5-ADJCHANGE: neighbor 192.168.10.0 Up

 

Let’s have a look on R6 and the detail of our neighbor R10.

We can see the remote AS, the BGP state and the TTL.

 

The TTL is set to 1 so our neighbor need to be directly connected.

R6#sh ip bgp neigh 192.168.10.1
BGP neighbor is 192.168.10.1,  remote AS 10, external link
  BGP version 4, remote router ID 10.10.1.10
  BGP state = Established, up for 00:03:49
  Last read 00:00:05, last write 00:00:19, hold time is 180, keepalive interval is 60 seconds
  Neighbor sessions:
    1 active, is not multisession capable (disabled)
SNIP
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 192.168.10.0, Local port: 56690
Foreign host: 192.168.10.1, Foreign port: 179

 

On R10, we are learning all the routes, the next hop is set to R6 ip address.

R10#sh ip route bgp
      10.0.0.0/32 is subnetted, 7 subnets
B        10.100.1.1 [20/0] via 192.168.10.0, 00:06:45
B        10.100.1.2 [20/0] via 192.168.10.0, 00:06:45
B        10.100.1.3 [20/0] via 192.168.10.0, 00:06:45
B        10.100.1.4 [20/0] via 192.168.10.0, 00:06:45
B        10.100.1.5 [20/0] via 192.168.10.0, 00:06:45
B        10.100.1.6 [20/0] via 192.168.10.0, 00:06:45

R10#sh ip bgp
BGP table version is 7, local router ID is 10.10.1.10
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.100.1.1/32    192.168.10.0                           0 100 ?
 *>  10.100.1.2/32    192.168.10.0                           0 100 ?
 *>  10.100.1.3/32    192.168.10.0                           0 100 ?
 *>  10.100.1.4/32    192.168.10.0                           0 100 ?
 *>  10.100.1.5/32    192.168.10.0                           0 100 ?
 *>  10.100.1.6/32    192.168.10.0             0             0 100 ?

 

However, we are not able to ping R4 loopback.

R10#ping 10.100.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.100.1.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

 

On R6, we are not learning any route from R10.

So let’s advertise R10 loopback into BGP and see if R6 and his iBGP peers are learning the route to R10 loopback.

R10(config)#router bgp 10
R10(config-router)#network 10.10.1.10 mask 255.255.255.255

R6#sh ip bgp
BGP table version is 11, local router ID is 10.100.1.6
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.10.1.10/32    192.168.10.1             0             0 10 i
 *>i 10.100.1.1/32    10.100.10.65             0    100      0 ?
 *>i 10.100.1.2/32    10.100.10.2              0    100      0 ?
 *>i 10.100.1.3/32    10.100.10.18             0    100      0 ?
 *>i 10.100.1.4/32    10.100.10.34             0    100      0 ?
 *>i 10.100.1.5/32    10.100.10.50             0    100      0 ?
 *>  10.100.1.6/32    0.0.0.0                  0         32768 ?

R4#sh ip bgp
BGP table version is 6, local router ID is 10.100.1.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
 * i 10.10.1.10/32    192.168.10.1             0    100      0 10 i
 *>i 10.100.1.1/32    10.100.10.1              0    100      0 ?
 *>i 10.100.1.2/32    10.100.10.33             0    100      0 ?
 *>i 10.100.1.3/32    10.100.10.18             0    100      0 ?
 *>  10.100.1.4/32    0.0.0.0                  0         32768 ?
 *>i 10.100.1.6/32    10.100.10.66             0    100      0 ?

 

So R6 gets the route to 10.10.1.10/32 and it is declared as best.

 

On R4, the route is there but it is not declare as best, so it is not in the routing table.

The reason is because R4 has no route to the next hop.

R4#sh ip route 10.10.1.10
% Subnet not in table
R4#sh ip route 192.168.10.1
% Network not in table

 

In order to make this work we need R6 to modify the next hop value for the route learned from R10.

R6(config)#router bgp 100
R6(config-router)#neighbor 10.100.10.2 next-hop-self
R6(config-router)# neighbor 10.100.10.18 next-hop-self
R6(config-router)# neighbor 10.100.10.34 next-hop-self
R6(config-router)# neighbor 10.100.10.50 next-hop-self
R6(config-router)# neighbor 10.100.10.65 next-hop-self
R6#clear ip bgp *

 

Now on R4 the route to R10 is installed in the routing table and we can ping from R10 to R4 loopback.

R4#sh ip bgp
BGP table version is 12, local router ID is 10.100.1.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
 *>i 10.10.1.10/32    10.100.10.66             0    100      0 10 i

R4#sh ip route 10.10.1.10
Routing entry for 10.10.1.10/32
  Known via "bgp 100", distance 200, metric 0
  Tag 10, type internal
  Last update from 10.100.10.66 00:01:21 ago
  Routing Descriptor Blocks:
  * 10.100.10.66, from 10.100.10.66, 00:01:21 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 10
      MPLS label: none

R10#ping 10.100.1.4 so loo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.100.1.4, timeout is 2 seconds:
Packet sent with a source address of 10.10.1.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms

 

 

Let’s now configure the peering between R3 and R20.

R20(config)#router bgp 20
R20(config-router)#neighbor 192.168.20.0 remote-as 100
R20(config-router)#network 10.20.1.20 mask 255.255.255.255

R3(config)#router bgp 100
R3(config-router)#neigh 192.168.20.1 remote-as 20
R3(config-router)# neighbor 10.100.10.1 next-hop-self
R3(config-router)# neighbor 10.100.10.17 next-hop-self
R3(config-router)# neighbor 10.100.10.34 next-hop-self
R3(config-router)# neighbor 10.100.10.50 next-hop-self
R3(config-router)# neighbor 10.100.10.66 next-hop-self

 

On R10, we now learn the prefix of R20 loopback and we can ping it to.

R10#sh ip bgp
BGP table version is 36, local router ID is 10.10.1.10
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.10.1.10/32    0.0.0.0                  0         32768 i
 *>  10.20.1.20/32    192.168.10.0                           0 100 20 i

R10#ping 10.20.1.20 so loo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.1.20, timeout is 2 seconds:
Packet sent with a source address of 10.10.1.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/6 ms

 

 

That’s all for this intro to eBGP, as you can see there will be more and more to explore in the next post.

 

Thank you for reading.

 

 

BGP – implement and troubleshoot Peerings – EBGP Peerings