Sei sulla pagina 1di 25

COMANDOS BASICOS DE

CONFIGURACIÓN PARA
ROUTER Y SWITCH CISCO

GC-F-004 V.01
Métodos de acceso

Consola: Este es un puerto de


administración que proporciona
acceso exclusivo a un dispositivo con
fines de mantenimiento.

SSH: Es el método recomendado para


administración remota ya que
proporciona una conexión segura.

Telnet: Es un método inseguro para


establecer una sesión CLI de manera
remota a través de una interfaz virtual
por medio de una red.

GC-F-004 V.01
Programas de emulación de terminal

- PuTTY
- Tera Term
- Secure CRT
- HyperTerminal

GC-F-004 V.01
Consola con Packet Tracer

GC-F-004 V.01
Modos de comando

Router>enable
Router#disable
Router>

GC-F-004 V.01
Estructura jerárquica de modos del IOS

GC-F-004 V.01
Estructura básica de comandos de IOS

GC-F-004 V.01
Comando de ayuda

GC-F-004 V.01
Teclas de acceso rápido y métodos abreviados

GC-F-004 V.01
Comandos show

GC-F-004 V.01
Comando hostname

Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#

GC-F-004 V.01
Limitaciones de acceso a dispositivos
R1(config)#enable secret cisco12345
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#service password-encryption
R1(config)#banner motd # Solo personal autorizado #
R1(config)# GC-F-004 V.01
Guardar configuraciones

R1#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#

R1#write
Building configuration...
[OK]
R1# GC-F-004 V.01
Configuración de interfaces

R1(config)#interface gigabitEthernet 0/0


R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#description Int-Lan1
R1(config-if)#no shutdown
R1(config)# interface loopback 0
R1(config-if)#ip address 192.168.20.1 255.255.255.0
R1(config-if)#

R1#show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.10.1 YES manual up up
Loopback0 192.168.20.1 YES manual up up
R1#
GC-F-004 V.01
Configuración de interfaces

SW1(config)#interface vlan 1
SW1(config-if)#ip address 192.168.10.254 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip default-gateway 192.168.10.1

SW1#sh ip int br
Interface IP-Address OK? Method Status Protocol
Vlan1 192.168.10.254 YES manual up up
SW1#

GC-F-004 V.01
Configuración de interfaces

R1(config)#ipv6 unicast-routing
R1(config)#interface g0/0
R1(config-if)#ipv6 address 2000:ACAD::1/64
R1(config-if)#no shutdown
R1#sh ipv6 int br
GigabitEthernet0/0 [up/up]
FE80::202:4AFF:FEB6:BD01
2000:ACAD::1
R1#

GC-F-004 V.01
Prácticas de seguridad básicas

R1(config)#security passwords min-length 8


R1(config)#login block-for 120 attempts 3 within 60
R1(config)#line vty 0 4
R1(config-line)#exec-timeout 10
R1(config-line)#end

- Longitud mínima de contraseña 8,


- Si hay 3 intentos fallidos en 60 segundos se bloquea el inicio
de sesión durante 120 segundos.
- Los usuarios inactivos se desconectan después de 10
minutos.

GC-F-004 V.01
Secure Shell ( SSH )

R1(config)#ip domain-name cisco.com


R1(config)#crypto key generate rsa
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
R1(config)#ip ssh version 2
R1(config)#username sena secret cisco12345
R1(config)#line vty 0 4
R1(config-line)#login local
R1(config-line)#transport input ssh
R1(config-line)#end

GC-F-004 V.01
Secure Shell ( SSH )

Prueba desde un cliente en Packet Tracert

Packet Tracer PC Command Line 1.0


C:\>ssh -l sena 192.168.1.1
Open
Password:
R1>

GC-F-004 V.01
Rutas estáticas IPv4

Ruta estática sobre la interface de salida


R1(config)#ip route 192.168.50.0 255.255.255.0 gigabitEthernet 0/1

Ruta estática sobre la IP del siguiente salto


R1(config)#ip route 192.168.50.0 255.255.255.0 192.168.20.2

Ruta estática por defecto sobre la interface de salida


R1(config)#ip route 0.0.0.0 0.0.0.0 gigabitEthernet 0/0

Ruta estática por defecto sobre la IP del siguiente salto


R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.20.2
GC-F-004 V.01
Rutas estáticas IPv6

R1(config)#ipv6 unicast-routing
R1(config)#int g0/0
R1(config-if)#ipv6 address 2000:ACAD::1/64
R1(config-if)#no shutdown
R1(config-if)#exit

Opciones de rutas estáticas igual que en IPv4


R1(config)#ipv6 route 2001:ACAD::/64 g0/0
R1(config)#ipv6 route 2001:ACAD::/64 2000:ACAD::2
R1(config)#ipv6 route ::/0 g0/0
R1(config)#ipv6 route ::/0 2000:ACAD::2
GC-F-004 V.01
Comandos de verificación y prueba

R1#sh ip route
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
S 192.168.50.0/24 is directly connected, GigabitEthernet0/0
S* 0.0.0.0/0 is directly connected, GigabitEthernet0/0

R1#ping 192.168.10.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

R1#traceroute 192.168.50.2
1 192.168.10.2 1 msec 0 msec 0 msec
R1#
GC-F-004 V.01
Comandos de verificación y prueba

R1#show ipv6 route


S ::/0 [1/0]
via 2000:ACAD::2
S 2001:ACAD::/64 [1/0]
via 2000:ACAD::2

R1#ping 2001:acad::2
Sending 5, 100-byte ICMP Echos to 2001:acad::2, timeout is 2 seconds:
!!!!!

R1#traceroute 2001:acad::2
1 2000:ACAD::2 0 msec 0 msec 0 msec
2 2001:ACAD::2 0 msec 1 msec 1 msec

GC-F-004 V.01
Laboratorio Configuración Básica

GC-F-004 V.01
GRACIAS
GC-F-004 V.01

Potrebbero piacerti anche