here are basic cisco router configuratuion commands you will need to fully understand before going to Routing protocols topics:
Router>ena //有用戶模式進入特權模式
Router#show version //查看版本信息
Router#show start //查看啓動配置
Router#show run //查看運行配置
Router#show history //查看歷史命令
Router#show clock //查看時鐘
Router#show users //查看用戶
Router#show flash //查看flash的文件與情況
Router#show tech-support //設備基本命令的集成
Router#show interfaces //查看端口的情況(詳細)
Router#show ip interface brief //查看端口的基本情況
Router#copy run start //保存運行配置到啓動配置
Router#ping //ping命令
Router#reload //重新啓動
Router#config t //從特權模式進入全局模式
Router(config)#ip host yasser 10.0.0.100 //配置路由器名字和地址,可以在ping後面接名字或地址
Router(config)#interface fastEthernet 0/0 //進入接口配置模式
Router(config-if)#ip address 10.0.0.1 255.0.0.0 //配置IP地址
Router(config-if)#speed auto //配置速度
Router(config-if)#duplex auto //配置工作模式
Router(config-if)#no shutdown //啓用接口
Router(config-if)#exit //退出接口配置模式
Secure Router & Setting Telnet connection //路由安全和telnet配置
Router(config)#enable password 1111 //配置特權密碼(明文)
Router(config)#no enable password //取消特權密碼
Router(config)#enable secret 1111 //配置特權密碼(加密)
Router(config)#line console 0 //進入console 0
Router(config-line)#password 2222 //配置console密碼
Router(config-line)#login //啓用密碼
Router(config-line)#exit //退出該模式
Router(config)#line vty 0 4 //進入vty
Router(config-line)#password 3333 //配置vty登錄的密碼
Router(config-line)#login //啓用密碼
Router(config-line)#exit //退出該模式
Router(config)#service password-encryption //加密密碼
Router(config)#banner motd # dont login # //配置登陸前看到的信息
Router(config)#username yasser password 2222 //配置用戶名和密碼(明文)
Router(config)#username yasserramzy secret 2222 //配置用戶名和密碼(加密)
Router(config)#username yasserauda privilege 15 password 2222 //配置用戶名和密碼(明文)並給與最高權限
Router(config)#username yasserramzyauda privilege 15 secret 2222
//配置用戶名和密碼(加密)並給與最高權限
Router(config)#no ip domain-lookup //取消域名解析
Router#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 171 S 2960 Fas 0/1
Router Fas 0/0 122 R C2800 Fas 0/0
Router#show cdp interface
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Router#show cdp entry *
Device ID: Switch
Entry address(es):
Platform: cisco 2960, Capabilities: Switch
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1
Holdtime: 148
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
advertisement version: 2
Duplex: full
---------------------------
Device ID: Router
Entry address(es):
IP address : 120.0.0.2
Platform: cisco C2800, Capabilities: Router
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/0
Holdtime: 158
Version :
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version
12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
advertisement version: 2
Duplex: full
1- connect your router using console cable //使用console線連接電腦和路由器
2- turn off turn on your router //關閉路由器並開啓
3- press ctrl + pause break //開啓時按ctrl+【pause break】
4- change confreg to 0x2142 //修改寄存器爲0x2142
5- reset //重新啓動
6- n
7- ena //進入特權模式
8- copy start run //將啓動配置到運行配置
9- config t //進入全局模式
10- use password commands to change or remove passwords //使用密碼配置命令,修改密碼或移除密碼
11- confgire-register 0x2102 //配置寄存器值爲0x2102
12- exit //退出
13- copy run start //保存運行配置到啓動配置
Router#copy tftp flash //恢復
Router#copy flash tftp //備份
Router#copy run tftp //備份
Router#copy start tftp //備份
Router(config)#boot system flash ?
WORD System image filename
Router(config)#ip dhcp pool me //定義dhcp地址池名字
Router(dhcp-config)#network 10.0.0.0 255.0.0.0 //關聯網絡
Router(dhcp-config)#default-router 10.0.0.10 //網關
Router(dhcp-config)#dns-server 10.0.0.11 //DNS
Router(dhcp-config)#exit
Router(config)#ip name-server 10.0.0.11 //配置名字服務器
Router(config)#ip dhcp excluded-address 10.0.0.100 10.0.0.200 //dhcp分配除外的地址
Router(config)#exit
Router#show ip dhcp binding //查看dhcp綁定
IP address Client-ID/ Lease expiration Type Hardware address
Router(config)#interface fastEthernet 0/0 //進入接口
Router(config-if)#ip address dhcp //該接口從dhcp地址池中獲取地址
SSH //SSH配置
Router(config)#username yasser password 2222 //配置用戶名和密碼(明文)
Router(config)#hostname alexrouter //路由器名字
alexrouter(config)#ip domain-name me.com //域名
alexrouter(config)#ip ssh time-out 30 //SSH超時時間
alexrouter(config)#ip ssh authentication-retries 3 //使用SSH登錄錯誤的次數不準超過3次
alexrouter(config)#ip ssh version 2 //SSH版本爲2
Please create RSA keys (of at least 768 bits size) to enable SSH v2.
alexrouter(config)#crypto key generate rsa //產生RSA
The name for the keys will be: alexrouter.me.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 512 //輸入大小
% Generating 512 bit RSA keys, keys will be non-exportable...[OK] //密鑰產生完成
*Mar 1 0:1:26.828: RSA key size needs to be at least 768 bits for ssh version 2
*Mar 1 0:1:26.828: %SSH-5-ENABLED: SSH 1.5 has bee