Está en la página 1de 28

1

Ampliacion de Redes de Computadores (4 II)


Seminario. Configuracion de Routers 1
SemInarIo
CONFIGURACIN DE
ROUTERS
Ampliacin de Redes de
Computadores
(4 Ingenieria Informtica)
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 2
Indice
1. Aspectos bsicos de un Router
2. Componentes internos del Router.
3. Fuentes de configuracin de un Router.
4. Secuencia de inicio de un Router.
5. Configuracin inicial de un Router {SETUP)
6. Modos de configuracin de un Router.
7. Comandos Show de un Router.
S. Procesos de prueba de conectividad.
9. Comandos del IOS
9.1 Configuracin bsica de un Router
Bibliografa.
Curriculum CNAP de C!SCO
2
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 3
1. Aspectos basicos de un Router
- En networking, existen dos esquemas de direccionamiento:
- el primero utiliza la direccin MAC, una direccin de Capa 2.
- el segundo, utiliza una direccin ubicada en la capa de red (Capa 3) del
modelo OS!. Un ejemplo de direccin de Capa 3 es una direccin !P.
- Un router es un tipo
de dispositivo de
internetworking que
transporta paquetes de
datos entre redes,
basandose en las
direcciones de Capa 3.
- Un router tiene la
capacidad de tomar
decisiones inteligentes
con respecto a la mejor
ruta para la entrega de
datos en la red.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 4
Aspectos basicos de un Router
- Los Routers son dispositivos de interconexin de Capa 3 y se
utilizan para conectar LANs a travs de enlaces WAN.
- Tienen interfaces WAN y LAN.
- Las dos funciones principales:
- Determinacin de las mejores rutas (utilizando direcciones de capa 3)
para los paquetes de datos entrantes.
- Conmutacin de los paquetes a la interfaz saliente correcta.
- Se basan en la construccin de tablas de enrutamiento.
- DTEJDCE: El punto donde cambia la responsabilidad
(Modem)
CSU/DSU
CSU/DSU
(Modem)
DTE
Data Terminal
Equipment
DTE
Data Terminal
Equipment
DCE
Data Circuit
Terminating
Equipment
WAN punto a punto
DCE
Data Circuit
Terminating
Equipment
3
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 5
Aspectos basicos de un Router
Router vs Puente vs Switch
- Los puentes y los switches usan direcciones fsicas (direcciones
NAC) para tomar decisiones con respecto al envio de datos.
- Los routers usan direcciones IP (direcciones lgicas) en lugar de
direcciones NAC.
- El fabricante de la NIC generalmente es el que asigna las
direcciones fsicas, o direcciones NAC, que se codifican de forma
permanente en la N!C.
- El administrador de la red generalmente asigna las direcciones
IP. De hecho, es comun que en el esquema de direccionamiento !P,
un administrador de la red agrupe los dispositivos de acuerdo con su
ubicacin geografica, departamento o piso dentro de un edificio.
- Como se implementan en software, las direcciones IP se pueden
cambiar con relativa facilidad.
- Por ultimo, los puentes y los switches se usan principalmente para
conectar los segmentos de una red.
- Los routers se usan para conectar redes separadas, y para
acceder a !nternet. Esto se hace a travs del enrutamiento de
extremo a extremo.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 6
Aspectos basicos de un Router
Router vs Puente vs Switch
4
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 7
Aspectos basicos de un Router
Numeros de red unicos
- Los routers conectan dos o ms redes, cada una de las cuales debe
tener un numero de red exclusivo para que el enrutamiento se produzca
con xito.
- El numero de red exclusivo se incorpora a la direccin !P que se le asigna
a cada dispositivo conectado a esa red.
- Cuando los datos (tramas)
llegan al router, ste ejecuta
las siguientes funciones:
1. Extrae y elimina el encabezado y
la cola que transporta la trama.
2. Extrae el campo de datos de la
trama (donde va encapsulado el
paquete !P). Examina la direccin
!P destino de la cabecera del
paquete !P para determinar cual
es la red destino.
3. Consulta las tablas de
enrutamiento para determinar
cual de las interfaces usara para
enviar los datos, a fin de que
lleguen a la red destino.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 8
Aspectos basicos de un Router
!nterfazpuerto del router
- La conexin de un router con una red se denomina interfaz;
tambin se puede denominar puerto. En el enrutamiento !P,
cada interfaz debe tener una direccin de red (o de subred)
individual y unica.
- Los routers, al igual
que cualquier otro
dispositivo de la red,
envan y reciben
datos a travs de
las interfaces.
- Crean tablas ARP
que asignan
direcciones !P a las
direcciones NAC.
5
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 9
Aspectos basicos de un Router
Ejemplo de !nterconexin LANfWAN con
Routers
172.20.0.0/16
MADRD BARCELONA VALENCA SEVLLA ALBACETE
172.20.40.0/21 172.20.48.0/21 172.20.56.0/21 172.20.64.0/21 172.20.72.0/21
172.20.32.0/21 172.20.24.0/21 172.20.16.0/21 172.20.8.0/21
172.20.40.1
172.20.40.2
172.20.47.254
172.20.8.1 172.20.8.2 172.20.16.1 172.20.16.2
172.20.48.1
172.20.48.2
172.20.48.3 172.20.55.254
172.20.56.1
172.20.56.2
172.20.56.3 172.20.63.254
172.20.24.1 172.20.24.2 172.20.32.1 172.20.32.2
172.20.64.1
172.20.64.2
172.20.64.3 172.20.71.254
172.20.72.1
172.20.72.2
172.20.72.3 172.20.79.254
DCE= S0/0
DTE= S0/1
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 10
2. Componentes !nternos del Router
Almacena el
archivo de
configuracin en
ejecucin, tablas
de ruteo y ARP. Al
apagar
el router o
reiniciarlo se borra
toda la
informacin
Almacena la copia
de respaldo del ar-
chivo de configu-
racinfarchivo de
configuracin de
inicio del router
RON borrable y
Reprogramable.
Almacena una o mas
versiones del IOS
{Sistema Operativo
del Router)
Contiene diag-
nsticos de en-
cendido, un pro-
grama bootstrap
y un sistema
operativo basico
Conexiones de red donde los paquetes entranfsalen del router
6
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 11
3. Fuentes de Configuracin de un
Router
El puerto de Consola se utiliza
como minimo para configurar
por primera vez al router. Se conecta
una terminal al router con un cable
rollover, desde el puerto console del
router al puerto CON
Del PC mediante
Un adaptador.
Este tipo de conexin se
utiliza en red, desde cualquier
equipo de la LAN
(TELNET).
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 12
+. Secuencia de !nicio de un Router
1) Verificacin del hardware
2) Encontrar y cargar en la RAM el software Cisco IOS que el
router usa para su sistema operativo.
3) Encontrar, cargar en la RAM y aplicar la informacin del
archivo de configuracin del router
7
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 13
5. Configuracin !nicial (SETUP) de
un Router
- Si no existe ningn archivo de configuracin vlido en la NVRAM,
el S.O. ejecuta una rutina de configuracin inicial con preguntas
denominada dilogo de configuracin inicial (Nodo Setup).
- Se debe usar el modo de configuracin inicial para realizar una
configuracin mnima, y luego se deben usar los diferentes comandos
de modo de configuracin, para realizar una configuracin mas avanzada.
valores por defecto entre [ | al lado de la pregunta.
Control+C para interrumpir el proceso y comenzar de nuevo.
- Una vez terminada la configuracin inicial, todas las interfaces quedan
administrativamente cerradas (shutdown). Posteriormente habra que
abrirlas, con el comando no shutdown desde el modo de interfaz.
- Al completarse el proceso se nos pregunta entonces si deseamos usar esa
configuracin. Si respondemos "yes", se ejecuta la configuracin y sta se
guarda en la NvRAN. Si responde que "no", la configuracin no se guarda
y el proceso comienza de nuevo.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 14
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:yes
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Basic management setup configures only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system
Would you like to enter basic management setup? [yes/no]:no
First, would you like to see the current interface summary? [yes]: no
Configuring global parameters:
Enter host name [Router]: BarceIona
The enable secret is a password used to protect access to
privileged EXEC and configuration modes. This password, after
entered, becomes encrypted in the configuration.
Enter enable secret: cisco
The enable password is used when you do not specify an
enable secret password, with some older software versions, and
some boot images.
Enter enable password: epsa
The virtual terminal password is used to protect
access to the router over a network interface.
Enter virtual terminal password: cisco
Configure SNMP Network Management? [yes]: no
Configure DECnet? [no]:
Configure AppleTalk? [no]:
Configure PX? [no]:
Configure P? [yes]:
Configure GRP routing? [yes]: no
Configure RP routing? [no]: yes
Configure bridging? [no]:
Async lines accept incoming modems calls. f you will have
users dialing in via modems, configure these lines.
Configure Async lines? [yes]: no
Configuracin !nicial (SETUP)
Configuring interface parameters:
Do you want to configure FastEthernet0/0 interface? [yes]:
Use the 100 Base-TX (RJ-45) connector? [yes]:
Operate in full-duplex mode? [no]: yes
Configure P on this interface? [yes]:
P address for this interface: 172.20.48.1
Subnet mask for this interface [255.255.0.0] : 255.255.248.0
Class B network is 172.20.0.0, 21 subnet bits; mask is /21
Do you want to configure Serial0/0 interface? [yes]:
Some supported encapsulations are
ppp/hdlc/frame-relay/lapb/x25/atm-dxi/smds
Choose encapsulation type [hdlc]:
Serial interface needs clock rate to be set in dce mode.
The following clock rates are supported on the serial interface.
1200, 2400, 4800, 9600, 14400, 19200
28800, 32000, 38400, 56000, 57600, 64000
72000, 115200, 125000, 128000, 148000, 500000
800000, 1000000, 1300000, 2000000, 4000000, 8000000
choose speed from above : [2000000]:
Configure P on this interface? [yes]:
Configure P unnumbered on this interface? [no]:
P address for this interface: 172.20.16.1
Subnet mask for this interface [255.255.0.0] : 255.255.248.0
Class B network is 172.20.0.0, 21 subnet bits; mask is /21
Do you want to configure Serial0/1 interface? [yes]:
Some supported encapsulations are
ppp/hdlc/frame-relay/lapb/x25/atm-dxi/smds
Choose encapsulation type [hdlc]:
Configure P on this interface? [yes]:
Configure P unnumbered on this interface? [no]:
P address for this interface: 172.20.8.2
Subnet mask for this interface [255.255.0.0] : 255.255.248.0
[0] Go to the OS command prompt without saving this config
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
Enter your selection [2]:2
8
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 15
6. Nodos de Configuracin del Router
Nodo de visualizacin exclusivamente en el
que el usuario puede visualizar alguna informacin
acerca del router, pero no puede realizar cambios.
Soporta los
comandos de
depuracin y
prueba, el
examen
detallado del
router, la
manipulacin de
los archivos de
configuracin, y
el acceso a los
modos de
configuracin
Presenta en la consola un dialogo interactivo
basado en indicadores que ayuda al nuevo
usuario a crear una configuracin basica inicial
!mplementa pode-
rosos comandos de
una linea que eje-
cutan tareas sim-
ples de configura-
cin
Permiten configu-
raciones mas de-
talladas de multi-
ples lineas
Nodo de mantenimiento que se puede usar,
entre otras cosas, para recuperar las
contrasenas perdidas
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 16
Nodos de Configuracin del Router
enable
configure terminal
exit
exit
Ctrl+Z
9
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 17
7. Comandos Show del Router
Estos comandos nos ayudan a obtener informacin del estado del
router que es necesaria para monitorear y diagnosticar los fallos en las
operaciones del router.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 18
Comandos Show del Router
- show version: Nuestra la configuracin del hardware del
sistema, la versin del software, los nombres y origenes de los
archivos de configuracin y la imagen de arranque
- show protocols: Nuestra los protocolos configurados. Nuestra el
estado de todos los protocolos configurados de Capa 3
- show memory: Nuestra estadisticas acerca de la memoria del
router, incluyendo estadisticas de memoria disponible
- show buffers: Suministra estadisticas sobre los grupos de bufer
en el router
- show flash: Nuestra informacin acerca del dispositivo de
memoria Flash
- show running-config:Nuestra el archivo de configuracin activo
- show startup-config:Nuestra la copia de respaldo del archivo
de configuracin
- show interfaces: Nuestra estadisticas para todas las interfaces
configuradas en el router
10
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 19
8. Procesos de prueba de conectividad
Comandos de prueba
- Las pruebas basicas de una red deben desarrollarse en secuencia
desde una capa del modelo de referencia OS! a la siguiente.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 20
- Si, se puede acceder remotamente a otro router a travs de
Telnet, entonces se sabe que por lo menos una aplicacin TCPf!P
puede acceder al router remoto. Una conexin exitosa de Telnet
indica que la aplicacin de capa superior (y los servicios de las
capas inferiores tambin) funcionan correctamente.
Procesos de prueba de conectividad
Comandos de prueba: TELNET
11
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 21
Procesos de prueba de conectividad
Comandos de prueba: P!NG
- El comando ping envia un paquete al host destino y luego espera
un paquete de respuesta de ese host. Los resultados de este
protocolo de eco pueden ayudar a evaluar la confiabilidad de ruta a
host, las demoras en la ruta, y si se puede acceder al host, o si ste
esta funcionando.
{l) indican
cada eco
exitoso
Si obtenemos {.)
en la pantalla, la
aplicacin en su
router super el
tiempo de espera
esperando el eco
de un paquete
determinado
desde el objetivo
de ping.
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 22
Procesos de prueba de conectividad
Comandos de prueba: TRACE
- El comando trace es similar al comando ping, salvo que en lugar de
probar la conectividad de extremo a extremo, trace prueba cada paso
del proceso. El comando trace es la herramienta ideal para descubrir a
dnde se envian los datos en su red.
- Esta operacin se puede realizar a los niveles EXEC usuario o
privilegiado.
- El comando trace envia
varios paquetes y muestra
el tiempo de viaje de ida y
vuelta para cada uno de
ellos. La ventaja del
comando trace es que
indica cual de los routers
que aparecen en el
camino fue el ultimo al
que se accedi. Esto se
denomina aislamiento
de fallas.
12
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 23
- Este comando nos muestra la tabla de encaminamiento de
un router y por tanto nos permite determinar si existe una entrada
de la tabla de enrutamiento para la red objetivo
Procesos de prueba de conectividad
Comandos de prueba: SHOW !P ROUTE
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 24
Procesos de prueba de conectividad
Comandos de prueba: SHOW !NTERFACES
show interIaces
Este comando nos muestra el estado de las interfaces y por tanto nos
permite saber si el enlace esta en funcionamiento. Tambin muestra
las estadisticas de la interfaz desde la ultima vez en que se despejaron los
contadores. Se usa el comando clear counters para colocar los contadores
en 0.
13
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 25
9. Comandos del !OS
Creando una Conexion via Consola
Creating a Cisco Router Connection
Keywords Hyper TerminaI
First make or check the physical connection between a
workstation and a Cisco Router.
Bootup work station and go to Hyper TerminaI folder
Execute HyperTerminaI program
Connection Description window
Select connection name and a connection icon
Phone Number window
Enter indicated settings:
You are not creating a phone dial-up connection
Save the new connection:
t is recommended to drag the router icon to the desktop for
convenient future router access.
Connect console cable RJ45 plug to serial adapter and attach
serial adapter to com1 serial workstation port. Connect the
other RJ45 plug to the con port of the router.
Note: Cisco 2500 will also work with aux port.
Click <Start-Programs-Accessories-HyperTerminaI>
Click <Hypertrm.exe>
Name: Cisco Router (or other appropriate icon name)
con: Accept default icon or pick desired icon
Click OK
Connect using: Direct to Com1 (do not use dial up)
Bits per second: 9600
Data bits: 8
Parity: none
Flow control: Hardware
Click OK
Click <FiIe-Save>
Start a router session:
Execute HyperTerminaI:
Connect to the router
Click <HyperTerminaI>
Click <FiIe-Open> and select Router icon
Press <Enter>
You should see user-exec prompt like Router>
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 26
Logging into the Router
Keywords <enabIe> heIp <?> <^Z> <exit>
Correct, initial, router connection should provide user-exec
mode prompt. The user-exec mode provides minimal router
command access, which is mostly of the "read-only variety.
Router configurations cannot be changed in user mode.
Router>
To display a list of available user-exec commands: Router> ?
To enter priviIeged-exec mode:
The priviIeged-exec mode provides maximum router
command access. A password prompt may not be seen the
first time that a router is activated. You must provide the
password for future logins.
Router> enabIe
Password: cIass (password is not displayed)
Router#
To display a list of available priviIeged-exec commands: Router# ?
To enter gIobaI configuration mode:
(t is short for terminaI)
Return to priviIeged mode with <Ctrl-Z>:
You can also return to priviIeged mode with exit:
Router# config t
Router(config)#
Router(config)#^Z
Router#
Router(config)# exit
Router#
Return the router to user-exec mode: Router#disabIe
Note:
Cisco routers automatically disconnect after an inactive
time period. t will be necessary to repeat the login.
f a user-exec prompt does not appear, try pressing
the <Enter> key.
Comandos del !OS
Conectarse al Router
14
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 27
Using CIock and Getting Cisco Router Command HeIp
Keywords <cIock> <set> <show> <?>
The ? can be used to display a list of available options after a
partial router command entry.
To set the clock and only knowing the cIock command:
Router responds with:
Enter the next step and ask for more help:
Router responds with:
Now enter new time:
Router responds with:
Ask for additional help:
Router responds with:
Add day and month information and ask for more help:
Router responds with:
Enter the complete cIock command:
To display date and time information:
Router# cIock ?
set Set the time and date
Router# clock set ?
hh:mm:ss Current Time (hh:mm:ss)
Router# clock set 10:29:30
% ncomplete command
Router# clock set 10:29:30 ?
<1-31> Day of the month
MONTH Month of the year
Router# clock set 10:29:30 10 October ?
<1993-2035> Year
Router# clock set 10:29:30 10 October 1999
Router# show cIock
10:30:01.543 UTC Sun Oct 10 1999
Comandos del !OS
ConIiguracion del Reloj y Comando de Ayuda
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 28
Cisco Router Editing Commands
Keywords <show> <terminaI> <editing> <history> <size>
Move to the beginning of the command line:
Move to the end of the command line:
Move forward one character:
Move backward one character:
Repeat the entire (last) previous command:
Most recent command recall:
Move backward one word:
Move forward one word:
Show history of commands in the buffer:
Set the history buffer size (up to 256):
Disable advanced editing features:
Enable advanced editing features:
Completing a partial command with <tab> key:
Router responds with:
Typing a complete command:
Typing a partial, but recognizable, command
Typing a partial, unrecognizable, command
<CtrI-A>
<CtrI-E>
Right-Arrow or <CtrI-F>
Left-Arrow or <CtrI-B>
Up-Arrow or <CtrI-P>
Down-Arrow or <CtrI-N>
<Esc-B>
<Esc-F>
Router> show history
Router> terminaI history size
Router> no terminaI editing
Router> terminaI editing
Router# show run <tab>
Router# show running-config
Router# show cIock
Router# sho cIo
Router# sh cI
% Ambiguous command: "sh cl
Comandos del !OS
Comandos de Edicion
15
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 29
Configuration Modes and Prompts
Keywords <config> <interface> <subinterface> <Iine> <router> <ipx>
User EXEC mode for limited examination of the router Router>
Privileged EXEC mode for detailed examination of the router,
debugging, debugging, file manipulation and remote access
Router#
All router configurations start by changing to the gIobaI
configuration mode. Router# config t
Router(config)#
This example changes to the configuration-interface mode
for the e0 interface of the router:
Router(config)# int e0
Router(config-if)#
Note:
The remainder of the exampIe incIude a variety of Cisco
router configuration modes.
You wiII not know the meaning of many of these
commands. Right now that does not matter. The main
point is that many commands do not work because they
are not entered from the correct configuration mode.
Router(config)# int e0.100
Router(config-subif)#
Router(config)# router rip
Router(config-router)#
Router(config)# Iine vty 0 4
Router(config-line)#
Router(config)# ipx router rip
Router(config-ipx-router)#
Router(config)# map-Iist Qwerty
Router(config-map-list)#
Router(config)# map-map Secure 10
Router(config-rout-map)#
RXBOOT mode used to recover from lost passwords or
accidental flash erasure
SETUP mode prompted dialog to enter router configuration
Comandos del !OS
Modos de ConIiguracion y prompts
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 30
Router Status Commands
Keywords <show> <version> <processes> <mem> <stacks> <fIash> <run> <start> <int>
Displays system configuration, software version, file names
and the boot image:
Displays information about the active processes:
Displays the configured protocols:
Monitors stack use, interrupt routines, and last system reboot:
Displays buffer statistics:
Displays flash memory information:
Displays the active configuration file in RAM:
This is one of the most useful router commands
Displays the startup (backup) configuration file in NVRAM:
Displays statistics for all router interfaces:
Note: All command examples are shown in the privileged
mode. Many of the show commands are also available in the
user mode.
Router#show version
Router#show processes
Router#show protocoIs
Router#show stacks
Router#show buffer
Router#show fIash
Router#show running-config (usually just show run)
Router#show startup-config (usually just show start)
Router#show interfaces
Comandos del !OS
Comprobacion del Estado del Router
16
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 31
Cisco Discovery ProtocoI
Keywords <cdp> <interface> <neighbors> <detaiI> <entry> <enabIe> <traffic>
Show packets and holdtime:
Shows information about the router's interface status, such as
CDP timers, packets and encapsulation:
Displays information about directly connected routers, such as
device identifiers, address lists, port idenmtifiers and version:
Displays additional detailed information about directy
connected routers, including their ip addresses:
Displays the same information as the show cdp neighbors
detaiI command:
Displays information for a specified neighbor:
Enabling CDP on a specified interface, which begins CDP's
dynamic discovery and starts the exchange of CDP frames:
Displays the amount of packets sent and received among
router neighbors:
Router#show cdp
Router#show cdp interface
Router#show cdp neighbors
Router#show cdp neighbors detaiI
Router#show cdp entry *
Router#show cdp entry LAB-B

Router#config t
Router(config)#int s0
Router(config-if)#cdp enabIe
Router#show cdp traffic
Comandos del !OS
ConIiguracion del protocolo CDP
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 32
Router Testing
Keywords <teInet> <exit> <disconnect> <return> <sessions> <users> <ping> <trace>
<ip route> <cIear> <counters>
Starting a virtual terminal session with an P address:
Starting a virtual terminal session with a host name:
Finish a telnet session connected to LAB-A router:
Disconnect a telnet session:
Return to original router without terminating telnet session:
Resume earlier telnet session:
Displays open telnet sessions:
Displays routers connected by telnet:
Test end-to-end connectivity using ip address:
Test end-to-end connectivity host name:
Test each step from source to destination:
Abort continuous trace attempts:
Check if a router has a routing table:
Check if a specific interafce is operational and display
statistics since the last time counter were cleared:
To reset counters which helps to get a current router picture:
Router#teInet 172.16.50.1
Router#teInet Lab-A

Lab-A#exit
Lab-A#disconnect Router
Lab-A#<CtrI><Shift><6>
Lab-A#return
Router#show sessions
Router#show users
Router#ping 172.16.50.1
Router#ping LAB-A

Router#trace 172.16.50.1
<CtrI><Shift><6>
Router#show ip route
Router#show intyerfaces s1
Router#cIear counters
Comandos del !OS
Monitorizacion del Router
17
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 33
Commands reIated to Router Startup and Configurations
Keywords <run> <run> <reIoad> <setup> <write> <erase> <term>
Display running configuration in RAM:
Cisco OS 10.3 and earlier:
Display startup (backup) configuration in NVRAM:
Cisco OS 10.3 and earlier:
Erase the startup configuration in NVRAM:
Cisco OS 10.3 or earlier:
Restart the entire startup process with start-up configuration:
Enter router-prompted running configuration sequence:
Copy the running configuration to the startup configuration:
Cisco OS 10.3 or earlier:
Copy the startup configuration to the running configuration:
Cisco OS 10.3 or earlier:
Note: the setup command can be used only for creating a
minimal router configuration. Many configurations cannot be
entered or altered with setup
Router#show running-config (or show run)
Router#write term
Router#show startup-config (or show start)
Router#show config
Router#erase start-up config (or erase start)
Router#write erase
Router#reIoad
Router#setup
Router#copy run start
Router#write mem
Router#copy start run
Router#config mem
Comandos del !OS
Manipulacion de Archivos de ConIiguracion
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 34
Setting Cisco Router Passwords
Keywords <config> <enabIe> <secret> <password> <Iine> <vty> <aux> <con> <Iogin>
<service> <password-encryption>
Setting the priviIeged password:
Used for non-encrypted privileged mode and older OS
All password settings must be done in global configuration
Router# config t
Router(config)# enabIe password cisco
Setting the priviIeged-exec mode password: Router(config)# enabIe secret cIass
Setting the virtuaI terminaI password:
This password is used for teInet sessions into your router.
Iine vty 0 4 specifies that up to 5 telnet sessions are allowed:
Router(config)# Iine vty 0 4
Router(config-line)# Iogin
Router(config-line)# password cisco
Setting the auxiIiary password:
This password is used to control access to the router through
the aux port via a modem for remote console connections.
Router(config)# Iine aux 0
Router(config-line)# Iogin
Router(config-line)# password cisco
Setting the consoIe password:
This password controls access to the router through the
standard con router port
Router(config)# Iine con 0
Router(config-line)# Iogin
Router(config-line)# password cisco
Manually encrypting all password configurations that follow: Router(config)#service password-encryption
Comandos del !OS
ConIiguracion de las Passwords
18
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 35
Hostnames and Login Banners
Keywords <hostname> <banner> <motd>
Changing the router's hostname from current Router to the
new name Lab-A:
Note: Casual changing of host names can cause problems.
You will see in later router commands that host names are
used in various router configurations that are stored for future
use. The ability to do something like TeInet may not be
possible anymore when host names are arbitrarily changed.
Router#config t
Router(config)#hostname Lab-A

You can add a banner that will be displayed with login.
The motd commands stands for message of the day.
Start with the command witha delimiting charcter, like #
Both end and <CtrI-Z> return to the priviliged mode:
Router#config t
Router(config)#banner motd #
Enter TEXT message: End with the chracter #
Have a nice day#
Router(config)#end
Router#
Router(config)#^Z
Router#
Comandos del !OS
ConIiguracion del Nombre del Router y Banners
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 36
Bootstrap options
Keywords <boot system> <fIash> <tftp>
Loading Cisco OS from flash memory (this is default) with a
specified file name:
Router#config t
Router(config)#boot system fIash gsnew-image
Loading Cisco OS from TFTP server with a specified file
name and TFTP server ip address:
Router(config)#boot system tftp test.exe 172.16.13.111
Loading Cisco OS from ROM, which is only a subset of the
completye OS:
Router(config)#boot system rom
Comandos del !OS
ConIiguracion de las opciones de Arranque
Working with a TFTP server
Keywords <fIash> <copy> <tftp>
Determining memory available in f lash, as well as OS file
name that is stored in flash:
Router#show fIash
4096K bytes of f lash memory sized on embedded flash
File name/status
0 mater/California//i11/bin/gs7-j-mz.112-0.11 [deleted]
Upload copying the system image from f lash to a tftp server: Router#copy fIash tftp
P address of remote host [255.255.255.255]? 172.16.13.111
filename to write on tftp host? c4500-i

Downloading a new image from a tftp server to flash: Router#copy tftp fIash
P address of remote hosts [255.255.255.255]? 172.16.13.111
Name of tftp filename to copy into flash []? c4500-aj-m

Upload running configuration to a tftp server: Router#copy run tftp
Upload startup configuration to a tf tp server: Router#copy start tftp
Download running configuration f rom a tftp server: Router#copy tftp run
Download startup configuration from a tf tp server: Router#copy tftp start
Utilizacion de servidores TFTP
19
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 37
Recovering a router from Iost password
Keywords Hyper TerminaI
Restart the router Turn off router for a short period of time and turn it back on
nterrupt the bootup sequence: Press the <Ctrl> <Break> keys
Read the configuration register's original value:
Record this value for later, like 0x2102
>o (LittIe Ietter o not zero)
Change the configuration register and tell the router to ignore
the startup config in NVRAM:
>o/r 0x2142
nitialize and reboot the router:
Type n not to enter initial configuration
Press <Enter> to see Router> prompt
>i
Enter privileged mode: Router>enabIe
Restore original startup configuration:
You will not be able to see the secret password.
Reset the secret password.
Router#copy start run
Change to the original configuration register: Router#config t
Router(config)#config-register 0x2102
Save new configuration: Router#copy run start
Restart the computer with the new startup configuration: Router#reIoad
Check the new configuration: Router#show run
Check if configuration register is set to original settings: Routershow version
Comandos del !OS
Recuperacion de la Password
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 38
Configuring router ports
Keywords <description> <int> <ip address> <no> <shutdown> >cIock rate>
Enter specific port interface Ethernet 0:
Provide optional comment for router port:
Enter ip address for e0 followed by subnet mask:
Activate e0 port from default down to up:
Change to port interface Ethernet 1:
Provide optional comment for router port:
Enter ip address for e1 followed by subnet mask:
Activate e1 port from default down to up:
Change to port interface Serial 0:
Provide optional comment for router port:
Enter ip address for s0 followed by subnet mask:
Enter clockrate for DCE serial interface:
Activate s0 port from default down to up:
Lab-A(config)#int e0
Lab-A(config-if)#description E0 Iink to SaIes LAN
Lab-A(config-if)#ip address 192.5.5.1 255.255.255.0
Lab-A(config-if)#no shutdown
Lab-A(config-if)#int e1
Lab-A(config-if)#description E1 Iink to switch
Lab-A(config-if)#ip address 205.7.5.1 255.255.255.0
Lab-A(config-if)#no shutdown
Lab-A(config-if)#int s0
Lab-A(config-if)#description S0 WAN Iink (DCE) to Lab-B

Lab-A(config-if)#ip address 201.100.11.1 255.255.255.0
Lab-A(config-if)#cIock rate 56000
Lab-A(config-if)#no shutdown
Removing an ip address: Lab-A(config-if)#no ip address
Change an interface from up to down: Lab-A(config-if)#shutdown
Comandos del !OS
ConIiguracion de las InterIaces
20
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 39
Host Name to address mapping and Name server configuration
Keywords <ip host> <hosts> <domain> <Iookup> <name-server>
Set up host name, address mapping on Lab-A router:
Set up host name, address mapping on Lab-B router:
Note: you can enter a maximum of eight addresses
Lab-A(config)#ip host Lab-A 205.7.5.1 201.100.11.1 192.5.5.1
Lab-A(config)#ip host Lab-B 219.17.100.1 201.100.11.2 199.6.13.1
Lab-A(config)#ip host Lab-C 199.6.13.2 223.8.151.1 204.204.7.1
Lab-A(config)#Ip host Lab-D 204.204.7.2 210.93.105.1
Lab-A(config)#ip host Lab-E 210.93.105.2
Lab-B(config)#ip host Lab-A 205.7.5.1 201.100.11.1 192.5.5.1
Lab-B(config)#ip host Lab-B 219.17.100.1 201.100.11.2 199.6.13.1
Lab-B(config)#ip host Lab-C 199.6.13.2 223.8.151.1 204.204.7.1
Lab-B(config)#Ip host Lab-D 204.204.7.2 210.93.105.1
Lab-B(config)#ip host Lab-E 210.93.105.2
Display the list of host name, address mappings: Lab-A#show hosts
Or
Lab-A#show run (will also include mappings)
Remove mapping for router Lab-B on router Lab-A: Lab-A(config)#no ip host Lab-B

Turn on ip domain lookup (turned on by default):
Set the P address of the DNS server:
Append the domain name to the hostname:
Router(config)#ip domain-Iookup
Router(config)#ip name-server 192.168.0.70
Router(config)#ip domain-name schnook.com
Comandos del !OS
ConIiguracion del Servidor de Nombres
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 40
Configuring static routes
Keywords <ip route> <show ip route>
Set static route to 172.16.30.0 with subnet mask
255.255.255.0 via gateway 172.16.20.2
Set static route to 172.16.50.0 with subnet mask
255.255.255.0 via gateway 172.16.20.2
Set static route to 172.16.40.0 with subnet mask
255.255.255.0 via interface e0 with administrative
distance 10:
View static route information:
Removing a static route:
Note: t is not possible to state: no ip route to
remove a static route. t is an incomplete
command. The entire set of ip addresses needs to
be provided. Keep in mind that there can be
multiple static routes.
Router(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.2
Router(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.2
Router(config)#ip route 172.16.40.0 255.255.255.0 e0 10
Router#show run
Router(config)#no ip route 172.16.50.0 255.255.255.0 172.16.20.2
Comandos del !OS
ConIiguracion de Rutas Estaticas
21
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 41
Configuring Routing Information ProtocoI (RIP)
Keywords Hyper TerminaI
Add RP to update routing tables dynamically:
Network 172.16.0.0 is being advertised by the router:
Network 221.50.32.0 is being advertised by the router:
Router(config)#router rip
Router(config-router)#network 172.16.0.0
Router(config-router)#network 21.50.32.0
View contents of routing tables:
:
Router#show ip route
View contents of RP routes only: Router#show ip route rip
Holding back routing updates through a specified interface: Router(config-router)#passive-interface seriaI 0
To make RP broadcast on non-broadcast networks: Router(config-router)#neighbor 172.18.3.10
View RP information about routing timers and network
information associated with the entire router:
Router#show ip protocoI
Remove RP routing: Router(config)#no router rip
Display routing updates as they happen: Router#debug ip rip
Remove debugging: Router#no debug ip rip
Remove all debugging: Router#undebug aII
Comandos del !OS
ConIiguracion del protocolo RIP
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 42
Configuring defauIt routing
Keywords <ip route> <ip cIassIess>
Default route to 172.16.49.1 with subnet mask 0.0.0.0 via
gateway 0.0.0.0:
Default is like a static route with wild cards.
Default is used if the router does not know how to move a
packet.
Sometimes default routing fails to forward to appriate subnets.
Specifying ip cIassIess will forward packets to the best route
according to default specifications. Normally cIassIess is
used with IP unless RIP is used for erouting:
Remove default route:
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.49.1
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.49.2
Router(config)#ip cIassIess
Router(config)#no ip route 0.0.0.0 0.0.0.0 172.16.49.2
Alternative default routing commands: Router(config)#router rip
Router(config-router)#router rip
Router(config-router)#network 172.16.0.0
Router(config-router)#network 192.168.17.0
Router(config-router)#ip default network 192.168.17.0
Comandos del !OS
ConIiguracion de Rutas por DeIecto
22
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 43
Configuring Interior Gateway Routing ProtocoI (IGRP)
Keywords <router> <igrp> <network> <ip route> <protocoI> <events> <transactions>
Activate GRP routing protocol with AS number 10 (0-65535):
Specify attached network addresses:
Router(config)#router igrp 10
Router(config-router)#network 172.16.0.0
Router(config-router)#network 172.25.0.0
Check GRP routing table information: Router#show ip route
Useful command to see ip addresses for each interface and
determine if routing protocol is enabled:
Router#show protocoI
Verifying which routing protocol is active: Router#show ip protocoI
Display a summary of GRP routing information: Router#debug igrp events
Display message requests and broadcasts: Router#debug igrp transactions
Turn off all debugging: Router#un aII
Comandos del !OS
ConIiguracion del protocolo IGRP
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 44
Configuring standard IP access Iists
Keywords <access-Iist> <deny> <permit> <hosts> <any> <in> <out> <access-group>
Deny any packets from host 172.16.30.2
Permit access to all other ip addresses:
Change to interface mode:
Attach access list 10 to Ethernet 0 outgoing:
Router(config)#access-Iist 10 deny host 172.16.30.2
Router(config)#access-Iist 10 permit any
Router(config)#int e0
Router(config-if)#ip access-group 10 out
Permit any packets from network 172.16.0.0: Router(config)#access-Iist 20 permit 172.16.0.0 0.0.255.255
Permit any packets from subnet 172.16.4.0: Router(config)#access-Iist 30 permit 172.16.4.0 0.0.0.255
Permit only host 172.16.30.2 using wild card: Router(config)#access-Iist 40 permit 172.16.30.2 0.0.0.0
Deny only host 200.23.45.78:
Permit all other addresses using wild cards:
Permit all other addresses using any:
Router(config)#access-Iist 50 deny host 200.23.45.78
Router(config)#access-Iist 50 permit 0.0.0.0 255.255.255.255
same as:
Router(config)#access-Iist 50 permit any
Permit only even-numbered hosts of network
220.100.50.0:
Router(config)#access-Iist 60 permit 220.100.50.0 0.0.0.254
Permit only ip addresses in the range
172.16.16.0 through 172.16.19.0:
Router(config)#access-Iist 70 permit 172.16.16.0 0.0.3.255
Permit only ip addresses in the range
172.16.16.0 through 172.16.23.0:
Router(config)#access-Iist 80 permit 172.16.16.0 0.0.7.255
Permit only ip addresses in the range
172.16.32.0 through 172.16.63.0:
Router(config)#access-Iist 90 permit 172.16.32.0 0.0.31.255
Comandos del !OS
ConIiguracion de Listas de Acceso (ACLs)
23
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 45
ControIIing VTY (TeInet) access and viewing access Iists
Keywords <Iine vty 0 4> <access-cIass>
Create a standard access list permitting only 172.16.10.3:
Change to telnet line mode:
Apply the access list to the VTY line:
Router(config)#access-Iist 50 permit 172.16.10.3
Router(config)#Iine vty 0 4
Router(config-line)#access-cIass 50 in
Display all the access lists:
Display only access list 75:
Shows only the P access lists:
Shows which interfaces have access lists:
Shows the access lists and which interfaces have access lists:
Router#show access-Iist
Router#show access-Iist 75
Router#show ip access-Iist
Router#show ip interface
Router#show run
Comandos del !OS
ConIiguracion de Listas de Acceso (ACLs)
Access Iist main number ranges
Keywords
P standard access list
P extended access list
Appletalk access list
PX standard access list
PX extended access list
PX SAP access list
1-99
100-199
600-699
800-899
900-999
1000-1099
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 46
Configuring extended ip access Iists
Keywords <access-Iist> <deny> <permit> <eq> <any> <ftp> <teInet>
Deny acces from any source to host
172.16.10.5
Router(config)#access-Iist 110 deny ip any host 172.16.10.5
Deny access from any ftp and any teInet
source to host 172.16.10.5
Same access list as above, but using port
names (ftp and telnet) in place of numbers
(21 and 23)
Router(config)#access-Iist 120 deny tcp any host 172.16.10.5 eq 21
Router(config)#access-Iist 120 deny tcp any host 172.16.10.5 eq 23
Router(config)#access-Iist 120 permit ip any any
Router(config)#access-Iist 120 deny tcp any host 172.16.10.5 eq ftp
Router(config)#access-Iist 120 deny tcp any host 172.16.10.5 eq teInet
Router(config)#access-Iist 120 permit ip any any
Permit access from source network
150.50.0.0 to destination network 200.1.1.0
Router(config)#access-Iist 130 permit ip 150.50.0.0 0.0.255.255
200.1.1.0 0.0.0.255
Comandos del !OS
ConIiguracion de Listas de Acceso (ACLs)
Working with ARP tabIes
Keywords Hyper TerminaI
Display the ARP table:
This will show the P address address, MAC address and the
interface
Router#show arp
Clear the ARP table: Router#cIear arp
Consulta Tabla (cache) ARP
24
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 47
Configuring NAT y NAPT
Keywords <ip nat> <inside> <outside> <Iist> <poII> <overIoad> <static> <source>
Definir los interfaces que van a participar en el
NAT y de que tipo son: inside (conectada a la
red interna) o outside (conectada a la red
externa).
Router(config-if)# ip nat { inside | outside }
Para la asignacin dinmica de direcciones
por parte de NAT se debe definir un
conjunto(rango) de direcciones P. Estas
direcciones sern utilizadas por NAT conforme
las vaya necesitando.
Router(config)# ip nat pool <name> <start-ip> <end-ip> { netmask
<netmask> | prefix-length <prefix-length>
Name es el nombre que le asignamos al conjunto de direcciones (pool).
Start-ip es la primera direccin P del conjunto (rango).
End-ip es la ltima direccin P del conj unto (rango).
Netmask netmask especifica la mascara de red/subred de la red a la cual pertenece
el conjunto de direcciones.
Prefix-Iength prefix-length indica el nmero de 1s que tiene la mascara.
Para habilitar NAT para la traduccin de
direcciones fuente internas
Router(config)# ip nat inside source {list {access-list-number | name} {
pool name | interface interface-name}[overload] | static local-ip global-ip}
List access-list number es el nmero de lista de acceso P estndar. nicamente los
paquetes cuya direccin fuente pasan la lista de acceso son traducidos
dinmicamente utilizando las direcciones globales del pool name.
List name es el nombre de lista de acceso P estndar.
PooI name es el nombre del conj unto de direcciones que sern asignadas de forma
dinmica.
OverIoad (opcional) habilita al router para que utilice una nica direccin global para
vari as direcciones locales utilizando NAPT.
Interface interface es el nombre de la interfaz cuya direccin P ser asignada de
forma dinmica utili zando NAPT
Static local-ip establ ece una traduccin esttica simple entre local-ip y global-ip. Esta
direccin global P asignada al dispositi vo interno ser la direccin que ser vista
desde el exterior.
Configuracin de los timeouts de traduccin
Router(config)# ip nat translation {timeout | udp-timeout | dns-timeout |
tcp-timeout | finrst-timeout} seconds
Mostrar traducciones activas Router# show ip nat translations [ verbose ]
Mostrar estadsticas de las traducciones NAT Router# show ip nat statistics
Borrar traducciones dinmicas Router# clear ip nat translation {* | [inside global-ip local-ip] [outside local-
ip global-ip]}
Debugging Router# debug ip nat [ <list> ] [ detailed ]
Comandos del !OS
ConIiguracion de NAT y NAPT
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 48
Configuring PPP
Keywords <encapsuIation> <ppp> <chap> <pap>
Change to serial 0 router interface:
Enable Point-To-Point (PPP) encapsulation:
Change to Ethernet 0 router interface:
Try to enable PPP encapsulation:
Note: WAN protocoIs are enabIed at seriaI ports onIy and
must be enabIed at both ends of the seriaI connection.
Router(config)#int s0
Router(config-if)#encapsuIation ppp
Router(config-if)#int e0
Router(config-if)#encapsuIation ppp
^
% nvalid input detected at '^' marker
Configure PPP CHAP authentication:
(Challenge Handshake Authentication Protocol)
(more secure and encrypted password authentication)
Configure PPP PAP authentication:
(Password Authentication Protocol)
(less secure unencrypted password authentication)
Router(config-if)#ppp authentication chap
Router(config-if)#ppp authentication pap
Verify that PPP encapsulation is enabled:
More information is provided than shown here. Much of the
information will not make sense. The keep issue here is to
verify that PPP encapsulation is enabled.
Router#show int s0
Serial0 is up, line protocol is up
Hardware is HD64570
nternet address is 172.16.20.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely
255/255, load 1/255
EncapsuIation PPP, loopback not set, keepalive set (10 sec)
Comandos del !OS
ConIiguracion de PPP
25
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 49
Configuring FrameReIay
Keywords <encapsuIation> <frame-reIay> <ietf> <interface-dIci> <Imi-type>
Change to serial 0 router interface:
Enable Frame Relay encapsulation for Cisco routers:
Enable Frame Relay ETF encapsulation for non-cisco routers
or one cisco router connected to a non-cisco device:
(nternet Engineering Task Force)
Router(config)#int s0
Router(config-if)#encapsuIation frame-reIay
Router(config-if)#encapsuIation frame-reIay ietf
Permanent virtual circuits (PVCs) like Frame Relay virtual
circuits are identified by Data Link Connection dentifiers
(DLCs).
Check available DLC numbers for interface s0:
Configure DLC number 16 to the interface:
Router(config)#int s0
Router(config-if)#frame-reIay interface-dIci ?
<16-1007> Define a DLC as part of the current subinterface
Router(config-if)#frame-reIay interface-dIci 16
The Local Management nterface (LM) is a signaling standard
responsible for managing and maintaining status between a
CPE router and a frame switch. Beginning with OS 11.2 the
LM type is auto-sensed. There are three LM types.
Determine the three LM types:
Setting the LM type to q933a:
Router(config)#int s0
Router(config-if)#frame-reIay Imi-type ?
cisco
ansi
q933a
Router(config-if)#frame-reIay Imi-type q933a
Comandos del !OS
ConIiguracion de Frame Relay
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 50
C o n f i g u r i n g S u b i n t e r f a c e s f o r F r a m e R e I a y
K e yw o r d s < i n t s 1 . ? > < m u It i p o i n t > < p o i n t - to - p o i n t >
Y o u h a ve m u l t i p l e vi r t u a l c i r c u i ts o n a s i n g l e s e r i a l i n t e rf a c e ,
b u t e a c h m u s t b e t r e a te d a s a s e p a r a t e i n t e r f a ce . T h i s i s
a c c o m p l i s h e d b y c r e a t in g s u b i n t e r f a c e s .
F i r s t s e t F r a m e R e l a y e n c a p s u l a t i o n to a s e r i a l i n t e rf a c e :
C h e c k a v a i l a b l e su b i n te r f a c e n u m b e r s :
C r e a t e s u b i n t e r f a c e 1 6 i n S e r i a l 1 i n t e r f a ce :
R o u t e r ( c o n f i g ) # i n t s 1
R o u t e r ( c o n f i g - i f ) # e n c a p s u I a t i o n f r a m e - r e I a y
R o u t e r ( c o n f i g - i f ) # i n t s 1 . ?
< 0 - 4 2 9 4 9 6 7 2 9 5 >
R o u t e r ( c o n f i g - i f ) # i n t s 1 . 1 6
R o u t e r ( c o n f i g - s u b if ) #
D e t e r m i n e t h e t w o t yp e s o f su b i n t e rf a c e s :
M u l t i p o i n t i s u s e d w h e n t h e r o u te r i s a t t h e c e n t e r o f a s t a r o f
vi r t u a l c i r c u i t s .
P o i n t - t o - P o i n t i s u s e d w h e n a s i n g l e v i r t u a l c i r c u i t c o n n e c t s
o n e r o u te r t o a n o th e r .
C r e a t e s u b i n t e r f a c e 1 6 w i th m u l t i p o i n t t yp e :
R o u t e r ( c o n f i g ) # i n t s 0 .1 6 ?
m u l t i p o i n t T r e a t a s m u l t i p o i n t l i n k
p o i n t - t o - p o i n t T r e a t a s p o i n t- to - p o i n t l i n k
R o u t e r ( c o n f i g ) # i n t s 0 .1 6 m u I t i p o i n t
R o u t e r ( c o n f i g - s u b if ) #
Comandos del !OS
ConIiguracion de Frame Relay
M ap p i ng F r am e Re I a y
Ke yw or d s
P de vi ce s a t t h e en d s of virt u a l c irc u it s mu s t h a ve t h eir
ad d re s s m ap ped to Dat a L ink Con ne c t ion den t if ie rs (DL C s ).
The re ar e t wo ma pp ing ap p ro ac h es :
Us e t he Fr ame Re la y m ap c o mma nd
Us e t he i nv er s e-a rp f un c t ion
Fram e Rela y m ap c omma nd e xa mp le
En a b le (d ef au lt Cis c o ) Fr am e Re la y e nc a p su la t ion :
Cre at e s ub int e rf ac e wi th p oin t -t o- po int lin k :
Dis ab le in ve rs e arp :
Con f igu re ip a dd re s s a nd s ub n et m as k f or s u bin t e rf ac e :
Ro u t er (c on f ig) #a cc es s-I i s t 8 10 pe r m i t 2 0 4 0
Ro u t er (c on f ig) #i nt e0
Ro u t er (c on f ig- if )#i px a cc es s -gr oup 8 10 out
Ro u t er (c on f ig) #i nt s0
Ro u t er (c on f ig- if )#e nc aps uI at ion f ra m e -re I a y
Ro u t er (c on f ig- if )#i nt s 0. 1 6 poi nt-to- point
Ro u t er (c on f ig- s ub if )# no i nve r se a rp
Ro u t er (c on f ig- s ub if )# i p a ddr es s 1 72 .1 6 .3 0 .1 2 5 5. 25 5. 2 55 . 0
y
26
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 51
Configuracin basica del Router
Topologia del Laboratorio de Redes
- 3 Hubs 3COM (Jan, Guadalajara, Ciudad Real)
- S switches C!SCO 2950
- 2+ 12 puertos Fast Ethernet UTP (RJ+5)
- 2 puertos Gigabit Ethernet (Fibra Optica, troncales)
- S routers CISCO de la serie 2620.
- 1 interface Fast Ethernet UTP (RJ+5)
- 2 interfaces serie v.35
- 3 routers CISCO de la serie 2621 (Nadrid, Jan, Guadalajara)
- 2 interfaces Fast Ethernet UTP (RJ+5)
- 2 interfaces serie v.35
172.20.0.0/16
MADRD BARCELONA VALENCA SEVLLA ALBACETE
172.20.40.0/21
172.20.32.0/21 172.20.24.0/21 172.20.16.0/21 172.20.8.0/21
172.20.40.1
172.20.40.2
CONSOLA
TERMINAL 1
172 .20.40.3
161.67.17.225
TERMINAL 3
172.20.40.5
161.67.17.227
172.20.8.1 172.20.8.2 172.20.16.1 172.20.16.2 172.20.24.1 172 .20.24.2 172.20.32.1 172.20.32.2
S0/1 S0/0
F0/0
172.20.80.0/21
172 .20.80.1 172.20.80.2
TERMINAL 2
172 .20.40.4
161.67.17.226
172.20.48.0/21
172 .20.48.1
172 .20.48.2
TERMINAL 3
172.20.48.5
161 .67.17.230
S0/1 S0/0
F0/0
TERMINAL 2
172.20.48.4
161.67.17.229
CONSOLA
TERMINAL 1
172.20.48.3
161.67.17.228
172.20.56.0/21
172.20.56.1
172.20.56.2
TERMINAL 3
172.20.56.5
161.67.17.239
S0/1 S0/0
F0/0
TERMINAL 2
172 .20.56.4
161.67.17.232
CONSOLA
TERMINAL 1
172.20.56.3
161.67.17.231
172.20.64.0/21
172.20.64.1
172.20.64.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.64.4
161.67.17.236
TERMINAL 3
172.20.64.5
161.67.17.237
CONSOLA
TERMINAL 1
172.20.64.3
161 .67.17.238
172.20.72.0/21
172 .20.72.1
172 .20.72.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.72.4
161.67.17.234
TERMINAL 3
172.20.72.5
161.67.17.233
CONSOLA
TERMINAL 1
172 .20.72.3
161.67.17.235
JAEN GUADALAJARA CUDAD REAL TOLEDO CUENCA
172.20.128.0/21
172.20.112.0/21 172.20.104.0/21 172.20.96.0/21 172.20.88.0/21
172.20.128.1
172.20.128.2
CONSOLA
TERMINAL 1
172.20.128.3
161.67.17.240
TERMINAL 2
172.20.128.4
161.67.17.241
172.20.88.1 172.20.88.2 172.20.96.1 172.20.96.2 172 .20.104.1 172.20.104 .2 172.20.112.1 172.20.112.2
S0/0
F0/0
172.20.120.0/21
172.20.120.1 172.20.120.2
172.20.136.0/21
172.20.136.1
172.20.136.2
TERMINAL 2
172.20.136.4
161.67.17.243
S0/1 S0/0
F0/0
CONSOLA
TERMINAL 1
172.20.136.3
161.67.17.242
172.20.144.0/21
172.20.144 .1
172.20.144 .2
TERMINAL 2
172 .20.144.4
161.67.17.245
S0/1 S0/0
F0/0
CONSOLA
TERMINAL 1
172 .20.144.3
161.67.17.244
172.20.152.0/21
172 .20.152.1
172 .20.152.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.152.4
161.67.17.254
TERMINAL 3
172 .20.152.5
161.67.17.253
CONSOLA
TERMINAL 1
172 .20.152.3
161.67.17.246
172.20.160.0/21
172.20.160 .1
172.20.160 .2
S0/1 S0/0
F0/0
TERMINAL 2
172 .20.160.4
161.67.17.251
TERMINAL 3
172.20.160.5
161.67.17.250
CONSOLA
TERMINAL 1
172.20.160.3
161 .67.17.252
S0/1
GRANADA
172.20.168.0/21
172.20.168 .1
172.20.168 .2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.168.4
161.67.17.248
TERMINAL 3
172.20.168.5
161 .67.17.247
CONSOLA
TERMINAL 1
172 .20.168.3
161.67.17.249
DCE DCE DCE DCE DCE DTE DTE DTE DTE DTE DTE
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 52
Configuracin basica del Router
Topologia del Laboratorio
ARNAR!O A
JAEN GUADALAJARA C UDAD REAL TOLEDO CUENCA
172.20.136. 0/21 172.20.144. 0/21 172.20.152.0/21 172.20.160.0/21
172.20. 112.0/21 172.20.104. 0/21 172. 20. 96. 0/21 172.20.88.0/ 21
172.20.135.254
172.20.88.1 172.20.88.2 172.20.96.1 172.20.96.2
172.20.136.1
172.20.136.2
172.20.136.3 172.20.143.254
172.20.144.1
172.20.144..2
172.20.144.3 172.20.151.254
172.20.104.1 172.20.104.2 172.20.112.1 172.20.112.2
172.20.152.1
172.20.152.2
172.20.152.3 172.20.159.254
172.20.160.1
172.20.160.2
172.20.160.3 172.20.167.254
DCE= S0/0
DTE=S0/1
S0/0
F0/0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
GRANADA
172.20.168.0/21
172.20. 120.0/ 21
172.20.120.2
172.20.168.1
172.20.168.2
172.20.168.3 172.20.175.254
S0/1 S0/0
F0/0
172.20.120.1
172.20.128.0/ 21
172.20.128.1
172.20.128.2
172.20.128.3
172.20.0.0/16
MADRD BARCELONA VALENCA SEVLLA ALBACETE
172. 20.40.0/21 172.20. 48.0/ 21 172. 20.56.0/21 172.20.64.0/21 172.20.72. 0/21
172. 20.32.0/21 172.20.24.0/21 172. 20.16.0/ 21 172.20.8.0/21
172.20.40.1
172.20.40.2
172.20.40.3 172.20.47.254
172.20.8.1 172.20.8.2 172.20.16.1 172.20.16.2
172.20.48.1
172.20.48.2
172.20.48.3 172.20.55.254
172.20.56.1
172.20.56.2
172.20.56.3 172.20.63.254
172.20.24.1 172.20.24.2 172.20.32.1 172.20.32.2
172.20.64.1
172.20.64.2
172.20.64.3 172.20.71.254
172.20.72.1
172.20.72.2
172.20.72.3 172.20.79.254
DCE= S0/0
DTE= S0/1
S0/1 S0/0
F0/0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
172. 20.80.0/21
172.20.80.1 172.20.80.2
S0/1
172.20.0.0/16
ARMARO A ARMARO B
MADRD BARCELONA VALENCA SEVLLA ALBACETE
172.20.40.0/21
172.20.32.0/21 172.20.24.0/21 172.20.16.0/21 172.20.8.0/21
172.20.40.1
172.20.40.2
CONSOLA
TERMINAL 1
172.20.40.3
161.67.17.225
TERMINAL 3
172.20.40.5
161.67.17.227
172.20.8.1 172.20.8.2 172.20.16.1 172.20.16.2 172.20.24.1 172.20.24.2 172.20.32.1 172.20.32.2
S0/1 S0/0
F0/0
172.20.80.0/21
172.20.80.1
TERMINAL 2
172.20.40.4
161.67.17.226
172.20.48.0/21
172.20.48.1
172.20.48.2
TERMINAL 3
172.20.48.5
161.67.17.230
S0/1 S0/0
F0/0
TERMINAL 2
172.20.48.4
161.67.17.229
CONSOLA
TERMINAL 1
172.20.48.3
161.67.17.228
172.20.56.0/21
172.20.56.1
172.20.56.2
TERMINAL 3
172.20.56.5
161.67.17.239
S0/1 S0/0
F0/0
TERMINAL 2
172.20.56.4
161.67.17.232
CONSOLA
TERMINAL 1
172.20.56.3
161.67.17.231
172.20.64.0/21
172.20.64.1
172.20.64.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.64.4
161.67.17.236
TERMINAL 3
172.20.64.5
161.67.17.237
CONSOLA
TERMINAL 1
172.20.64.3
161.67.17.238
172.20.72.0/21
172.20.72.1
172.20.72.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.72.4
161.67.17.234
TERMINAL 3
172.20.72.5
161.67.17.233
CONSOLA
TERMINAL 1
172.20.72.3
161.67.17.235
DCE DCE DTE DTE DTE
27
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 53
Configuracin basica del Router
Topologia del Laboratorio
ARNAR!O B
JAEN GUADALAJARA C UDAD REAL TOLEDO CUENCA
172.20.136. 0/21 172.20.144. 0/21 172.20.152.0/21 172.20.160.0/21
172.20. 112.0/21 172.20.104. 0/21 172. 20. 96. 0/21 172.20.88.0/ 21
172.20.135.254
172.20.88.1 172.20.88.2 172.20.96.1 172.20.96.2
172.20.136.1
172.20.136.2
172.20.136.3 172.20.143.254
172.20.144.1
172.20.144..2
172.20.144.3 172.20.151.254
172.20.104.1 172.20.104.2 172.20.112.1 172.20.112.2
172.20.152.1
172.20.152.2
172.20.152.3 172.20.159.254
172.20.160.1
172.20.160.2
172.20.160.3 172.20.167.254
DCE= S0/0
DTE=S0/1
S0/0
F0/0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/0
S0/1 S0/0
F0/0
GRANADA
172.20.168.0/21
172.20. 120.0/ 21
172.20.120.2
172.20.168.1
172.20.168.2
172.20.168.3 172.20.175.254
S0/1 S0/0
F0/0
172.20.120.1
172.20.128.0/ 21
172.20.128.1
172.20.128.2
172.20.128.3
172.20.0.0/16
MADRD BARCELONA VALENCA SEVLLA ALBACETE
172. 20.40.0/21 172.20. 48.0/ 21 172. 20.56.0/21 172.20.64.0/21 172.20.72. 0/21
172. 20.32.0/21 172.20.24.0/21 172. 20.16.0/ 21 172.20.8.0/21
172.20.40.1
172.20.40.2
172.20.40.3 172.20.47.254
172.20.8.1 172.20.8.2 172.20.16.1 172.20.16.2
172.20.48.1
172.20.48.2
172.20.48.3 172.20.55.254
172.20.56.1
172.20.56.2
172.20.56.3 172.20.63.254
172.20.24.1 172.20.24.2 172.20.32.1 172.20.32.2
172.20.64.1
172.20.64.2
172.20.64.3 172.20.71.254
172.20.72.1
172.20.72.2
172.20.72.3 172.20.79.254
DCE= S0/0
DTE= S0/1
S0/1 S0/0
F0/0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
S0/1 S0/0
F0/ 0
172. 20.80.0/21
172.20.80.1 172.20.80.2
S0/1
172.20.0.0/16
ARMARO A ARMARO B
172.20.80.0/21
172.20.80.2
JAEN GUADALAJARA CUDAD REAL TOLEDO CUENCA
172.20.128.0/21
172.20.112.0/21 172.20.104.0/21 172.20.96.0/21 172.20.88.0/21
172.20.128.1
172.20.128.2
CONSOLA
TERMINAL 1
172.20.128.3
161.67.17.240
TERMINAL 2
172.20.128.4
161.67.17.241
172.20.88.1 172.20.88.2 172.20.96.1 172.20.96.2 172.20.104.1 172.20.104.2 172.20.112.1 172.20.112.2
S0/0
F0/0
172.20.120.0/21
172.20.120.1 172.20.120.2
172.20.136.0/21
172.20.136.1
172.20.136.2
TERMINAL 2
172.20.136.4
161.67.17.243
S0/1 S0/0
F0/0
CONSOLA
TERMINAL 1
172.20.136.3
161.67.17.242
172.20.144.0/21
172.20.144.1
172.20.144.2
TERMINAL 2
172.20.144.4
161.67.17.245
S0/1 S0/0
F0/0
CONSOLA
TERMINAL 1
172.20.144.3
161.67.17.244
172.20.152.0/21
172.20.152.1
172.20.152.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.152.4
161.67.17.254
TERMINAL 3
172.20.152.5
161.67.17.253
CONSOLA
TERMINAL 1
172.20.152.3
161.67.17.246
172.20.160.0/21
172.20.160.1
172.20.160.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.160.4
161.67.17.251
TERMINAL 3
172.20.160.5
161.67.17.250
CONSOLA
TERMINAL 1
172.20.160.3
161.67.17.252
S0/1
GRANADA
172.20.168.0/21
172.20.168.1
172.20.168.2
S0/1 S0/0
F0/0
TERMINAL 2
172.20.168.4
161.67.17.248
CONSOLA
TERMINAL 1
172.20.168.3
161.67.17.249
DCE DCE DCE DTE DTE DTE
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 54
Configuracin basica del Router
Descripcin / ExpIicacin
deI paso
Indicador de comando deI
router
Comando IOS
Habilitar el modo privilegiado Router> enable
Configurar (el router) desde la
Terminal (teclado)
Router# configure terminal
PonerIe nombre aI Router
BarceIona (el indicador
cambia)
Router(config)# hostname Barcelona
EstabIecer Ia contrasea
cifrada (secreta) para el
modo privilegiado como
"cisco"
Barcelona(config)# enable secret cisco
EstabIecer Ia contrasea de
texto del modo privilegiado
(opcional) como "epsa"
Barcelona A(config)# enable password epsa
SeIeccionar Ia interfaz
FastEthernet 0
Barcelona (config)# interface f 0/0
Establecer la direccin P y la
mscara de subred de f0/0
Barcelona (config-if)# ip address 172.20.48.1 255.255.248.0
Activar la interfaz f0/0 Barcelona (config-if)# no shutdown
SeIeccionar Ia interfaz
SeriaI 0
Barcelona (config-if)# interface s 0/0
Establecer la direccin P y la
mscara de subred de s0/0
Barcelona (config-if)# ip address 172.20.16.1 255.255.248.0
Establecer la sincronizacin
de DCE en 56000
Barcelona (config-if)# clock rate 56000
Activar la interfaz s0/0 Barcelona (config-if)# no shutdown
SeIeccionar Ia interfaz
SeriaI 1
Barcelona(config-if)# interface s 0/1
Establecer la direccin P y la
mscara de subred de s0/0
Barcelona(config-if)# ip address 172.20.8.2 255.255.248.0
Establecer la sincronizacin
de DCE en 56000
Barcelona (config-if)# clock rate 56000
Activar la interfaz s0/1 Barcelona(config-if)# no shutdown
28
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 55
Activar eI protocoIo de
enrutamiento RIP
Barcelona(config)# router rip
Especificar la red
directamente conectada para
las actualizaciones de
enrutamiento
Barcelona(config-router)# network 172.20.8.0
Especificar la red
directamente conectada para
las actualizaciones de
enrutamiento
Barcelona(config-router)# network 172.20.16.0
Especificar la red
directamente conectada para
las actualizaciones de
enrutamiento
Barcelona(config-router)# network 172.20.48.0
Definir Ia tabIa de nombres
de host deI router
Barcelona(config)#
Especificar la entrada de
tabla de host para Barcelona
(con direcciones P de las
interfaces)
Barcelona(config)#
ip host Barcelona 172.20.8.2 172.20.16.1
172.20.48.1
Especificar la entrada de
tabla de host para Madrid
(con direcciones P de las
interfaces)
Barcelona(config)# ip host Madrid 172.20.8.1 172.20.40.1
Especificar la entrada de
tabla de host para Valencia
(con direcciones P de las
interfaces)
Barcelona(config)#
ip host Valencia 172.20.16.2 172.20.24.1
172.20.56.1
Especificar la entrada de
tabla de host para Sevilla
(con direcciones P de las
interfaces)
Barcelona(config)#
ip host Sevilla 172.20.24.2 172.20.32.1
172.20.64.1
Especificar la entrada de
tabla de host para Albacete
(con direcciones P de las
interfaces)
Barcelona(config)# ip host Albacete 172.20.32.2 172.20.72.1
Ampliacion de Redes de Computadores (4 II)
Seminario. Configuracion de Routers 56
Configurar Ia Inea de
consoIa (conectada
directamente al puerto de
consola)
Barcelona(config)# line con 0
Activar verificacin de
contrasea de conexin de
consola
Barcelona(config-line)# login
Establecer la contrasea de
modo usuario para la
conexin de consola
Barcelona(config-line)# password cisco
Configurar teInet Iine
(terminal virtual o VTY)
Barcelona(config-line)# line vty 0 4
Activar verificacin de
contrasea de conexin de
telnet
Barcelona(config-line)# login
Establecer la contrasea de
modo usuario para la
conexin de telnet
Barcelona(config-line)# password cisco
Comprobar Ia configuracin Barcelona# show running-config
Guardar Ia configuracin
actuaI en Ia configuracin
iniciaI
Barcelona# copy running-config startup-config
Configuracin basica del Router