您的位置:首页 > 其它

思科Router和Switch的最基本配置

2014-01-12 15:06 288 查看
Router基本配置:Router> \\路由器的启动时所进入的用户模式Router>enable \\键入该命令以进入特许模式Router# \\此显示模式表示已经进入了特许模式Router#configure terminal \\键入该命令以进入全局配置模式Router(config)# \\此显示模式表示已经进入了全局配置模式Router(config)#hostname 51cto \\键入该命令把路由器的名称改为 “51cto”
配置控制台密码51cto(config)#line console 0 51cto(config_line)#login 51cto(config_line)#password cisco
配置控制台其他参数51cto(config)#line console 051cto(config_line)#exec-timeout 0 0 \\配置console口超时时间51cto(config_line)#logging synchronous \\配置显示同步
配置欢迎信息51cto(config)#banner motd # (回车)输入一段欢迎信息并以“#”结束。(回车)
配置路由器密码51cto(config)#enable password cisco \\为路由器设置使能口令为cisco51cto(config)#enable secret ciscolab \\为路由器设置使能密码为ciscolab配置路由器端口IP地址51cto(config)interface fastethernet 0/051cto(config-if)#ip add 192.168.1.1 255.255.255.051cto(config-if)#no shutdown51cto(config-if)#exit 51cto(config)#exit
配置路由器f0/0端口描述信息51cto(config)interface fastethernet 0/051cto(config-if)#description “要描述的信息”
进入路由器的串口配置模式51cto (config)#interface serial 0/051cto (config_if)#
设置串口的时钟频率51cto (config)#interface serial 0/051cto (config_if)#clock rate 64000
设置串口的带宽51cto (config)#interface serial 0/051cto (config_if)#bandwidth 64
配置静态路由51cto(config) #ip route 目标网络 目标网络子网掩码 下一跳地址
配置缺省路由51cto(config) #ip route 0.0.0.0 0.0.0.0 下一跳地址51cto#copy running-config startup-config \\将配置信息存盘(存入NVRAM)51cto#show running-config \\查看当前的配置信息(RAM中的信息)51cto#show startup-config \\查看已存盘的信息(NVRAM中的信息)51cto#show ip route \\查看路由表信息51cto#show cdp neighbors \\查看此路由器还连有哪些cisco的设备51cto#erase startup-config \\将路由器恢复到出厂配置51cto#reload \\重新启动路由器路由器密码恢复1开机按住Ctrl+Break2执行confreg 0x21423执行reset4执行copy startup-config running-config 将路由器配置拷贝到running-config中5在全局配置模式下修改密码,并执行config-register 0x21026 copy running-config startup-config 保存信息7 reload 重新启动路由器Switch基本配置:Switch> \\交换机的启动时所进入的用户模式Switch>enable \\键入该命令以进入特许模式Switch# \\此显示模式表示已经进入了特许模式Switch#configure terminal \\键入该命令以进入全局配置模式Switch(config)# \\此显示模式表示已经进入了全局配置模式Switch(config)#hostname 51cto \\键入该命令把交换机的名称改为“51cto”51cto(config)#enable password cisco \\为交换机设置使能口令为cisco51cto(config)#enable secret cisco \\为交换机设置使能密码为cisco51cto(config)#interface FastEthernet 0/10 \\进入交换机的快速以太网端口f0/1051cto(config-if)#description link to Server A \\配置f0/10的描述信息,描述此端口和服务器Server A相连51cto(config-if)#duplex full \\配置f0/10端口为全双工51cto(config-if)#speed 10 \\配置f0/10端口速率为10Mb/s51cto(config-if)#exit \\退出端口模式到全局配置模式51cto(config)#exit \\退出全局模式到特许模式51cto#copy running-config startup-config \\将配置信息存盘(存入NVRAM)51cto#show version \\查看交换机的版本信息51cto#show running-config \\查看当前的配置信息(RAM中的信息)51cto#show startup-config \\查看已存盘的信息(NVRAM中的信息)51cto#show mac-address-table \\查看交换机的MAC地址表内容51cto#show cdp neighbors \\查看此交换机还连有哪些cisco的设备51cto#erase startup-config \\将交换机恢复到出厂配置51cto#reload \\重新启动交换机
Cisco Catalyst2950交换机的密码恢复1.关机2.按住“MODE”键开机3.等到超级终端显示已开机,松开“MODE”键4.执行flash_init命令,可以查看flash的内容,dir flash:5.把flash里的“config.text”文件改名字为“config.old” rename flash:config.text flash:config.old6.执行boot启动交换机7.把flash里的“config.old”文件改名字为“config.text” rename flash:config. old flash:config. text8.把“config.text”考入系统的“running-config” copy flash:config.text running-config9.修改密码并且存盘保存信息
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: