cisco配置命令大全

合集下载

思科路由器命令大全(完整版)

思科路由器命令大全(完整版)

思科路由器命令大全(完整版)思科路由器命令大全(完整版)本文档旨在提供思科路由器命令的详细说明和使用指南,包括路由器配置、网络管理、安全性设置等内容。

每个章节都详细介绍了不同的命令和参数,以帮助用户更好地理解和使用思科路由器。

1:路由器基本配置1.1 主机名设置1.2 用户名和密码设置1.3 IP 地址和子网掩码配置1.4 默认网关配置2:接口配置2.1 以太网接口配置2.2 串行接口配置2.3 子接口配置2.4 虚拟局域网 (VLAN) 配置3:路由协议配置3.1 静态路由配置3.2 动态路由配置3.2.1 RIP 配置3.2.2 OSPF 配置3.2.3 BGP 配置4:网络管理4.1 SNMP 配置4.2 NetFlow 配置4.3 Syslog 配置4.4 路由器时间设置5:安全性配置5.1 访问控制列表 (ACL) 配置5.2 VPN 配置5.3 防火墙配置5.4 AAA 配置附件:本文档附带的附件包括示例配置文件、命令输出示例等,以帮助读者更好地理解和应用文档中的内容。

法律名词及注释:本文档所涉及的法律名词及其注释如下:1:主机名:指路由器的主机标识名称,用于在网络中识别路由器。

2:用户名和密码:用于登录和管理路由器的凭证信息。

3: IP 地址:网络协议中用于唯一标识设备的数字地址。

4:子网掩码:用于标识 IP 地址中网络部分和主机部分的分界线。

5:默认网关:用于转发网络流量的下一跳路由器。

6:以太网接口:用于连接局域网设备的物理接口。

7:串行接口:用于连接广域网设备的物理接口。

8:子接口:在一个物理接口上创建多个逻辑接口,用于实现VLAN 分隔等功能。

9:虚拟局域网 (VLAN):用于将局域网划分成多个逻辑网络的技术。

10:静态路由:手动配置的路由表项,用于指定数据包传输的路径。

11:动态路由:根据路由协议动态学习和更新的路由表项,用于自动路由选择。

12: RIP:路由信息协议,一种距离向量路由协议。

Cisco的命令大全

Cisco的命令大全

Cisco的命令大全序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名 switch(config)# hostname "hostname" switch(enable) set sys tem name name-string2.设置登录口令 switch(config)# enable password level 1 password switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问 switch(config)# inte***ce vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce s c0 ip-address netmask broadcast-addressswitch(enable) set inte***ce sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息 switch(config-if)# cdp enableswitch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module /port5.查看Cisco邻接设备的CDP通告 switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]6.端口描述 switch(config-if)#description escription-string switch(enable)set p ort name module/number description-string7.设置端口速度 switch(config-if)# speed{10|100|auto} switch(enable) set port s peed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式 switch(config-if)# duplex {auto|full|half} switch(enabl e) set port duplex module/number {full|half9.配置静态VLAN switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#inte***ce inte***ce module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线 switch(config)# inte***ce inte***ce mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域 switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name] 12.配置VTP 模式 switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本 switch# vlan databaseswitch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable14.启动VTP剪裁 switch# vlan databaseswitch(vlan)# vtp pruning switch(enable) set vtp pruning enable15.配置以太信道 switch(config-if)# port group group-number [distribution {sour ce|destination}] switch(enable) set port channel moudle/port-range mode{on|off| desirable|auto}16.调整根路径成本 switch(config-if)#spanning-tree [vlan vlan-list] cost cost s witch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priority por t-priority switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟 switch(config)# spanning-tree [vlan vlan-list] hello-time seco ndsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征 switch(config-if)#spanning-tree portfast switch(en able)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征 switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|dec ring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# inte***ce atm numb er.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS: ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addres sATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addres sATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# inte***ce atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)# inte***ce atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接: router# configure terminalrouter(config)# inte***ce media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接: router(config)# inte***ce module/port.subint e***cerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# inte ***ce inte***ce numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: router(config-if)#mls rp management-inte***ce47. 要检验MLS-RP的配置情况: router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config) # mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(e nable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls ag ingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_thres hold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:sw itch(enable) show mls include55. 显示MLS高速缓存记录: switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

Cisco配置命令大全

Cisco配置命令大全

Cisco配置命令大全1. switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"configt"全局配置模式----接口模式,使用命令"interface+接口类型+接口号"全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息 + # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configureterminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |{port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

思科交换机 路由器配置命令大全

思科交换机 路由器配置命令大全

思科Cisco交换机、路由器设置命令交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <hostname> ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令为 xxxswitch(config)#enable password xxx ;设置特权非密口令为 xxxswitch(config)#line console 0 ;进控制台口(Rs232)初始化switch(config-line)#line vty 0 4 ;进入虚拟终端virtual ttyswitch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口1加入VLAN 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan中继switch(config)#vtp domain <name> ;设置发vtp域名switch(config)#vtp password <word>switch(config)#vtp mode serverswitch(config)#vtp mode client交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address <IP> <mask> ;添加远程登录IP switch(config)#ip default-gateway <IP> ;添加默认网关switch#dir flash: ;查看内存交换机显示命令:switch#write ;写入保存switch#show vtpswitch#show run ;查看当前配置信息switch#show vlan ;看VLANswitch#show interface ;显示所有端口信息switch#show int f0/0 ;显示端口0的信息 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^路由器显示命令:router#show run ;显示接口router#show interface ;显示接口router#show ip route ;显示路由router#show cdp nei ;看邻居router#reload ;重新起动设置口令:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname <hostname> ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令为 xxxrouter(config)#enable password xxx ;设置特权非密口令为 xxxrouter(config)#line console 0 ;进控制台口(Rs232)初始化router(config-line)#line vty 0 4 ;进入虚拟终端virtual ttyrouter(config-line)#login ;允许登录router(config-line)#password xx ;设置登录口令xx router(config)# (Ctrl+z) ;返回特权模式router#exit ;返回命令配置IP地址:router(config)#int s0/0 ;进行串Serail接口router(config-if)#no shutdown ;起动接口router(config-if)#clock rate 64000 ;设置时钟router(config-if)#ip address 10.1.1.1 255.255.0.0 ;设置IP地址和子网掩码router(config-if)#ip add 10.1.1.2 255.255.0.0 second;router(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip><netmask> ;router(config-subif.1)#encapsulation dot1q <n> ;router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导复制操作:router#copy running-config startup-config ;存配置router#copy running-config tftp ;上载router#copy startup-config tftprouter#copy tftp flash: ;特权模式下升级IOSrouter#copy tftp startup-config ;下载配置文件到nvramROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置,26 36 45xxrommon>confreg 0x2102 ;使用配置,恢复工作状态rommon>reset ;重新引导,等效于重开机rommon>copy xmodem:<sname> flash:<dname> ;从console升级IOSrommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin ;所要下载的文件rommon>tftpdnld ;ROM监控状态下升级IOSrommon>dir flash: ;查看闪存中的内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> 例:router(config)#ip route 10.1.0.0 255.255.0.0 10.2.1.1router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2动态路由:router(config)#ip routing ;启动路由router(config)#router rip ;启动RIP路由协议。

思科路由器(CiscoRouter)常用配置命令大全

思科路由器(CiscoRouter)常用配置命令大全

思科路由器(CiscoRouter)常用配置命令大全思科路由器(Cisco Router)常用配置命令大全1. Access-enable允许路由器在动态访问列表中创建临时访问列表入口2. Access-group把访问控制列表(ACL)应用到接口上3. Access-list定义一个标准的IP ACL4. Access-template在连接的路由器上手动替换临时访问列表入口5. Appn向APPN子系统发送命令6. Atmsig 执行ATM信令命令7. B 手动引导操作系统8. Bandwidth 设置接口的带宽9. Banner motd 指定日期信息标语10. Bfe 设置突发事件手册模式11. Boot system 指定路由器启动时加载的系统映像12. Calendar 设置硬件日历13. Cd 更改路径14. Cdp enable 允许接口运行CDP协议15. Clear 复位功能16. Clear counters 清除接口计数器17. Clear interface 重新启动接口上的件逻辑18. Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率19. Cmt 开启/关闭FDDI连接管理功能20. Config-register 修改设置寄存器设置21. Configure 允许进入存在的设置模式,在中心站点上维护并保存设置信息22. Configure memory 从NVRAM加载设置信息23. Configure terminal 从终端进行手动设置24. Connect 打开一个终端连接25. Copy 复制设置或映像数据26. Copy flash tftp 备份系统映像文件到TFTP服务器27. Copy running-config startup-config 将RAM中的当前设置存储到NVRAM28. Copy running-config tftp 将RAM中的当前设置存储到网络TFTP服务器上29. Copy tftp flash 从TFTP服务器上下载新映像到Flash30. Copy tftp running-config 从TFTP服务器上下载设置文件31. Debug 使用调试功能32. Debug dialer 显示接口在拨什么号及诸如此类的信息33. Debug ip rip 显示RIP路由选择更新数据34. Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息35. Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息36. Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程37. Debug ppp 显示在实施PPP中发生的业务和交换信息38. Delete 删除文件39. Deny 为一个已命名的IP ACL设置条件40. Dialer idle-timeout 规定线路断开前的空闲时间的长度41. Dialer map 设置一个串行接口来呼叫一个或多个地点42. Dialer wait-for-carrier-time 规定花多长时间等待一个载体43. Dialer-group 通过对属于一个特定拨号组的接口进行设置来访问控制44. Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL和协议的组合来控制控制拨号45. Dir 显示给定设备上的文件46. Disable 关闭特许模式47. Disconnect 断开已建立的连接48. Enable 打开特许模式49. Enable password 确定一个密码以防止对路由器非授权的访问50. Enable password 设置本地口令控制不同特权级别的访问51. Enable secret 为enable password命令定义额外一层安全性(强制安全,密码非明文显示)52. Encapsulation frame-relay 启动帧中继封装53. Encapsulation novell-ether 规定在网络段上使用的Novell 独一无二的格式54. Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法55. Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco的密码是sap56. End 退出设置模式57. Erase 删除闪存或设置缓存58. Erase startup-config 删除NVRAM中的内容59. Exec-timeout 设置EXEC命令解释器在检测到用户输入前所等待的时间60. Exit 退出所有设置模式或关闭一个激活的终端会话和终止一个EXEC61. Exit 终止所有设置模式或关闭一个活动的对话和结束EXEC62. format 格式化设备63. Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)64. Help 获得交互式帮助系统65. History 查看历史记录66. Hostname 使用一个主机名来设置路由器,该主机名以提示符或缺省文件名的方式使用67. Interface 设置接口类型并且输入接口设置模式68. Interface 设置接口类型和进入接口设置模式69. Interface serial 选择接口并且输入接口设置模式70. Ip access-group 控制对一个接口的访问71. Ip address 设定接口的网络逻辑地址72. Ip address 设置一个接口地址和子网掩码并开始IP处理73. Ip default-network 建立一条缺省路由74. Ip domain-lookup 允许路由器缺省使用DNS75. Ip host 定义静态主机名到IP地址映射76. Ip name-server 指定至多6个进行名字-地址解析的服务器地址77. Ip route 建立一条静态路由78. Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互连网协议(IP)的处理过程79. Ipx delay 设置点计数80. Ipx ipxwan 在串口上启动IPXWAN协议81. Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量82. Ipx network 在一个特定接口上启动互连网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)83. Ipx router 规定使用的路由选择协议84. Ipx routing 启动IPX路由选择85. Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新86. Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受87. Isdn spid1 在路由器上规定已由ISDN业务供给商为B1信道分配的业务简介号(SPID)88. Isdn spid2 在路由器上规定已由ISDN业务供给商为B2信道分配的业务简介号(SPID)89. Isdntch-type 规定了在ISDN接口上的中心办公区的交换机的类型90. Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制91. Lat 打开LAT连接92. Line 确定一个特定的线路和开始线路设置93. Line concole 设置控制台端口线路94. Line vty 为远程控制台访问规定了一个虚拟终端95. Lock 锁住终端控制台96. Login 在终端会话登录过程中启动了密码检查97. Login 以某用户身份登录,登录时允许口令验证98. Logout 退出EXEC模式99. Mbranch 向下跟踪组播地址路由至终端100. Media-type 定义介质类型101. Metric holddown 把新的IGRP路由选择信息和正在使用的IGRP路由选择信息隔离一段时间102. Mrbranch 向上解析组播地址路由至枝端103. Mrinfo 从组播路由器上获取邻居和版本信息104. Mstat 对组播地址多次路由跟踪后显示统计数字105. Mtrace 由源向目标跟踪解析组播地址路径106. Name-connection 命名已存在的网络连接107. Ncia 开启/关闭NCIA服务器108. Network 把一个基于NIC的地址分配给一个和他直接相连的路由器把网络和一个IGRP的路由选择的过程联系起来在IPX路由器设置模式下,在网络上启动加强的IGRP109. Network 指定一个和路由器直接相连的网络地址段110. Network-number 对一个直接连接的网络进行规定111. No shutdown 打开一个关闭的接口112. Pad 开启一个X.29 PAD连接113. Permit 为一个已命名的IP ACL设置条件114. Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断115. Ping 发送回声请求,诊断基本的网络连通性116. Ppp 开始IETF点到点协议117. Ppp authentication 启动Challenge握手鉴权协议(CHAP)或密码验证协议(PAP)或将两者都启动,并且对在接口上选择的CHAP和PAP验证的顺序进行规定118. Ppp chap hostname 当用CHAP进行身份验证时,创建一批似乎是同一台主机的拨号路由器119. Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制120. Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP对同等层请求数据包验证过程中使用sent-username和password121. Protocol 对一个IP路由选择协议进行定义,该协议能是RIP,内部网关路由选择协议。

思科命令大全(完整版)

思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度IOS:switch(config-if)# speed{10|100|auto}CLI:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list CLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道IOS:switch(config-if)# port group group-number [distribution {source|destination}] CLI:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况: router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录: switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

Cisco(思科)语法命令大全

Cisco(思科)语法命令大全

Cisco(恩科)命令大全switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号" 注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLAN(虚拟局域网)configure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

干货!思科网络设备配置命令大全

干货!思科网络设备配置命令大全

干货!思科网络设备配置命令大全础配置1思科设备管理基础命令enable 从用户模式进入特权模式configure terminal 进入配置模式interface g0/0进入千兆以太网接口g0/0ip address 172.16.0.1 255.255.0.0配置接口的 ip 地址no shutdown 开启接口line vty 0 4进入虚拟终端 vty 0 - vty 4password CISCO配置认证密码login 用户要进入路由器,需要先进行登录exit 退回到上一级模式enable password CISCO配置进入特权模式的密码,密码不加密end 直接回到特权模式show int g0/0 显示 g0/0 接口的信息hostname Terminal-Server 配置路由器的主机名enable secret ccielab 配置进入特权模式的密码,密码加密no ip domain-lookup 路由器不使用 DNS 服务器解析主机的 IP地址logging synchronous 路由器上的提示信息进行同步,防止信息干扰我们输入命令no ip routing 关闭路由器的路由功能ip default-gateway 10.1.14.254 配置路由器访问其他网段时所需的网关show line 显示各线路的状态line 33 48 进入 33-48 线路模式transport input all 允许所有协议进入线路int loopback0 进入 loopback0 接口ip host R1 2033 1.1.1.1 为 1.1.1.1 主机起一个主机名alias exec cr1 clear line 33 为命令起一个别名privilege exec level 0 clear line把命令 clear line 的等级改为 0,在用户模式下也可以执行它banner motd 设置用户登录路由器时的提示信show ip int brief 查看接口状态2VLAN相关命令vlan X 创建VLAN Xname SPOTO 将VLAN X命名为SPOTOexit 退出当前模式interface e0/0 进入以太网接口e0/0switchport mode access 将二层接口设置为接入模式switchport access vlan X 将接口划入vlan Xinterface e0/1switchport trunk encapsulation dot1q trunk链路封装协议为 802.1qswitchport mode trunk 将二层接口配置模式为 trunkswitchport trunk allow vlan X trunk接口单独放行某个 vlan。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

933a
LMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。

# fram-relay intf-typ ABC
ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。

# frame_relay interface_dlci 110 br
配置DLCI(数据链路连接标识符)。

# frame-relay map ip ABCD XXXX broadcast
建立帧中继映射。

ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。

# no shutdown
激活本端口.
# exit
---- 5 .帧中继子接口的配置:
# conf t
# int s0.1 point-to-point
对应S0的子接口1,点对点方式。

# ip addr ABCD XXXX
ABCD为子口1的IP地址,XXXX为子网掩码。

# frame-relay intreface-dlci 100 br 6.配置拨号备份
(1).配置备份主口
# conf t
# int s0
S0为主口.
# backup int asy 1
A1口为备份口.
# backup delay 0 1
延时1秒.
(2).配置虚拟接口
# conf t
# ip addr ABCD XXXX
ABCD为虚拟接口IP地址,XXXX为子网掩码。

# encap ppp
封装ppp协议.
# dialer in-band
激活随叫随拨功能.
# dialer idle-timeout 7200
# dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.ABCD为对方拨号口的ip地址,6225481为对应的电话号码。

# dialer_group 1 定义拨号组成员.
(3).配置防火墙
# dialer_list 1 pro ip permit
允许ip协议通过。

(4).配置连接口令
# user name ABCD pass XXXX
ABCD为对方主机名,XXXX为连接口令.
(5).配置拨号字符串
# chat-script call ABORT BUSY ABORT ERROR"" atdt 6335481 TIMEOUT 45 "CONNECT" 6335481为对方电话号码。

(6).配置拨号连接密码
# conf t
# username ROU1 pass XXXX
ROU1为对方路由器名,XXXX为连接密码。

(7).配置线路
# conf t
# line aux 0
# modem inout
MODEM双向传输。

# modem autoconfigure discovery
# transport input all
# rxspeed 51200
MODEM的收发速率为51200 。

7.配置同步/异步口(适用于2522)
# conf t
# int s2
# ph asyn
配置S2为异步口.
# ph sync、
配置S2为同步口.
8.动态路由的配置
# conf t
# router eigrp 20
使用EIGRP路由协议。

常用的路由协议有RIP,IGRP,IS-IS等。

# passive-interface serial0
若S0与X.25相连,则输入本条指令。

# passive-interface serial1
若S1与X.25相连,则输入本条指令。

# network ABCD
ABCD为本机的以太网地址。

# network XXXX
XXXX为S0的ip地址。

# no auto-summary
# exit
9.静态路由的配置
# ip router ABCD XXXX YYYY 90
ABCD为对方路由器的以太网地址;XXXX为子网掩码.;YYYY为对方对应的广域网端口地址。

# dialer-list 1 protocol ip permail
10.备份配置文件到硬盘
# copy run tftp
在硬盘上建立一个空文件且有读写权限,才能备份成功.
11.恢复备份配置文件到路由器
# copy tftp run
12.在路由器上建一个备份
# copy run start。

相关文档
最新文档