Guia CCNAS 2019
Guia CCNAS 2019
ACLs Reflexivas...........................................................................................................................3
Cisco Configuration Professional (CCP)Acceso..........................................................................7
Router Security........................................................................................................................10
Privilege Level..........................................................................................................................12
CLI Views..................................................................................................................................14
SSH...........................................................................................................................................16
Telnet/TCP AAA........................................................................................................................20
Setup AAA:...............................................................................................................................23
AAA Base de datos Local..........................................................................................................25
Banner Messages.....................................................................................................................27
Syslog Features........................................................................................................................29
ACLs Established......................................................................................................................32
ACLs de Tiempo........................................................................................................................36
ACLs Dinámicas........................................................................................................................39
Fragmentation Attack..............................................................................................................42
Protección contra el uso de opciones de IP maliciosas...........................................................44
Protección mensajes ICMP tipo 3 código 1.............................................................................49
TCP Intercept (Redistribucion EIGRP-OSPF)............................................................................52
Proteccion a ataques DoS utilizando Committed Access Rate (CAR)......................................56
Proteccion a ataques Smurf.....................................................................................................57
ACLs IP/ICMP............................................................................................................................59
ACLs para OSPF y EIGRP...........................................................................................................65
Seguridad Telnet IPv6..............................................................................................................69
ACLs para IPv6..........................................................................................................................74
Bloqueo de paquetes de un rango particular usando PBR (Falta Figura)................................81
Filtrado utilizando MQC (Modular Quality of Service)............................................................88
NTP Network Time Protocol....................................................................................................95
Authentication Radius..............................................................................................................99
Autenticación utilizando ACS /Tacacs+..................................................................................101
Creación de Grupos...............................................................................................................102
Configuración de server AAA.................................................................................................104
Creación de Usuarios.............................................................................................................107
Configuración de cliente AAA................................................................................................109
Configuración Router.............................................................................................................111
CBAC.......................................................................................................................................114
Zone Based Firewall I.............................................................................................................116
Zone Based Firewall II............................................................................................................122
Zone Based Firewall III...........................................................................................................128
DHCP one Way.......................................................................................................................133
DHCP Snooping......................................................................................................................140
NAT.........................................................................................................................................145
NAT Dinámico........................................................................................................................146
NAT Estático...........................................................................................................................148
PAT.........................................................................................................................................149
NAT TCP Load Sharing............................................................................................................151
HSRP NAT...............................................................................................................................157
Firewall por Zona Challenge NAT/PAT...................................................................................165
GRE Recursivo........................................................................................................................182
Tunnel GRE IPv6.....................................................................................................................186
1
2019 instructor.duoc@gmail.com
SRY
2
2019 instructor.duoc@gmail.com
SRY
ACLs Reflexivas
Para obtener conectividad extremo a extremo configure EIGRP de 64 bits utilizando en numero de sitema
autónomo 10. Las interfaces loopback0 se deben publicar dentro del dominio EIGRP.
R1
router eigrp n1
address-family ipv4 unicast autonomous-system 10
network 1.0.0.0
network 10.0.0.0
R2
router eigrp n1
address-family ipv4 unicast autonomous-system 10
network 2.0.0.0
network 10.0.0.0
R3
router eigrp n1
address-family ipv4 unicast autonomous-system 10
network 3.0.0.0
network 10.0.0.0
R4
router eigrp n1
address-family ipv4 unicast autonomous-system 10
network 4.0.0.0
network 10.0.0.0
4
2019 instructor.duoc@gmail.com
SRY
R2
ip access-list extended BORDER-OUT
permit tcp any any eq www reflect TST
permit tcp any any eq telnet reflect TST
permit udp any any eq tftp reflect TST
permit eigrp any any
interface FastEthernet0/1
ip access-group BORDER-IN in
ip access-group BORDER-OUT out
R4#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
UUUUU
Success rate is 0 percent (0/5)
R4#telnet 1.1.1.1
Trying 1.1.1.1 ...
% Destination unreachable; gateway or host down
5
2019 instructor.duoc@gmail.com
SRY
Configure Telnet server en R4. Utilice AAA, user admin password cisco.
R4
username admin password cisco
aaa new-model
aaa authentication login default local-case
line vty 0 4
login authentication default
R1#telnet 4.4.4.4
Trying 4.4.4.4 ... Open
User Access Verification
Username: admin
Password:cisco
R4>
R2#sh access-lists
Extended IP access list BORDER-IN
10 permit eigrp any any (1748 matches)
20 evaluate TST
Extended IP access list BORDER-OUT
10 permit tcp any any eq www reflect TST
20 permit tcp any any eq telnet reflect TST (34 matches)
30 permit udp any any eq tftp reflect TST
40 permit eigrp any any
Reflexive IP access list TST
permit tcp host 4.4.4.4 eq telnet host 10.1.12.1 eq 17999 (41 matches) (time left 231)
R4>
[Connection to 4.4.4.4 closed by foreign host]
R1#
Despues de 5 minutos, el timeout predefinido por el proceso elimina la ACL temporal (TST). R1 utiliza el puerto
origen 17999 (es aleatorio) y el puerto 23 destino. Podemos notar que R2 permite el tráfico de retorno.
6
2019 instructor.duoc@gmail.com
SRY
Nota: El dispositivo que será configurado a través de CCP debe tener configurado HTTP o HTTPS. La
autenticación utilizando HTTPS debe ser establecido para usar la base de datos local del dispositivo.
R1
router eigrp 1
network 10.0.0.0
network 100.0.0.0
neighbor 10.1.12.2 GigabitEthernet0/0
no auto-summary
ip http server
ip http authentication local
ip http secure-server
R2
router eigrp 1
network 10.0.0.0
neighbor 10.1.12.1 GigabitEthernet0/0
no auto-summary
7
2019 instructor.duoc@gmail.com
SRY
R1#ping 100.1.1.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/37/60 ms
Puesto que tenemos conectividad con el PC CCP entonces activamos la aplicación CCP.
En la ventana Select / Manage Community debemos ingresar la información de usuario y password que
configuramos en R1 y la IP de R1. Le damos OK. Luego debemos descubrir al Router R1. Para esto
utilizamos seleccionamos Discover.
Si todo está correctamente configurado deberíamos ver el dispositivo descubierto. Con CCP tenemos un
amplio espectro de configuración. Configure DHCP utilizando CCP.
8
2019 instructor.duoc@gmail.com
SRY
9
2019 instructor.duoc@gmail.com
SRY
Router Security
En R1 configurar de manera que solo se permita configurar passwords con un mínimo de 5
caracteres.
Las password deben ser ilegibles si utilizamos el comando show running-config.
Crear el usuario admin password cisco. Si accedemos por consola deberemos loguearnos en la
base de datos local.
R1
security passwords min-length 5
R1
service password-encryption
R1
username admin password cisco
line con 0
login local
R1#exit
R1 con0 is now available
Press RETURN to get started.
Username:admin
Password:cisco
R1>enable
R1#
10
2019 instructor.duoc@gmail.com
SRY
Normalmente el tiempo de expiración lo dejo en infinito (exec-timeout 0 0) para no tener que loguearme
a cada rato si ese plazo se vence, como en este caso se requiere ingresar los valores utilizaremos
ventanas de tiempo grandes.
R1
line con 0
exec-timeout 120 30
11
2019 instructor.duoc@gmail.com
SRY
Privilege Level
En R1 crear dos usuarios con las siguientes características
Definir password para modo privilegiado utilizando la palabra clave cisco.
Usuario Password Comandos disponibles (EXEC)
admin cisco Todos los comandos (high privilege)
noc network Show, ping, traceroute
R1
username noc privilege 2 password network
Para forzar a que los usuarios se tengan que identificar (login) con la base de datos local utilizamos:
R1
line con 0
login local
aaa new-model
aaa authentication login default local none
R1#exit
R1 con0 is now available
R1#show privilege
Current privilege level is 2
R1#conf t
^
% Invalid input detected at '^' marker.
12
2019 instructor.duoc@gmail.com
SRY
R1#ping 10.2.2.2
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/72/100 ms
R2#exit
R2 con0 is now available
Press RETURN to get started.
Username: admin
Password:cisco
R2#show privilege
Current privilege level is 15
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#
R2(config)#router bgp 20.20
13
2019 instructor.duoc@gmail.com
SRY
CLI Views
R2
aaa new-model
enable secret cisco
R2#enable view
Password:cisco
R2#
%PARSER-6-VIEW_SWITCH: successfully set to view 'root'.
configure terminal
R2#disable
R2>
R2>enable view ADMIN
Password:admin
R2#show ?
aaa Show AAA values
access-expression List access expression
access-lists List access lists
acircuit Access circuit info
adjacency Adjacent nodes
aliases Display alias commands
alignment Show alignment information
ancp ANCP information
aps APS information
14
2019 instructor.duoc@gmail.com
SRY
R2#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#?
Configure commands:
do-exec To run exec commands in config mode
exit Exit from configure mode
R2(config)#end
^
% Invalid input detected at '^' marker.
R2(config)#exit
Entramos con el perfil de NOC y comprobamos que solo tenemos la opción ping
R2#exit
R2>
R2>enable view NOC
Password:noc
R2#?
Exec commands:
do-exec Mode-independent "do-exec" prefix support
enable Turn on privileged commands
exit Exit from the EXEC
ping Send echo messages
show Show running system information
R2#ping 10.1.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/42/52 ms
15
2019 instructor.duoc@gmail.com
SRY
SSH
Configurar enrutamiento estático o dinámico de manera que exista conectividad completa entre
todos los routers incluyendo su interfaces loopbacks0.
Configurar Telnet en R1utilizando password r111.
Configurar Telnet en R2 para sesiones entrantes y SSH para sesiones salientes, solo se permite
establecer sesión SSH con los ID (loopbacks0) de cada router. Utilizar las siguientes políticas:
- Domain Name: duoc.cl
- Utilizar version SSH 2.0 (1.9)
- Autentificar en función de base de datos local utilizando AAA
- La autentificación solo se debe establecer en line VTY.
- Mostrar eventos SSH en consola de R1, sesion exitosas y fallidas.
- El usuario para SSH es el siguiente:
Usuario Password
jadmin cisco123
R1 puede acceder a R2 a través de telnet pero desde R2 solo puede acceder a R3 a utilizando SSH.
Configurar en R3 SSH para sesiones entrantes, solo se permite establecer sesión SSH con los ID
(loopbacks0) de cada router. Utilizar las siguientes políticas:
- Domain Name: duoc.cl
- Utilizar version SSH 2.0 (1.9)
- Autentificar en función de base de datos local utilizando AAA
- La autentificación solo se debe establecer en line VTY.
- Mostrar eventos SSH en consola de R1, sesion exitosas y fallidas.
- El usuario para SSH es el siguiente:
Usuario Password
admin cisco
Configure la password cisco para acceder al modo privilegiado en todos los routers.
R1
router eigrp 1
network 10.0.0.0
no auto-summary
16
2019 instructor.duoc@gmail.com
SRY
R2
router eigrp 1
network 10.0.0.0
no auto-summary
R3
router eigrp 1
network 10.0.0.0
no auto-summary
R1
line vty 0 4
password cisco
login
R2
ip domain-name duoc.cl
crypto key generate rsa usage-keys
How many bits in the modulus [512]: 1024
17
2019 instructor.duoc@gmail.com
SRY
aaa new-model
username jadmin password cisco123
aaa authentication login VTY-LOCAL local
line vty 0 4
login authentication VTY-LOCAL
transport input telnet
transport output ssh
R3
ip domain-name duoc.cl
crypto key generate rsa usage-keys
How many bits in the modulus [512]: 1024
aaa new-model
username admin password cisco
aaa authentication login VTY-LOCAL local
line vty 0 4
login authentication VTY-LOCAL
transport input ssh
R1 accederá a R2 a través de telnet, pero desde R2 solo podrá acceder a R3 a través SSH, es decir, al
perímetro de seguridad.
R1#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
Username: jadmin
Password:cisco123
R2>enable
Password:cisco
R2#telnet 10.3.3.3
% telnet connections not permitted from this terminal
18
2019 instructor.duoc@gmail.com
SRY
Password:cisco
R3>en
Password:cisco
R3#
*Aug 17 10:41:11.059: %SSH-5-SSH2_SESSION: SSH2 Session request from 10.1.23.2 (tty = 0) using crypto
cipher '3des-cbc', hmac 'hmac-sha1' Succeeded
R3#
*Aug 17 10:41:14.523: %SSH-5-SSH2_USERAUTH: User 'admin' authentication for SSH2 Session from
10.1.23.2 (tty = 0) using crypto cipher '3des-cbc', hmac 'hmac-sha1' Succeeded
R3#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
2 vty 0 admin idle 00:01:00 10.1.23.2
19
2019 instructor.duoc@gmail.com
SRY
Telnet/TCP AAA
R1
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf 1 area 0
router ospf 1
router-id 1.1.1.1
R2
interface FastEthernet0/0
ip ospf 1 area 0
interface FastEthernet0/1
ip ospf 1 area 0
router ospf 1
router-id 2.2.2.2
20
2019 instructor.duoc@gmail.com
SRY
R3
interface FastEthernet0/1
ip ospf 1 area 0
router ospf 1
router-id 3.3.3.3
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
R3
username admin password admin
aaa new-model
aaa authentication login VTY local-case none
line vty 0 4
privilege level 15
21
2019 instructor.duoc@gmail.com
SRY
R1#telnet 10.3.3.3
Trying 10.3.3.3 ... Open
Username: admin
Password:admin
R3#
¿Porque la ventana de flujo TCP (Follow muestra al usuario con username duplicado?
Realice la misma experiencia para SSH, y compruebe los resultados entregados por Wireshark
->Analyze || Follow || TCP Stream.
¿Cuantas conexiones concurrentes permite las líneas VTY del router?
22
2019 instructor.duoc@gmail.com
SRY
Setup AAA:
Configurar AAA en R1 con las siguientes características para la autentificación:
Crear usuario U4 password cisco.
Proceso AAA debe pedir usuario y contraseña utilizando Usuario: , Password: . El usuario solo
puede acceder al router utilizando sistema case sensitive.
Crear banner que tenga el siguiente mensaje $ Autentificación AAA $
El maximo número de intentos es 3 antes de volver a pedir autenticación, luego se bloqueará el
permiso para el usuario.
Si el usuario no puede autentificarse se debe desplegar el siguiente mensaje: AUTENTIFICACIÓN
INVALIDA, INTENTELO NUEVAMENTE
El usuario debe autentificarse en función de la base de datos local
Para poder probar inmediatamente lo que hemos configurado podríamos habilitar el login en la consola.
R1
username U4 password cisco
aaa new-model
aaa authentication password-prompt Password:
aaa authentication username-prompt Usuario:
aaa authentication login CONS local-case
R1
User Access Verification
Usuario:u4
Password:cisco
% Authentication failed
Usuario:U4
Password:cisco
R1
aaa authentication banner $ Autentificacion AAA $
R1>exit
Press RETURN to get started.
Autentificacion AAA
Usuario:U4
Password:cisco
23
2019 instructor.duoc@gmail.com
SRY
Para comprobar si funciona esta configuración debemos crear un super usuario en caso de que
bloqueemos al usauario U4. Luego de las pruebas debemos desbloquear al usuario U4.
R1
username admin privilege 15 password cisco
aaa authentication attempts login 3
aaa local authentication attempts max-fail 3
Usuario:U4
Password:111
Usuario:U4
Password:222
Usuario:U4
Password:333
Usuario:admin
Password:
R1
aaa authentication fail-message $ AUTENTIFICACISN INVALIDA, INTENTELO NUEVAMENTE $
Usuario:U4
Password:1111
AUTENTIFICACISN INVALIDA, INTENTELO NUEVAMENTE
Usuario:U4
Password:cisco
R1>
line con 0
login authentication CONS
R1
interface GigabitEthernet0/0
ip address 10.1.12.1 255.255.255.0
no shut
R2
interface GigabitEthernet0/0
ip address 10.1.12.2 255.255.255.0
no shut
Rx
router eigrp 1
network 10.0.0.0
R2
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
line vty 0 4
login authentication TELNET
R1#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
Password:cisco
Corresponde a la misma
password que configuramos
con enable secret (cisco) 25
2019 instructor.duoc@gmail.com
SRY
R2>
R2>enable
Password:cisco
Escenario 2. Accedemos R2 via telnet usando la base de datos local. Debemos crear un user y su password.
Nota: Borrar configuración anterior. Si está configurado aaa new-model no podremos utilizar la base de datos local
directamente en line vty.
R2
username admin password admin
line vty 0 4
login local
R1#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
Username: admin
Password:admin
R2>en
Password:cisco
Escenario 3. Accedemos R2 via telnet usando si usar password. Como veremos no tendremos que
autenticarnos. Salvo si queremos entrar al modo privilegiado.
R2
aaa new-model
aaa authentication login TELNET none
line vty 0 4
login authentication TELNET
R1#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
R2>
26
2019 instructor.duoc@gmail.com
SRY
Banner Messages
Configure R1 con el mensaje del dia (message of the day = motd) que se muestra a continuación:
-------------------------------------------------------------------------
Te has conectado al router R1 en el puerto de consola 0.
XXXXXXXX
/| XXXXXXXX|\XXXXXXXXX
/*/ XXXXXXXXXXXXXX\*\XXXXXXXXXXXX
|**\ X _____XXXXXXXXX/**|XXXXXXXXXXXXX
|***\ X_/ \_ /***|___XXXXXXXXXXXX
\******* *******/ XXXXX \\XXXXXXX
\**** / \ *****/ XXXXX \\XXXXXXX
XXXX| 0 0 | XXXXX \XXXXXXX
XXXXX | | XXXXX \XXXXXXX
XXXXXX \ / XXXXX |________//
XXXXXX \ / XXXXX |XXXXXX
XXXXXX | O_O | XXXXX ||XXXXX
XXXXX \ _ / XXXXX \XXX
XXXX| : |XXXX /\ \ _
XXX\_/XXX |\__\ _____/ \ \ ) |_|
XXXXXX< | | | XX| |X\_ | _
XXX/ |X <_> XXXX/ | | | |_|
|___|XXXX| |XXXXXXXXX|___| | \
XXXXXX/ \XXXXXXXX |____|
Gerencia Informatica
Ubicacion: Av. Bernardo Prat # 1559, Piso 2
!!!! Atencion !!!!
Notificar al Area Administracion de Redes cualquier modificacion.
------------------------------------------------------------------------
Cisco Router 7200 ^C
28
2019 instructor.duoc@gmail.com
SRY
Syslog Features
Habilitar Syslog Server en PC. Utilizar aplicación Kiwi Syslog o Syslog Server 1.2.0.
R1 debe poder enviar mensajes de syslog tanto al server como a la consola. Utilizar loopback0
como interface de sesión. Los mensajes debe ser enviados a partir de log nivel 7.
Nota: El servidor syslog se encuetra en la VM XP.
29
2019 instructor.duoc@gmail.com
SRY
30
2019 instructor.duoc@gmail.com
SRY
R1
logging on
logging origin-id hostname
logging source-interface loopback0
logging 100.1.1.3
logging trap debugging
R1#debug ip packet
R1#debug ip packet
IP packet debugging is on
R1#
IP: s=10.1.12.1 (local), d=224.0.0.10 (GigabitEthernet0/0), len 60, sending broad/multicast
IP: s=10.1.12.1 (local), d=224.0.0.10 (GigabitEthernet0/0), len 60, sending full packet
IP: s=10.1.12.2 (GigabitEthernet0/0), d=224.0.0.10, len 60, rcvd 0
IP: s=10.1.12.2 (GigabitEthernet0/0), d=224.0.0.10, len 60, input feature, packet consumed, MCI
Check(85), rtype 0, forus FALSE, sendself FALSE, mtu 0, fwdchk FALSE
R1#
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
R1#
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
R1#
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
R1#u al
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: tableid=0, s=10.1.1.1 (local), d=100.1.1.3 (FastEthernet1/0), routed via FIB
IP: s=10.1.12.1 (local), d=224.0.0.10 (GigabitEthernet0/0), len 60, sending broad/multicast
IP: s=10.1.12.1 (local), d=224.0.0.10 (GigabitEthernet0/0), len 60, sending full packet
IP: s=10.1.12.2 (GigabitEthernet0/0), d=224.0.0.10, len 60, rcvd 0
31
2019 instructor.duoc@gmail.com
SRY
32
2019 instructor.duoc@gmail.com
SRY
ACLs Established
R1
router ospf 1
router-id 1.1.1.1
interface Loopback0
ip ospf 1 area 0
line vty 0 4
exec-timeout 0 0
password cisco
login
R2
router ospf 1
router-id 2.2.2.2
interface Loopback0
ip ospf 1 area 0
line vty 0 4
exec-timeout 0 0
password cisco
login
R3
router ospf 1
router-id 3.3.3.3
interface Serial1/0
ip ospf 1 area 1
interface Loopback0
ip ospf 1 area 0
line vty 0 4
exec-timeout 0 0
password cisco
login
R4
router ospf 1
router-id 4.4.4.4
interface Serial1/0
ip ospf 1 area 1
interface Loopback0
ip ospf 1 area 1
line vty 0 4
exec-timeout 0 0
password cisco
login
34
2019 instructor.duoc@gmail.com
SRY
R4#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
User Access Verification
Password:cisco
R2>
R4#telnet 10.1.1.1
Trying 10.1.1.1 ... Open
User Access Verification
Password:cisco
R1>
R3
access-list 103 permit ospf any any
access-list 103 permit tcp any any established log
access-list 103 deny ip any any log
interface Serial1/0
ip access-group 103 in
R4#telnet 10.1.1.1
Trying 10.1.1.1 ...
% Destination unreachable; gateway or host down
R1#telnet 10.4.4.4
Trying 10.4.4.4 ... Open
User Access Verification
Password:cisco
R4>
R4#telnet 10.1.1.1
Trying 10.1.1.1 ...
% Destination unreachable; gateway or host down
R3#
*Aug 29 13:27:47.747: %SEC-6-IPACCESSLOGP: list 103 denied tcp 10.1.34.4(46374) -> 10.1.1.1(23), 1
packet
R1#telnet 10.4.4.4
Trying 10.4.4.4 ... Open
User Access Verification
Password:cisco
R4>
R3#
*Aug 29 13:28:37.151: %SEC-6-IPACCESSLOGP: list 103 permitted tcp 10.4.4.4(23) -> 10.1.13.1(45476), 1
packet
Nota: la gran limitación del uso de la ACL en conjunto con established es que solo aplica a TCP y capas
superiores, pero no funciona para UDP o ICMP.
36
2019 instructor.duoc@gmail.com
SRY
ACLs de Tiempo
Configurar el direccionamiento mostrado y habilitar EIGRP 1 de manera que los routers publiquen
todas sus interfaces directamente conectadas.
Configurar R3 para que permita a los usuarios desde R4 navegar por Internet durante los dias de
semana unicamente, y pruebas de conectividad icmp los fines de semana.
- Habilitamos EIGRP
R1
router eigrp 1
network 10.0.0.0
no auto-summary
R2
router eigrp 1
network 10.0.0.0
no auto-summary
R3
router eigrp 1
network 10.0.0.0
no auto-summary
R4
router eigrp 1
network 10.0.0.0
no auto-summary
37
2019 instructor.duoc@gmail.com
SRY
R3
time-range SEMANA
periodic weekdays 0:00 to 23:59
time-range FINDE
periodic weekend 0:00 to 23:59
interface FastEthernet0/0
ip access-group 100 in
R4#ping 10.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
%SEC-6-IPACCESSLOGDP: list 100 denied icmp 10.1.34.4 -> 10.3.3.3 (8/0), 1 packet
R3#show access-lists
Extended IP access list 100
10 permit icmp any any time-range FINDE (inactive) (5 matches)
20 permit tcp any any eq www time-range SEMANA (active)
30 permit eigrp any any (64 matches)
40 deny ip any any log (15 matches)
R4#telnet 10.2.2.2 80
Trying 10.2.2.2, 80 ...
% Connection refused by remote host
R3#show access-lists
Extended IP access list 100
10 permit icmp any any time-range FINDE (inactive) (5 matches)
20 permit tcp any any eq www time-range SEMANA (active) (1 match)
30 permit eigrp any any (70 matches)
40 deny ip any any log (15 matches)
R3#
%SEC-6-IPACCESSLOGDP: list 100 denied icmp 10.1.34.4 -> 10.3.3.3 (8/0), 14 packets
R4#ping 10.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/76/116 ms
R3#show access-lists
Extended IP access list 100
10 permit icmp any any time-range FINDE (active) (5 matches)
20 permit tcp any any eq www time-range SEMANA (inactive)
30 permit eigrp any any (6 matches)
40 deny ip any any log
39
2019 instructor.duoc@gmail.com
SRY
ACLs Dinámicas
Configurar EIGRP 1 en todos los routers y publicar sus interfaces directamente conectadas. EIGRP
no debe perder adyacencias.
Habilitar Telnet en R1 y R2. Para acceder a R4 debemos usar el usuario admin4 password cisco4
R4 requiere autentificación para poder acceder a los routers dentro de empresa A. Usar telnet
para autentificación.
Los routers dentro de Empresa A pueden acceder a los servicios de R4 sin autentificación.
En R3 (el router de borde) crear usuario u4 password cisco.
R1
router eigrp 1
network 10.0.0.0
no auto-summary
line vty 0 4
password cisco
login
R2
router eigrp 1
network 10.0.0.0
no auto-summary
line vty 0 4
password cisco
login
R3
router eigrp 1
network 10.0.0.0
no auto-summary
40
2019 instructor.duoc@gmail.com
SRY
line vty 0 4
password cisco
login
R4
router eigrp 1
network 10.0.0.0
no auto-summary
line vty 0 4
password cisco
login
R4#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
User Access Verification
Password:cisco
R2>
R1#telnet 10.4.4.4
Trying 10.4.4.4 ... Open
Autentificacion AAA
Usuario:admin4
Password:cisco4
Configuramos R3
R3
username u4 password cisco
interface Serial1/0
ip access-group 100 in
line vty 0 4
autocommand access-enable host //comando oculto
login local //Parece no ser necesario si el server está down.
41
2019 instructor.duoc@gmail.com
SRY
R4#telnet 10.1.34.3
Trying 10.1.34.3 ... Open
Username: u4
Password:
[Connection to 10.1.34.3 closed by foreign host]
R4#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
Password:
R2>en
Password:
R2#
R4#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/82/132 ms
R3#show access-lists
Extended IP access list 100
10 permit tcp any host 10.1.34.3 eq telnet (132 matches)
20 permit eigrp any any (128 matches)
30 permit tcp any any established log (18 matches)
40 Dynamic ACCESO permit ip any any
permit ip host 10.1.34.4 any (1 match)
42
2019 instructor.duoc@gmail.com
SRY
Fragmentation Attack
Se utilizó el IOS Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)M8.
Setup: Cree la topologia y direccionamiento mostrado.
El router R1 está enviando un gran grupo de paquetes fragmentados a R2. Configure una solución de
manera que R2 descarte todos los paquetes fragmentados que recibe en su interface FastEthernet y
genere un mensaje de consola.
R2
ip access-list extended DENY_FRAGMENTS
deny icmp any host 10.1.123.2 fragments log
permit ip any any
interface FastEthernet0/0
ip access-group DENY_FRAGMENTS in
R2#sh access-lists
Extended IP access list DENY_FRAGMENTS
10 deny icmp any host 10.1.123.2 fragments log
20 permit ip any any
R2#
43
2019 instructor.duoc@gmail.com
SRY
Con respecto al primer ping realizado en R1. ¿Porque se pierde el primer paquete?
Configure R3 de manera que realice un seguimiento de los paquetes fragmentados que reciba. R3 solo
permitirá hasta un paquete fragmentado en 2 y con un timout de 2 segundos.
R3
interface FastEthernet0/0
ip virtual-reassembly in max-fragments 2 timeout 2
R3#
%IP_VFR-4-TOO_MANY_FRAGMENTS: FastEthernet0/0: Too many fragments per datagram (more than 2) - sent by
10.1.123.1, destined to 10.1.123.3
¿Porque los paquetes se descartan cuando el tamaño del paquete supera los 2800 bytes?’
44
2019 instructor.duoc@gmail.com
SRY
Configure R1 de manera que bloquee y genere un log cuiando reciba las siguientes opciones IP:
- Loose Source Route (LSR) permite determiner el camino parcial que puede tomar el paquete.
- Strict Source Routing (SSR) permite determiner el camino completo que puede tomar el paquete.
- Base Security
R1
ip access-list extended OPTIONS_IPv4
deny ip any any option lsr log
deny ip any any option ssr log
deny ip any any option security log
permit ip any any
interface FastEthernet0/0
ip access-group OPTIONS_IPv4 in
R2#ping
Protocol [ip]:
Target IP address: 10.1.123.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: L
Source route: 10.1.123.2
Loose, Strict, Record, Timestamp, Verbose[LV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
45
2019 instructor.duoc@gmail.com
SRY
R1#
%SEC-6-IPACCESSLOGDP: list OPTIONS_IPv4 denied icmp 10.1.123.2 -> 10.1.123.1 (0/0), 1 packet
En R2 configure una ACL que permita segmentos TCP que tengan establecidos las flags SYN, ACK, pero no la
flag FIN. Adicionalmente permita solo paquetes que tengan un TTL entre 254 y 255 saltos.
R2
ip access-list extended TCP_OPTIONS
permit tcp any any match-all +ack -fin +syn
permit ip any any ttl range 254 255
deny ip any any log-input
interface FastEthernet0/0
ip access-group TCP_OPTIONS in
46
2019 instructor.duoc@gmail.com
SRY
R2#sh access-lists
Extended IP access list TCP_OPTIONS
10 permit tcp any any match-all +ack -fin +syn
20 permit ip any any ttl range 254 255
30 deny ip any any log-input
R2
line vty 0 4
privilege level 15
no login
transport input telnet
R1#telnet 10.1.123.2
Trying 10.1.123.2 ... Open
R2#
R2#sh access-lists
Extended IP access list TCP_OPTIONS
10 permit tcp any any match-all +ack -fin +syn
20 permit ip any any ttl range 254 255 (74 matches)
30 deny ip any any log-input
En R1 cree una ruta estática apuntando a R3 como próximo salto para alcanzar la dirección 10.1.123.2.
R1
ip route 10.1.123.2 255.255.255.255 10.1.123.3
R3#debug ip icmp
ICMP packet debugging is on
R2#
%SEC-6-IPACCESSLOGP: list TCP_OPTIONS denied udp 10.1.123.1(49171) (FastEthernet0/0 ca03.06e4.0008) ->
10.1.123.2(33437), 1 packet
47
2019 instructor.duoc@gmail.com
SRY
R3#
ICMP: redirect sent to 10.1.123.1 for dest 10.1.123.2, use gw 10.1.123.2
R1#telnet 10.1.123.2
Trying 10.1.123.2 ...
% Destination unreachable; gateway or host down
R2#
%SEC-6-IPACCESSLOGP: list TCP_OPTIONS denied tcp 10.1.123.1(11338) (FastEthernet0/0 ca03.06e4.0008) ->
10.1.123.2(23), 1 packet
R3
ip options drop
R1#ping 10.1.123.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms
48
2019 instructor.duoc@gmail.com
SRY
R1#ping
Protocol [ip]:
Target IP address: 10.1.123.3
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: T
Number of timestamps [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[TV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.123.3, timeout is 2 seconds:
Packet has IP options: Total option bytes= 40, padded length=40
Timestamp: Type 0. Overflows: 0 length 40, ptr 5
>>Current pointer<<
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
Time= 00:00:00.000 UTC (00000000)
49
2019 instructor.duoc@gmail.com
SRY
R1
ip route 3.3.3.0 255.255.255.0 10.1.123.3
R3
interface FastEthernet0/0
no ip unreachables
50
2019 instructor.duoc@gmail.com
SRY
Configure R2 para ICMP rate limit de manera que el router pueda enviar 1 paquete ICMP código 1 cada 5
segundos y 1 paquete ICMP código 4 (DF) cada 3 segundos.
En R1 cree una ruta estática para alcanzar la dirección 3.3.3.3 (dirección que no existe).
R2
ip icmp rate-limit unreachable 5000
ip icmp rate-limit unreachable DF 3000
R1
ip route 2.2.2.2 255.255.255.255 10.1.123.2
R2#sh debugging
Generic IP:
ICMP packet debugging is on
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
R2#
51
2019 instructor.duoc@gmail.com
SRY
R2#
ICMP: dst (2.2.2.2) host unreachable sent to 10.1.123.1
52
2019 instructor.duoc@gmail.com
SRY
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
router eigrp 1
network 1.1.1.0 0.0.0.255
network 10.1.12.0 0.0.0.255
eigrp router-id 0.0.0.1
R2
router eigrp 1
network 10.1.12.0 0.0.0.255
eigrp router-id 0.0.0.2
53
2019 instructor.duoc@gmail.com
SRY
Configure OSPF 1 area 0 entre R2 y R3. R3 debe publicar su interface loopback0 dentro del
dominio OSPF.
R2
router ospf 1
router-id 0.0.0.2
network 10.1.23.0 0.0.0.255 area 0
R3
router ospf 1
router-id 0.0.0.3
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Loopback0
ip ospf network point-to-point
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/27/32 ms
54
2019 instructor.duoc@gmail.com
SRY
R2#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/25/32 ms
R2
router eigrp 1
default-metric 100000 100 255 1 1500
redistribute ospf 1
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2
router ospf 1
redistribute eigrp 1 subnets
55
2019 instructor.duoc@gmail.com
SRY
Utilizando AAA habitilie el servicio Telnet en R3. Las credenciales son las siguientes:
- Username: admin
- Password: class
R3
username admin password class
aaa new-model
aaa authentication login TELNET local
line vty 0 4
privilege level 15
login authentication TELNET
transport input telnet
transport output ssh
R1#telnet 3.3.3.3
Trying 3.3.3.3 ... Open
User Access Verification
Username: admin
Password:class
R3#
56
2019 instructor.duoc@gmail.com
SRY
Se ha reportado que R1 está enviando una gran cantidad de paquetes ICMP a R3. Este tráfico de datos
genera degradación del rendimiento de la red. Limite el tráfico a 8 kbps. Tráfico normal 2 kbps y excedido 4
kbps.
R3
access-list 100 permit icmp any any
interface FastEthernet0/0
rate-limit input access-group 100 8000 2000 4000 conform-action transmit exceed-action drop
57
2019 instructor.duoc@gmail.com
SRY
Configure R3 de manera que bloquee ataques Smurf que se originen en la red ethernet y vayan a la
interface loopback0 de R3 (3.3.3.3/24).
Redirects debe estar activo, solo se debe bloquear siempre que se cumpla lo indicado en la tarea anterior.
R3
interface fastEthernet 0/0
ip redirects
58
2019 instructor.duoc@gmail.com
SRY
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.0
R3#sh access-lists
R3#
R3
access-list 100 deny icmp any host 3.3.3.255 log
access-list 100 permit ip any any
interface FastEthernet0/0
ip access-group 100 in
R3#sh access-lists
Extended IP access list 100
10 deny icmp any host 3.3.3.255 log
20 permit ip any any
En R1 cree una ruta hacia el prefijo 3.3.3.3/24 considerando a R3 como próximo salto.
R3
ip route 3.3.3.0 255.255.255.0 10.1.123.3
R1#ping 3.3.3.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.255, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3#
%SEC-6-IPACCESSLOGDP: list 100 denied icmp 10.1.123.1 -> 3.3.3.255 (0/0), 5 packets
R3#sh access-lists
Extended IP access list 100
10 deny icmp any host 3.3.3.255 log (5 matches)
20 permit ip any any
59
2019 instructor.duoc@gmail.com
SRY
ACLs IP/ICMP
Configrar RIPv2 para que exista NLRI completo. Las actualizaciones deben ser unicast (no
mutlicast).
En R2 debemos denegar entre 10.1.1.1 y 10.4.4.4. El resto del tráfico debe ser permitido.
De haber un match respecto a esta regla, debemos ver un log de consola en R2.
R1
router rip
version 2
passive-interface FastEthernet0/0
network 10.0.0.0
neighbor 10.1.12.2
no auto-summary
R2
router rip
version 2
passive-interface FastEthernet0/0
passive-interface FastEthernet0/1
network 10.0.0.0
neighbor 10.1.12.1
neighbor 10.1.23.3
no auto-summary
R3
router rip
version 2
passive-interface FastEthernet0/0
passive-interface FastEthernet0/1
network 10.0.0.0
neighbor 10.1.34.4
neighbor 10.1.23.2
no auto-summary
R4
router rip
version 2
passive-interface FastEthernet0/0
60
2019 instructor.duoc@gmail.com
SRY
network 10.0.0.0
neighbor 10.1.34.3
no auto-summary
En R2 creamos las ACLs que filtrará el tráfico entre 10.1.1.1 y 10.4.4.4. Como buena práctica verificamos si
hemos configurado alguna ACL con anterioridad con el comando show access-lists. Una de las ACL tiene
origen R1 y destino R4. La otra ACL tiene origen R4 y destino R1. Esto quiere decir que aplicaremos cada
ACL en interfaces distintas.
R2#show access-lists
R2#
R2
access-list 102 deny ip host 10.4.4.4 host 10.1.1.1 log
access-list 102 permit ip any any
interface FastEthernet0/0
ip access-group 122 in
61
2019 instructor.duoc@gmail.com
SRY
interface FastEthernet0/1
ip access-group 102 in
R2#show access-lists
Extended IP access list 102
10 deny ip host 10.4.4.4 host 10.1.1.1 log
20 permit ip any any (3 matches)
Extended IP access list 122
10 deny ip host 10.1.1.1 host 10.4.4.4 log
20 permit ip any any (3 matches)
Prueba de conectividad.
R2#
*Sep 5 13:14:05.527: %SEC-6-IPACCESSLOGDP: list 122 denied icmp 10.1.1.1 -> 10.4.4.4 (0/0), 1 packet
R1
access-list 101 deny icmp host 10.1.12.2 any echo
access-list 101 deny icmp host 10.2.2.2 any echo
access-list 101 deny icmp host 10.1.23.2 any echo
access-list 101 permit ip any any
interface FastEthernet0/0
ip access-group 101 in
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/64/88 ms
R1#ping 10.1.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/64/96 ms
R1#ping 10.1.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/74/92 ms
R2#ping 10.1.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
63
2019 instructor.duoc@gmail.com
SRY
R2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
En el siguiente ejemplo configuraremos R2 de manera que si no tiene como alcanzar una red utilice a R3
como su default-gateway. Creamos un default route. Intentamos conectividad a una IP inexistente
(10.5.5.5)
R2
ip route 0.0.0.0 0.0.0.0 fastEthernet 0/1 10.1.23.3
R2#debug ip icmp
ICMP packet debugging is on
64
2019 instructor.duoc@gmail.com
SRY
Configurar R3 de manera que no envíe mensage de ICMP: dst (10.1.23.2) host unreachable.
R3
interface FastEthernet0/1
no ip unreachables
65
2019 instructor.duoc@gmail.com
SRY
Configure EIGRP 1 en todos los routers y publique sus interfaces directamente conectadas.
Deshabilite la sumarización automática.
Configure OSPF 1 area 0 en todos los routers y publique sus interfaces directamente conectadas.
No se permite la elección de DR/BDR. Publique las loopback en OSPF con sus máscaras correctas.
No utilizar comando network para publicar las interfaces. Remover RIPv2 de la configuración
anterior incluyendo ACLs.
Rx
no router rip
R1
router eigrp 1
network 10.0.0.0
no auto-summary
router ospf 1
router-id 1.1.1.1
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf network point-to-point
ip ospf 1 area 0
R2
router eigrp 1
network 10.0.0.0
no auto-summary
66
2019 instructor.duoc@gmail.com
SRY
router ospf 1
router-id 2.2.2.2
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/1
ip ospf network point-to-point
ip ospf 1 area 0
R3
router eigrp 1
network 10.0.0.0
no auto-summary
router ospf 1
router-id 3.3.3.3
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/1
ip ospf network point-to-point
ip ospf 1 area 0
R4
router eigrp 1
network 10.0.0.0
no auto-summary
router ospf 1
router-id 4.4.4.4
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf network point-to-point
67
2019 instructor.duoc@gmail.com
SRY
ip ospf 1 area 0
Configure una ACL en R1 de manera que bloquee el tráfico EIGRP y permita todo el resto del
tráfico. El resultado de está configuración la veremos en la tabla de R1 donde en lugar de redes
conocidas por EIGRP (AD 90) se instalarán redes conocidas por OSPF (AD 110).
Nota: Primero verificamos la RIB. Luego de la configuración veremos que EIGRP pierde adyacencia.
R1#sh ip route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Loopback0
L 10.1.1.1/32 is directly connected, Loopback0
C 10.1.12.0/24 is directly connected, FastEthernet0/0
L 10.1.12.1/32 is directly connected, FastEthernet0/0
D 10.1.23.0/24 [90/30720] via 10.1.12.2, 00:10:41, FastEthernet0/0
D 10.1.34.0/24 [90/33280] via 10.1.12.2, 00:10:39, FastEthernet0/0
D 10.2.2.0/24 [90/156160] via 10.1.12.2, 00:10:41, FastEthernet0/0
D 10.3.3.0/24 [90/158720] via 10.1.12.2, 00:10:39, FastEthernet0/0
D 10.4.4.0/24 [90/161280] via 10.1.12.2, 00:10:38, FastEthernet0/0
R1#show access-lists
Extended IP access list 101
10 deny icmp host 10.1.12.2 any echo (10 matches)
20 deny icmp host 10.2.2.2 any echo (5 matches)
30 deny icmp host 10.1.23.2 any echo (5 matches)
40 permit ip any any (242 matches)
R1#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#
R1(config)#no access-list 101
R1
access-list 100 deny eigrp any any
access-list 100 permit ip any any
68
2019 instructor.duoc@gmail.com
SRY
interface FastEthernet0/0
ip access-group 100 in
69
2019 instructor.duoc@gmail.com
SRY
Cree la topología y direccionamiento mostrado. Para la dirección Link Local utilice el formato
FE80::X donde la X representa el número del router.
R1
ipv6 unicast-routing
interface FastEthernet0/0
ipv6 address FE80::1 link-local
ipv6 address 2001:1:1:12::1/64
interface Loopback0
ipv6 address 1::1/64
R2
ipv6 unicast-routing
interface FastEthernet0/0
ipv6 address FE80::2 link-local
ipv6 address 2001:1:1:12::2/64
interface Loopback0
ipv6 address 2::2/64
R2#ping 2001:1:1:12::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:1:1:12::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/20/80 ms
R1#ping fe80::2
Output Interface: FastEthernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2 seconds:
Packet sent with a source address of FE80::1%FastEthernet0/0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/28/36 ms
70
2019 instructor.duoc@gmail.com
SRY
71
2019 instructor.duoc@gmail.com
SRY
Configure OSPFv3 area 0 y compruebe que exista conectividad entre las loopback0 de R1 y R2.
Utilice el ID OSPF 0.0.0.X donde X corresponde al número del router.
No se permiten LSAs del tipo 2 en el enlace entre R1 y R2.
Compruebe la direcciones de las interfaces loopback0 se instalen con su mascara correcta en la
Router Information Base.
R1
router ospfv3 1
router-id 0.0.0.1
interface FastEthernet0/0
ipv6 ospf 1 area 0
interface Loopback0
ipv6 ospf 1 area 0
R2
router ospfv3 1
router-id 0.0.0.2
interface FastEthernet0/0
ipv6 ospf 1 area 0
interface Loopback0
ipv6 ospf 1 area 0
R2
interface Loopback0
ipv6 ospf network point-to-point
72
2019 instructor.duoc@gmail.com
SRY
R1
interface Loopback0
ipv6 ospf network point-to-point
R1
interface FastEthernet0/0
ipv6 ospf network point-to-point
R2
interface FastEthernet0/0
ipv6 ospf network point-to-point
R2
line vty 0 4
privilege level 15
no login
line vty 0 4
ipv6 access-class ONLY-R1 in
R1#telnet 2001:1:1:12::2
Trying 2001:1:1:12::2 ...
% Connection refused by remote host
R2#
%IPV6_ACL-6-ACCESSLOGP: list ONLY-R1/20 denied tcp 2001:1:1:12::1(37180) -> 2001:1:1:12:
:2(23), 1 packet
R1#telnet 2::2
Trying 2::2 ...
% Connection refused by remote host
R2#
%IPV6_ACL-6-ACCESSLOGP: list ONLY-R1/20 denied tcp 2001:1:1:12::1(58477) -> 2::2(23), 1 packet
74
2019 instructor.duoc@gmail.com
SRY
R2#exit
Utilice AAA de manera que cuando R1 se conecte via telnet a R2 utilice las siguientes credenciales:
- User: admin
- Passwoerd: class
75
2019 instructor.duoc@gmail.com
SRY
R1
ipv6 router ospf 1
router-id 1.1.1.1
log-adjacency-changes detail
interface FastEthernet0/0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface FastEthernet0/1
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface Loopback0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
76
2019 instructor.duoc@gmail.com
SRY
R2
ipv6 router ospf 1
router-id 2.2.2.2
log-adjacency-changes detail
interface FastEthernet0/0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface FastEthernet0/1
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface Loopback0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
R2#
*Sep 7 13:44:03.863: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from 2WAY to EXSTART, AdjOK?
*Sep 7 13:44:04.079: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from EXSTART to EXCHANGE, Negotiation Done
*Sep 7 13:44:04.235: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from EXCHANGE to LOADING, E xchange Done
*Sep 7 13:44:04.379: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loadi ng Done
R3
ipv6 router ospf 1
router-id 3.3.3.3
log-adjacency-changes detail
interface FastEthernet0/0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface FastEthernet0/1
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
interface Loopback0
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
R3
ipv6 router rip R34
interface Serial1/0
ipv6 rip R34 enable
R4
ipv6 router rip R34
interface Serial1/0
ipv6 rip R34 enable
interface Loopback0
ipv6 rip R34 enable
R3
ipv6 router ospf 1
redistribute rip R34 include-connected
R1#ping 2001:4:4:4::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:4:4:4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/68/88 ms
79
2019 instructor.duoc@gmail.com
SRY
R1
interface Loopback1
ipv6 address 2000:1:1::1/64
ipv6 address 2000:1:1:1::1/64
ipv6 address 2000:1:1:2::1/64
ipv6 address 2000:1:1:3::1/64
ipv6 address 2000:1:1:4::1/64
ipv6 address 2000:1:1:5::1/64
ipv6 address 2000:1:1:6::1/64
ipv6 address 2000:1:1:7::1/64
ipv6 ospf 1 area 0
ipv6 ospf network point-to-point
80
2019 instructor.duoc@gmail.com
SRY
Configurar R3 de manera que R1 no pueda probar conectividad con el comando ping. Esto incluye
las interfaces loopback o la interface que comunica con R2.
R4
ipv6 access-list TEST
deny icmp 2001:1:1:13::/64 any
permit ipv6 any any
interface FastEthernet0/0
ipv6 traffic-filter TEST in
81
2019 instructor.duoc@gmail.com
SRY
El primer caso solo incluye la ipv6 de origen 2001:1:1:13::1 pero no incluye las demás interfaces.
Debemos hacer una configuración que incluya todas las IPv6 que pertenecen a R1.
R3
ipv6 access-list TEST
deny icmp 2001:1:1:13::/64 any
deny icmp 2000:1:1:0::/61 any
deny icmp 2001:1:1:12::/64 any
permit ipv6 any any
interface FastEthernet0/0
ipv6 traffic-filter TEST in
R3#traceroute 2001:1:1:13::3
Type escape sequence to abort.
Tracing the route to 2001:1:1:13::3
1
*Sep 7 15:22:41.667: ICMPv6: Sent Unreachable code 4, Src=2001:1:1:13::3, Dst=2001:1:1:13::3 *
*Sep 7 15:22:44.671: ICMPv6: Sent Unreachable code 4, Src=2001:1:1:13::3, Dst=2001:1:1:13::3 *
*Sep 7 15:22:47.679: ICMPv6: Sent Unreachable code 4, Src=2001:1:1:13::3, Dst=2001:1:1:13::3 *
2
*Sep 7 15:22:50.683: ICMPv6: Sent Unreachable code 4, Src=2001:1:1:13::3, Dst=2001:1:1:13::3 *
*Sep 7 15:22:53.691: ICMPv6: Sent Unreachable code 4, Src=2001:1:1:13::3, Dst=2001:1:1:13::3 *
82
2019 instructor.duoc@gmail.com
SRY
R1
router ospf 1
router-id 0.0.0.1
interface Loopback0
ip ospf 1 area 12
interface FastEthernet0/0
ip ospf 1 area 12
R2
router ospf 1
router-id 0.0.0.2
interface Loopback0
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf 1 area 12
interface FastEthernet0/1
ip ospf 1 area 0
83
2019 instructor.duoc@gmail.com
SRY
R3
router ospf 1
router-id 0.0.0.3
interface Loopback0
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf 1 area 34
interface FastEthernet0/1
ip ospf 1 area 0
R4
router ospf 1
router-id 0.0.0.4
interface Loopback0
ip ospf 1 area 34
interface FastEthernet0/0
ip ospf 1 area 34
84
2019 instructor.duoc@gmail.com
SRY
Compruebe que todas las intefaces loopback0 tengan sus máscaras correctas.
R1
interface Loopback0
ip ospf network point-to-point
R2
interface Loopback0
ip ospf network point-to-point
R3
interface Loopback0
ip ospf network point-to-point
R4
interface Loopback0
ip ospf network point-to-point
85
2019 instructor.duoc@gmail.com
SRY
En R2 cree una política que bloquee los paquetes que reciba desde R3 que tengan un rango de
250-320 bytes y que tengan como destino el router R1.
R2
access-list 100 permit icmp any host 10.1.12.1
access-list 100 permit icmp any host 1.1.1.1
interface FastEthernet0/1
ip policy route-map RANGE-PACKET
R2#sh route-map
route-map RANGE-PACKET, permit, sequence 10
Match clauses:
ip address (access-lists): 100
length 250 320
Set clauses:
interface Null0
Policy routing matches: 0 packets, 0 bytes
route-map RANGE-PACKET, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R3#ping 10.1.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/28/48 ms
R3#ping 10.1.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/58/68 ms
86
2019 instructor.duoc@gmail.com
SRY
R2#sh route-map
route-map RANGE-PACKET, permit, sequence 10
Match clauses:
ip address (access-lists): 100
length 250 320
Set clauses:
interface Null0
Policy routing matches: 15 packets, 4560 bytes
route-map RANGE-PACKET, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 15 packets, 3560 bytes
87
2019 instructor.duoc@gmail.com
SRY
Habilite telnet en R4 utilizando el username admin contraseña class. No se permite el uso de AAA.
Compruebe que exista conectividad entre R1 y R4.
R4
username admin password class
line vty 0 4
login local
R1#telnet 4.4.4.4
Trying 4.4.4.4 ... Open
User Access Verification
Username: admin
Password:class
R4>
R4>exit
Configure una política que permita conexiones telnet a la dirección destino 4.4.4.4 siempre que el
origen sea la direccion 1.1.1.1. Esta tarea se debe realizar en el router R3.
R3
access-list 100 permit tcp host 1.1.1.1 host 4.4.4.4 eq 23
interface FastEthernet0/1
ip policy route-map R1-to-R4
R3#sh route-map
route-map R1-to-R4, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
ip precedence immediate
Policy routing matches: 0 packets, 0 bytes
route-map R1-to-R4, permit, sequence 20
Match clauses:
Set clauses:
88
2019 instructor.duoc@gmail.com
SRY
interface Null0
Policy routing matches: 0 packets, 0 bytes
R1#telnet 10.1.34.4
Trying 10.1.34.4 ...
% Destination unreachable; gateway or host down
R1#telnet 4.4.4.4
Trying 4.4.4.4 ...
% Destination unreachable; gateway or host down
R3#sh route-map
route-map R1-to-R4, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
ip precedence immediate
Policy routing matches: 26 packets, 1446 bytes
route-map R1-to-R4, permit, sequence 20
Match clauses:
Set clauses:
interface Null0
Policy routing matches: 1 packets, 58 bytes
R4
access-list 111 permit ip host 1.1.1.1 host 4.4.4.4
89
2019 instructor.duoc@gmail.com
SRY
R1
router eigrp 1
network 1.1.1.0 0.0.0.255
network 10.1.12.0 0.0.0.255
eigrp router-id 1.1.1.1
R2
router eigrp 1
network 2.2.2.0 0.0.0.255
network 10.1.12.0 0.0.0.255
network 10.1.23.0 0.0.0.255
R3
router eigrp 1
network 3.3.3.0 0.0.0.255
network 10.1.23.0 0.0.0.255
network 10.1.34.0 0.0.0.255
eigrp router-id 3.3.3.3
R4
router eigrp 1
network 4.4.4.0 0.0.0.255
network 10.1.34.0 0.0.0.255
90
2019 instructor.duoc@gmail.com
SRY
Confugure Telnet en el router R4. Utilice la base de datos local con las siguientes credenciales:
- User: admin
- Password: class
Para el acceso al modo privilegiado utilice la contraseña cisco.
R4
username admin password class
enable secret cisco
line vty 0 4
login local
91
2019 instructor.duoc@gmail.com
SRY
R1#telnet
Host: 4.4.4.4
Trying 4.4.4.4 ... Open
User Access Verification
Username: admin
Password:class
R4>enable
Password:cisco
R4#
R4#sh users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
2 vty 0 admin idle 00:00:49 10.1.12.1
Interface User Mode Idle Peer Address
R4#exit
[Connection to 4.4.4.4 closed by foreign host]
R1#
92
2019 instructor.duoc@gmail.com
SRY
En R1 los paquetes que tengan destino R4 (4.4.4.4) para el puerto 23 deben ser marcados con IP
precedencia de 1.
R1
ip access-list extended IPP
permit tcp any host 4.4.4.4 eq telnet
policy-map QOS
class TELNET
set ip precedence 1
interface FastEthernet0/0
service-policy output QOS
R1#sh class-map
Class Map match-all TELNET (id 1)
Match access-group name IPP
Class Map match-any class-default (id 0)
Match any
93
2019 instructor.duoc@gmail.com
SRY
R1#telnet 10.1.34.4
Trying 10.1.34.4 ... Open
User Access Verification
Username: admin
Password:class
R4>exit
R1#telnet 4.4.4.4
Trying 4.4.4.4 ... Open
User Access Verification
Username: admin
Password:
R4>exit
[Connection to 4.4.4.4 closed by foreign host]
94
2019 instructor.duoc@gmail.com
SRY
Modifique la ACL de manera que solo se permitan sesión TELNET siempre que el origen sea la
interface loopback0 de R1 (1.1.1.1).
Configure R3 de manera que bloquee todos los paquetes que estén marcados con nivel de
precedencia 1.
R3
class-map match-all BLK-IPP
match ip precedence 1
policy-map IPP
class BLK-IPP
drop
interface FastEthernet0/1
service-policy input IPP
R1#telnet 4.4.4.4
Trying 4.4.4.4 ...
% Connection timed out; remote host not responding
R1#telnet 10.1.34.4
Trying 10.1.34.4 ... Open
User Access Verification
Username: admin
Password:class
R4>exit
95
2019 instructor.duoc@gmail.com
SRY
96
2019 instructor.duoc@gmail.com
SRY
Nota: NTP tiene como meta sincronizar el tiempo para distintos de red, esto permite que cuando ocurren
eventos que generan mensajes puedan posteriormente ser interpretados coherentemente utilizando el
tiempo como referencia. La idea es mantener el orden de los syslog que se generan.
R1
interface Loopback0
ip address 10.1.1.1 255.255.255.255
interface FastEthernet0/0
ip address 10.1.12.1 255.255.255.0
duplex full
no shutdown
R2
interface Loopback0
ip address 10.2.2.2 255.255.255.255
interface fastethernet0/0
ip address 10.1.12.2 255.255.255.0
full-duplex
no shutdown
interface fastethernet0/1
ip address 10.1.23.2 255.255.255.0
full-duplex
no shutdown
R3
interface Loopback0
ip address 10.3.3.3 255.255.255.255
97
2019 instructor.duoc@gmail.com
SRY
interface fastethernet0/1
ip address 10.1.23.3 255.255.255.0
full-duplex
no shutdown
R1
router eigrp 1
network 10.0.0.0
no auto-summary
R2
router eigrp 1
network 10.0.0.0
no auto-summary
R3
router eigrp 1
network 10.0.0.0
no auto-summary
R2
clock set 14:00:00 11 sep 2012
*Sep 11 14:00:00.003: %SYS-6-CLOCKUPDATE: System clock has been updated from 14:01:13 UTC Tue
Sep 11 2012 to 14:00:00 UTC Tue Sep 11 2012, configured from console by console.
R2#show clock
14:00:33.759 UTC Tue Sep 11 2012
Configure R2 como NTP server y con stratum 3. Se utiliza cuando no tenemos un reloj externo
para sicronizar el tiempo. Stratum 1 corresponde a la fuente mas fiable.
Stratum (Nivel) Significado
0 No disponible
1 Referencia primaria (reloj atómico)
2 - 15 Referencia secundaria
16 - 255 Reservado
R2
ntp master 2
Configurar R1 y R3 para que sincronicen sus relojes en base al reloj de R2 (Master). Utilice
loopback0 como source NTP server.
Nota: el proceso no es instantaneo. Paciencia.
R2#show clock
15:16:06.267 UTC Tue Sep 11 2012
99
2019 instructor.duoc@gmail.com
SRY
R1#show clock
*15:17:27.323 UTC Tue Sep 11 2012
R3#show clock
*15:17:40.335 UTC Tue Sep 11 2012
R2
ntp source Loopback0
R1
ntp server 10.2.2.2
R3
ntp server 10.2.2.2
100
2019 instructor.duoc@gmail.com
SRY
Authentication Radius
Configurar Server Radius (WinRadius) para que los usuarios que accedan a R3 se autentifiquen en
función de la base de datos del server, en caso de que el server este down utilizar no debe pedir
autenticación.
En la WinRadius ir al menú Operation→Add User el usuario nadmin password nico
Nota: La instalación del server Radius se puede realizar de acuerdo al Lab Manual CCNAS.
R1#ping 100.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/31/104 ms
101
2019 instructor.duoc@gmail.com
SRY
R1
username admin password cisco
aaa new-model
aaa authentication login default group radius none
radius-server host 100.1.1.3 auth-port 1812 key WinRadius
R2#telnet 10.1.1.1
Trying 10.1.1.1 ... Open
Username: nadmin
Password:nico
102
2019 instructor.duoc@gmail.com
SRY
La configuración de Tacacs+ involucra dos dispositivos, el cliente (Router, Firewall, etc…) y el ACS Server.
Este último puede ser un appliance, o sencillamente un PC con la aplicación ACS.
Primero configuraremos el ACS Server.
Nota: El ejemplo presentando está enfocado en el Grupo Administrador, los otros grupos los debe crear el
alumno.
103
2019 instructor.duoc@gmail.com
SRY
Creación de Grupos
- Entramos al ACS y seleccionamos Group Setup.
- Modificamos el nombre para este grupo de Group 3 a Administrador y cliqueamos Submit para
que los cambios sean efectivos.
104
2019 instructor.duoc@gmail.com
SRY
Podemos ver en la siguiente figura que en Group Setup ahora podemos seleccionar el grupo
Administrador en el menú desplegable, esto nos permite tener nombres representativos. Debemos
proceder de la misma forma para los grupos NOC e Invitado.
105
2019 instructor.duoc@gmail.com
SRY
- Completamos los valores mostrados en la figura. El nombre del server (aleatorio), la dirección ip
donde se del Server, una key y el AAA Server Type seleccionamos TACACS+. Finalmente hacemos
los cambios efectivos con Submit + Apply
106
2019 instructor.duoc@gmail.com
SRY
107
2019 instructor.duoc@gmail.com
SRY
108
2019 instructor.duoc@gmail.com
SRY
Creación de Usuarios
En este momento podemos crear los usuarios dentro del ACS; esto es análogo a cuando utilizamos el
comando username ….. (DB Local).
- Seleccionamos User Setup para crear al usuario.
- Creamos al usuario jadmin (este nombre lo asignamos nosotros, puede ser un nombre cualquiera)
y seleccionamos Add/Edit.
109
2019 instructor.duoc@gmail.com
SRY
110
2019 instructor.duoc@gmail.com
SRY
- En el campo User Setup (mas abajo) definimos la password que empleará el usuario jadmin para
loguearse en el router. En nuestro caso seleccionamos la password lucho. Además seleccionamos
el grupo al que pertenece el usuario jadmin, en nuestro caso el grupo se llama Administrador (ya
lo hemos definido) y cliqueamos Submit.
111
2019 instructor.duoc@gmail.com
SRY
112
2019 instructor.duoc@gmail.com
SRY
Configuración Router
Para configurar los cliente debemos tener algún IGP y conectividad entre el cliente AAA y el Server. En el
ejemplo actual el server se encuentra en la subred 100.1.1.0/24.
Lo primero es probar si tenemos accesos a nivel de Red.
R1
router rip
version 2
network 0.0.0.0
no auto-summary
R2
router rip
version 2
network 0.0.0.0
no auto-summary
R3
router rip
version 2
network 0.0.0.0
no auto-summary
R2#ping 100.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/72/112 ms
113
2019 instructor.duoc@gmail.com
SRY
R2
aaa new-model
aaa authentication login default group tacacs+ enable none
ip tacacs source-interface loopback 0
tacacs-server host 100.1.1.3 key ccnas
R1#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
Username: jadmin
Password: lucho
R2>
R2>?
Exec commands:
<1-99> Session number to resume
access-enable Create a temporary Access-List entry
access-profile Apply user-profile to interface
clear Reset functions
connect Open a terminal connection
crypto Encryption related commands.
disable Turn off privileged commands
disconnect Disconnect an existing network connection
emm Run a configured Menu System
enable Turn on privileged commands
ethernet Ethernet parameters
exit Exit from the EXEC
help Description of the interactive help system
lat Open a lat connection
lock Lock the terminal
login Log in as a particular user
logout Exit from the EXEC
mrinfo Request neighbor and version information from a multicast
router
mstat Show statistics after multiple multicast traceroutes
mtrace Trace reverse multicast path from destination to source
name-connection Name an existing network connection
pad Open a X.29 PAD connection
114
2019 instructor.duoc@gmail.com
SRY
115
2019 instructor.duoc@gmail.com
SRY
CBAC
CBAC inspecciona los flujos de tráfico entre zonas de confianza y zonas inseguras, permite el tráfico
desde una zona insegura a una zona de confianza siempre que ese flujo se haya iniciado en la zona de
confianza.
Setup: Configure direccionamiento mostrado Configure RIPv2 para que exista NLRI extremo/extremo.
Configure R1 para que permita el tráfico TCP, UDP, ICMP iniciado desde la red INSIDE a la red
OUTSIDE. Desde la red OUTSIDE se permite trafico ICMP y Telnet siempre que el destino sea la IP
10.1.123.3/24 (R3). El resto del tráfico desde la red OUTSIDE debe ser denegado.
R1 Estos comandos le dicen al IOS que inspeccione el tráfico TCP, UDP e ICMP.
ip inspect name OUT tcp CBAC no monitorea lo que sucede en el instante sobre la conexión, si es
ip inspect name OUT udp requerido, una inspección específica para una aplicación dada puede ser
ip inspect name OUT icmp configurada, una vez configurada toma prescedencia sobre la inspección
genérica TCP o UDP.
access-list 100 permit ip 10.1.123.0 0.0.0.255 any Las ACLs permiten cualquier tráfico desde la red 10.1.123.0/24
a cualquier red, también permite que RIPv2 opere.
access-list 100 permit udp any any eq rip
interface FastEthernet0/0
description **INTERFACE INSIDE**
116
2019 instructor.duoc@gmail.com
SRY
ip inspect OUT in
ip access-group 100 in
- Puesto que solo se permite el tráfico Telnet e ICMP desde la red insegura debemos identificarlo
con otra ACL.
R1
access-list 101 permit icmp any host 10.1.123.3
access-list 101 permit tcp any host 10.1.123.3 eq telnet
access-list 101 permit udp any any eq 520
interface FastEthernet0/1
description **INTERFACE OUTSIDE**
ip access-group 101 in
Configure telnet en R3. Cree usuario admin password class. El usuario necesite acceder a R3 a
través de telnet debe loguearse utilizando la base de datos local. Use password cisco para acceder
a modo privilegiado.
R3
username admin password class
aaa new-model
aaa authentication login TELNET local
line vty 0 4
login authentication TELNET
- Pruebas CBAC. Desde R2 a R4 acceder por telnet. Comprobar que existe inspección utilizando el
comando sh ip inspect con argumento necesario.
- R4 debe poder acceder remotamente a R3 usando telnet y comprobar conectividad utilizando
ping.
117
2019 instructor.duoc@gmail.com
SRY
Setup: Configure direccionamiento mostrado Configure RIPv2 para que exista NLRI extremo/extremo.
Verificar utilizando la tabla de enrutamiento y comprobar cada red creada.
R1
router rip
version 2
network 10.0.0.0
network 200.1.1.0
no au
R2
router rip
version 2
network 10.0.0.0
no au
R3
router rip
version 2
network 200.1.1.0
no au
118
2019 instructor.duoc@gmail.com
SRY
119
2019 instructor.duoc@gmail.com
SRY
R4
router rip
version 2
network 10.0.0.0
no au
R1
class-map type inspect match-any CM-INSIDE
match protocol tcp
match protocol udp
match protocol icmp
2. Este segundo paso nos permite determinar que hacer con el tráfico interesante que definimos con
el class-map (permitirlo, inspeccionarlo, descartarlo, entre otras opciones). En R1 aplicamos las
políticas respetando la dirección de cada una de ellas. INSIDE→OUTSIDE, INSIDE→DMZ,
OUTSIDE→DMZ.
R1
policy-map type inspect PM-INSIDE-TO-OUTSIDE
class type inspect CM-INSIDE
inspect
120
2019 instructor.duoc@gmail.com
SRY
3. Definimos las zonas de seguridad INSIDE, OUTSIDE y DMZ. En este caso se han asignado los
nombres de las zonas en minúsculas salvo la DMZ.
R1
zone security inside
zone security outside
zone security DMZ
4. En este paso asignamos las zonas a las interfaces apropiadas. Recordar que los nombres fueron
asignados con minúsculas.
R1
interface FastEthernet0/0
zone-member security inside
interface Serial1/0
zone-member security outside
interface FastEthernet0/1
zone-member security DMZ
5. El último paso consiste en asociar políticas entre zonas (zone-pair). Que en pocas palabras define
direccionalidad del tráfico.
R1
zone-pair security Z-IO source inside destination outside
service-policy type inspect PM-INSIDE-TO-OUTSIDE
121
2019 instructor.duoc@gmail.com
SRY
Pruebas ICMP
- Ping desde R2 (INSIDE) a R4 (DMZ)→OK
- Ping desde R2 (INSIDE) a R3 (OUTSIDE)→OK
- Ping desde R3 (OUTSIDE) a R2 (INSIDE)→FAIL
- Ping desde R3 (OUTSIDE) a R4 (DMZ)→OK
R2#ping 10.1.14.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/68/84 ms
R2#ping 200.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/67/92 ms
R3#ping 10.1.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3#ping 10.1.14.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/66/92 ms
122
2019 instructor.duoc@gmail.com
SRY
Pruebas TCP utilizando Telnet (habilitar telnet en todos los routers de la topología).
- Telnet desde R2 (INSIDE) a R4 (DMZ)→OK
- Telnet desde R2 (INSIDE) a R3 (OUTSIDE)→OK
- Telnet desde R3 (OUTSIDE) a R2 (INSIDE)→FAIL
- HTTP desde R3 (OUTSIDE) a R4 (DMZ)→OK
R1#telnet 10.1.14.4
Trying 10.1.14.4 ... Open
R4>
R1#telnet 200.1.1.3
Trying 200.1.1.3 ... Open
R3>
R3#telnet 10.1.12.2
Trying 10.1.12.2 ...
% Connection timed out; remote host not responding
- Para poder testear la conección HTTP debe habilitar a R4 como server para HTTP. A pesar de que
NO obtendremos acceso a través de telnet, si existe un servicio abierto (Open) que corresponde a
HTTP. La salida que nos entrega el comando show policy-map type inspect zone-pair Z-OD nos
muestra este comportamiento.
R4
ip http server
R3#telnet 10.1.14.4 80
Trying 10.1.14.4, 80 ... Open
123
2019 instructor.duoc@gmail.com
SRY
124
2019 instructor.duoc@gmail.com
SRY
125
2019 instructor.duoc@gmail.com
SRY
R1
router eigrp 1
network 10.0.0.0
network 200.1.1.0
no auto-summary
R2
router eigrp 1
network 10.0.0.0
no auto-summary
R3
router eigrp 1
network 200.1.1.0
no auto-summary
R4
router eigrp 1
network 10.0.0.0
no auto-summary
R5
router eigrp 1
network 10.0.0.0
no auto-summary
R2
enable secret cisco
username admin password cisco
ip domain-name duoc.cl
crypto key generate rsa usage-keys
aaa new-model
aaa authentication login VTY-LOCAL local
line vty 0 4
login authentication VTY-LOCAL
transport output ssh
126
2019 instructor.duoc@gmail.com
SRY
R2
enable secret cisco
username admin password cisco
ip domain-name duoc.cl
crypto key generate rsa usage-keys
aaa new-model
aaa authentication login VTY-LOCAL local
line vty 0 4
login authentication VTY-LOCAL
transport output ssh
R1
class-map type inspect match-any CM-INSIDE
match protocol tcp
match protocol udp
match protocol icmp
2. Este segundo paso nos permite determinar que hacer con el tráfico interesante que definimos con
el class-map (permitirlo, inspeccionarlo, descartarlo, entre otras opciones). En R1 aplicamos las
políticas respetando la dirección de cada una de ellas. INSIDE→OUTSIDE, INSIDE→DMZ,
OUTSIDE→DMZ.
R1
policy-map type inspect PM-INSIDE-TO-OUTSIDE
class type inspect CM-INSIDE
inspect
127
2019 instructor.duoc@gmail.com
SRY
3. Definimos las zonas de seguridad INSIDE, OUTSIDE y DMZ. En este caso se han asignado los
nombres de las zonas en minúsculas salvo la DMZ.
R1
zone security inside
zone security outside
zone security DMZ
4. En este paso asignamos las zonas a las interfaces apropiadas. Recordar que los nombres fueron
asignados con minúsculas.
R1
interface FastEthernet0/0
zone-member security inside
interface FastEthernet2/0
zone-member security inside
interface Serial1/0
zone-member security outside
interface FastEthernet0/1
zone-member security DMZ
5. El último paso consiste en asociar políticas entre zonas (zone-pair). Que en pocas palabras define
direccionamiento del tráfico.
R1
zone-pair security Z-IO source inside destination outside
service-policy type inspect PM-INSIDE-TO-OUTSIDE
128
2019 instructor.duoc@gmail.com
SRY
Pruebas ICMP
- Ping desde R2 (INSIDE) a R4 (DMZ)→OK
- Ping desde R5 (INSIDE) a R4 (DMZ)→OK
- Ping desde R2 (INSIDE) a R3 (OUTSIDE)→OK
- Ping desde R3 (OUTSIDE) a R2 (INSIDE)→FAIL
- Ping desde R3 (OUTSIDE) a R5 (INSIDE)→FAIL
R2#ping 10.1.14.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/68/92 ms
R5#ping 10.1.14.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/68/92 ms
R2#ping 200.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/65/84 ms
R3#ping 10.1.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R3#ping 10.1.15.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.15.5, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#
%FW-6-DROP_PKT: Dropping icmp session 200.1.1.3:0 10.1.15.5:0 on zone-pair Z-OD class class-default
due to policy match failure with ip ident 30
129
2019 instructor.duoc@gmail.com
SRY
R2>enable
Password:cisco
R2#exit
R1#
%FW-6-DROP_PKT: Dropping Other session 200.1.1.3:50226 10.2.2.2:22 due to Stray Segment with ip
ident 37207 tcpflags 0x5004 seq.no 3158919498 ack 0
130
2019 instructor.duoc@gmail.com
SRY
R1
router eigrp 1
network 10.0.0.0
network 200.1.1.0
no auto-summary
131
2019 instructor.duoc@gmail.com
SRY
R2
router eigrp 1
network 10.0.0.0
no auto-summary
R3
router eigrp 1
network 10.0.0.0
network 200.1.1.0
no auto-summary
R4
router eigrp 1
network 10.0.0.0
no auto-summary
R5
router eigrp 1
network 10.0.0.0
network 100.0.0.0
no auto-summary
R1
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
line vty 0 4
login authentication TELNET
R2
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
132
2019 instructor.duoc@gmail.com
SRY
line vty 0 4
login authentication TELNET
R3
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
line vty 0 4
login authentication TELNET
R4
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
line vty 0 4
login authentication TELNET
R5
aaa new-model
aaa authentication login TELNET enable
enable secret cisco
line vty 0 4
login authentication TELNET
R5#telnet 10.1.1.1
Trying 10.1.1.1 ... Open
User Access Verification
Password:cisco
R1>enable
Password:cisco
R1
access-list 100 permit ip host 10.2.2.2 any
access-list 100 permit ip host 10.5.5.5 any
133
2019 instructor.duoc@gmail.com
SRY
1. Este segundo paso nos permite determinar que hacer con el tráfico interesante que definimos con
el class-map (permitirlo, inspeccionarlo, descartarlo, entre otras opciones). En R1 aplicamos 2
políticas: INSIDE→OUTSIDE, DMZ→INSIDE.
R1
policy-map type inspect PM-INSIDE-TO-OUTSIDE
class type inspect CM-INSIDE
inspect
2. Definimos las zonas de seguridad INSIDE, OUTSIDE y DMZ. En este caso se han asignado los
nombres de las zonas en minúsculas salvo la DMZ.
R1
zone security inside
zone security outside
zone security DMZ
3. En este paso asignamos las zonas a las interfaces apropiadas. Recordar que los nombres fueron
asignados con minúsculas.
R1
interface FastEthernet0/0
zone-member security inside
interface FastEthernet2/0
zone-member security inside
interface Serial1/0
zone-member security outside
interface FastEthernet0/1
zone-member security DMZ
134
2019 instructor.duoc@gmail.com
SRY
4. El último paso consiste en asociar políticas entre zonas (zone-pair). Que en pocas palabras define
direccionalidad del tráfico.
R1
zone-pair security Z-IO source inside destination outside
service-policy type inspect PM-INSIDE-TO-OUTSIDE
Pruebas Syslog
R1
logging on
logging origin-id hostname
logging source-interface loopback0
logging 100.1.1.11
logging trap debugging
135
2019 instructor.duoc@gmail.com
SRY
R2
ip dhcp excluded-address 10.1.1.1 10.1.1.9
interface FastEthernet0/0
ip address 10.1.1.2 255.255.255.0
no shut
R1
interface fastEthernet 0/0
ip address dhcp
no shutdown
136
2019 instructor.duoc@gmail.com
SRY
137
2019 instructor.duoc@gmail.com
SRY
R3
ip dhcp excluded-address 10.1.1.1 10.1.1.9
!
ip dhcp pool TST
network 10.1.1.0 255.255.255.0
default-router 10.1.1.3
dns-server 4.4.4.4
domain-name tilt.org
interface FastEthernet0/0
ip address 10.1.1.3 255.255.255.0
no shut
138
2019 instructor.duoc@gmail.com
SRY
139
2019 instructor.duoc@gmail.com
SRY
R2
no ip dhcp excluded-address 10.1.1.1 10.1.1.9
no ip dhcp pool TST
router ospf 1
router-id 1.1.1.1
R3
no ip dhcp excluded-address 10.1.1.1 10.1.1.9
no ip dhcp pool TST
router ospf 1
router-id 3.3.3.3
R4
router ospf 1
router-id 4.4.4.4
140
2019 instructor.duoc@gmail.com
SRY
R4
ip dhcp excluded-address 10.1.1.1 10.1.1.9
!
ip dhcp pool TST
network 10.1.1.0 255.255.255.0
default-router 4.4.4.4
dns-server 4.4.4.4
domain-name tilt.org
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
141
2019 instructor.duoc@gmail.com
SRY
Configure una característica de DHCP de manera que permita que R1 pueda obtener sus
parámetros de red desde el servisor R4.
Habilite R1 para recibir los parámetros de red desde R4.
Comience a capturar tráfico en la interface Fasethernet0/0 de R1 y Fastethernet0/1 de R2 y R3
(hacia R4).
Luego que R1 haya obtenido IP compruebe que puede alcanzar al router R4.
R2
interface FastEthernet0/0
ip helper-address 4.4.4.4
ip helper-address 10.1.24.4
R3
interface FastEthernet0/0
ip helper-address 4.4.4.4
ip helper-address 10.1.34.4
R1
interface fastEthernet 0/0
ip address dhcp
no shutdown
¿Que servicios se envían por defecto cuando se utiliza DHCP Relay? Nombre cada uno y de una
pequeña explicación.
Determine cual es el camino que utiliza DHCP para entregar valores de red a R1.
142
2019 instructor.duoc@gmail.com
SRY
DHCP Snooping
PC1 debe recibir estos valores de red desde R1 (servidor DHCP). Para resguardar de posibles
ataques o intentos de suplatancionde indentidad DHCP, confgure DHCP Snooping en el SW1.
R1
interface GigabitEthernet0/0
ip address 10.1.1.1 255.255.255.0
no shut
143
2019 instructor.duoc@gmail.com
SRY
Configure como puertos de acceso los dispositivos conectados al SW1. Considere que estos
puertos de acceso:
Deben pertenecer al la VLAN 100
Deben bypasear los estados STP y pasar al estado de reenvio inmediatamente.
Solo deben aceptar una MAC por puerto. Si reciben mas de una MAC de origen deben descartarlas
pero seguir operando normalemente.
SW1
vlan 100
name ACCESO
R2
interface GigabitEthernet0/0
ip address 10.1.1.2 255.255.255.0
no shut
144
2019 instructor.duoc@gmail.com
SRY
145
2019 instructor.duoc@gmail.com
SRY
Configure DHCP Snooping de manera que solo se considere válido el trafico DHCP que se genere
en R1.
Previo a la configuración podemos confirmar que R2 envia valores DHCP al cliente PC1 como se muestra a
continuación.
SW1
ip dhcp snooping
no ip dhcp snooping information option
interface FastEthernet0/1
ip dhcp snooping trust
146
2019 instructor.duoc@gmail.com
SRY
none
Smartlog is operational on following VLANs:
none
DHCP snooping is configured on the following L3 Interfaces:
C:\>ping 10.1.1.1
Pinging 10.1.1.1 with 32 bytes of data:
Reply from 10.1.1.1: bytes=32 time=1ms TTL=255
Reply from 10.1.1.1: bytes=32 time<1ms TTL=255
Reply from 10.1.1.1: bytes=32 time<1ms TTL=255
Reply from 10.1.1.1: bytes=32 time<1ms TTL=255
147
2019 instructor.duoc@gmail.com
SRY
NAT
Setup: Configure direccionamiento y verifique que R1 tiene conectividad con sus vecinos
directamente conectados.
Configure OSPF área 0 en la zona INSIDE. R1 debe inyectar una ruta por defecto dentro del
dominio OSPF.
En R1 cree una ruta estática para la subred 4.4.4.4/24 apuntando a la interface serial de R4.
En R4 cree una ruta p
R1
router ospf 1
router-id 0.0.0.1
interface FastEthernet0/0
ip ospf 1 area 0
R2
router ospf 1
router-id 0.0.0.2
interface FastEthernet0/0
ip ospf 1 area 0
R3
router ospf 1
router-id 0.0.0.3
148
2019 instructor.duoc@gmail.com
SRY
interface FastEthernet0/0
ip ospf 1 area 0
R1
router ospf 1
default-information originate always
R1
ip route 0.0.0.0 0.0.0.0 191.1.1.40
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/16 ms
NAT Dinámico.
Este método es menos eficiente partiendo de la base que se traduce una IP a otra dinamicamente.
Cree un pool NAT que traduzca las direcciones internas de acuerdo a la siguiente tabla:
Host Direccion INSIDE Direccion OUTSIDE
R2 10.1.1.2 191.1.1.3
R3 10.1.1.3 191.1.1.3
R1
ip nat pool PUBLICO 191.1.1.2 191.1.1.5 netmask 255.255.255.0
interface Serial1/0
ip nat outside
interface FastEthernet0/0
ip nat inside
R4#debug ip icmp
ICMP packet debugging is on
R4#
*Jun 17 13:06:23.755: ICMP: echo reply sent, src 4.4.4.4, dst 191.1.1.3, topology BASE, dscp 0 topoid 0
*Jun 17 13:06:26.319: ICMP: echo reply sent, src 4.4.4.4, dst 191.1.1.4, topology BASE, dscp 0 topoid 0
150
2019 instructor.duoc@gmail.com
SRY
NAT Estático
NAT estático asigna una IP predefinida uno a uno.
Cree un pool NAT que traduzca las direcciones internas de acuerdo a la siguiente tabla:
Host Direccion INSIDE Direccion OUTSIDE
R2 10.1.1.2 191.1.1.32
R3 10.1.1.3 191.1.1.33
R1
ip nat inside source static 10.1.1.2 191.1.1.32
ip nat inside source static 10.1.1.3 191.1.1.33
R4#
*Jun 17 13:34:03.571: ICMP: echo reply sent, src 4.4.4.4, dst 191.1.1.32, topology BASE, dscp 0 topoid 0
151
2019 instructor.duoc@gmail.com
SRY
PAT
Port Address Translation permite mapear una IP Inside Global a varias IP Inside Local.
Configure PAT de manera que R2 y R3 utilicen la dirección de la interface serial de R1.
R1
ip access-list standard IN_NET
permit 10.1.1.0 0.0.0.255
152
2019 instructor.duoc@gmail.com
SRY
153
2019 instructor.duoc@gmail.com
SRY
Configure OSPF área 0 en la zona INSIDE. R2 debe inyectar una ruta por defecto dentro del
dominio OSPF.
Configure Telnet en todos los routers utilizando usuario adminX y classX donde X corresponde al
número del router. Compruebe que R2 sea el DR y R3 el BDR.
R4
router ospf 1
router-id 0.0.0.4
interface FastEthernet0/0
ip ospf 1 area 0
R2
router ospf 1
router-id 0.0.0.2
default-information originate always
interface FastEthernet0/0
ip ospf priority 255
ip ospf 1 area 0
154
2019 instructor.duoc@gmail.com
SRY
R3
router ospf 1
router-id 0.0.0.3
interface FastEthernet0/0
ip ospf priority 254
ip ospf 1 area 0
R1
line vty 0 4
privilege level 15
no login
R2
line vty 0 4
privilege level 15
no login
R3
line vty 0 4
privilege level 15
no login
R4
line vty 0 4
privilege level 15
no login
R2#telnet 10.1.12.1
Trying 10.1.12.1 ... Open
R1#
155
2019 instructor.duoc@gmail.com
SRY
R2#telnet 10.1.1.3
Trying 10.1.1.3 ... Open
R3#
R2#telnet 10.1.1.4
Trying 10.1.1.4 ... Open
R4#
R1
ip route 0.0.0.0 0.0.0.0 10.1.12.2
R1#ping 10.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/22/28 ms
R1#ping 10.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/18/28 ms
R2
ip nat pool HOST-REAL 10.1.1.3 10.1.1.4 prefix-length 24 type rotary
access-list 10 permit 10.1.34.34
interface FastEthernet0/1
ip nat outside
interface FastEthernet0/0
ip nat inside
156
2019 instructor.duoc@gmail.com
SRY
Comprobación.
R1#telnet 10.1.34.34
Trying 10.1.34.34 ... Open
R3#
R3#sh users
Line User Host(s) Idle Location
0 con 0 idle 00:07:27
* 2 vty 0 idle 00:00:00 10.1.12.1
Interface User Mode Idle Peer Address
R1#telnet 10.1.34.34
Trying 10.1.34.34 ... Open
R4#
R2#debug ip nat detailed
IP NAT detailed debugging is on
R1#telnet 10.1.34.34
Trying 10.1.34.34 ... Open
R2#
*Nov 15 21:43:35.915: NAT: Entry assigned id 3
*Nov 15 21:43:35.915: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2772]
*Nov 15 21:43:35.915: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2772]
*Nov 15 21:43:35.955: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14659]
*Nov 15 21:43:35.955: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14659]
*Nov 15 21:43:35.975: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2773]
*Nov 15 21:43:35.975: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2773]
*Nov 15 21:43:35.975: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2774]
*Nov 15 21:43:35.979: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2774]
*Nov 15 21:43:35.979: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2775]
*Nov 15 21:43:35.979: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2775]
*Nov 15 21:43:35.995: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14660]
*Nov 15 21:43:35.995: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14660]
*Nov 15 21:43:35.995
R2#: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14661]
*Nov 15 21:43:35.999: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14661]
*Nov 15 21:43:35.999: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14662]
*Nov 15 21:43:35.999: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14662]
*Nov 15 21:43:35.999: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14663]
*Nov 15 21:43:35.999: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14663]
*Nov 15 21:43:36.003: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14664]
*Nov 15 21:43:36.003: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14664]
*Nov 15 21:43:36.011: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2776]
*Nov 15 21:43:36.015: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2776]
*Nov 15 21:43:36.015: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2777]
*Nov 15 21:43:36.015: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2777]
157
2019 instructor.duoc@gmail.com
SRY
*Nov 15 21:43:36.019: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2778]
*Nov 15 21:43:36.019: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2778]
*Nov 15 21:43:36.023: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2779]
*Nov 15 21:43:36.023: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2779]
*Nov 15 21:43:36.031: NAT*: i: tcp (10.1.1.3, 23) -> (10.1.12.1, 51756) [14665]
*Nov 15 21:43:36.035: NAT*: s=10.1.1.3->10.1.34.34, d=10.1.12.1 [14665]
*Nov 15 21:43:36.235: NAT*: o: tcp (10.1.12.1, 51756) -> (10.1.34.34, 23) [2780]
*Nov 15 21:43:36.235: NAT*: s=10.1.12.1, d=10.1.34.34->10.1.1.3 [2780]
R1#telnet 10.1.34.34
Trying 10.1.34.34 ... Open
R4#
159
2019 instructor.duoc@gmail.com
SRY
HSRP NAT
R1
line vty 0 4
privilege level 15
no login
transport input all
R2
line vty 0 4
privilege level 15
no login
transport input all
R3
line vty 0 4
privilege level 15
no login
transport input all
R4
line vty 0 4
privilege level 15
no login
transport input all
160
2019 instructor.duoc@gmail.com
SRY
Configure EIGRP nombrado para toda la topología con el numero de Sistema Autonomo 123 entre
R1, R2 y R3.
Configure EIGRP nombrado para toda la topología con el numero de Sistema Autonomo 234 entre
R2, R3 y R4
Redistribuya ambos Sistemas Autónomos.
R1
router eigrp n1
address-family ipv4 unicast autonomous-system 123
network 10.1.123.0 0.0.0.255
R2
router eigrp n1
address-family ipv4 unicast autonomous-system 123
topology base
default-metric 10000 10 255 1 1500
redistribute eigrp 234
exit-af-topology
network 10.1.123.0 0.0.0.255
router eigrp n2
address-family ipv4 unicast autonomous-system 234
topology base
default-metric 10000 10 255 1 1500
redistribute eigrp 123
exit-af-topology
network 10.1.234.0 0.0.0.255
R3
router eigrp n1
address-family ipv4 unicast autonomous-system 123
topology base
default-metric 10000 10 255 1 1500
redistribute eigrp 234
exit-af-topology
network 10.1.123.0 0.0.0.255
router eigrp n2
address-family ipv4 unicast autonomous-system 234
topology base
default-metric 10000 10 255 1 1500
redistribute eigrp 123
exit-af-topology
network 10.1.234.0 0.0.0.255
R4
router eigrp n2
address-family ipv4 unicast autonomous-system 234
161
2019 instructor.duoc@gmail.com
SRY
R4#traceroute 10.1.123.1
162
2019 instructor.duoc@gmail.com
SRY
163
2019 instructor.duoc@gmail.com
SRY
R1#traceroute 10.1.234.4
Type escape sequence to abort.
Tracing the route to 10.1.234.4
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.123.2 16 msec
10.1.123.3 8 msec
10.1.123.2 12 msec
2 10.1.234.4 16 msec 36 msec 24 msec
R2
interface FastEthernet0/0
standby 10 ip 10.1.123.254
standby 10 priority 150
standby 10 preempt
standby 10 name SITIO-1
standby 10 track 1 decrement 51
interface FastEthernet0/1
standby 20 ip 10.1.234.254
standby 20 priority 150
standby 20 preempt
standby 20 name SITIO-2
standby 20 track 2 decrement 51
R3
interface FastEthernet0/0
standby 10 ip 10.1.123.254
standby 10 preempt
standby 10 name SITIO-1
standby 10 track 1 decrement 51
interface FastEthernet0/1
standby 20 ip 10.1.234.254
standby 20 preempt
standby 20 name SITIO-2
standby 20 track 2 decrement 51
164
2019 instructor.duoc@gmail.com
SRY
165
2019 instructor.duoc@gmail.com
SRY
R2
interface FastEthernet0/0
ip nat inside
interface FastEthernet0/1
ip nat outside
R3
interface FastEthernet0/0
ip nat inside
interface FastEthernet0/1
ip nat outside
R1#telnet 10.1.234.4
Trying 10.1.234.4 ... Open
R4#
R4#sh users
Line User Host(s) Idle Location
0 con 0 idle 00:18:10
* 2 vty 0 idle 00:00:00 10.1.234.1
Interface User Mode Idle Peer Address
166
2019 instructor.duoc@gmail.com
SRY
R2
interface fastEthernet 0/1
shutdown
Como podemos observar, R2 tiene el rol active hasta que la interface FastEthernet 0/1 se desactiva, en
ese momento baja su prioridad qa 99por lo que R3 toma el rol Activo con prioridad 100.
167
2019 instructor.duoc@gmail.com
SRY
Setup: Configure direccionamiento y verifique que R1 tiene conectividad con sus vecinos
directamente conectados.
1. Configure OSPF en Inside y DMZ utilice OSPF área 0 y publique las loopback0 de R2 y R3. Cree
una ruta por defecto en R1 apuntando a R4. R1 debe inyectar una ruta por defecto a través de
OSPF. En R4 cree rutas estáticas para alcanzar las redes INSIDE y DMZ. Antes de seguir con la
siguiente tarea compruebe que tiene conectividad end to end.
2. Configure NAT en R1 de manera que convierta la IP del server 10.1.13.3 (R3) a la dirección
pública 100.1.1.100. Desde Internet se podrá acceder a las aplicaciones del servidor (DMZ)
utilizando la IP 100.1.1.100. Configure PAT de manera que todos los hosts que pertenecen a la
INSIDE utilicen la IP de la interface serial 1/0 de R1.
R1
router ospf 1
router-id 1.1.1.1
default-information originate always
R2
interface FastEthernet0/0
ip ospf network point-to-point
ip ospf 1 area 0
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
R3
interface FastEthernet0/1
168
2019 instructor.duoc@gmail.com
SRY
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
R4
ip route 2.0.0.0 255.0.0.0 Serial1/0
ip route 3.0.0.0 255.0.0.0 Serial1/0
ip route 10.0.0.0 255.0.0.0 Serial1/0
R1#sh ip route
Gateway of last resort is 100.1.1.4 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 100.1.1.4
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
O 2.2.2.0 [110/2] via 10.1.12.2, 00:01:02, FastEthernet0/0
3.0.0.0/24 is subnetted, 1 subnets
O 3.3.3.0 [110/2] via 10.1.13.3, 00:00:40, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.12.0/24 is directly connected, FastEthernet0/0
L 10.1.12.1/32 is directly connected, FastEthernet0/0
C 10.1.13.0/24 is directly connected, FastEthernet0/1
L 10.1.13.1/32 is directly connected, FastEthernet0/1
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 100.1.1.0/24 is directly connected, Serial1/0
L 100.1.1.1/32 is directly connected, Serial1/0
R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/54/72 ms
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/76/92 ms
R1#ping 4.4.4.4
169
2019 instructor.duoc@gmail.com
SRY
R2#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/62/92 ms
R3#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/72/84 ms
R4#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/105/136 ms
R4#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/121/132 ms
R1
interface Serial1/0
description **A R4**
ip nat outside
interface FastEthernet0/0
description **A R2**
ip nat inside
interface FastEthernet0/1
description **A R3**
ip nat inside
R2#ping 4.4.4.4
Type escape sequence to abort.
170
2019 instructor.duoc@gmail.com
SRY
R3#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/74/100 ms
3. Habilite telnet en el servidor DMZ (R3) y compruebe que el servicio HTTP está activo desde la
OUTSIDE.
R3
ip http server
line vty 0 4
exec-timeout 0 0
password cisco
login
transport input all
171
2019 instructor.duoc@gmail.com
SRY
R4#telnet 100.1.1.100 80
Trying 100.1.1.100, 80 ... Open
R4#telnet 100.1.1.100
Trying 100.1.1.100 ... Open
Password:cisco
Definición de zonas
4. Cree y asigne a la interface correspondiente la zona OUTSIDE (serial1/0), INSIDE
(FasEthernet0/0) y DMZ (FastEthernet0/1).
R1
zone security OUTSIDE
description INTERNET
interface Serial1/0
zone-member security OUTSIDE
interface FastEthernet0/0
zone-member security INSIDE
interface FastEthernet0/1
zone-member security DMZ
Puesto que aun no hemos definidos las acciones (políticas), los paquetes serán descartados.
R1#
FIREWALL: ret_val 0 is not PASS_PAK
R1#
FIREWALL*: ret_val 0 is not PASS_PAK
FIREWALL*: ret_val NO_ACTION, but not valid router traffic .Dropping pak
R1#
FIREWALL: ret_val 0 is not PASS_PAK
R1#
R1#u all
All possible debugging has been turned off
Políticas ZBF:
5. P1: No se permite el tráfico de paquetes desde la DMZ a cualquier otra zona. P2: No se
permite el tráfico iniciado desde la zona OUTSIDE a la zona INSIDE.
R1
En ambos casos no es necesario configuración alguna puesto que el valor por defecto es denegar
cualquier tráfico de datos.
6. P3: Se permite el tráfico http/https desde la zona OUTSIDE a la zona DMZ. En este caso se permitirá
desde cualquier origen desde Internet al HTTP server 100.1.1.100, y HTTPS server 100.1.1.100.
R1#show access-lists
Extended IP access list 100
10 permit ip 10.1.12.0 0.0.0.255 any
R1
access-list 111 permit tcp any host 100.1.1.100 eq www
access-list 111 permit tcp any host 100.1.1.100 eq 23
R1
policy-map type inspect PM-OD
class type inspect CM-OD-HTTP
inspect
class type inspect CM-OD-HTTPS
inspect
class class-default
drop
R4#telnet 100.1.1.100 80
Trying 100.1.1.100, 80 ... Open
R1#
*Sep 7 09:16:15.071: FIREWALL: FW CCE got packet 0x682A5218 in process path
*Sep 7 09:16:15.075: FIREWALL: Multicast pak 0x682A5218, let it pass
*Sep 7 09:16:15.771: FIREWALL: FW CCE got packet 0x682A56E4 in process path
*Sep 7 09:16:15.771: FIREWALL: Multicast pak 0x682A56E4, let it pass
R1
class-map type inspect match-any CM-IO
match protocol tcp
match protocol ftp
match protocol icmp
class class-default
drop
175
2019 instructor.duoc@gmail.com
SRY
R1
class-map type inspect match-any CM-ID
match protocol ftp
match protocol https
match protocol icmp
9. P6: Para evitar ataques DoS se deben permitir solo 1000 conexiones válidas, además entre 100
y 500 conexiones embrionarias (conexiones TCP incompletas).
R1
parameter-map type inspect SESION
max-incomplete low 100
max-incomplete high 500
sessions maximum 1000
Test P3
R4#telnet 100.1.1.100 80
Trying 100.1.1.100, 80 ... Open
policy exists on zp OD
Zone-pair: OD
Inspect
Inspect
177
2019 instructor.duoc@gmail.com
SRY
policy exists on zp OD
Zone-pair: OD
Inspect
Inspect
178
2019 instructor.duoc@gmail.com
SRY
R4
ip http server
line vty 0 4
exec-timeout 0 0
password cisco
login
transport input all
R2#telnet 4.4.4.4 80
Trying 4.4.4.4, 80 ... Open
Inspect
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
policy exists on zp IO
Zone-pair: IO
Inspect
180
2019 instructor.duoc@gmail.com
SRY
policy exists on zp ID
Zone-pair: ID
Inspect
181
2019 instructor.duoc@gmail.com
SRY
policy exists on zp ID
Zone-pair: ID
Inspect
Zone: OUTSIDE
Description: INTERNET
Member Interfaces:
Serial1/0
Zone: INSIDE
Description: ZONA-SEGURA
Member Interfaces:
FastEthernet0/0
Zone: DMZ
Description: SERVER
Member Interfaces:
182
2019 instructor.duoc@gmail.com
SRY
FastEthernet0/1
Zone-pair : OD
Source Zone : OUTSIDE
Destination Zone : DMZ
Service-policy inspect : PM-OD
Class-map : CM-OD-HTTP(match-all)
Match protocol http
Action : inspect
Parameter-map : SESION
Class-map : CM-OD-HTTPS(match-all)
Match protocol https
Action : inspect
Parameter-map : SESION
Class-map : class-default(match-any)
Match any
Action : drop log
Parameter-map : Default
Zone-pair : IO
Source Zone : INSIDE
Destination Zone : OUTSIDE
Service-policy inspect : PM-IO
Class-map : CM-IO(match-any)
Match protocol tcp
Match protocol ftp
Match protocol icmp
Action : inspect
Parameter-map : Default
Class-map : class-default(match-any)
Match any
Action : drop log
Parameter-map : Default
Zone-pair : ID
Source Zone : INSIDE
Destination Zone : DMZ
Service-policy inspect : PM-ID
Class-map : CM-ID(match-any)
Match protocol ftp
Match protocol https
Match protocol icmp
Action : inspect
Parameter-map : Default
Class-map : class-default(match-any)
Match any
183
2019 instructor.duoc@gmail.com
SRY
Parameter-map Config:
Global:
alert on
sessions maximum 2147483647
waas disabled
l2-transparent dhcp-passthrough disabled
log dropped-packets disabled
log summary disabled
max-incomplete low 18000
max-incomplete high 20000
one-minute low 2147483647
one-minute high 2147483647
tcp reset-PSH disabled
Default:
audit-trail off
alert on
max-incomplete low 2147483647
max-incomplete high 2147483647
one-minute low 2147483647
one-minute high 2147483647
udp idle-time 30
icmp idle-time 10
dns-timeout 5
tcp idle-time 3600
tcp finwait-time 5
tcp synwait-time 30
tcp max-incomplete host 4294967295 block-time 0
sessions maximum 2147483647
184
2019 instructor.duoc@gmail.com
SRY
GRE Recursivo
Setup: Configure direccionamiento y verifique que R1 tiene conectividad con sus vecinos
directamente conectados.
R1
router ospf 1
router-id 0.0.0.1
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 0
interface FastEthernet0/0
ip ospf 1 area 0
R2
router ospf 1
router-id 0.0.0.2
interface FastEthernet0/0
ip ospf 1 area 0
185
2019 instructor.duoc@gmail.com
SRY
interface FastEthernet0/1
ip ospf 1 area 1
R3
router ospf 1
router-id 0.0.0.3
interface Loopback0
ip ospf network point-to-point
ip ospf 1 area 1
interface FastEthernet0/1
ip ospf 1 area 1
186
2019 instructor.duoc@gmail.com
SRY
Luego de comprobar que exista conectividad entre las loopback0s de R1 y R3 cree un tunnel GRE
entre R1 y R3 utilizando la subred 172.16.1.0/24. Considere los siguientes valores:
R1
interface Tunnel13
ip address 172.16.1.1 255.255.255.0
tunnel source Loopback0
tunnel destination 3.3.3.3
R3
interface Tunnel13
ip address 172.16.1.3 255.255.255.0
tunnel source Loopback0
tunnel destination 1.1.1.1
R3#ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/64/100 ms
187
2019 instructor.duoc@gmail.com
SRY
Configure EIGRP de 64 bits utilizando el Sistema Autónomo 1 entre R1 y R3 a través del túnel.
Publique las interfaces loopback0 en EIGRP.
R1
router eigrp n1
address-family ipv4 unicast autonomous-system 1
network 1.1.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
eigrp router-id 1.1.1.1
R3
router eigrp n1
address-family ipv4 unicast autonomous-system 1
network 3.3.3.0 0.0.0.255
network 172.16.1.0 0.0.0.255
eigrp router-id 3.3.3.3
R3#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel13, changed state to up
R3#
%DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 172.16.1.1 (Tunnel13) is up: new adjacency
%ADJ-5-PARENT: Midchain parent maintenance for IP midchain out of Tunnel13 - looped chain
attempting to stack
R3#
%TUN-5-RECURDOWN: Tunnel13 temporarily disabled due to recursive routing
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel13, changed state to down
%DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 172.16.1.1 (Tunnel13) is down: interface down
188
2019 instructor.duoc@gmail.com
SRY
R1
interface FastEthernet0/0
ip address 10.1.12.1 255.255.255.0
no shut
R2
interface FastEthernet0/0
ip address 10.1.12.2 255.255.255.0
no shut
interface FastEthernet0/1
ip address 10.1.23.2 255.255.255.0
no shut
R3
interface FastEthernet0/1
ip address 10.1.23.3 255.255.255.0
no shut
189
2019 instructor.duoc@gmail.com
SRY
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
router eigrp n1
address-family ipv4 unicast autonomous-system 10
network 1.1.1.1 0.0.0.0
network 10.1.12.0 0.0.0.255
R2
router eigrp n2
address-family ipv4 unicast autonomous-system 10
network 10.1.12.0 0.0.0.255
network 10.1.23.0 0.0.0.255
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
router eigrp n3
address-family ipv4 unicast autonomous-system 10
network 3.3.3.3 0.0.0.0
network 10.1.23.0 0.0.0.255
190
2019 instructor.duoc@gmail.com
SRY
Cree el tunnel 13 para IPv6 entre R1 y R6 utilizando las loopback 0 para esta tarea. Utilice la subred 13::/64.
R1
interface Tunnel13
ipv6 address FE80::1 link-local
ipv6 address 13::1/64
tunnel source Loopback0
tunnel destination 3.3.3.3
R3
interface Tunnel13
ipv6 address FE80::3 link-local
ipv6 address 13::3/64
tunnel source Loopback0
tunnel destination 1.1.1.1
191
2019 instructor.duoc@gmail.com
SRY
Realice el siguiente ping extendido en R1. Capture datos en la inteface FastEthernet0/1 de R3. Compruebe
que el valor de DSCP en el paquete IPv4.
¿Qué valor tiene el DSCP, el valor se transfiere al paquete IPv6? ¿Por qué?
Configure EIGRP 10 para IPv6 de manera que exista adyacencia EIGRP entre R1 y R3.
R3
router eigrp n3
address-family ipv6 unicast autonomous-system 10
neighbor FE80::1 Tunnel13
eigrp router-id 3.3.3.3
R1
router eigrp n1
address-family ipv6 unicast autonomous-system 10
neighbor FE80::3 Tunnel13
eigrp router-id 1.1.1.1
De acuerdo a los datos obtenidos de los mensajes EIGRP para IPv6, determine el nivel de encapsulación de
los paquetes.
192
2019 instructor.duoc@gmail.com
SRY
IPSec Site-to-Site I
Paso1.
Setup: Crear el direccionamiento mostrado. Configurar EIGRP 1y publique todas sus interfaces
directamente conectadas. Verificar que tenemos comunicación entre R1 y R3
R1
crypto isakmp enable
R3
crypto isakmp enable
193
2019 instructor.duoc@gmail.com
SRY
194
2019 instructor.duoc@gmail.com
SRY
R1
crypto isakmp key 0 cisco address 10.1.12.2
R2
crypto isakmp key 0 cisco address 10.1.12.1
195
2019 instructor.duoc@gmail.com
SRY
b. En R1 y R3 crear un transform set con una etiqueta de TS ustilizar ESP con un AES con ESP y hash
SHA.
IPSec transform set: especifica algoritmos de criptografía y funciones (transforms) que un router emplea
sobre los actuales paquetes de datos enviados a través del túnel IPSec. Este algoritmo incluye:
o Encriptación.
o Encapsulación.
o Autenticación.
o Integridad de datos.
Paso6: Definir tráfico interesante. En este escenario el tráfico interesante debe ser el que se origina en la
red 100.1.1.0/24 para R1, y la red 200.2.2.0/24 para R3.
R1
access-list 100 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
R3
access-list 100 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255
196
2019 instructor.duoc@gmail.com
SRY
Verificación IPSec
interface: FastEthernet0/1
Crypto map tag: MAP, local addr 10.1.23.3
inbound ah sas:
outbound ah sas:
198
2019 instructor.duoc@gmail.com
SRY
IPSec Site-to-Site II
1. Configurar direccionamiento mostrado y habilite Frame Relay como muestra la figura, deshabilite
mapeo dinámico. Los routers del core deben estar en la misma subred. Configure enrutamiento
estático en el core de manera R1 y R3 tengan comunicación bidireccinal. En los routers de Sitio
configure una ruta por defecto.
R1
interface Serial1/0
ip address 20.1.123.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 20.1.123.2 102 broadcast
frame-relay map ip 20.1.123.3 102 broadcast
no frame-relay inverse-arp
no shutdown
R2
interface s1/0
encapsulation frame-relay
no shutdown
R3
interface Serial1/0
ip address 20.1.123.3 255.255.255.0
encapsulation frame-relay
frame-relay map ip 20.1.123.2 302 broadcast
frame-relay map ip 20.1.123.1 302 broadcast
no frame-relay inverse-arp
no shutdown
R1#ping 20.1.123.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.1.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/61/76 ms
R3#ping 20.1.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.1.123.1, timeout is 2 seconds:
199
2019 instructor.duoc@gmail.com
SRY
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/85/96 ms
R1
crypto isakmp policy 10
authentication pre-share
R3
crypto isakmp policy 10
authentication pre-share
R1
crypto isakmp key 0 class address 20.1.123.3
R3
crypto isakmp key 0 class address 20.1.123.1
6. Configure Transform Set habilitando ESP para autenticación, encriptación e integridad. Utilice los
algoritmos más seguros.
R1
crypto ipsec transform-set TS esp-des esp-md5-hmac
R3
crypto ipsec transform-set TS esp-des esp-md5-hmac
200
2019 instructor.duoc@gmail.com
SRY
R1
access-list 100 permit ip 172.16.14.0 0.0.0.255 172.16.35.0 0.0.0.255
R3
access-list 100 permit ip 172.16.35.0 0.0.0.255 172.16.14.0 0.0.0.255
8. Cree el crypto map estaleciendo peering R1↔ R3. Habilite el crypto map en la interface serial de
ambos routers.
R1
crypto map MAP 10 ipsec-isakmp
set peer 20.1.123.3
set transform-set TS
match address 100
interface Serial1/0
crypto map MAP
R3
crypto map MAP 10 ipsec-isakmp
set peer 20.1.123.1
set transform-set TS
match address 100
interface Serial1/0
crypto map MAP
Al final del ejercicio debemos ver algo similar a las siguientes salidas:
interface: Serial1/0
Crypto map tag: MAP, local addr 20.1.123.1
inbound ah sas:
outbound ah sas:
202
2019 instructor.duoc@gmail.com
SRY
DMVPN
R2#ping 255.255.255.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:
.
Reply to request 1 from 10.1.12.1, 84 ms
Reply to request 1 from 10.1.25.5, 88 ms
Reply to request 1 from 10.1.24.4, 84 ms
Reply to request 1 from 10.1.23.3, 84 ms
Reply to request 2 from 10.1.25.5, 124 ms
Reply to request 2 from 10.1.23.3, 128 ms
Reply to request 2 from 10.1.24.4, 124 ms
Reply to request 2 from 10.1.12.1, 124 ms
Reply to request 3 from 10.1.24.4, 76 ms
Reply to request 3 from 10.1.25.5, 80 ms
Reply to request 3 from 10.1.12.1, 80 ms
203
2019 instructor.duoc@gmail.com
SRY
Configure una ruta estática por defecto en los routers R1, R3, R4 y R5 apuntando al router R2.
R1
ip route 0.0.0.0 0.0.0.0 10.1.12.2
R3
ip route 0.0.0.0 0.0.0.0 10.1.23.2
R4
ip route 0.0.0.0 0.0.0.0 10.1.24.2
R5
ip route 0.0.0.0 0.0.0.0 10.1.25.2
R1#ping 10.1.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/116/136 ms
R1#ping 10.1.24.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.24.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/101/124 ms
R1#ping 10.1.25.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.25.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/120/140 ms
R3#ping 10.1.24.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.24.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/116/160 ms
R3#ping 10.1.25.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.25.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/117/136 ms
R4#ping 10.1.25.5
Type escape sequence to abort.
204
2019 instructor.duoc@gmail.com
SRY
Configure DMVPN fase 1 considerando los roles: R1-> HUB, R3, R4 y R5 los Spokes. Utilice la subred
172.16.1.0/24. Al finalizar esta tarea, Hub & Spkes deben tener conectividad end to end.
R1
interface Tunnel0
ip address 172.16.1.1 255.255.255.0
no ip redirects
ip nhrp map 172.16.1.3 10.1.23.3
ip nhrp map 172.16.1.4 10.1.24.4
ip nhrp map 172.16.1.5 10.1.25.5
ip nhrp network-id 1
tunnel source 10.1.12.1
tunnel mode gre multipoint
R3
interface Tunnel0
ip address 172.16.1.3 255.255.255.0
no ip redirects
ip nhrp map 172.16.1.1 10.1.12.1
ip nhrp map 172.16.1.4 10.1.24.4
ip nhrp map 172.16.1.5 10.1.25.5
ip nhrp network-id 3
205
2019 instructor.duoc@gmail.com
SRY
R4
interface Tunnel0
ip address 172.16.1.4 255.255.255.0
no ip redirects
ip nhrp map 172.16.1.1 10.1.12.1
ip nhrp map 172.16.1.3 10.1.23.3
ip nhrp map 172.16.1.5 10.1.25.5
ip nhrp network-id 4
tunnel source 10.1.24.4
tunnel mode gre multipoint
R5
interface Tunnel0
ip address 172.16.1.5 255.255.255.0
no ip redirects
ip nhrp map 172.16.1.1 10.1.12.1
ip nhrp map 172.16.1.3 10.1.23.3
ip nhrp map 172.16.1.4 10.1.24.4
ip nhrp network-id 5
tunnel source 10.1.25.5
tunnel mode gre multipoint
R1#show ip nhrp
172.16.1.3/32 via 172.16.1.3
Tunnel0 created 00:15:58, never expire
Type: static, Flags:
NBMA address: 10.1.23.3
172.16.1.4/32 via 172.16.1.4
Tunnel0 created 00:15:47, never expire
Type: static, Flags:
NBMA address: 10.1.24.4
172.16.1.5/32 via 172.16.1.5
Tunnel0 created 00:15:40, never expire
Type: static, Flags:
NBMA address: 10.1.25.5
R1#ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 132/145/184 ms
R1#ping 172.16.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 124/145/172 ms
R1#ping 172.16.1.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.5, timeout is 2 seconds:
206
2019 instructor.duoc@gmail.com
SRY
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/141/168 ms
R3#ping 172.16.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/123/140 ms
R3#ping 172.16.1.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/140/148 ms
R4#ping 172.16.1.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 128/137/152 ms
R3#show ip nhrp
172.16.1.1/32 via 172.16.1.1
Tunnel0 created 00:12:14, never expire
Type: static, Flags: used
NBMA address: 10.1.12.1
172.16.1.4/32 via 172.16.1.4
Tunnel0 created 00:12:14, never expire
Type: static, Flags: used
NBMA address: 10.1.24.4
172.16.1.5/32 via 172.16.1.5
Tunnel0 created 00:12:14, never expire
Type: static, Flags: used
NBMA address: 10.1.25.5
R1#show debugging
Generic IP:
IP packet debugging is on (detailed)
208
2019 instructor.duoc@gmail.com