This is a draft cheat sheet. It is a work in progress and is not finished yet.
Comandos ingreso y basicos
Router>enable |
Router#configure terminal |
Switch(config)#do copy r s |
Presionar tabulador completa la palabra |
Router#configure "?" el signo de pregunta sirve para ayudar a saber que palabra viene despues |
Router(config)#do ping *<ping destino> |
Router(config)#do tracert o tracer <ip destino> |
Router#show running-config |
Configuracion interfaces
Router(config)#interface <nombre interfaz><numero de interfaz> |
Router(config-if)#ip address <ip> <mascara> |
Router(config-if)#no shutdown |
Router(config-if)#clock rate 56000 <seriales con reloj> |
Router(config-if)# ipv6 address <ipv6> |
Router#show ip interface brief |
Router(config-if)#ip address dhcp <la interfaz recibe ip por DHCP> |
Seguridad
Router(config)#enable password password |
Router(config)#enable secret password |
Router(config)#service password-encryption |
Router(config)#line console 0 |
Router(config-line)#password password |
Router(config-line)#login |
Router(config)#line vty 0 4 |
Router(config-line)#password password |
Router(config-line)#login |
Router(config)#banner motd $ esciribir mensaje y utilizar el $ para finalizar el mensaje |
Resetear router
!.Reinicar router 2. CTRL+B mientras cargan los astericos |
Rommon 1>confreg 0x2142 |
Rommon 2>reset |
Enrutamiento estatico
Router(config)#ip route <red destino> <mascara destino> <salto o interfaz salida> |
Router(config)#ip route 0.0.0.0. 0.0.0.0 <salto> predeterminada |
Router#show ip route |
Configutacion SSH
Router(config)#hostname name |
Router(config)#ip domain-name nombre de dominio |
Router(config)#crypto key generate rsa |
Router(config)#1024 |
Router(config)#username username privilege 15 password password |
Router(config)#line vty 0 15 |
Router(config-line)#transport input ssh |
Router(config-line)#login local |
Router(config)# ip ssh version 2 |
SWITCH |
Switch(config)#interface vlan 10 |
Switch(config-if)#ip address <> <> |
Switch(config)#ip default-gateway <ip interfaz router> |
configuracion OSPF
Router(config)#router ospf 1 |
Router(config-router)#network <ip red> <wilcard> area 0 "redes direct conect" |
Router(config-router)#redistribute static subnets <inyecta rutas staticas> |
Router(config-router)#default-information originate |
Router#show ip ospf neighbor |
Router#show ip protocols |
Configuracion OSPFv6
Router(config)#ipv6 router ospf 1 |
Router(config)#ipv6 unicast-routing |
Router(config-rtr)#router-id "nombre" |
Router(config-if)#ipv6 ospf 1 area 0 |
Resetear switch
Reiniciar router presionar Boton del switch y esperar a que carge switch: |
switch: flash_init |
switch: dir flash: |
switch: delete vlan.dat.renamed |
switch: delete config.text.renamed |
switch: reset |
Configuracion VLAN router
Router |
Router(config)#interface g0/0.10 |
Router(config-subif)#encapsulation dot1Q 10 |
Router(config-subif)#ip address <> <> |
Router(config)#interface g0/0 |
Router(config-if)#no shutdown |
Configuracion VLANSwitch
Switch(config)#vlan 10 |
Switch(config)#interface vlan 10 |
Switch(config-vlan)#name nombre |
Switch(config)#interface range f0/1-24 |
Switch(config-if-range)#switchport access vlan 10 |
Switch(config)#interface range g0/1-2 |
Switch(config-if-range)#switchport mode trunk |
Switch(config)#do show vlan brief |
Configuracion DHCP
Router(config)#ip dhcp pool name |
Router(dhcp-config)#network <ip de la red> <mascara de la red> |
Router(dhcp-config)#default-router ip interfaz de salida |
Router(dhcp-config)#dns-server ip DNS |
Router#show ip dhcp binding |
Router#show ip dhcp pool name |
Configuracion DHCPV6
Router(config)#ipv6 dhcp pool "nombre" |
Router(config-dhcpv6)#dns-server ip DNS |
Router(config-if)#ipv6 dhcp server "nombre" |
ACL extendida
CERCA DEL ORIGEN |
Router(config)#access-list 101 permit tcp host 10.1.1.2 host 172.16.1.1 eq telnet |
Router(config)#access-list 101 permit ip any any |
Router(config-if)#ip access-group 101 in or out |
OTRA FORMA PARA CREAR ACL EXTENDIDA |
Router(config)#ip access-list extended <nombre o numero 100-199> |
Router(config-ext-nacl)#permit tcp host 10.1.1.2 host 172.16.1.1 eq telnet |
Router(config-if)#ip access-group 101 in or out |
NAT dinamico
Router(config)#ip nat pool <nombre> <start ip address> <end ip address>" nestmask <mask>* |
Router(config)#access-list 1 permit <ip red> <wilcard red> |
Router(config)#ip nat inside source list 1 pool <nombre> |
Router(config-if)#ip nat inside |
Router(config-if)#ip nat outside |
Router(config)#do show ip nat translation |
ACL estandar
CERCA DEL DESTINO |
Router(config)#access-list 1 permit <red ip 1-99> <mask red> |
Router(config)#access-list 1 permit ip any |
Otra forma para crear una ACL Standar |
Router(config)#ip access-list standard <nombre o numero 1-99> |
Router(config-std-nacl)#permit <red> <wildcard> |
Router(config-if)#ip access-group nombre o numero in or out |
NAT estatico
Router(config)#ip nat inside source static *<ip privada host> <ip public> |
Router(config)#interface g0/0 |
Router(config-if)#ip nat outside |
Router(config)#interface g0/1 |
Router(config-if)#ip nat inside |
Router(config)#do show ip nat translation |
PAT
Router(config)#access-list 1 permit <ip de red> <wilcard> |
Router(config)#ip nat inside source list 1 interface g0/0 overload |
Router(config-if)#ip nat inside |
Router(config-if)#ip nat outside |
Router(config)#do show ip nat translation |
Spanning-tree
Switch(config)#do show spanning-tree |
Switch(config)#spanning-tree vlan <id-vlan> root {primary | secondary} |
Switch(config)#spanning-tree vlan <numero> priority <numero> |
Switch(config)#no spanning-tree desactivar spanning-tree |
VTP Vlan Trunk Protocols
Primero crear las VLAN |
Switch(config)#vtp domain <nombre cualquiera> |
Switch(config)#vtp password <clave cualquiera> |
Switch(config)#vtp mode client, server o transparent |
Switch(config)#do show vtp status |
PORT-SECURITY
Switch01(config-if)# switchport mode access |
Switch01(config-if)#switchport port-security |
switchport port-security violation { protect | restrict | shutdown } |
MAC UNICA |
Switch01(config-if)#switchport port-security maximum 1 |
Switch01(config-if)# switchport port-security violation shutdown |
Switch01(config-if)# switchport port-security mac-address 0a04.aaf8.13ad |
PORT STICKY |
Switch01(config-if)# switchport mode access |
Switch01(config-if)#switchport port-security |
Switch01(config-if)#switchport port-security maximum 1 |
Switch01(config-if)# switchport port-security violation shutdown |
Switch01(config-if)# switchport port-security mac-address sticky |
show port-security interface <> |
|