Sie sind auf Seite 1von 3

######## INITIAL CONFIGURATION ########

- <Router>

no ip domain-lookup
service password-encryption
enable secret class
banner motd #Unauthorized access is strictly prohibited. #
line con 0
password cisco
login
logging synchronous
line vty 0 4
password cisco
login
exit
copy run start

- <Switch>

no ip domain-lookup
hostname S1
service password-encryption
enable secret class
banner motd #
Unauthorized access is strictly prohibited. #
Line con 0
password cisco
login
logging synchronous
line vty 0 15
password cisco
login
exit

S1> ip default-gateway <ip address>

######## RUTAS ESTATICAS ########

show running-config | section ip route


show ip route
show ip route connected
show IP interface brief
show ip interface

-Recursive static route

# Ip route <Red a donde vas> <Mascara de subred> <Interfaz por donde entra> o <Ip
del proximo salto>

-Directly connected static route

# Ip route <Red de destino> <Mascara de subred> <interfaz donde sale>

-Gateway last resort

# Ip route 0.0.0.0 0.0.0.0 <exit interface>


######## RIP ########

show ip protocols
router rip
version 2
no auto-summary
do show ip route connected
passive-interface g0/0 (para deshab RIP en interfaces que no lo necesiten)
default-information originate (propagar info a rutas rip)

######## SSH ########

<Switch>

show ip ssh
ip domain-name <cisco.com>
crypto key generate rsa
ip ssh version 2
username <username> secret <password>

line vty 0 15
transoprt input ssh (para que solo use ssh)
login local (para ver el usuario local creado)
ip ssh version 2

-Para ingresar SSH


# CMD > ssh -L -user- -ip-

######## Port Security ########

(en una interfaz o en un rango de interfaces)


# swsitchport mode access
# switchport port-security
# switchport port-security maximum <1> (Solo 1 dispositivo puede acceder a los
puertos)
# switchport port-security mac-address sticky (MAC address dispositivo aprendido
dinamicamente)
# switchport port-security violation <restrict/protect/shutdown>
# show port-security interface <int>

# interface range <range>

######## VLAN ########

# show vlan brief

# vlan <#> (crea vlan)


# name <nombre> (da nombre a la vlan)

- Asignando puerto a vlan


# interface <Interface>
# switchport mode access
# switchport access vlan <#>

- Moviendo direccion Vlan 1 a vlan 99


# interface vlan 1
# no ip address
# interface vlan 99
# ip address <ip> <mascara>

- Creando troncales
# show interfaces trunk
# interface <interf>
# switchport trunk native vlan -99-
# switchport mode trunk

######## ACL ########

# show access-list <name/number>


# access-list <number> <permit/deny> <Ip address> <Wildcard>
# access-list <number> <permit/deny> any
# ip access-group <number> <in/out> (Dentro de interfaz para aplicar ACL)
#
# ip access-list <standard> <name>
# <permit/deny> host <ip number>
# deny any

- Poniendo ACL en VTY


line vty 0 4
access-class <number/name> in

**** EJEMPLO ****

access-list 1 permit 192.168.10.0 0.0.0.255


access-list 1 permit 192.168.20.0 0.0.0.255
access-list 1 deny any
r3 g0/1
ip access-group 1 out

ip access-list standard BRANCH-O-P


permit 192.168.40.2 0.0.0.255
permit host 192.168.30.3 o 192.168.30.0 0.0.0.0

ip access-list starndar ACL on S1


permit host 192.168.1.3

line vty 0 4
access-class ACL on S1 in

Das könnte Ihnen auch gefallen