conf t
hostname SW001
enable secret cisco
motd ^ BANNER HERE^
no ip domain-lookup
line con 0
logging synchronous
Mostrar interfaces:
show ip int brief
R1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 2.2.2.1 YES manual up up
Serial0/0 unassigned YES NVRAM administratively down down
FastEthernet0/1 unassigned YES NVRAM administratively down down
show arp
*************configurar ssh***************
ssh necesita FQDN
ip domain-name mydomain.com
crypto key generate rsa
SW1(config)#crypto key generate rsa
The name for the keys will be: SW1.mydomain.com
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…
[OK] (elapsed time was 1 seconds)
SW1(config)#
*Mar 9 00:03:39.622: %SSH-5-ENABLED: SSH 1.99 has been enabled
Configuración de
——————————————————
Crear usuario
username cisco privilege 15 secret cisco
line vty 0 4
password cisco
logging synchronous
login local
transport input telnet ssh
——————————————————–
show users
Botar usuarios:
SW1#clear line vty 0
[confirm]
[OK]
[OK]
SW1#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
Interface User Mode Idle Peer Address
—————————————————————————-
Sintaxis interfaces:
General: nx 34 ————————————— Usar con cuidado para no saturar el sw clear mac address-table dynamic —————————————————— vIOS-L2-01(config-if)#switchport host ————- switch port mode access ( para que se habilite port-security) vIOS-L2-01(config-if)#switchport port-security ? port security maximum —————————————————————————— vIOS-L2-01(config-if)#switchport port-security mac-address sticky vIOS-L2-01(config-if)#do show port-security int gi0/0 ………………………………… interface GigabitEthernet0/0 Sigue 41
debug matm all
Nota: port security ( para que funcione en vIOS hay que activar este comando:)
switchport mode will be set to access
spanning-tree portfast will be enabled
channel group will be disabled
port security
aging Port-security aging commands
mac-address Secure mac address
maximum Max secure addresses
violation Security violation mode
vIOS-L2-01(config-if)#switchport port-security
Port Security : Enabled
Port Status : Secure-shutdown
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 0
Sticky MAC Addresses : 1
Last Source Address:Vlan : 0050.7966.6802:1
Security Violation Count : 1
switchport mode access
switchport port-security maximum 4
switchport port-security mac-address sticky
switchport port-security mac-address sticky 0050.7966.6801
switchport port-security mac-address sticky 0050.7966.6802
switchport port-security
media-type rj45
negotiation auto
spanning-tree portfast
end