next-hop-self for update received from iBGP neighbor

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi, 

will next-hop-self still work for bgp update received from iBGP neighbor in ExtremeXOS?

for example for cisco additional routemap is required:

route-map RM-NHS
set ip next-hop peer-address
neighbor X.X.X.X route-map out RM-NHS

While for juniper it works by default for iBGP neighbors  within different clusters
Photo of Tatiana

Tatiana

  • 146 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Henrique

Henrique, Employee

  • 10,302 Points 10k badge 2x thumb
Hi Tatiana,

To configure outgoing updates to the specified neighbors to specify the address of the BGP connection originating the update as the next hop address, use the following command:

configure bgp neighbor <remoteaddr> next-hop-self 

IPv4 unicast address family will be used by default. For IPv6 you must specify the option in the command.
Photo of Henrique

Henrique, Employee

  • 10,302 Points 10k badge 2x thumb
Hi Tatiana, 

Please see below the commands applied for router "B":

regrabgp.pol

entry R1 {    
       if match any {
                        nlri  0.0.0.0/0;
                   } then {
                      next-hop 192.168.1.6;
                  } 
}

Command 1: configure bgp neighbor 192.168.1.8 next-hop-self
Command 2: configure bgp neighbor 192.168.1.8 route-policy out regrabgp

I have tried using only command 1, then only command 2 and then both. Got same results on all 3 tests.
Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 13,284 Points 10k badge 2x thumb
I can't verify now, but I think nlri matches by default with an exact. So, unless you are testing with an actual default route, your routing policy doesn't match.

Check the routing policy chapter and look for nlri and next-hop keywords in the table to be sure.
Photo of Henrique

Henrique, Employee

  • 10,302 Points 10k badge 2x thumb
Hi, I have just tested with the policy below and worked:

Policy: regrabgp

entry R1 {
if match any {
         nlri 123.123.123.0/24 exact;
        } then {
               next-hop <router B loopback>;
               permit ;
            }
}

To match any routes with /24 mask-length you can use:

Policy: regrabgp

entry R1 { 
if match any { 
         nlri any/24 exact;
        } then {
               next-hop <router B loopback>;
               permit ;
            }
}

BGP configuration for router B for the neighbor Router A:

create bgp neighbor 192.168.1.8 remote-AS-number 100 multi-hop
configure bgp neighbor 192.168.1.8 route-reflector-client
configure bgp neighbor 192.168.1.8 source-interface ipaddress 192.168.1.6
configure bgp neighbor 192.168.1.8 route-policy out regrabgp
enable bgp neighbor 192.168.1.8


Thanks Stephane to mention the routing-policy concepts. :-)

Tatiana, please let us know if that worked for you.
Photo of Tatiana

Tatiana

  • 146 Points 100 badge 2x thumb
Thanks   Henrique, it helped,
We tested it on the equipment and route-map made his work. 
Photo of Henrique

Henrique, Employee

  • 10,302 Points 10k badge 2x thumb