No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ:Can the Next Hop of Direct EBGP Changed on NE40Es?

Publication Date:  2019-04-11 Views:  80 Downloads:  0

Issue Description

Device model: NE40E
Software version: V800R008C10SPC500
Symptom: Can a route-policy be used to change the next hop when a direct EBGP peer relationship is established on two NE40Es?

Scenario description: An EBGP peer relationship is established between R1 and R2.

Configuration of R1:
route-policy outbound permit node 10
if-match xxxx
apply ip-address next-hop x.x.x.x
bgp xxxx
peer R2 route-policy outbound export

Can the next hop of the routes received by R2 from R1 be changed based on the route-policy?

Solution

The associated configuration is as follows:
Router 1:
[~HUAWEI_router1-bgp]dis this
#
bgp 211
peer 1.35.1.2 as-number 100

#
ipv4-family unicast
  undo synchronization
  peer 1.35.1.2 enable
  peer 1.35.1.2 route-policy 1 export
#
return
[~HUAWEI_router1-bgp]disp current-configuration configuration route-policy 1
#
route-policy 1 permit node 10
apply ip-address next-hop 1.35.1.3
#
return

Router 2:
[~HUAWEI_router2-bgp]disp c c bgp
#
bgp 100
peer 1.35.1.1 as-number 211
#
ipv4-family unicast
  undo synchronization
  peer 1.35.1.1 enable
#
return

Before the next hop is changed:
[~HUAWEI_router2-bgp]disp bgp routing-table 1.2.3.4

 BGP local router ID : 1.1.11.5
Local AS number : 100
Paths:   1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of 1.2.3.4/32:
From: 1.35.1.1 (2.4.0.4) 
 Route Duration: 0d00h00m19s
Direct Out-interface: GigabitEthernet0/3/5
Original nexthop: 1.35.1.1
Qos information : 0x0           
 AS-path 211, origin incomplete, MED 0, pref-val 0, valid, external, best, select, pre 255
Not advertised to any peer yet

After the next hop is changed:
[~HUAWEI_router2-bgp]disp bgp routing-table 1.2.3.4

 BGP local router ID : 1.1.11.5
Local AS number : 100
Paths:   1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of 1.2.3.4/32:
From: 1.35.1.1 (2.4.0.4) 
 Route Duration: 0d00h00m04s
Direct Out-interface: GigabitEthernet0/3/5
Original nexthop: 1.35.1.3
Qos information : 0x0           
 AS-path 211, origin incomplete, MED 0, pref-val 0, valid, external, best, select, pre 255
Not advertised to any peer yet

If the EBGP peer relationship is established through physical connections,
1. The next-hop address cannot be changed on the receive end through an import routing policy.
2. The next-hop address can be changed by configuring an export routing policy on the transmit end device. However, traffic is discarded if the next hop is unreachable after this route reaches the EBGP peer. Therefore, exercise caution while performing this configuration.

-END

END