Procedimientos rutinarios Cisco
1. Configure una contrasea para las conexiones de la consola, en un router.
ISP(config)#line console 0 ISP(config-line)#password cisco ISP(config-line)#login ISP(config-line)#
Si quieres cifrar todas contrasea:
ISP(config-line)#exit ISP(config)#service password-encryption
2. Configure una contrasea para todas las conexiones de vty.
ISP(config)#line vty 0 4 ISP(config-line)#password class ISP(config-line)#login Se pueden securizar los puertos AUX y TTY pero no suele preguntarse.
3. Configure una contrasea de modo EXEC privilegiado.
ISP#configure terminal Enter configuration commands, one per line. ISP(config)#enable password cisco Tambin se puede guardar la contrasea cifrada con: ISP#configure terminal Enter configuration commands, one per line. ISP(config)#enable secret cisco End with CNTL/Z. End with CNTL/Z.
4. Como saber a travs de qu linea estoy conectado o si alguien esta ocupando cierta linea
Router#show line .Tty Typ...Tx/Rx .A Modem.Roty *.0..CTY.......... - ..- ... ..1..AUX 9600/9600 - ..- ......2..VTY ..........- ..- ......3..VTY ..........- ..- ......4..VTY ..........- ..- ......5..VTY ..........- ..- ......6..VTY ..........- ..- ....AccO .. ..... .. .. .. .. AccI .. .. .. .. .. .. .. Uses .. 0 .. 0 .. 0 .. 0 .. 0 .. 0 .. 0 Noise ....0 ....0 ....0 ....0 ....0 ....0 ....0 Overruns Int .. 0/0 .. .. 0/0 .. .. 0/0 .. .. 0/0 .. .. 0/0 .. .. 0/0 .. .. 0/0 .. -
De acuerdo a lo que se muestra en esta presentacin, el dispositivo cuenta con un puerto consola (CTY) actualmente en uso (lo marca el asterisco), un puerto auxiliar (AUX) y 5 puertos virtuales (VTY).
5. Servicio de encriptado de contraseas.
Para definir que todas las contraseas que se guarden encriptadas. ISP(config)#service password-encryption
6. Conexiones Serial DTE DCE quien lleva el clock rate 64000?
DCE = Data Circuit Equipment, tpicamente es el proveedor. DTE = Data Terminal Circuit, tpicamente es el cliente. El que marca el reloj es el proveedor. Ejemplo: RouterDCE(config)#int s0/0/0 RouterDCE(config-if)#ip address 10.1.1.1 255.255.255.252 RouterDCE(config-if)#clock rate 64000 RouterDCE(config-if)#no shutdown RouterDTE(config)#int s0/0/0 RouterDTE(config-if)#ip address 10.1.1.2 255.255.255.252 RouterDTE(config-if)#no shutdown
7. Habilite OSPF con el ID de proceso 1 en R1 y R2. No publique la red 209.165.200.224/27.
R2(config)#router ospf 1 R2(config-router)#network 192.168.20.0 0.0.0.255 area 0 R2(config-router)#network 10.1.1.0 0.0.0.3 area 0 R2(config-router)#default-information originate R1(config)#router ospf 1 R1(config-router)#network 192.168.10.0 0.0.0.255 area 0 R1(config-router)#network 192.168.11.0 0.0.0.255 area 0 R1(config-router)#network 10.1.1.0 0.0.0.3 area 0
8. Wildcards
Es el inverso de la mscara de subred. Por lo tanto Subred ejemplo /32 /31 /30 /29 /28 /27 /26 /25 /24 Mscara 255.255.255.255 255.255.255.254 255.255.255.252 255.255.255.248 255.255.255.240 255.255.255.224 255.255.255.192 255.255.255.128 255.255.255.0 Wildcards 0.0.0.0 0.0.0.1 0.0.0.3 0.0.0.7 0.0.0.15 0.0.0.31 0.0.0.63 0.0.0.127 0.0.0.255
9. Comprobar si el switch es la raz del spanning tree para una VLAN
S2#show spanning-tree VLAN0011 Spanning tree enabled protocol ieee Root ID Priority 24587 Address 00E0.A380.CD1C This bridge is the root
10. Asignar un puerto de un switch a una VLAN, en modo access
S3(config-if)#int fa0/2 S3(config)#switchport mode access S3(config)#switchport access vlan 30 Si no existe vlan30 se crea automticamente en este momento: %LINK-5-CHANGED: Interface Vlan30, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up % Access VLAN does not exist. Creating vlan 30
11. S2 es la raz del spanning tree para VLAN 11 y S3 es la raz del spanning tree para VLAN 30.
Esta es una tarea de una prctica de PT 8.5.1 1 Comprobamos que VLANs hay en S2 y S3 S2#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig1/1, Gig1/2 11 VLAN0011 active Fa0/1, Fa0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active S3#sh vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/1, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig1/1, Gig1/2 30 VLAN0030 active Fa0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Lo que veo es que no exista VLAN30 en S3 lo creo como explico en la tarea 10. Ahora voy a comprobar si son raz. S3#show spanning-tree VLAN0030 Spanning tree enabled protocol ieee Root ID Priority 24606 Address 0050.0FCE.8E14 This bridge is the root Hello Time 2 sec Max Age 20 sec Bridge ID Priority Address Hello Time Aging Time Role ---Desg Desg Desg Sts --FWD FWD FWD
Forward Delay 15 sec
24606 (priority 24576 sys-id-ext 30) 0050.0FCE.8E14 2 sec Max Age 20 sec Forward Delay 15 sec 20 Cost --------19 19 19 Prio.Nbr -------128.2 128.3 128.4 Type -------------------------------P2p P2p P2p
Interface ---------------Fa0/2 Fa0/3 Fa0/4 Y
S2#sh spanning-tree VLAN0011 Spanning tree enabled protocol ieee Root ID Priority 24587 Address 00E0.A380.CD1C This bridge is the root Hello Time 2 sec Max Age 20 sec Bridge ID Priority Address Hello Time Aging Time Role ---Desg Desg Desg Desg Sts --FWD FWD FWD FWD
Forward Delay 15 sec
24587 (priority 24576 sys-id-ext 11) 00E0.A380.CD1C 2 sec Max Age 20 sec Forward Delay 15 sec 20 Cost --------19 19 19 19 Prio.Nbr -------128.1 128.2 128.3 128.4 Type -------------------------------P2p P2p P2p P2p
Interface ---------------Fa0/1 Fa0/2 Fa0/3 Fa0/4 S2#
O sea que s, S2 y S3 son raz de las VLANs que corresponden.
12. S3 es un servidor VTP con S2 como cliente.
S3#sh vtp status VTP Version : 2 Configuration Revision : 1 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode : Server VTP Domain Name : CCNA_troubleshooting VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0xB9 0xF6 0xC8 0xF8 0x8A 0x35 0xA1 0xDE Configuration last modified by 192.168.30.2 at 3-1-93 01:42:33 Local updater ID is 192.168.30.2 on interface Vl30 (lowest numbered VLAN interface found) S2#sh vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode : Server VTP Domain Name : CCNA_Troubleshooting VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0x72 0xFA 0xB4 0x4B 0x07 0xB2 0x64 0x87 Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00 Local updater ID is 192.168.11.2 on interface Vl11 (lowest numbered VLAN interface found) Error. Tenemos que pasar S2 a cliente de S3 S2(config)#vtp mode client No hace falta definir el Dominio (CCNA_Troubleshooting) porque ya est bien. Lo mismo con la contrasea, que tena dudas: S2(config)#vtp password ciscoccna Password already set to ciscoccna S2#sh vtp status VTP Version : 2 Configuration Revision : 1 Maximum VLANs supported locally : 255 Number of existing VLANs : 6 VTP Operating Mode : Client VTP Domain Name : CCNA_troubleshooting VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0xB9 0xF6 0xC8 0xF8 0x8A 0x35 0xA1 0xDE Configuration last modified by 192.168.30.2 at 3-1-93 01:42:33
13. El enlace serial entre R1 y R2 es Frame Relay.
Miramos en la topologa que R1 (DCE) s0/0/0 --- R2 s0/0/0 R1#sh run Building configuration... [salida omitida ] interface Serial0/0/0 ip address 10.1.1.1 255.255.255.252 encapsulation frame-relay frame-relay map ip 10.1.1.1 201 frame-relay map ip 10.1.1.2 201 broadcast no keepalive clock rate 4000000 ! [salida omitida] R2#sh run Building configuration... [ salida omitida ] ! interface Serial0/0/0 ip address 10.1.1.2 255.255.255.0 encapsulation frame-relay frame-relay map ip 10.1.1.1 201 broadcast no keepalive ip nat inside ! [salida omitida] S es serial, adems desde R1 puedo hacer ping a R2 R1 al ser DCE tiene configurado el reloj
14. El enlace serial entre R1 y R3 usa PPP y est autenticado mediante CHAP
Miramos en la topologa de R1 S0/0/1 a R3 (DCE) S0/0/0 R1#sh run Building configuration... [salida omitida] ! username R3 password 0 ciscoccna username ccna password 0 ciscoccna ! [salida omitida] ! interface Serial0/0/1 ip address 10.3.3.1 255.255.255.252 encapsulation ppp ppp authentication chap [salida omitida] R3#show running-config Building configuration... [salida omitida] ! username R1 password 0 ciscoccna username ccna password 0 ciscoccna ! [salida omitida] ! interface Serial0/0/0 ip address 10.3.3.2 255.255.255.252 encapsulation ppp ppp authentication chap clock rate 4000000 ! Parece correcto. Hago prueba de ping con xito. Hay una manera de comprobar si el autenticado funciona, R3#debug ppp authentication PPP authentication debugging is on y ahora conecto y reconecto la interfaz
15. El enlace serial entre R2 y R3 usa encapsulacin HDLC.
Segn la topologa R2 DCE S0/0/1 --- R3 S0/0/1 R2#sh run Building configuration... [salida omitida] ! interface Serial0/0/1 ip address 10.2.2.1 255.255.255.0 ip access-group R3-telnet in ip nat inside clock rate 4000000 ! [salida omitida] R3#sh run Building configuration... [salida omitida] ! interface Serial0/0/1 ip address 10.2.2.2 255.255.255.252 ! [salida omitida] Hago prueba de ping y es exitosa R3#sh interfaces s0/0/1 Serial0/0/1 is up, line protocol is up (connected) Hardware is HD64570 Internet address is 10.2.2.2/30 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) [salida omitida] R2#sh interfaces s0/0/1 Serial0/0/1 is up, line protocol is up (connected) Hardware is HD64570 Internet address is 10.2.2.1/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of "show interface" counters never [salida omitida]
16. Todas las lneas vty, excepto las que pertenecen a R2, permiten conexiones slo desde las subredes que se muestran en el diagrama de topologa, sin incluir la direccin pblica.
Esto significa que todas las lineas vty de R1 y R3, tienen que estar protegidas con un ACL que permita slo la subredes a las que los dispositivos estn conectados. Es una medida de seguridad para que no se puedan conectar rmotamente. En el caso de R2 no es as porque se debe permitir la administracin remota. Veo que para los switches no se aplica esta proteccin. R1#sh run Building configuration... [resultado omitido] ! ip access-list standard Anti-spoofing permit 192.168.10.0 0.0.0.255 deny any ip access-list standard VTY permit 10.0.0.0 0.255.255.255 permit 192.168.10.0 0.0.0.255 permit 192.168.11.0 0.0.0.255 permit 192.168.20.0 0.0.0.255 permit 192.168.30.0 0.0.0.255 ! [resultado omitido] ! line con 0 line vty 0 4 access-class VTY in login ! [resultado omitido] R3#sh run Building configuration... [resultado omitido] ! ip access-list standard Anti-spoofing permit 192.168.30.0 0.0.0.255 deny any ip access-list standard VTY permit 10.0.0.0 0.255.255.255 permit 192.168.10.0 0.0.0.255 permit 192.168.11.0 0.0.0.255 permit 192.168.20.0 0.0.0.255 permit 192.168.30.0 0.0.0.255 ! ! line con 0 line vty 0 4 login ! En R3 no se aplica la lista a las vty. R3#conf t Enter configuration commands, one per line. End R3(config)#line vty 0 4 R3(config-line)#acc R3(config-line)#access-class VTY in R3(config-line)#login % Login disabled on line 66, until 'password' is % Login disabled on line 67, until 'password' is % Login disabled on line 68, until 'password' is % Login disabled on line 69, until 'password' is % Login disabled on line 70, until 'password' is Falta poner un password R3(config-line)#password ciscoccna Y por cierto creo que falta poner password tambin en R1 R1(config)#line vty 0 4 R1(config-line)#password ciscoccna R1(config-line)# with CNTL/Z.
set set set set set
17 Crear una VLAN
A veces necesitamos que exista una VLAN, en configuraciones con VTP server y client a veces es necesario. Por ejemplo, en un switch cliente se usa la vlan10, con S2 #sh vlan brief vemos que no esta creada pues vamos al servidor y lo declaramos. S3(config)#vlan 10 %LINK-5-CHANGED: Interface Vlan10, changed state to up 18 VLAN troubleshooting En esta topologa PC2 hace ping a PC3. El ping va de PC2 a R1. De R1 a R3 De R3 a PC3 para luego volver por S3 S2 El problema era que de R3 a PC3 Slo haba una VLAN la VLAN30 que slo serva para 192.168.30.0/24 Por lo que se ha aadido la VLAN11 al trunk entre R3 y S3 S3#sh run Building configuration... [salida omitida] ! interface FastEthernet0/1 switchport trunk allowed vlan 11,30 switchport mode trunk !