Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Configuracion de Routers AR151 - v1 0 PDF
Configuracion de Routers AR151 - v1 0 PDF
COLOMBIA
DIRECCIN DE INGENIERA
CONTROL DE CAMBIOS
TABLA DE CONTENIDO
Los routers Huawei que adquiri CLARO para ser utilizados como CPEs en soluciones
corporativas son del modelo AR 151; las caractersticas de este equipo son las siguientes:
1 puerto de consola.
o VPN: IPSec VPN, GRE VPN, DSVPN, SSL VPN, L2TP VPN.
o QoS: Diffserv mode, Priority mapping, traffic policing (CAR), traffic shaping,
congestion avoidance (based on IP precedence/DSCP WRED), congestion
management (LAN interface: SP/WRR/SP+WRR; WAN interface:
<CPEbandaancha>dis ver
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.130 (AR150 V200R005C00)
Copyright (C) 2011-2013 HUAWEI TECH CO., LTD
Huawei AR151 Router uptime is 0 week, 0 day, 3 hours, 23 minutes
<CPEbandaancha>
La presente versin de software presenta mejoras respecto a la versin anterior (Version 5.110) en
temas de capacidad de manejo de nmero de prefijos que se aprenden por BGP. Con la versin
anterior solo se permitan 1000 prefijos. Con la presente versin liberada en agosto de 2013 se
permiten aprender hasta 10mil prefijos.
La conexin se realiza por el puerto serial del computador al puerto de consola del router
mediante el cable incluido con cada equipo o con un cable de consola estndar. Los parmetros
de configuracin del puerto se muestran a continuacin:
El inicio del router, bien sea de primera vez o porque se ejecuta procedimiento para cargar
configuracin de fbrica coloca la siguiente salida:
VRP_SockTm_Init create............OK
VRP initialize
Create tasks......................OK
Initialize tasks..................OK
Recovering configuration..........OK
En caso de que ya se tenga una configuracin previamente cargada y se desee recuperar esta
configuracin de fbrica, el comando a ejecutar es el siguiente:
<ROUTER>factory-configuration reset
Info: Successfully set factory config reset flag!
<ROUTER>
reinicia
VRP_SockTm_Init create............OK
VRP initialize
Create tasks......................OK
Initialize tasks..................OK
Recovering configuration..........OK
El router almacena en su memoria flash tanto los archivos de configuracin como el sistema
oeprativo (VRP), y la forma de visulaizarlos es la siguiente:
<CPEbandaancha>dir
Directory of flash:/
Los archivos de configuracin son los que tienen la extensin *.cfg. Los archivos del sistema
operativo son los de extenxin *.cc. Teniendo entonces claro esto, se procede a definir el
archivo que se desee cargar en la memoria (NVRAM) para su ejecucin:
<Huawei>dis startup
MainBoard:
Startup system software: flash:/ar150-v200r005c00.cc
Next startup system software: flash:/ar150-v200r005c00.cc
Backup system software for next startup: null
Startup saved-configuration file: null
Next startup saved-configuration file: null
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
<Huawei>
<Huawei>dis startup
MainBoard:
Startup system software: flash:/ar150-v200r005c00.cc Sistema Operativo de arranque.
Next startup system software: flash:/ar150-v200r005c00.cc
Backup system software for next startup: null
Startup saved-configuration file: null
Next startup saved-configuration file: flash:/pruebasbandaancha.cfg Se verifica.
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
<Huawei>
<Huawei>
Oct 11 2013 17:41:26+00:00 Huawei %%01DEV/4/ENTRESET(l)[0]:Board[0] is reset, The reason is: Reset by
user command.
Requesting system reboot
Restarting system.
El equipo permite detener su proceso de arranque normal e ingresar al men BOOT con el fin
de controlar el arranque del equipo, bien sea para cargar la configuracin por defecto, o una
configuracin especfica, o iniciar un nuevo sistema operativo (VRP).
Enter Password: Huawei Este password se define cuando se arranca la configuracin de fbrica.
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
Ya en este punto se puede seguir el men conforme a lo que se desee ejecutar. La opcin 1
continua el arranque normal del equipo, cargando la configuracin definida con el comando
start-up (seccin 2.1.2).
La opcin 4 me permite elegir el archivo de arranque del equipo, consultando previamente todos
los archivos cargados en la flash, mediante la opcin 5 (File Manager):
Startup Select
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
0. return
1. Flash
0. Return
Finalmente, regresando al menu principal est la opcin de reboot (6), con la cual se reinicia el
equipo.
<AR151>dis current-configuration
[V200R005C00]
#
sysname CPEbandaancha
(Se omite la salida completa)
<AR151>save
<AR151>system-view
Enter system view, return user view with Ctrl+Z.
[AR151]sysname ?
TEXT<"..."> Host name (no more than 246 characters)
[AR151]sysname PRUEBA Ejemplo de configuracin comando para nombrar el equipo.
[PRUEBA]
TEXT<"..."> Set header text, take the first character as the specified start and end character, the string
between the start character and the end character is the header to be displayed,The banner text supports 480
characters max, including the start and the end character
El primer paso es crear el usuario con su respectivo password, se ingresa a proceso aaa:
[AR151]aaa
[AR151-aaa] local-user gestion password cipher Prueba123
Posteriormente se le asigna un nivel de comandos que puede realizar el usuario (de 0 a 15,
donde 3 es el mximo nivel permitido):
Luego se seleccionan los tipos de acceso que va a tener el usuario, en nuestro caso Telnet y
consola.
[PRUEBA]user-interface console 0
[PRUEBA-ui-console0] authentication-mode aaa
[PRUEBA]user-interface vty 0 4
[PRUEBA-ui-vty0-4] authentication-mode aaa
<PRUEBA>clock datetime ?
HH:MM:SS Specify the time
<PRUEBA>clock datetime 16:34:00 ?
YYYY/MM/DD Specify the date from 2000 to 2099
<PRUEBA>clock datetime 16:34:00 2005/01/03
[PRUEBA-Ethernet0/0/8] speed ?
10 10M port speed mode
100 100M port speed mode
[PRUEBA-Ethernet0/0/8] duplex ?
full Full-Duplex mode
half Half-Duplex mode
[PRUEBA-Ethernet0/0/8]shutdown
[PRUEBA]acl number ?
INTEGER<2000-2999> Basic access-list(add to current using rules)
INTEGER<3000-3999> Advanced access-list(add to current using rules)
INTEGER<4000-4999> Specify a L2 acl group
[PRUEBA]nat address-group 1 ?
Luego en la interfaz WAN se asocia el NAT de salida con una lista de acceso extendida y con un
nat address-group; si no se asocia ste ltimo, el NAT se hace con la IP de la interfaz:
[PRUEBA]int Ethernet0/0/8
[PRUEBA-Ethernet0/0/8]nat outbound ?
INTEGER<2000-3999> Apply basic or advanced ACL
Protocol : ICMP(1)
SrcAddr Vpn : 192.168.20.4
DestAddr Vpn : 10.10.10.2
Type Code IcmpId : 0 8 54029
NAT-Info
New SrcAddr : 200.74.100.1
New DestAddr : ----
New IcmpId : 10257
Protocol : ICMP(1)
SrcAddr Vpn : 192.168.20.4
DestAddr Vpn : 10.10.10.2
Type Code IcmpId : 0 8 54031
NAT-Info
New SrcAddr : 200.74.100.1
Total : 2
Hay dos maneras de hacer un NAT esttico, la primera es definindolo en el modo de sistema:
[PRUEBA-Ethernet0/0/8]nat static ?
enable Enable function
global Specify global information of NAT
protocol Specify protocol
La segunda es haciendo un NAT Server en la interfaz WAN del router, donde se definen los
parmetros para hacer NAT esttico slo de los puertos que uno defina y no de todas las clases de
trfico:
[PRUEBA-Ethernet0/0/8]nat server protocol tcp global 200.74.1.25 www inside 192.168.1.5 www
Este NAT es til para permitir aplicaciones de telefona como SIP las cuales son sensibles al NAT
dinmico normal:
[PRUEBA-Ethernet0/0/0] nat server protocol tcp global 200.74.1.33 ftp inside 10.0.0.3 ftp
Total : 1
2.16.1. OSPF
Lo primero que se debe definir es el router ID, se utilizar la IP WAN del CPE como ID:
[PRUEBA]router id 10.160.1.1
[PRUEBA]ospf 1
[PRUEBA-ospf-1]area 0
[PRUEBA-ospf-1-area-0.0.0.0]network 10.160.1.1 0.0.0.3
[PRUEBA-ospf-1]default-route-advertise
[PRUEBA-ospf-1]import-route ?
bgp Border Gateway Protocol (BGP) routes
direct Connected routes
isis Intermediate System to Intermediate System (IS-IS) routes
limit Limit the number of routes imported into OSPF
ospf Open Shortest Path First (OSPF) routes
rip Routing Information Protocol (RIP) routes
static Static routes
unr User Network Routes
Para aplicar un filtro a las rutas que se desean anunciar o aprender por OSPF:
[PRUEBA-ospf-1]filter-policy ?
INTEGER<2000-2999> Apply basic ACL
acl-name Specify the ACL name for filtering IPv4 routes
ip-prefix IP address prefix-list
route-policy Route policy
[PRUEBA-ospf-1]filter-policy 2000 ?
export Filtering outgoing routing updates
import Filtering incoming routing updates
2.16.2. BGP
[PRUEBA]bgp 65000
[PRUEBA-bgp]undo synchronization
[PRUEBA-bgp]group 1 external
[PRUEBA-bgp]peer 10.160.1.1 group 1
[PRUEBA-bgp]peer 10.160.1.1 as-number 14080
[PRUEBA-bgp]peer 10.160.1.1 timer keepalive 10 hold 30
Para aplicar un filtro a las rutas que se desean anunciar o aprender por BGP:
Para poder aplicar una poltica determinada en el equipo primero se debe definer una lista de
acceso que identifique el tipo de trfico (direcciones IP) al que se les desea aplicar la poltica.
Luego se crea la poltica para aplicarle una caracterstica determinada al trfico por ejemplo para
fijar el next hop:
[PRUEBA-route-policy]if-match ?
acl Specify an ACL
as-path-filter BGP AS path list
community-filter Match BGP community filter
cost Match metric of route
extcommunity-filter Match BGP/VPN extended community filter
interface Specify the interface matching the first hop of routes
ip IP information
ip-prefix Specify an address prefix-list
ipv6 IPv6 Information
mpls-label Give the Label
rd-filter Route-distinguisher filter
route-type Match route-type of route
tag Match tag of route
[PRUEBA-route-policy]apply ?
as-path BGP AS path list
backup-interface Backup outgoing interface
backup-nexthop Backup nexthop address
behavior Specify QoS policy as behavior
comm-filter Set BGP community filter (for deletion)
community BGP community attribute
cost Set metric of route
cost-type Type of metric for destination routing protocol
dampening Set BGP route flap dampening parameters
extcommunity Set BGP/VPN extended community filter
ip-address IP information
ip-precedence Specify QoS policy as IP precedence
ipv6 IPv6 Information
local-preference BGP local preference path attribute
mpls-label Give the Label
origin BGP origin code
ospf Where to import route
preference Give the Preference (Route Preference)
preferred-value BGP Preferred-value (weight) for routing table
qos-local-id Specify QoS policy as qos local id
tag Set tag of route
traffic-index Specify BGP Traffic Accounting Index
[PRUEBA -route-policy]apply ip-address next-hop 10.160.1.1
A continuacin se muestra un ejemplo para configurar calidad de servicio marcando los paquetes
que llegan por la LAN y dndoles prioridad por la interfaz WAN.
Primero se crea una poltica que marque los paquetes deseados (de acuedo a una lista de acceso)
con una precedencia determinada:
Se crea un clasificador de trfico que haga match con la precedencia de los datos deseada ya sea
por el ToS o el DSCP:
Posteriormente se debe crear un behavior que especifica el trato que se le va a dar al tipo de
datos, es decir asegurarle un ancho de banda determinado:
Finalmente se crea la poltica de calidad deservicio asociada al clasificador y al behavior del trfico:
Por ltimo se aplica la poltica a la interfaz WAN por donde salen los datos:
La configuracin de calidad de servicio (QoS) para voz se hace de la misma forma como se
explic en el punto anterior para los datos. La nica diferencia es que al asignar la cola de la
interfaz (queue) se utiliza la ef (expedited forwarding) y no la af (assured forwarding). A
continuacin se muestra un ejemplo de configuracin:
Primero se crea una poltica que marque los paquetes de voz con precedencia 5:
Se crea un clasificador de trfico que haga match con la precedencia de la voz ya sea por el ToS o
el DSCP:
Finalmente se crea la poltica de calidad deservicio asociada al clasificador y al behavior del trfico:
Por ltimo se alpaca la poltica a la interfaz WAN por donde sale la voz:
3.1.1. PING
[PRUEBA]ping ?
STRING<1-255> IP address or hostname of a remote system
-a Select source IP address, the default is the IP address of the output interface
-c Specify the number of echo requests to be sent, the default is 5
-d Specify the SO_DEBUG option on the socket being used
-f Set Don't Fragment flag in packet (IPv4-only)
-h Specify TTL value for echo requests to be sent, the default is 255
-i Select the interface sending packets
-m Time in milliseconds to wait for sending next packet, the default is 500ms
-n Numeric output only. No attempt will be made to lookup host addresses for symbolic names
-name Display the host name of the destination address
-p No more than 8 (pad) hexadecimal characters to fill out the sent packet. For example -p f2 will fill the
sent packet with f and 2 repeatedly
-q Quiet output. Nothing is displayed except the summary lines at startup time and when finished
-r Record route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the
route
-s Specify the number of data bytes to be sent, the default is 56bytes
-si Set the specified interface as the source interface of ping packet
-system-time Display the sending time of echo request packets
-t Timeout in milliseconds to wait for each reply, the default is 2000ms
-tos Specify TOS value for echo requests to be sent, the default is 0
-v Verbose output. ICMP packets other than ECHO_RESPONSE those are received are listed
-vpn-instance Specify VPN-Instance of MPLS VPN
ignore-mtu Send packets without checking the interface MTU
ip IP Protocol
ipv6 IPv6 protocol
multicast Multicast ping
vc PWE3 Ping
Un ping de origen se genera con la letra a y tiene que contener una ip perten eciente al router.
3.1.2. TRACERT
[PRUEBA]tracert ?
STRING<1-255> IP address or hostname of a remote system
-a Set source IP address, the default is the IP address of the output interface
-f First time to live, the default is 1
-m Max time to live, the default is 30
-name Display the host name of the router on each hop
-p Destination UDP port number, the default is 33434
-q Number of probe packet, the default is 3
-s
-v Display the MPLS label information carried in the ICMP Time Exceed message. By default, it is only to
display the path information carried in the ICMP Time Exceed message and ICMP Port Unreachable message
without MPLS label information
-vpn-instance Specify VPN-Instance of MPLS VPN
-w Timeout in milliseconds to wait for each reply, the default is 5000ms
ipv6 IPv6 Protocol
vc PWE3 traceroute
3.1.3. DEBUGGING
[PRUEBA]info-center enable
Info: Information center is enabled.
<PRUEBA>terminal monitor
Info: Current terminal monitor is on.
<PRUEBA>terminal debugging
Info: Current terminal debugging is on.
<PRUEBA>debugging ?
aaa AAA
acl4 ACL4 module
aclada Aclada
adp-ipsec IP Security
all All debugging functions
am AM module
anti-attack Specify anti-attack configurations
application-apperceive Set application-apperceive information
arp ARP module
arp-ping ARP-ping
arp-proxy Arp proxy debugging functions
atm ATM module
bfd BFD module
bgp BGP protocol
bridge Bridge
bridge-adp Display bridge module debuging information
cm CM module
cwmp CPE WAN Management Protocol
dhcp Dynamic host configure protocol
dhcpv6 Dynamic host configure protocol for IPv6
dialer DCC module
dlsw Data Link Switching module
dns <Group> dns command group
dot1x EAPOL module
efm EFM module
error-down The interface was shut down because of an error event
ethernet Ethernet module
firewall Firewall debugging
forward Forward
fr <Group> fr command group
ftp-server FTP server debugging information
gresm GRESM module
gvrp Generic VLAN Registration Protocol
hdlc HDLC module
http Http server information
hwtacacs Set HWTACACS server
ifnet Ifnet module
igmp Specify parameters for IGMP
ike Specify IKE(Internet Key Exchange) configuration
information
ikev2 IKE V2 information
ip <Group> ip command group
ipsec Specify IPSec(IP Security) configuration information
ipv6 <Group> ipv6 command group
isdn ISDN module
isis Intermediate System to Intermediate System (ISIS)
routes
keychain Keychain module
l2if Layer two interface management
l2tp L2TP module
l2vovlan Voice VLAN
lapb LAPB module
llc2 LLC2 module
lldp Link Layer Discovery Protocol
lspagt LSPAGT module
mac-limit MAC limit
mfib MFIB module
mgr Ethernet OAM manager
mlppp MLPPP shell debugging
Dentro de los problemas tpicos que se pueden presentar est el no poder alcanzar el ancho de
banda configurado. En este caso se debe revisar la configuracin de la interfaz WAN y
negociacin que est aplicada. Se debe asegurar que la interfaz est en FULL DUPLEX. En caso
de que la autonegociacin no lo permta, se debe forzar manualmente.
interface Ethernet0/0/4
description WAN
undo negotiation auto
Collisions: 0, ExcessiveCollisions: 0
Late Collisions: 0, Deferreds: 0
<CPEbandaancha>
Para realizar el upgrade del equipo, se debe tener el software a actualizar y ya con este se procede
a copiar en el equipo se carga y se reinicia. El software de sistema operativo en equipos Huawei se
llama VRP.
Inicialmente convertimos el router en un servidor ftp para asi poder cargar el directorio de
nuestro porttil:
Posterior se ingresa al command line de Windows y previo a eso uno se posiciona donde este
guardado el archivo .cc del nuevo VRP y procede a abrir el ftp a la IP que tenga el router,
ingresamos con los datos creados previamente. Colocamos en binario para transferir con el
comando bin y despus con el comando put y el nombre del archivo lo copiamos dentro del
router put ar_150v200r002.cc.
Ya con el archivo dentro del router se procede a cargarlo para que en el prximo reinicio se
active.
<PRUEBA>reboot
Info: The system is comparing the configuration, please wait.
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
It will take several minutes to save configuration file, please wait...............
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
System will reboot! Continue ? [y/n]:y
Info: system is rebooting ,please wait...
Posterior a el reinicio esperamos a que el equipo suba nuevamente y ejecutamos el display version
para revisar que la nueva versin halla quedado.
VRRP es un protocolo empleado para proveer redundancia de equipos para un cliente creando
una direccin de LAN virtual en los routers. Este protocolo se puede configurar ya sea entre 2
equipos Huawei o un Huawei y un Cisco que soporte este protocolo.
Router principal:
Router backup:
[PRUEBA-BACKUP]int eth0/0/8
[PRUEBA-BACKUP-Ethernet0/0/8]vrrp vrid 5 virtual-ip 192.168.1.1
<PRUEBA-MASTER>dis vrrp
Ethernet0/0/8 | Virtual Router 5
State : Master
Virtual IP : 192.168.1.1
Master IP : 192.168.1.2
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0105
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2013-05-21 21:53:56 UTC-05:13
Last change time : 2013-05-21 21:53:59 UTC-05:13
[PRUEBA-BACKUP]dis vrrp
La configuracin del router Huawei es exactamente igual a como se explic en el punto anterior.
La configuracin del router Cisco se muestra a continuacin:
Pruebas(config)#interface Ethernet0/0
Pruebas(config-if)#ip address 192.168.1.2 255.255.255.0
Pruebas(config-if)#vrrp 1 ip 192.168.1.1
Pruebas(config-if)#vrrp 1 preempt
Pruebas(config-if)#vrrp 1 priority 100
Los enrutadores HUAWEI tambin soportan mltiples instancias de VPN o mejor conocidas
como instancias de enrutamiento (VRF). Esta caracterstica permite manejar diferentes tablas de
enrutamiento dentro del mismo router con el fin de independizar servicios.
Aca se describe como se configura un servidor DHCP basado en un rango de direcciones donde
los clientes DHCP y el servidor estn en el mismo segmento de red.
[PRUEBA]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[PRUEBA]ip pool pool1
Info: It's successful to create an IP address pool.
[PRUEBA-ip-pool-pool1]network 10.10.10.0 mask 24
[PRUEBA-ip-pool-pool1]gateway-list 10.10.10.1
[PRUEBA-ip-pool-pool1]excluded-ip-address ?
IP_ADDR<X.X.X.X> The start IP address of the excluded IP network section
[PRUEBA-ip-pool-pool1]excluded-ip-address 10.10.10.2 ?
IP_ADDR<X.X.X.X> The end IP address of the excluded IP network section
<cr> Please press ENTER to execute command
[PRUEBA-ip-pool-pool1]excluded-ip-address 10.10.10.2 10.10.10.24
Despues de crear el rango de direcciones y excluir las direcciones IP se asigna a la interfz la cual
esta conectada a la LAN.
[PRUEBA]int eth0/0/8
[PRUEBA-Ethernet0/0/8]dhcp select global
[PRUEBA]dis ip pool
-----------------------------------------------------------------------
Pool-name : pool1
Pool-No :0
Position : Local Status : Unlocked
Gateway-0 : 10.10.10.1
Mask : 255.255.255.0
VPN instance : --
IP address Statistic
Total :253
Used :0 Idle :230
Expired :0 Conflict :0 Disable :23
<CPEbandaancha>dis current-configuration
[V200R005C00]
#
sysname CPEbandaancha
header login information "%
*************************************************************
* ATENCION: Este equipo es propiedad de CLARO COLOMBIA *
* El uso no autorizado esta estrictamente prohibido. *
* *
* Todos los usuarios son legalmente responsables de sus *
* acciones sobre el sistema y toda actividad sera registrada*
*************************************************************
#
drop illegal-mac alarm
#
vlan batch 2 to 3 Indica las VLAN creadas.
#
wlan ac-global carrier id other ac id 0
#
#
interface Ethernet0/0/1
description LAN
port link-type access
port default vlan 2
#
interface Ethernet0/0/2
description LAN