文档详情

CISCO设备必学命令.doc

发布:2017-12-10约1.2万字共12页下载文档
文本预览下载声明
基础命令练习 1.模式 Router //用户模式 Router# //特权模式(也叫enable 模式) Router(config-if)# //接口模式 Router(config Router(config-subif)# //子接口模式 2.模式切换 Router //用户模式 Routerenable //在用户模式敲入enable 进入特权模式(也叫enable 模式) Router#disable //在特权模式敲入disable 退出到用户模式 Routerenable //在用户模式敲入enable 进入特权模式 Router#configure terminal //在特权模式敲入configure terminal 进入到配置模式 Router(config)#interface ethernet 0/0 //在配置模式敲入“interface+接口类型+接口编号”进入接口模式 Router(config-if)#exit //敲入exit 退出接口模式 Router(config)#router rip //敲入“router + 路由协议”进入router 模式 Router(config-router)#exit //退出router 模式 Router(config)#line console 0 //进入line 模式 Router(config-line)#end //从line 模式退出(任何时候敲入end 会退出到特权模式) Router#conf t Router(config)#interface ethernet 0/0.1 //进入子接口模式 Router(config-subif)#end //任何时候敲入end 会退出到特权模式 Router# 2.为路由器定义名称 router(config)#hostname xxx(xxx 为我们定义的名称) Router(config)#host fxh fxh(config)#定义路由器的名称为FXH,那么对路由器定义名称,是为了区别我们所操作所有设备的不同. 3.为路由器添加特权密码 router(config)#enable password sss(sss 为我们定义的明文密码) router(config)#enable secret cisco (cisco 为我们定义的密文密码) 4.不执行 DNS 解析 router(config)#no ip domain-lookup (这条命令的作用是:当我们在执行命令错误的时候,路由器会认为这条命令没有错误,它只是一个域名的形式,那么他会给你解析,这样,很浪费我们宝贵的时间 5.配置路由器,使得控制台端口不会中止你的连接。 router(config-line)#exec-timeout 0 我们在长时间不去操作路由器的时候,我们的路由器会自动的终止与我们的对话连接,跳转到非连接状态,这时候,我们还需要输入enable 密码重新登陆,从某种意义上来讲是对安全性得到了保证,但是对我们的操作是十分的不方便的。 6.配置路由器,使得路由器发送的控制台屏幕的消息不会附加到命令行中 router(config)#line console 0 router(config-line)# logging synchronous 7.配置路由器,使得当登陆控制台端口的时候显示一个标题 router(config)#banner motd Enter TEXT message. End with the character ‘m’. 在这里M 是我们结束时候输入的结束控制字符,你最好找一个特殊的作为结束,例如~等等。Xxxxxxx(是我们定义的信息) 8..console 口的配置 Router(config)#line console 0 Router(config-line)#password [password] //设置con口登录密码 Router(config-line)#login Router(config-line)#exit 9. VTY 口的配置 Router(config)#line vty 0 4 //不同设备或不同IOS可能数量不同 Router(config-line)#password [password] Router(config-line)#login Router(config-line)#exit 10. 配置以太网口 Router#conf t Router(config)#int E0 Router(config-if)#ip address //配置IP地址 Router(config-if)#no shutdown //激活该接口
显示全部
相似文档