晒晒路由器的一些基本命令
时间:2011-07-16 18:07来源:未知 作者:admin 点击:次
关键词:路由交换路由技术路由基本命令, 在对局域网组成结构的研究方面,有一个拓扑的概念。所i胃拓扑,就是网络中各个节点主机与在它们之间的连接介质的物理分布模式。局城
关键词:路由交换路由技术路由基本命令, 在对局域网组成结构的研究方面,有一个“拓扑”的概念。所i胃拓扑,就是网络中各个节点主机与在它们之间的连接介质的物理分布模式。局城网的签本拓扑类型有总线形、星形和环形三种。总线形拓扑是所有节点都连接到一条线性的介质上,该介质称为“总线.或“母线”。
1.模式
Router>//用户模式
Router#//特权模式(也叫enable模式)
Router(config-if)#//接口模式
Router(config-router)#//router模式
Router(config-line)#//line模式
Router(config-subif)#//子接口模式
2.模式切换
Router>//用户模式
Router>enable//在用户模式敲入enable进入特权模式(也叫enable模式)
Router#disable//在特权模式敲入disable退出到用户模式
Router>enable//在用户模式敲入enable进入特权模式
Router#configureterminal//在特权模式敲入configureterminal进入到配置模式
Router(config)#interfaceethernet0/0//在配置模式敲入“interface+接口类型+接口编号”进入接口模式
Router(config-if)#exit//敲入exit退出接口模式
Router(config)#routerrip//敲入“router+路由协议”进入router模式
Router(config-router)#exit//退出router模式
Router(config)#lineconsole0//进入line模式
Router(config-line)#end//从line模式退出(任何时候敲入end会退出到特权模式)
Router#conft
Router(config)#interfaceethernet0/0.1//进入子接口模式
Router(config-subif)#end//任何时候敲入end会退出到特权模式
Router#
2.为路由器定义名称
router(config)#hostnamexxx(xxx为我们定义的名称)
Router(config)#hostfxh
fxh(config)#FXH,,.
3.为路由器添加特权密码
router(config)#enablepasswordsss(sss为我们定义的明文密码)
router(config)#enablesecretcisco(cisco为我们定义的密文密码)
4.不执行DNS解析
router(config)#noipdomain-lookup
5.配置路由器,使得控制台端口不会中止你的连接。
router(config-line)#exec-timeout0
我们在长时间不去操作路由器的时候,我们的路由器会自动的终止与我们的对话连接,跳转到非连接状态,这时候,我们还需要输入enable密码重新登陆,从某种意义上来讲是对安全性得到了保证,但是对我们的操作是十分的不方便的。
6.配置路由器,使得路由器发送的控制台屏幕的消息不会附加到命令行中
router(config)#lineconsole0
router(config-line)#loggingsynchronous
7.配置路由器,使得当登陆控制台端口的时候显示一个标题
router(config)#bannermotd
EnterTEXTmessage.Endwiththecharacter'm'.在这里M是我们结束时候输入的结束控制字符,你最好找一个特殊的作为结束,例如~等等。Xxxxxxx(是我们定义的信息)
8..console口的配置
Router(config)#lineconsole0
Router(config-line)#password[password]//设置con口登录密码
Router(config-line)#login
Router(config-line)#exit
9.VTY口的配置
Router(config)#linevty04//不同设备或不同IOS可能数量不同
Router(config-line)#password[password]
Router(config-line)#login
Router(config-line)#exit
10.配置以太网口
Router#conft
Router(config)#intE0
Router(config-if)#ipaddress192.168.1.1255.255.255.0//配置IP地址
Router(config-if)#noshutdown//激活该接口
11.配置串行接口(需要配置时钟频率)
Router#conft
Router(config)#intS0
Router(config-if)#clockrate64000//DCE设备配置时钟,DTE设备不用配置
Router(config-if)#ipaddress192.168.1.1255.255.255.0//配置IP地址
Router(config-if)#noshutdown
12.配置接口描述信息:
Router(config-if)#descriptionlinktostsd
13.配置主机名与IP地址映射:
Router(config)#iphoststsd192.168.113.1
Pingstsd=ping192.168.113.1
14清除路由器启动配置:
Rotuer#erasestartup-config
15.保存路由器当前配置:
Router#copyrunning-configstartup-configRouterwrite

(责任编辑:admin) |
------分隔线----------------------------