5.設定NTP
14.設定Log
Setting
|
Value
|
Speed
|
9600
|
Data Bits
|
8Bit
|
Parity
|
None
|
Stop Bits
|
1
|
Flow Control
|
NO
|
Router(config)#service password-encryption
Router(config)#username fred privilege 7 password 123456
Router(config)#enable password 654321
Router(config)#interface f1
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config)#access-list 99 permit 192.168.0.0 0.0.255.255
Router(config)#access-list 99 deny any
Router(config)#line vty 0 4
Router(config-line)#exec-timeout 30
Router(config-line)#login local
Router(config-line)#access-class 99 in
Router(config)#ip domain-name abc.com
Router(config)#crypto key generate rsa
Router#show ip ssh
Router#show users
5.設定NTP
設定TimeZone +8
Router(config)#clock timezone gmt 8
設定NTP Server
Router(config)#ntp server time.stdtime.gov.tw
設定Log Time 為當地時間
Router(config)#service timestamps log datetime localtime
6.設定Default Route
Router(config)#ip route 0.0.0.0 0.0.0.0 211.75.186.254
Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.100
設定配發網段IP範圍、子網路遮罩、Gateway、DNS
Router(config)#ip dhcp pool dhcp-srv
Router(dhcp-config)#network 192.168.0.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.0.1
Router(dhcp-config)#dns-server 168.95.1.1 8.8.8.8
查看DHCP配發狀況
Router#show ip dhcp binding
8.設定NAT
Interface
|
NAT
|
F0
|
NAT Inside
|
F1
|
NAT Outside
|
Router(config)#interface f0
Router(config-if)#ip nat inside
設定內部NAT網段
Router(config)#ip access-list extended LocalUser
Router(config-ext-nacl)#permit ip 192.168.0.0 0.0.0.255 any
設定overload NAT
Router(config)#ip nat inside source list LocalUser interface FastEthernet1 overload
Router(config)#ip nat inside source static tcp 192.168.10.99 3389 60.25.12.10 3389 extendable
Router#show ip nat translations
Router(config)#ip access-list extended lan2wan2
Router(config-ext-nacl)#permit ip 192.168.1.129 0.0.0.0 any
Router(config)#route-map wan2
Router(config-route-map)#match ip address lan2wan2
Router(config-route-map)#set ip next-hop 192.168.1.253
Router(config)#int f0/0
Router(config-if)#ip policy route-map wan2
Router#sh ip access-lists lan2wan2
Router#sh route-map
Router(config)#interface Tunnel1
Router(config-if)#ip address 172.16.101.1 255.255.255.252
指定自己的WAN &對方WAN IP
Router(config-if)#tunnel source 211.75.186.11
Router(config-if)#tunnel destination 61.220.71.88
對等的另外一顆Router也是相同設定
Router#show interface tunnel 1
Router#ping 172.16.101.2
Router(config)#ip flow-export version 5
Router(config)#ip flow-export source Vlan1
Router(config)#ip flow-export destination 33.22.1.89 9996
Router(config)#int tu 200
Router(config-if)#ip route-cache flow
Router(config-if)#ip flow ingress
Router(config-if)#ip flow egress
Router#sh ip cache flow
Router#config t
Router(config)#interface Dialer1
Router(config-if)#encapsulation ppp
Router(config-if)#ip tcp adjust-mss 1400
Router(config-if)#dialer pool 1
Router(config-if)#dialer-group 1
Router(config-if)#dialer-group 1ppp pap sent-username [email protected] password 0 111111
指定F0 Port 接入電信數據機
Router(config)#interface f0
Router(config-if)#no ip address
Router(config-if)#pppoe enable group global
Router(config-if)#pppoe-client dial-pool-number 1
13.更新Firmware
Router#dir flash:
Router#copy flash tftp:
上傳Firmware
Router#copy tftp flash:
比對Firmware check sum
Router#verify /md5 flash:c181x-advipservicesk9-mz.124-24.T.bin
刪除舊版本Firmware
Router#delete flash:c181x-adventerprisek9-mz.124-2.T6.bin
重新開機,確認是否更新為新版本
Router#reload
Router#show version
14.設定Log
設定 Log大小 1M
Router(config)#logging buffered 1024000
15.設定存檔 & 恢復預設值 & 還原設定檔
設定存檔
Router#copy running-config startup-config
Router#copy running-config flash:
恢復預設值
Router#erase startup-config
Router#reload
還原設定檔
Router#copy flash:running-config running-config
16.忘記密碼
進入rommon Mode,開機快速鍵入Ctrl+Break(Pause)
monitor: command “boot” aborted due to user interrupt
rommon 1 >
使用0x2142 忽略NVRAM 設定
rommon 1 > confreg 0x2142
rommon 1 > reset
開機內容忽略….
進入特權模式,並把config恢復
Router>en
Router#copy startup-config runn
重新建立帳號密碼
Router#config t
Router(config)#username fred privilege 15 password 123456
回復組態站存
Router(config)#config-reg 0x2102
將設定回寫入Start-up config(NVRAM)
Router#copy run startup-config
重新開機
Router#reload
17.ROMMON 模式下載IOS
rommon 1 > IP_ADDRESS=192.168.1.129
rommon 2 > IP_SUBNET_MASK=255.255.255.0
rommon 3 > DEFAULT_GATEWAY=192.168.1.1
rommon 4 > TFTP_SERVER=192.168.1.100
rommon 5 > TFTP_FILE=c1841-adventerprisek9-mz.151-4.M4.bin
rommon 6 > tftpdnld
18.查看設備序號
Router#sh inventory
19.增加AAA設定
Router(config)#aaa new-model
Router(config)#aaa authentication login Test local group radius
Router(config)#aaa authorization exec Test local group radius
Router(config)#aaa session-id common
Router(config)#aaa authorization console
Router(config)#radius-server host 192.168.100.100
Router(config)#radius-server key password
Router(config)#line con 0
Router(config-line)#authorization exec Test
Router(config-line)#login authentication Test
Router(config)#line vty 0 4
Router(config-line)#authorization exec Test
Router(config-line)#login authentication Test
20. Cisco Password Cracker
http://www.ifm.net.nz/cookbooks/passwordcracker.html
21. 定時備份設定
Router(config)#kron policy-list Backup
Router(config-kron-policy)#cli show startup-config | redirect tftp://10.10.10.1/router.cfg
設定每周日晚上11點進行備份
Router(config)#kron occurrence SaveConfigSchedule at 23:00 sun recurring
Router(config-kron-occurrence)#policy-list Backup
驗證設定
Router#show kron schedule
Refer:
http://www.cisco.com/c/en/us/td/docs/routers/access/1800/1801/software/configuration/guide/scg.pdf