思科路由器命令大全_第1页
思科路由器命令大全_第2页
思科路由器命令大全_第3页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、思科交换机路由器命令大全交换机命令:switch用户模式1:进入特权模式switch enableswitch#2:进入全局配置模式configure switch enableswitchconfigure switch(conf)#3:交换机命名 hostname aptech2950以aptech2950为例switch enable switchconfigure terminalswitch(conf)#hostname aptch-2950 aptech2950(conf)#4:配置使能口令enable password cisco以cisco为例switch enable swi

2、tchconfigure terminal switch(conf)#hostname aptech2950(conf)# enable password cisco5:配置使能密码enablesecretciscolab以cicsolab为例IPswitch enableswitchconfigure terminal switch(conf)#hostname aptch2950aptech2950(conf)# enablesecretciscolabaptech2950(conf)#no ipdomain-lookupIP地址解析特性aptech2950(conf)#loggingsy

3、nchronous设置启用消息同步特性aptech2950(conf)#interface range fastethernet0/1-20aptech2950(conf-if-range)#spanning-tree portfast设置快速端口aptech2950(conf)#interface range fastethernet 0/23-24 aptech2950(conf-if-range)#swichport modetrunk设置主干道端口aptech2950(conf)#spanning-treeuplingkfast设置阻塞启用迅速(只可以在访问层启用)6:设置虚拟局域网v

4、lan 1interface vlan switch enableswitchconfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1255.255.255.0ipaptech2950(conf-if)#noshut是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway192.168.254设置网关地址7:进入交换机

5、某一端口interfacefastehernet 0/17以17端口为例switch enable switchconfigure terminal switch(conf)#hostname aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#8:查看命令switch enableswitch# show version察看系统中的所有版本信息show interface vlan 1ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interfacefast

6、ethernet0/11信息show mac-address-tablemacshow mac-address-table aging-timemac9:交换机恢复出厂默认恢复命令switch enableswitch# erase startup-configure switch# reload10:switch enableswitchconfigure terminal switch2950(conf)#hostname aptch-2950 aptech2950(conf)# interface fastehernet0/1717aptech2950(conf-if)#duplexfu

7、ll/half/auto有 fullhalf,autoswitch enableswitch# show cdpcdpshow cdp interface fastethernet 0/1717cdp信息show cdp traffic查看有关cdp包的统计信show cdp nerghbors列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。用手按着交换机的 MODE 键,插上电源线在 switch:后执行 flash_ini 命令:switch: flash_ini查看 flash 中的文件: switch: dir flash:把“config.text”

8、文件改名为“config.old”: switch: rename flash: config.text flash: config.old执行boot:switch: boot交换机进入是否进入配置的对话,执行 no :进入特权模式察看 flash 里的文件: show flash :“config.old文件改名为“config.text:switch:rename config.old flash: config.text把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-con

9、figure把配置模式重新设置密码存盘,密码恢复成功。13:交换机 telnet 远程登录设置:switchen switchconfigure switch(conf)#hostname aptech-2950aptech2950(conf)#enable password cisco以cisco 为特权模式密码aptech2950(conf)#interface fastethernet 0/117端口为 telnet远程登录端口aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 aptech2950(conf-if)#no s

10、hutaptech2950(conf-if)#exit aptech2950(conf)line vty 040-4 个用户可以telnet登陆aptech2950(conf-line)#loginaptech2950(conf-line)#password edge以edge主机设置:ip192.168.1.2主机的ip必须和交换机端口的地址在同一网络netmask255.255.255.0gate-way192.168.1.1是交换机端口地址运行:telnet 192.168.1.1telnetpassword : edge aptech2950enpassword: cisco apte

11、ch#14:交换机配置的重新载入和保存设置完成交换机的配置后: aptech2950(conf)#reload是否保存(y/n)y: 保存设置信息n:不保存置信息路由器命令router用户模式1:进入特权模式router enablerouter #2:进入全局配置模式configure router enablerouter configure router (conf)#3:交换机命名 hostname routera以routerA为router enablerouter configure terminal router(conf)#hostname routera (conf)#4:

12、配置使能口令enable password cisco以cisco为例router enablerouter configure terminal router(conf)#hostname routerArouterA (conf)# enable password cisco5:配置使能密码enablesecretciscolab以cicsolab为例router enablerouter configure terminal router(conf)#hostname routerArouterA (conf)# enable secret ciscolab 6:interfacefas

13、tehernet0/1717router enablerouter configure terminal router(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17 routerA (conf-if)#进入路由器的某一子端口 interface 0/17.1以17端口的1子端口为例router enablerouter configure terminal router(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17.1 7:设置

14、端口 ip 地址信息router enablerouter configure terminal router(conf)#hostname routerA routerA(conf)# interfacefastehernet0/1717routerA (conf-if)#ip address 192.168.1.1 255.255.255.0iprouterA (conf-if)#noshut是配置处于运行中routerA (conf-if)#exit 8:查看命令show router enablerouter # show version察看系统中的所有版本信息show interfa

15、ce vlan 1ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interfacefastethernet0/11信息show mac-address-tablemacshow mac-address-table aging-time查看mac地址表自动老化时间showcontrollersserial+ 编号查看串口类show ip router查看路由器的路由表9:cdp 相关命令router enablerouter #show cdp查看设备的 cdp 全局配置信息show cdpinterfacefastethernet 0

16、/1717cdp信息show cdp traffic查看有关cdp包的统计信show cdp nerghbors列出与设备相连的cisco设备10:csico2600的密码恢复win+breakmonitor在提示符下输入命令修改配置寄存器的值,然后重新启动路由器remmon1confreg 0 x2142 remmon2resetsetup“no”,execstartup-config不变把startup-configrunning-configenablerouterenablerouter#copy startup-config running-config routerconfigur

17、e terminal router(conf)#enable password cisco router(conf)c onfig-register 0 x2102startup-configrouter #copy running-config startup-config router #reload11:路由器 telnet 远程登录设置:routerenrouter configure terminal router (conf)#hostname routerArouterA (conf)#enable password cisco为特权模式密码routerA (conf)#inte

18、rface fastethernet 0/1routerA(conf-if)#ip addressrouterA(conf-if)#ip address192.168.1.1255.255.255.0routerA(conf-if)#no shutrouterA(conf-if)#exitrouterA(conf)linevty040-4telnetrouterA (conf-line)#loginrouterA (conf-line)#password edge为远程登录的用户密码主机设置:ip192.168.1.2机的ip必须和交换机端口的地址在同一网络netmask255.255.255

19、.0gate-way192.168.1.1是交换机端口地址运行:telnet 192.168.1.1telnetpassword : edge routeraen以 cisco以 17 端设以 edge主网关地址password: cisco routera#12:配置路由器的标识banner $连接到路由器的终端都会收到。routerenrouter configure terminal router (conf)#hostname routerArouterA(conf)#banner motd $This is aptech companyrouter !Please dont chan

20、ge the configuration without 13:配置接口标识description 接口标识用于区分路由器的各个接口。routerenrouter configure terminal router (conf)#hostname routerArouterA(conf)#interface fastethernet 0/10/1 接口为例routerA(conf-if)# description this is a fast Ethernet port used toconnecting the companys intranet!14:配置超时consoleexec10ro

21、uterenrouter configure terminal router (conf)#hostname routerA routerA(conf)#line console 0routerA(conf-if)e xec-timeout00个“0”代表分钟,第二个“0”代表秒15:配置串口参数两台路由器通过串口连接需要一个做为 DTE,一个做为 DCE。DCE 设备要向DTEDCErouterenrouter configure terminal router (conf)#hostname routerArouterA(conf)#interface serial 0/0routerA(

22、conf_if)#clockrate6400064000routerA(conf_if)#bandwidth 64提供带宽为 64DTEiprouterenrouter configure terminal router (conf)#hostname routerBrouterB(conf)#interface serial 0/0 routerB(conf_if)#ip address 192.168.1.1 16:静态路由的配置Arouterenable routerconfigure terminal router(conf)#hostname routerArouterA(conf)

23、#interface fastethernet 0/1A1routerA(conf-if)#ip address 192.168.2.1 255.255.255.0 routerA(conf-if)#no shutdownrouterA(conf-if)#exitrouterA(conf)# interfacefastethernet0/0A0routerA(conf-if)#ip address 192.168.1.2 255.255.255.0 routerA(conf-if)#no shutdownAip192.168.1.1 255.255.255.0192.168.1.2Brouterenable routerconfigure terminal router(conf)#

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论