Configuración BGP en routers Huawei

Recientemente he configurado un multihoming BGP con routers Huawei y creo que merece la pena compartirlo.

Los equipos Huawei en cuestión eran unos NE20E-S4:

http://e.huawei.com/en/products/enterprise-networking/routers/ne/ne20e-s

 

router-huawei

La topología es la clásica de un multihoming con dos ISP’s:
Estaba compuesta por dos routers NE20E-S4 cada uno conectado en su interface Wan a un ISP distinto e internamente conectados a un cluster de switches Huawei.

Ambos routers estaban además compartiendo entre sí su tabla de rutas BGP via iBGP.

Configuración básica del multihoming en el router-1:

GigabitEthernet0/0/0 = Wan
GigabitEthernet0/0/1 = LAN
Loopback 10 = peering iBGP

#router-1>display current-configuration 
[V200R003C00]
#
 sysname router-1
#

interface GigabitEthernet0/0/0
 ip address 10.80.80.54 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.250.250.1 255.255.255.0 
#
#
interface LoopBack10
 ip address 10.254.254.1 255.255.255.0 
#
bgp YYYY
 peer 10.80.80.53 as-number XXXX 
 peer 10.80.80.53 password simple OMITIDO 
 group iBGP internal
 peer 10.253.253.1 as-number YYYY 
 peer 10.253.253.1 group iBGP 
 peer 10.253.253.1 connect-interface LoopBack10
 peer 10.253.253.1 password simple OMITIDO 
 #
 ipv4-family unicast
  undo synchronization
  network IP_PREFIJO_BGP_A_ANUNCIAR 255.255.252.0 
  peer 10.80.80.53 enable
  peer iBGP enable
  peer iBGP next-hop-local 
  peer 10.253.253.1 enable
  peer 10.253.253.1 group iBGP 
#
rip 1
 undo summary
 version 2
 network 10.254.254.0
 network 10.250.250.0
#
ip route-static IP_PREFIJO_BGP_A_ANUNCIAR 255.255.252.0 NULL0
#
return

La configuración básica del router-2 es prácticamente simétrica, cambia el ASN del otro ISP, la IP Wan del interface Gi0/0/0 , la IP lan del interface Gi0/0/1 y la ip loopback para iBGP:
Router-2:

#
#router-2>display current-configuration 
[V200R003C00]
#
 sysname router-2
#
interface LoopBack10
 ip address 192.168.253.1 255.255.255.0 
#

interface GigabitEthernet0/0/0
 ip address 10.90.90.1 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 10.250.250.2 255.255.255.0 
#
interface NULL0
#
interface LoopBack10
 ip address 10.253.253.1 255.255.255.0 
#
bgp YYYY
 peer 10.90.90.2 as-number XXXX-2 
 peer 10.90.90.2 password simple OMITIDO 
 group iBGP internal
 peer 10.254.254.1 as-number YYYY 
 peer 10.254.254.1 group iBGP 
 peer 10.254.254.1 connect-interface LoopBack10
 peer 10.254.254.1 password simple OMITIDO 
 #
 ipv4-family unicast
  undo synchronization
  network IP_PREFIJO_BGP_A_ANUNCIAR 255.255.252.0 
  peer 10.90.90.2 enable
  peer iBGP enable
  peer iBGP next-hop-local 
  peer 10.254.254.1 enable
  peer 10.254.254.1 group iBGP 
rip 1
 undo summary
 version 2
 network 10.253.253.0
 network 10.250.250.0
#
ip route-static IP_PREFIJO_BGP_A_ANUNCIAR 255.255.252.0 NULL0
#

 

 

Leave a Reply

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