< Home

Configuring Next_Hop Attributes for Routes

The configuration of the next hop affects whether the next hop is set to the address of the router itself. BGP has certain common rules. Whether the next hop address is reachable is the first matching point in BGP route selection.

Procedure

  • Modify the next hop when advertising a route to an IBGP peer.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv4 unicast address family view.

      ipv4-family unicast

    4. Set the address of a router as the next hop when routes are advertised.

      peer { ipv4-address | group-name } next-hop-local

      By default, a device does not change the next-hop address of a route learned from an EBGP peer before forwarding the route to IBGP peers. The next-hop address of a route advertised by an EBGP peer to this device is the address of the EBGP peer. After being forwarded to IBGP peers, this route cannot become an active route because the next hop is unreachable. The relevant ASBR must be configured to change the next-hop address of the route to the ASBR's own IP address before the ASBR advertises the route to an IBGP peer. The route is active on the IBGP peer if the next hop is reachable

      If BGP load balancing is configured, the local router changes the next hop address to its own address when advertising routes to IBGP peer groups, regardless of whether the peer next-hop-local command is used.

  • Configure the device not to modify the next hop address when advertising a route learned from an IGP to an IBGP peer.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv4 unicast address family view.

      ipv4-family unicast

    4. Configure the device not to modify the next hop address when the router advertises an imported IGP route to its peer.

      peer { ipv4-address | group-name } next-hop-invariable

      By default, when a peer advertises an imported IGP route, the peer changes the next hop address to the address of the interface connecting the local router and the remote peer.

  • Configure the device not to modify the next hop address when advertising a route to an EBGP peer.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv4 unicast address family view.

      ipv4-family unicast

    4. Configure the AS Boundary Router (ASBR) not to modify the next hop when advertising a route to an EBGP peer.

      peer { group-name | ipv4-address } next-hop-invariable

      By default, PEs of different ASs set up EBGP peers, and modify the next hop address when the PEs advertise routes.

      In the inter-AS VPN option C networking where route reflectors (RRs) are used, the peer next-hop-invariable command needs to be run to prevent the RRs from changing the next-hop address of a route when the RRs advertise the route to EBGP peers. This ensures that the remote PE iterates a route to the BGP Label Switched Path (LSP) destined for the local PE during traffic transmission.

  • Enable next-hop iteration based on the routing policy.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv4 unicast address family view.

      ipv4-family unicast

    4. Enable the next-hop iteration based on the specified routing policy.

      nexthop recursive-lookup route-policy route-policy-name

      By default, the next-hop iteration based on the specified routing policy is disabled.

      The next-hop iteration based on the specified routing policy can control the iterated route according to certain conditions. The route that fails to match the routing policy is ignored.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >