Академический Документы
Профессиональный Документы
Культура Документы
Indice
1. ¿Qué es un Router?
2. Componentes internos del Router.
3. Fuentes de configuración de un Router.
4. Secuencia de inicio de un Router.
5. Configuración inicial de un Router (SETUP)
6. Modos de configuración de un Router.
7. Comandos Show de un Router.
8. Procesos de prueba de conectividad.
9. Comandos del IOS
1. Configuración básica de un Router
10. Topología del Laboratorio
Bibliografía: Curriculum CNAP de CISCO
DTE DCE
DCE DTE
Data Circuit
Data Terminal Terminating Data Terminal
Equipment Data Circuit
Equipment Terminating Equipment
Equipment
1. ¿Qué es un Router?
Router vs Puente vs Switch
! Los puentes y los switches usan direcciones físicas (direcciones MAC)
para tomar decisiones con respecto al envío de datos
" El fabricante de la NIC generalmente es el que asigna las direcciones físicas
• Se codifican de forma permanente en la NIC
! Los routers usan direcciones IP (direcciones lógicas) en lugar de
direcciones MAC
" El administrador de la red generalmente asigna las direcciones IP
• Es común que un administrador de la red agrupe los dispositivos de acuerdo con
su ubicación geográfica, departamento o piso dentro de un edificio
• Como se implementan en software, las direcciones IP se pueden cambiar con
relativa facilidad
! Los puentes y switches se usan principalmente para conectar los
segmentos de una red
! Los routers se usan para conectar redes separadas, y para acceder a
Internet
" Esto se hace a través del enrutamiento de extremo a extremo
1. ¿Qué es un Router?
Ejemplo de Interconexión LAN/WAN
DCE= S0/0
DTE= S0/1
MADRID BARCELONA VALENCIA SEVILLA ALBACETE
172.20.8.0/21 172.20.16.0/21 172.20.24.0/21 172.20.32.0/21
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 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0
172.20.40.1 F0/0 172.20.48.1 F0/0 172.20.56.1 F0/0 172.20.64.1 F0/0 172.20.72.1 F0/0
172.20.0.0/16
Almacena el
archivo de
configuración en
ejecución, tablas
de ruteo y ARP. Al
apagar
El router o
reiniciarlo se borra
toda la
información
Would you like to enter the initial configuration dialog? [yes/no]:yes Do you want to configure FastEthernet0/0 interface? [yes]:
Use the 100 Base-TX (RJ-45) connector? [yes]:
At any point you may enter a question mark '?' for help. Operate in full-duplex mode? [no]: yes
Use ctrl-c to abort configuration dialog at any prompt. Configure IP on this interface? [yes]:
Default settings are in square brackets '[]'. IP address for this interface: 172.20.48.1
Basic management setup configures only enough connectivity Subnet mask for this interface [255.255.0.0] : 255.255.248.0
for management of the system, extended setup will ask you Class B network is 172.20.0.0, 21 subnet bits; mask is /21
to configure each interface on the system
Do you want to configure Serial0/0 interface? [yes]:
Would you like to enter basic management setup? [yes/no]:no
Some supported encapsulations are
First, would you like to see the current interface summary? [yes]: no ppp/hdlc/frame-relay/lapb/x25/atm-dxi/smds
Choose encapsulation type [hdlc]:
Configuring global parameters:
Serial interface needs clock rate to be set in dce mode.
Enter host name [Router]: Barcelona The following clock rates are supported on the serial interface.
1200, 2400, 4800, 9600, 14400, 19200
The enable secret is a password used to protect access to 28800, 32000, 38400, 56000, 57600, 64000
privileged EXEC and configuration modes. This password, after 72000, 115200, 125000, 128000, 148000, 500000
entered, becomes encrypted in the configuration. 800000, 1000000, 1300000, 2000000, 4000000, 8000000
Enter enable secret: cisco
choose speed from above : [2000000]:
The enable password is used when you do not specify an Configure IP on this interface? [yes]:
enable secret password, with some older software versions, and Configure IP unnumbered on this interface? [no]:
some boot images. IP address for this interface: 172.20.16.1
Enter enable password: epsa 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
The virtual terminal password is used to protect
access to the router over a network interface. Do you want to configure Serial0/1 interface? [yes]:
Enter virtual terminal password: cisco
Some supported encapsulations are
Configure SNMP Network Management? [yes]: no ppp/hdlc/frame-relay/lapb/x25/atm-dxi/smds
Configure DECnet? [no]: Choose encapsulation type [hdlc]:
Configure AppleTalk? [no]: Configure IP on this interface? [yes]:
Configure IPX? [no]: Configure IP unnumbered on this interface? [no]:
Configure IP? [yes]: IP address for this interface: 172.20.8.2
Configure IGRP routing? [yes]: no Subnet mask for this interface [255.255.0.0] : 255.255.248.0
Configure RIP routing? [no]: yes
Configure bridging? [no]: [0] Go to the IOS command prompt without saving this config
Async lines accept incoming modems calls. If you will have [1] Return back to the setup without saving this config.
users dialing in via modems, configure these lines. [2] Save this configuration to nvram and exit.
Configure Async lines? [yes]: no
Enter your selection [2]:2
Ampliación de Redes 2º I.T.I.S. Seminario – 11
enable Ctrl+Z
configure terminal
exit
exit
show interfaces
First make or check the physical connection between a Connect console cable RJ45 plug to serial adapter and attach
workstation and a Cisco Router. 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.
Connection Description window Name: Cisco Router (or other appropriate icon name)
Select connection name and a connection icon Icon: Accept default icon or pick desired icon
Click OK
Phone Number window Connect using: Direct to Com1 (do not use dial up)
Enter indicated settings: Bits per second: 9600
You are not creating a phone dial-up connection Data bits: 8
Parity: none
Flow control: Hardware
Click OK
Note:
Cisco routers automatically disconnect after an inactive
time period. It will be necessary to repeat the login.
To set the clock and only knowing the clock command: Router# clock ?
Router responds with: set Set the time and date
Enter the next step and ask for more help: Router# clock set ?
Router responds with: hh:mm:ss Current Time (hh:mm:ss)
Add day and month information and ask for more help: Router# clock set 10:29:30 10 October ?
Router responds with: <1993-2035> Year
Enter the complete clock command: Router# clock set 10:29:30 10 October 1999
Set the history buffer size (up to 256): Router> terminal history size
Completing a partial command with <tab> key: Router# show run <tab>
Router responds with: Router# show running-config
The remainder of the example include a variety of Cisco Router(config)# router rip
router configuration modes. Router(config-router)#
You will not know the meaning of many of these Router(config)# line vty 0 4
commands. Right now that does not matter. The main Router(config-line)#
point is that many commands do not work because they
are not entered from the correct configuration mode. Router(config)# ipx router rip
Router(config-ipx-router)#
Monitors stack use, interrupt routines, and last system reboot: Router#show stacks
Displays the active configuration file in RAM: Router#show running-config (usually just show run)
This is one of the most useful router commands
Router#show startup-config (usually just show start)
Displays the startup (backup) configuration file in NVRAM:
Router#show interfaces
Displays statistics for all router interfaces:
Shows information about the router’s interface status, such as Router#show cdp interface
CDP timers, packets and encapsulation:
Router#show cdp neighbors
Displays information about directly connected routers, such as
device identifiers, address lists, port idenmtifiers and version:
Router#show cdp neighbors detail
Displays additional detailed information about directy
connected routers, including their ip addresses:
Router#show cdp entry *
Displays the same information as the show cdp neighbors
detail command:
Router#show cdp entry LAB-B
Displays information for a specified neighbor:
Router#config t
Enabling CDP on a specified interface, which begins CDP’s Router(config)#int s0
dynamic discovery and starts the exchange of CDP frames: Router(config-if)#cdp enable
Displays the amount of packets sent and received among Router#show cdp traffic
router neighbors:
To reset counters which helps to get a current router picture: Router#clear counters
Display startup (backup) configuration in NVRAM: Router#show startup-config (or show start)
Cisco IOS 10.3 and earlier: Router#show config
Erase the startup configuration in NVRAM: Router#erase start-up config (or erase start)
Cisco IOS 10.3 or earlier: Router#write erase
Copy the running configuration to the startup configuration: Router#copy run start
Cisco IOS 10.3 or earlier: Router#write mem
Copy the startup configuration to the running configuration: Router#copy start run
Cisco IOS 10.3 or earlier: Router#config mem
You can add a banner that will be displayed with login. Router#config t
The motd commands stands for message of the day. Router(config)#banner motd #
Start with the command with a delimiting charcter, like # Enter TEXT message: End with the chracter #
Have a nice day#
Router(config)#^Z
Router#
Provide optional comment for router port: Lab-A(config-if)#description E0 link to Sales LAN
Enter ip address for e0 followed by subnet mask: Lab-A(config-if)#ip address 192.5.5.1 255.255.255.0
Enter ip address for e1 followed by subnet mask: Lab-A(config-if)#ip address 205.7.5.1 255.255.255.0
Provide optional comment for router port: Lab-A(config-if)#description S0 WAN link (DCE) to Lab-B
Enter ip address for s0 followed by subnet mask: Lab-A(config-if)#ip address 201.100.11.1 255.255.255.0
Set up host name, address mapping on Lab-A router: 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
Or
Remove mapping for router Lab-B on router Lab-A: Lab-A(config)#no ip host Lab-B
Bootstrap options
Keywords <boot system> <flash> <tftp>
Loading Cisco IOS from flash memory (this is default) with a Router#config t
specified file name: Router(config)#boot system flash gsnew-image
Loading Cisco IOS from TFTP server with a specified file Router(config)#boot system tftp test.exe 172.16.13.111
name and TFTP server ip address:
Loading Cisco IOS from ROM, which is only a subset of the Router(config)#boot system rom
completye IOS:
Upload copying the system image from flash to a tftp server: Router#copy flash tftp
IP 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 flash
IP address of remote hosts [255.255.255.255]? 172.16.13.111
Name of tftp filename to copy into flash []? c4500-aj-m
Restart the router Turn off router for a short period of time and turn it back on
Read the configuration register’s original value: >o (Little letter o not zero)
Record this value for later, like 0x2102
Change the configuration register and tell the router to ignore >o/r 0x2142
the startup config in NVRAM:
Set static route to 172.16.30.0 with subnet mask Router(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.2
255.255.255.0 via gateway 172.16.20.2
Set static route to 172.16.50.0 with subnet mask Router(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.2
255.255.255.0 via gateway 172.16.20.2
Set static route to 172.16.40.0 with subnet mask Router(config)#ip route 172.16.40.0 255.255.255.0 e0 10
255.255.255.0 via interface e0 with administrative
distance 10:
Default route to 172.16.49.1 with subnet mask 0.0.0.0 via Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.49.1
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. Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.49.2
Specifying ip classless will forward packets to the best route Router(config)#ip classless
according to default specifications. Normally classless is
used with IP unless RIP is used for erouting:
View RIP information about routing timers and network Router#show ip protocol
information associated with the entire router:
Useful command to see ip addresses for each interface and Router#show protocol
determine if routing protocol is enabled:
Deny any packets from host 172.16.30.2 Router(config)#access-list 10 deny host 172.16.30.2
Permit access to all other ip addresses: Router(config)#access-list 10 permit any
Change to interface mode: Router(config)#int e0
Attach access list 10 to Ethernet 0 outgoing: Router(config-if)#ip access-group 10 out
Permit any packets from network 172.16.0.0: Router(config)#access-list 20 permit 172.16.0.0 0.0.255.255
Permit any packets from subnet 172.16.4.0: Router(config)#access-list 30 permit 172.16.4.0 0.0.0.255
Permit only host 172.16.30.2 using wild card: Router(config)#access-list 40 permit 172.16.30.2 0.0.0.0
Create a standard access list permitting only 172.16.10.3: Router(config)#access-list 50 permit 172.16.10.3
Change to telnet line mode: Router(config)#line vty 0 4
Apply the access list to the VTY line: Router(config-line)#access-class 50 in
Shows the access lists and which interfaces have access lists: Router#show run
Deny acces from any source to host Router(config)#access-list 110 deny ip any host 172.16.10.5
172.16.10.5
Deny access from any ftp and any telnet Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq 21
source to host 172.16.10.5 Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq 23
Router(config)#access-list 120 permit ip any any
Same access list as above, but using port Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq ftp
names (ftp and telnet) in place of numbers Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq telnet
(21 and 23) Router(config)#access-list 120 permit ip any any
Permit access from source network Router(config)#access-list 130 permit ip 150.50.0.0 0.0.255.255
150.50.0.0 to destination network 200.1.1.0 200.1.1.0 0.0.0.255
B o rra r tra d u c cio n e s d in á m ica s R o u te r# c le a r ip n a t tra ns la tio n {* | [in s ide g lo b a l-ip lo ca l-ip ] [o u ts id e lo c a l-
ip g lo b a l-ip ]}
D e b u g g in g R o u te r# d e b u g ip n a t [ < lis t> ] [ d e ta ile d ]
Seleccionar la interfaz
Barcelona (config)# interface f 0/0
FastEthernet 0
Establecer la dirección IP y la
Barcelona (config-if)# ip address 172.20.48.1 255.255.248.0
máscara de subred de f0/0
Activar la interfaz f0/0 Barcelona (config-if)# no shutdown
Seleccionar la interfaz
Barcelona (config-if)# interface s 0/0
Serial 0
Establecer la dirección IP y la
Barcelona (config-if)# ip address 172.20.16.1 255.255.248.0
máscara de subred de s0/0
Establecer la sincronización
Barcelona (config-if)# clock rate 56000
de DCE en 56000
Activar la interfaz s0/0 Barcelona (config-if)# no shutdown
Seleccionar la interfaz
Barcelona(config-if)# interface s 0/1
Serial 1
Establecer la dirección IP y la
Barcelona(config-if)# ip address 172.20.8.2 255.255.248.0
máscara de subred de s0/0
Activar la interfaz s0/1 Barcelona(config-if)# no shutdown
Activar el protocolo de
Barcelona(config)# router rip
enrutamiento RIP
9.1 Configuración básica del Router
Especificar la red
directamente conectada para
Barcelona(config-router)# network 172.20.8.0
las actualizaciones de
enrutamiento
Especificar la red
directamente conectada para
Barcelona(config-router)# network 172.20.16.0
las actualizaciones de
enrutamiento
Especificar la red
directamente conectada para
Barcelona(config-router)# network 172.20.48.0
las actualizaciones de
enrutamiento
Configurar la línea de
consola (conectada
Barcelona(config)# line con 0
directamente al puerto de
consola)
Activar verificación de
contraseña de conexión de Barcelona(config-line)# login
consola
Establecer la contraseña de
modo usuario para la Barcelona(config-line)# password cisco
conexión de consola
Configurar telnet line
Barcelona(config-line)# line vty 0 4
(terminal virtual o VTY)
Activar verificación de
contraseña de conexión de Barcelona(config-line)# login
telnet
Establecer la contraseña de
modo usuario para la Barcelona(config-line)# password cisco
conexión de telnet
ARMARIO A ARMARIO B
DCE= S0/0 DCE= S0/0
DTE= S0/1 DTE= S0/1
MADRID BARCELONA VALENCIA SEVILLA ALBACETE JAEN GUADALAJARA CIUDAD REAL TOLEDO CUENCA
172.20.8.0/21 172.20.16.0/21 172.20.24.0/21 172.20.32.0/21 172.20.80.0/21 172.20.88.0/21 172.20.96.0/21 172.20.104.0/21 172.20.112.0/21 172.20.120.0/21GRANADA
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 172.20.80.1 172.20.80.2 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.120.1 172.20.120.2
172.20.112.1 172.20.112.2
S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0
S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0
172.20.40.1 F0/0 172.20.48.1 F0/0 172.20.56.1 F0/0 172.20.64.1 F0/0 172.20.72.1 F0/0 F0/0 F0/0
172.20.128.1 172.20.136.1 F0/0 172.20.144.1 F0/0 172.20.152.1 172.20.160.1 F0/0 172.20.168.1 F0/0
172.20.40.3 172.20.47.254 172.20.48.3 172.20.55.254 172.20.56.3 172.20.63.254 172.20.64.3 172.20.71.254 172.20.72.3 172.20.79.254 172.20.128.3 172.20.135.254 172.20.136.3 172.20.143.254 172.20.144.3 172.20.151.254 172.20.152.3 172.20.159.254 172.20.160.3 172.20.167.254 172.20.168.3 172.20.175.254
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.128.0/21 172.20.136.0/21 172.20.144.0/21 172.20.152.0/21 172.20.160.0/21 172.20.168.0/21
172.20.0.0/16
172.20.0.0/16
ARMARIO A ARMARIO B
DCE= S0/0
DCE= S0 /0
DTE= S0/1
DTE= S0/1
MADRID BARCELONA VALENCIA SEVILLA ALBACETE JAE N GUADALA JARA CIUDAD REAL TO LE DO
172.20.8.0/21 172.20.16.0/21 172.20.24.0/21 172.20.32.0/21 172.20.80.0/21 CUENCA GRANADA
1 72.20.88.0/21 172.20.96.0/21 172.20.104.0/21 172.20.11 2.0/21 172.20.120.0/2 1
172.20.8 .1 172.20.8.2 172.20 .16.1 17 2.20.16.2 172.20 .24.1 1 72.20.24. 2 1 72.20.32. 1 172.20 .32.2 172 .20.80.1 172.20.8 0.2 172.20.120.1 1 72.20.120.2
1 72.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/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0 S0/1 S0/0
S 0/1 S0/0 S0/1 S0/0 S 0/1 S0/0 S 0/1 S0/0
172.20.4 0.1 F0/0 172.20 .4 8.1 F0/0 172.20 .56.1 F0/0 1 72.20.64. 1 F0/0 172.2 0.72.1 F0/0 172.20.128.1 F0/0 172.20.136.1 F0/0 172.20.144.1 F0/0 172.20.152.1 F0/0 172.20.160 .1 F0/0 172.20.168.1 F0/0
172.20 .40.3 172.20.4 7.254 172.20 .4 8.3 172.20.55 .254 172.20. 56.3 172.20.6 3.254 172.20 .64.3 1 72.20.71 .254 172.20 .72.3 172.20.79 .254 1 72.20.128.3 172.20.135.254 172.20.136.3 172.20.1 43.254 172.20.144.3 172.20.151 .254 17 2.20.152.3 172.20.159.254 17 2.20.160.3 172.20.1 67.254 1 72.20.168.3 172.2 0. 175.254
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.128.0/2 1 172.20.136.0/21 172.20.144.0/21 1 72 .20.152.0/21 172.20.160.0/21 172.20.168.0/21
172.20.0.0/16
172.20.0.0/16