思科设备可以使用TAB键补全命令 前提是该已输入前缀是唯一的;在--More--模式下,或者show running-config模式下,按空格可以显示下一页内容,按回车可以显示下一行内容

在特权模式下(Router#)用户可以使用show debug等命令

在配置模式下(Router(config)#)用户可以配置路由器

Router(config)#hostname 2811 将路由器更名为2811

Router(config)#enable secret cisco 设置enable密码为cisco(此密码在show running-config内不以明文显示,且优先级高于enable password

Router(config)#service password-encryption show run中的密码部分做MD5加密

Router(config)#line console 0

Router(config-line)#password cisco

Router(config-line)#login

设置CONSOLE口登陆密码为cisco,且只有Login命令打了之后才会生效。(telnet线路为VTY口登陆,方法同样)

Router(config-line)#exec-timeout 0设置线路空闲超时时间,0为永不超时

Router(config-line)#logging synchronous 设置syslog消息同步。作用:在命令打到一半的时候不会因为弹出的syslog信息而找不到以前打的内容,自动另起一行,此行内容为之前所打配置命令

Router(config)#banner exec * 创建通知板,并以“*”符合做完通知板的介绍,在登陆时显示。

Router(config)#clock timezone +时区(小时) +时区(分钟)设置时区

Router#clock set 11:11:11 11 sep 设置具体时间(小时:分钟:秒) 月(推荐先设置时区后设置具体时间)

Router(config)#no ip domain lookup 关闭路由器在特权模式下的DNS郁闷解析(在手误打错是避免了查询等待的时间)

 

Router(config)#interface fastEthernet 0/0输入接口“快速以太口0/0 并进入。

Router(config-if)#此模式为接口配置模式

Router(config-if)#ip address 192.168.1.1 255.255.255.0输入接口IP地址和掩码

Router(config-if)#no shutdown 路由器接口默认都为shutdown,所以要启用,就要打no shutdown

默认CONSOLE口下会跳syslog信息,告诉你接口以起来:

*Mar 1 00:50:55.611: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up

*Mar 1 00:50:56.611: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

默认VTY口下不会跳类似syslog消息,要在配置模式下打“terminal monitor”才可开启。

实验环境中串口serial0口为帧中继接口,serial1口为串口,在DCE端需要打clock rate

如何看DTEDCE,命令:show controllers serial 2/0

cable type : V.11 (X.21) DCE cable其中包含电缆类型,可以看到是DTE或者DCE

看接口IP等综合信息:show ip interface brief 或者 show protocols

看设备IOS版本及一些硬件信息:show version

Configuration register is 0x2142其中这条信息表示重启不保存配置,0x2102则重启保存配置

在配置模式下Router(config)#config-register 可自行修改寄存器值

Show processes cpu/memory可以看cpu/memory使用率

Show ip route IPV4路由表

show ip protocols 看路由协议信息

 

Show flash 可以看FLASH中存放的内容的信息

 

Show running-config可以看设备当前正在运行的配置清单

show running-config | begin xx 以关键词xx作为起始,开始show run

show running-config | include yy 找出带有关键词yyshow run信息

show startup-config 可以看设备起机时会运行的配置清单

两者不一样:可以通过copy running-config startup-config 将运行的拷贝到启动中

或者 copy startup-config running-config 将启动配置刷到设备上使其正在运行

Write命令 = copy running-config startup-config

Debug命令可以作为调试命令使用:会弹出很多相关信息

undebug all 关闭所有debug调试信息