EBGP Configuration on Huawei Router

Here is sample tutorial on how to configure External Border Gateway Protocol (EBGP) between Huawei Router and another router. I will focus on the configuration of the Huawei router (RouterA).


1. Configure the Loopback IP address

a. Enter system view
command: system-view

Enter system view, return user view with return command.

<RouterA>interface LoopBack0
<RouterA>description RouterA Loopback0
<RouterA>ip address

<RouterA>display current-configuration interface LoopBack 0

2. Configure the P2P(point to point) IP, we will assume that the connectivity between the 2 routers are in 100GigaEthernet interface and configured in Bundle via LACP

a. Configure the physical interface

<RouterA>interface 100GE6/0/0
<RouterA>description Connection to Peer
<RouterA>undo shutdown
<RouterA>damp-interface enable
<RouterA>eth-trunk 8
<RouterA>undo lldp enable
<RouterA>undo dcn

b. Configure the Eth-Trunk

<RouterA>interface Eth-Trunk8
<RouterA>description Eth-Trunk to Peer
<RouterA>set flow-stat interval 10
<RouterA>ip address
<RouterA>trust upstream default
<RouterA>mode lacp-static
<RouterA>lacp timeout fast


<RouterA>display current-configuration interface 100GE6/0/0
<RouterA>display current-configuration interface Eth-Trunk8
<RouterA>display interface Eth-Trunk8
<RouterA>display lacp statistics Eth-Trunk8

Ping the P2P IP to verify connectivity:

PING 56 data bytes, press CTRL_C to break
Reply from bytes=56 Sequence=1 ttl=255 time=4 ms
Reply from bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from bytes=56 Sequence=5 ttl=255 time=1 ms

— ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/4 ms

3. Configure the Incoming Policy
Assuming you one to allow default route from the neighbor

a. Create prefix list to allow default route

<RouterA>ip ip-prefix DEFAULT-PREFIX index 10 permit 0

b. Create the route policy to match the prefix, then explicitly add the default deny

<RouterA>route-policy DEFAULTv4 permit node 10
  if-match ip-prefix DEFAULT-PREFIX
route-policy DEFAULTv4 deny node 10000


4. Configure the Outgoing Policy

a. Create prefix list to allow the prefix you want to advertise

<RouterA>ip ip-prefix OUTPREFIX index 10 permit 32

b. Create the route policy to match the prefix, then explicitly add the default deny

<RouterA>route-policy OUTPOLICY permit node 10
   if-match ip-prefix OUTPREFIX
route-policy OUTPOLICY deny node 10000


5.Configure the eBGP
Assuming the agreed MD5 password between peers is bGP@p455w0rd

<RouterA>bgp 65555
 peer as-number 65577
 peer description Peer BGP IPv4
 peer password cipher bGP@p455w0rd

ipv4-family unicast
 undo synchronization
 import-route unr
 peer enable
 peer route-policy DEFAULTv4 import
 peer route-policy OUTPOLICY export


<RouterA>display bgp all summary
<RouterA>display bgp peer
<RouterA>display bgp routing-table
<RouterA>display bgp routing-table peer advertised-routes
<RouterA>display bgp routing-table peer received-routes
<RouterA>display bgp routing-table peer accepted-routes
<RouterA>display bgp routing-table peer not-accepted-routes

accepted-routes Routes accepted by routing policy
advertised-routes Routes advertised to the remote peer
not-accepted-routes Routes not accepted by routing policy
received-routes Routes received from the remote peer

Sample Output:

<RouterA>display bgp peer

BGP local router ID :
Local AS number : 65555
Total number of peers : 1 Peers in established state : 1

Peer           V  AS      MsgRcvd MsgSent OutQ Up/Down  State          PrefRcv   4 65577 10359        10065 0         0071h55m  Established 1

It can be observed that the eBGP IPv4 neighbor relationship is “Established” and receiving 1 prefix from AS65577 for peering

Be First to Comment

Leave a Reply

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