In questo articolo ti mostrerò dei comandi base per effettuare una configurazione di un router Cisco.
Indice
Questa raccolta di comandi è utile anche quando non riusciamo a ricordarci il comando preciso per effettuare un’operazione in particolare.
Configure Cisco Hostname
enable
configure terminal
hostname ciscoRT
exitConfigure Cisco Banner
configure terminal
banner motd **È vietato l'accesso non autorizzato a questo dispositivo!**
exitConfigure Cisco Username and Password
configure terminal
username admin privilege 15 secret admin123
exitEnable Password/Secret Cisco
configure terminal
enable secret cisco123
exitCisco Password Encryption
configure terminal
service password-encryption
exitCisco Console Enable
configure terminal
line con 0
exec-timeout 40 0
logging synchronous
exitCisco Telnet Enable
configure terminal
line vty 0 4
exec-timeout 40 0
logging synchronous
transport input telnet
transport output telnet
login local
exitCisco SSH Enable
configure terminal
line vty 0 4
exec-timeout 40 0
logging synchronous
transport input ssh
transport output ssh
login local
exit
ip domain-name test.it
crypto key generate rsa general-keys modulus 2048
ip ssh authentication-retries 2
ip ssh time-out 120
login block-for 240 attempts 3 within 60
exitCisco SSH Telnet Enable
configure terminal
line vty 0 4
exec-timeout 40 0
logging synchronous
transport input ssh telnet
transport output ssh telnet
login local
exit
ip domain-name test.it
crypto key generate rsa general-keys modulus 2048
ip ssh authentication-retries 2
ip ssh time-out 120
login block-for 240 attempts 3 within 60
exitConfigure Cisco Http
configure terminal
ip http server
ip http secure-server
exitConfigure Cisco Interface Configuration
configure terminal
interface gigabitethernet 0/0
description Link to LAN 1
ip address 192.168.10.1 255.255.255.0
no shutdown
exitConfigure Cisco IP Routing
Static Route
configure terminal
ip route xx.xx.xx.xx xx.xx.xx.xx xx.xx.xx.xx
Default Route
configure terminal
ip route 0.0.0.0 0.0.0.0 xx.xx.xx.xx
RIP
configure terminal
router rip
version 2
network xx.xx.xx.xx
network xx.xx.xx.xx
IGRP
configure terminal
router igrp 100
network 10.0.0.0
network 20.0.0.0
exit
Note: Here, 100 is atonomous system number
OSPF
configure terminal
router ospf 1
router-id 1.1.1.1
default-route-advertise always
import-route direct
import-route static
network 10.0.0.0 0.255.255.255 area 0.0.0.10
network 20.0.0.0 0.255.255.255 area 0.0.0.20
description ctg-network
exit
EIGRP
configure terminal
router eigrp 101
network 10.0.0.0
network 20.0.0.0
exitConfigure Cisco NAT
Static NAT
configure terminal
interface gigabitethernet0/0
ip nat inside
exit
interface gigabitethernet0/1
ip nat outside
exit
ip nat inside source static xx.xx.xx.xx xx.xx.xx.xxConfigure Cisco Gateway
configure terminal
ip default-gateway x.x.x.x
exitConfigure Cisco NTP
configure terminal
clock timezone bd 6
clock set 11:00:00 may 20 2022
or
configure terminal
ntp server 192.168.100.10 prefer
ntp authentication-key 1 md5 test.it
ntp trusted-key 1
ntp authenticate
ntp server 192.168.100.11 key 1 prefer
exitConfigure Cisco SNMP
configure terminal
snmp-server community mod RO
SNMP V3
configure terminal
snmp-server view viewRO iso included
snmp-server group noc v3 priv read viewRO access ACL_SNMP_SERVER
snmp-server user nocadmin noc v3 auth sha noc1234 priv aes 128 noc1234
snmp-server enable traps
exitConfigure Cisco Syslog
configure terminal
logging buffered 64000 warnings
logging trap notifications
logging host 192.168.100.12
logging origin-id ip
logg count
service sequence-numbers
line con 0
logging s
exit
logging on
configure terminal
archive
log confi
logging enable
hidekey
notify sys
exit
exitConfigure Cisco Tacacs
configure terminal
aaa new-model
aaa authentication login default group tacacs+ local
aaa authentication login vty@method none
aaa authorization commands 1 tacacs1 group tacacs+ local
aaa authorization commands 15 tacacs15 group tacacs+ local
aaa authorization config-commands
aaa accounting commands 1 tacacs-account1 start-stop group tacacs+
aaa accounting commands 15 tacacs-account15 start-stop group tacacs+
aaa accounting system default start-stop group tacacs+
tacacs-server key italia
tacacs-server host 192.168.100.13
tacacs-server host 192.168.100.14 timeout 5
line con 0
login authentication vty@method
login authentication default
exit
line vty 0 4
authorization commands 1 tacacs1
authorization commands 15 tacacs15
accounting commands 1 tacacs-account1
accounting commands 15 tacacs-account15
exitConfigure Cisco ACL
configure terminal
ip access-list standard admin-access
permit 10.55.10.0 0.0.0.255 log
exit
line vty 0 4
access-class admin-access in
exitReboot/Reload Cisco Router
reload in 10
reload
reload at 14:10
reload in 3 14:10
reload cancelBackup Configuration Cisco
configure terminal
archive
path tftp://xx.xx.xx.xx/$h
write-memory
exit
kron policy-list ConfBak
cli write memory
exit
kron occurrence weekly at 22:55 thu recurring
policy-list ConfBak
end










Lascia un commento
Visualizza Commenti