Saturday , November 23 2024
Home / IP Routing / basic BGP in Huawei CLI – part 2

basic BGP in Huawei CLI – part 2

This article is a continuation of the basic BGP with Huawei CLI.

Today I want to explain you, why labnarioR5 router cannot ping BGP prefixes advertised by BGP AS50. Do you remember our BGP topology? I have configured BGP protocol as in the picture below:

 

There are three BGP Autonomous Systems: AS50, AS100 and AS55. All are connected via EBGP peering sessions. AS100 has three routers forming IBGP full mesh. LabnarioR1 router in AS50 advertises three prefixes:

  • 11.10.10.0/24
  • 12.10.10.0/24
  • 13.10.10.0/24

All these prefixes are advertised by the routers in AS100 and pass to AS55. LabnarioR5 router has these prefixes in its BGP and routing tables, but cannot ping them. Why is it like that?

As the first step I want to check labnarioR5 router’s routing and BGP tables:

<labnarioR5>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 10       Routes : 10       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     11.10.10.0/24  EBGP    255  0           D   155.100.35.3    Serial0/0/0  
     12.10.10.0/24  EBGP    255  0           D   155.100.35.3    Serial0/0/0 
     13.10.10.0/24  EBGP    255  0           D   155.100.35.3    Serial0/0/0 
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
   155.100.35.0/24  Direct  0    0           D   155.100.35.5    Serial0/0/0
   155.100.35.3/32  Direct  0    0           D   155.100.35.3    Serial0/0/0
   155.100.35.5/32  Direct  0    0           D   127.0.0.1       Serial0/0/0
   155.100.45.0/24  Direct  0    0           D   155.100.45.5    Ethernet0/0/0
   155.100.45.5/32  Direct  0    0           D   127.0.0.1       Ethernet0/0/0

It looks like labnarioR5 has all three prefixes installed in its routing table. Let’s see BGP table:

<labnarioR5>dis bgp routing-table 

 BGP Local router ID is 155.100.45.5 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 6
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   11.10.10.0/24     155.100.35.3                          0      100 50i
 *                      155.100.45.4                          0      100 50i
 *>   12.10.10.0/24     155.100.35.3                          0      100 50i
 *                      155.100.45.4                          0      100 50i
 *>   13.10.10.0/24     155.100.35.3                          0      100 50i
 *                      155.100.45.4                          0      100 50i

It looks like labnarioR5 has all three prefixes installed in its both BGP and routing tables. So, is my BGP protocol configured correctly? Yes it is.

When troubleshooting routing issues, it is helpful to use the ICMP protocol with the ICMP debugging. I will try to debug ICMP on labnarioR1 and check, what the source IP address of the ICMP packet sent by the labnarioR5 router is:

<labnarioR1>debugging ip icmp
<labnarioR1>terminal monitor
<labnarioR1>terminal debugging

Now I can ping BGP prefix from R5 router:

[labnarioR5]ping 11.10.10.1
  PING 11.10.10.1: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out

Let’s check debugging output on labnarioR1:

<labnarioR1>
Mar  4 2013 21:44:46.710.1-08:00 labnarioR1 IP/7/debug_icmp:
ICMP Receive: echo(Type=8, Code=0), Src = 155.100.35.5, Dst = 11.10.10.1, ICMP I
d = 0xabd3, ICMP Seq = 3

Mar  4 2013 21:44:46.710.2-08:00 labnarioR1 IP/7/debug_icmp:
ICMP Send: echo-reply(Type=0, Code=0), Src = 11.10.10.1, Dst = 155.100.35.5, ICM
P Id = 0xabd3, ICMP Seq = 3

To successfully send ICMP reply packet, labnarioR1 has to be able to reach the source IP address of the packet. Let’s check if 155.100.35.0/24 prefix exists in its routing table:

<labnarioR1>dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 10       Routes : 10       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     11.10.10.0/24  Direct  0    0           D   11.10.10.1      LoopBack0
     11.10.10.1/32  Direct  0    0           D   127.0.0.1       LoopBack0
     12.10.10.0/24  Direct  0    0           D   12.10.10.1      LoopBack1
     12.10.10.1/32  Direct  0    0           D   127.0.0.1       LoopBack1
     13.10.10.0/24  Direct  0    0           D   13.10.10.1      LoopBack2
     13.10.10.1/32  Direct  0    0           D   127.0.0.1       LoopBack2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
   150.100.12.0/24  Direct  0    0           D   150.100.12.1    Ethernet0/0/0
   150.100.12.1/32  Direct  0    0           D   127.0.0.1       Ethernet0/0/0

LabnarioR1 does not know how to reach the 155.100.35.0/24 network. How to solve this problem?

There are two different solutions. The easiest way is to just advertise 155.100.35.0/24 network in the BGP protocol. The second one is to configure additional IGP protocol between our routers and advertise all the connected networks. I will use the first solution:

[labnarioR5]bgp 55
[labnarioR5-bgp]network 155.100.35.0 255.255.255.0
[labnarioR5-bgp]

Now I can try to ping BGP network once again:

[labnarioR5-bgp]ping 11.10.10.1
  PING 11.10.10.1: 56  data bytes, press CTRL_C to break
    Reply from 11.10.10.1: bytes=56 Sequence=1 ttl=253 time=110 ms
    Reply from 11.10.10.1: bytes=56 Sequence=2 ttl=253 time=80 ms
    Reply from 11.10.10.1: bytes=56 Sequence=3 ttl=253 time=60 ms
    Reply from 11.10.10.1: bytes=56 Sequence=4 ttl=253 time=70 ms
    Reply from 11.10.10.1: bytes=56 Sequence=5 ttl=253 time=70 ms

  --- 11.10.10.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 60/78/110 ms

Now labnarioR5 can successfully ping BGP networks advertised by labnarioR1.

Leave a Reply

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