42121 发表于 2015-11-2 11:01:46

Cisco useful feature and commands

configure DHCP server on Cisco Router:
---------------------------------------
ip dhcp excluded-address 192.168.27.1 192.168.27.50
!
ip dhcp pool cisco
network 192.168.27.0 255.255.255.0
dns-server 192.168.7.20
domain-name fagorarrasate.net
default-router 192.168.27.1
configure HTTP server:
---------------------
ip http server
username cisco privilege 15 password cisco
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
configure local logon without username and password/ with username and password:
-------------------------------
line con 0
exec-timeout 0 0
login local
line vty 0 4
password cisco
login
transport input all
Crack username/password for Cisco router:
-------------------------
after router boot up, in 10s, press FN+Ctrl+B or Ctrl+Break
then, confreg 0x2142
reset
----------
en
copy start-confi running
config-register 0x2102
no enable pass
no enable secret
exit
wr
--------------
IPAccountingarchive router configuration
archive router :http://www.packetu.com/2013/05/07/how-to-automate-cisco-backup-using-configuration-archive/
archive path tftp://10.254.254.10/router/ write-memoryno file verify auto

int g2/0 ip accounting output-packets exit
sh ip accounting
int g2/0 no ip accounting exit

clear ip accountinghttp://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipapp/configuration/15-s/iap-15-s-book/iap-ipserv.htmlRouter# configureterminalRouter(config)#interface ethernet 0/5Router(config-if)#ip accounting mac-address inputRouter(config-if)#ip accounting mac-address outputRouter(config-if)#ip accounting precedence inputRouter(config-if)#ip accounting precedence outputThe followingexample shows how to enable IP accounting with the ability to identify IPtraffic that fails IP access lists and with the number of transit records thatwill be stored in the IP accounting database limited to 100:
Router# configureterminalRouter(config)# ipaccounting-transits 100Router(config)#interface ethernet 0/5Router(config-if)#ip accounting output-packetsRouter(config-if)#ip accounting access-violations---------------

Copy flash的内容到tftp中:
archivetar /create tftp:1.2.3.4/saved.tar flash:https://learningnetwork.cisco.com/thread/10762
Copy tftp to flash: archivetar /xtract tftp://192.168.3.250/c1200-k9w7-tar.123-8.JA2.tar flash:
页: [1]
查看完整版本: Cisco useful feature and commands