Professional Documents
Culture Documents
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW1_172
SW1_172(config)#no ip domain-lookup
SW1_172(config)#enable password luis
SW1_172(config)#banner motd # LUIS VIVAS #
SW1_172(config)#enable password {contrasea}
SW1_172(config)#service password encryption (encriptar las contraseas)
R2(config)#
R2(config)#line console 0 (se ingresa al modo de consola en linea 0)
R2(config-line)#login local (este comando exige el usuario y contrasea)
R2(config-line)#logging synchronous (evita que los mensajes inesperados que
aparecen en
pantalla, nos desplacen los comandos que estamos escribiendo en el
momento.)
-----------------------------------------------------------------------------------
-----
CREACION DE UNA INTERFAZ LOOPBACK
interface Loopback 1
ip address 10.10.20.10 255.255.255.248
no shutdown
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
CONFIGURACION DEL SWITCH
-CREACION DE VLAN CON SUS RESPECTIVOS NOMBRES
-ASIGNACION DE IP A UNA INTERFAZ VLAN CON SU RESPECTIVA MASCARA(POR LO GENERAL A LA
VLAN DE ADMINISTRACION,ESTO HACE QUE EL SWITCH TENGA UNA DIRECCION IP PARA PODER
SER RECONOCIDO EN LA RED)
SW1_172(config)#vlan 24
SW1_172(config-vlan)#name compras
SW1_172(config-vlan)#vlan 5
SW1_172(config-vlan)#name ventas
SW1_172(config-vlan)#vlan 10
SW1_172(config-vlan)#name administracion
SW1_172(config-vlan)#exit
SW1_172(config)#interface vlan 10
SW1_172(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
SW1_172(config-if)#ip address 172.16.10.2 255.255.255.248
SW1_172(config-if)#no shutdown
SW1_172(config-if)#exit
SW1_172(config)#ip default-gateway 172.16.10.1
-----------------------------------------------------------------------------------
-----------
PONER LA PUERTA EN ENLACE EN LA SUBINTERFAS DE LA VLAN DE ADMINISTRACION SSH
Router(config)#interface g
Router(config)#interface gigabitEthernet 0/1.99
Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1.99, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1.99, changed
state to up
Router(config-subif)#en
Router(config-subif)#encapsulation do
Router(config-subif)#encapsulation dot1Q 99
Router(config-subif)#ip add
Router(config-subif)#ip address 10.10.30.9 255.255.255.0
Router(config-subif)#no sh
Router(config-subif)#no shutdown
Router(config-subif)#exit
Router(config)#
SE HACE EL ENRUTAMIENTO EN CADA ROUTER PARA QUE SE VEA EN SSH CON CADA UNA DE LAS
SUBREDES QUE HAY
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
CONFIGURACION EN SWITCH
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
INTERVLAN EN ROUTER
SW1_172#show ip ssh
SSH Enabled - version 1.99
Authentication timeout: 120 secs; Authentication retries: 3
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
ACL PARA LINEAS VTY PARA CUANDO SE VAYA A RESTRINGIR O PERMITIR ACCESO REMOTO
*se configuran en el equipo donde se vaya a implementar el ACCESS LIST
ACL PARA INTERFACES FISICAS DEL EQUIPO Y ASI FILTRAR TRAFICO ENTRE DIFERENTES
SUBREDES
-----------------------------------------------------------------------------------
-------
COMANDO PARA QUE Un ROUTER ENTREGUE DHCP A UNA SUBRED DE OTRO ROUTER
(el permiso se pide en la interfaz del router donde esta la subred
a la que le daran permiso)
interface g0/0
ip helper-address {network}
TENGO QUE ENTRAR ALA INTERFAZ DE LA VLAN SI TIENES VLAN CREADA
-----------------------------------------------------------------------------------
------------------------------------
PERMITIR DHCP CUANDO HACES ACL Y TE DENIEGA EL SERVICIO DE DHCP DEL SERVIDOR A LOS
CLIENTES
Router(config)#access-list 102 permit udp any any eq ?
<0-65535> Port number
bootpc Bootstrap Protocol (BOOTP) client (68)
bootps Bootstrap Protocol (BOOTP) server (67)
domain Domain Name Service (DNS, 53)
isakmp Internet Security Association and Key Management Protocol (500)
non500-isakmp Internet Security Association and Key Management Protocol
(4500)
snmp Simple Network Management Protocol (161)
tftp Trivial File Transfer Protocol (69)
Router(config)#access-list 102 permit udp any any eq boot
Router(config)#access-list 102 permit udp any any eq boo
Router(config)#access-list 102 permit udp any any eq bootpc
Router(config)#access-list 102 permit udp any any eq bootps
Router(config)#
-----------------------------------------------------------------------------------
-------
ACL EXTENDIDA PARA DENEGAR A DETERMINADA SUBRED EL ACCESO AL SERVIcIO WEB y FTP
(SE COLOCA LO MAS CERCANO AL ROUTER del servidor en la interfaz de salida)
R3(config)#access-list 110 deny tcp 192.168.10.0 0.0.0.127 any eq 80(WEB)
R3(config)#access-list 111 deny tcp 192.168.10.0 0.0.0.127 any eq 21(FTP)
R3(config)#access-list 110 permit ip any any
R3(config)#interface serial 0/0/0
R3(config-if)#ip access-group 110 in
R3(config-if)#exit
R3#show access-lists
Extended IP access list 111
10 deny tcp 192.168.20.0 0.0.0.63 any eq www
20 deny tcp 192.168.10.0 0.0.0.127 any eq ftp
30 permit ip any any (12 match(es))
-----------------------------------------------------------------------------------
-------
DHCP EN SWITCH
-----------------------------------------------------------------------------------
--------
ENRUTAMIENTO DINAMICO
router ospf 1
log-adjacency-changes
redistribute static metric 200 subnets
network 10.10.10.8 0.0.0.7 area 1
network 192.168.10.60 0.0.0.3 area 1
network 192.168.10.48 0.0.0.3 area 1
network 192.168.10.52 0.0.0.3 area 1
-----------------------------------------------------------------------------------
-------
router rip
version 2
redistribute static
network 10.0.0.0
network 192.168.10.0
no auto-summary
-----------------------------------------------------------------------------------
-----
ACCESs- LIST
para denegar ping y permitir entrega de servicios