cisco交换机和路由器配置命令全集
思科交换机和路由器配置命令简写与完整对照(Excel文章多个页签_下载可见)

完整命令
将端口加入到VLAN switch(config)#interface f0/2 switch(config-if)#switchport access vlan 30 验证VLAN配置信息 switch#show vlan brief switch#show vlan-switch 删除VLAN中的端口 1:switch(config-if)#no switchport access vlan 3 switch(config-if)#end 2:switch(config-if)#default interface f0/2 Building configuration...
宣告启用RIP的
switch(config)#end 同时将多个端口加入VLAN并验证 switch(config)#interface range f0/3 - 10 switch(config-if-range)#switchport access vlan 3 switch(config)#end switch#show vlan-switch 配置VLAN TRUHK switch(config)#interface f0/15 switch(config-if)#switchport mode trunk 从TRUNK中添加某个VLAN switch(config)#interface f0/15
switch(config-if)#no shutdown 删除交换机接口IP地址 switch(config-if)#no ip address 配置交换机默认网关 switch(config)#ip default-gateway 192.168.0.1 查看交换机的MAC地址表 switch#show mac-address-table 查看思科交换机相邻设备的详细信息 switch#show cdp neighbors detail 保存交换机配置 1:switch#copy running-config startup-config 2:switch#write 恢复交换机出厂配置 switch#erase startup-config switch#reload 创建VLAN switch#vlan database switch(vlan)#vlan 30 switch(vlan)#exit VLAN重命名 switch(vlan)#vlan 20 name benet VLAN 20 modified: Name: benet 删除VLAN switch(vlan)#no vlan 20 Deleting VLAN 2... switch(vlan)#exit
思科路由器交换机配置命令

思科路由器交换机配置命令1思科路由器常用配置命令一览表:1、Exec commands:<1-99> 恢复一个会话bfe 手工应急模式设置clear 复位功能clock 管理系统时钟configure 进入设置模式connect 打开一个终端copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能disable 退出优先命令状态disconnect 断开一个网络连接enable 进入优先命令状态erase 擦除快闪内存exit 退出exce模式help 交互帮助系统的描述lat 打开一个本地传输连接lock 锁定终端login 以一个用户名登录logout 退出终端mbranch 向树形下端分支跟踪多路由广播mrbranch 向树形上端分支跟踪反向多路由广播name-connection 给一个存在的网络连接命名no 关闭调试功能pad 打开X.29 PAD连接ping 发送回显信息ppp 开始点到点的连接协议reload 停机并执行冷启动resume 恢复一个活动的网络连接rlogin 打开远程注册连接rsh 执行一个远端命令send 发送信息到另外的终端行setup 运行setup命令show 显示正在运行系统信息slip 开始SLIP协议start-chat 在命令行上执行对话描述systat 显示终端行的信息telnet 远程登录terminal 终端行参数test 测试子系统内存和端口tn3270 打开一个tin3270连接trace 跟踪路由到目的地undebug 退出调试功能verify 验证检查闪烁文件的总数where 显示活动的连接which-route 执行OSI路由表查找并显示结果write 把正在运行的设置写入内存、网络、或终端x3 在PAD上设置X.3参数xremote 进入xremote模式2、#show ?access-expression 显示访问控制表达式access-lists 显示访问控制表apollo Apollo 网络信息appletalk Apple Talk 信息arap 显示Appletalk 远端通道统计arp 地址解析协议表async 访问路由接口的终端行上的信息bridge 前向网络数据库buffers 缓冲池统计clns CLNS网络信息clock 显示系统时钟cmns 连接模式网络服务信息compress 显示压缩状态configuration 非易失性内存的内容controllers 端口控制状态debugging 调试选项状态decnet DEC网络信息dialer 拨号参数和统计dnsix 显示Dnsix/DMPP信息entry 排队终端入口extended 扩展端口信息flash 系统闪烁信息flh-log 闪烁装载帮助日志缓冲区frame-relay 帧中继信息history 显示对话层历史命令hosts IP域名,查找方式,名字服务,主机表interfaces 端口状态和设置ip IP信息ipx Novell IPX信息isis IS-IS路由信息keymap 终端键盘映射lat DEC LAT信息line 终端行信息llc2 IBM LLC2 环路信息lnm IBM 局网管理local-ack 本地认知虚环路memory 内存统计netbios-cache NetBios命名缓冲存贮器内存node 显示已知LAT 节点ntp 网络时间协议processes 活动进程统计protocols 活动网络路由协议queue 显示队列内容queueing 显示队列设置registry 功能注册信息rhosts 远程主机文件rif RIF存贮器入口route-map 路由器信息sdlle 显示sdlc-llc2转换信息services 已知LAT服务sessions 远程连接信息smds SMDS信息source-bridge 源网桥参数和统计spanning-tree 跨越树形拓朴stacks 进程堆栈应用standby 热支持协议信息stun STUN状态和设置subsystem 显示子系统tcp TCP连接状态terminal 显示终端设置tn3270 TN3270 设置translate 协议转换信息ttycap 终端容易表users 显示终端行的信息version 系统硬、软件状态vines VINES信息whoami 当前终端行信息x25 X.25信息xns XNS信息xermote Xremote统计3、#config ?Memory 从非易失性内存设置Network 从TFTP网络主机设置Overwrite-network 从TFTP网络主机设置覆盖非易失性内存Terminal 从终端设置4、Configure commads:Access-list 增加一个访问控制域Apollo Apollo全局设置命令appletalk Appletalk 全局设置命令arap Appletalk远程进出协议arp 设置一个静态ARP入口async-bootp 修改系统启动参数autonomous-system 本地所拥有的特殊自治系统成员banner 定义注册显示信息boot 修改系统启动时参数bridge 透明网桥buffers 调整系统缓冲池参数busy-message 定义当连接主机失败时显示信息chat-script 定义一个调制解调器对话文本clns 全局CLNS设置子命令clock 设置时间时钟config-register 定义设置寄存器decnet 全局DEC网络设置子命令default-value 缺省字符位值dialer-list 创建一个拨号清单入口dnsix-nat 为审计提供DMDM服务enable 修改优先命令口令end 从设置模式退出exit 从设置模式退出frame-relay 全局帧中继设置命令help 交互帮助系统的描述hostname 设置系统网络名iterface 选择设置的端口ip 全局地址设置子命令ipx Novell/IPX全局设置命令keymap 定义一个新的键盘映射lat DEC本地传输协议line 设置终端行lnm IBM局网管理locaddr-priority-list 在LU地址上建立优先队列logging 修改注册(设备)信息login-string 定义主机指定的注册字符串map-class 设置静态表类map-list 设置静态表清单menu 定义用户接口菜单mop 设置DEC MOP服务器netbios NETBIOS通道控制过滤no 否定一个命令或改为缺省设置ntp 设置NTPpriority-list 建立特权列表prompt 设置系统提示符queue-list 建立常规队列列表rcmd 远程命令设置命令rcp-enable 打开Rep服务rif 源路由进程router-map 建立路由表或进入路由表命令模式router 打开一个路由进程rsh-enable 打开一个RSH服务sap-priority-list 在SAP或MAC地址上建立一个优先队列service 修改网络基本服务snmp-server 修改SNMP参数state-machine 定义一个TCP分配状态的机器stun STUN全局设置命令tacacs-server 修改TACACS队列参数terminal-queue 终端队列命令tftp-server 为网络装载请求提供TFTP服务tn3270 tn3270设置命令translate 解释全局设置命令username 建立一个用户名及其权限vines VINES全局设置命令x25 X.25 的第三级x29 X.29 命令xns XNS 全局设置命令xremote 设置Xremote5、(config)#ipGlobal IP configuration subcommands:Accounting-list 选择保存IP记帐信息的主机Accounting-threshold 设置记帐入口的最大数accounting-transits 设置通过入口的最大数alias TCP端口的IP地址取别名as-path BGP自治系统路径过滤cache-invalidate-delay 延迟IP路由存贮池的无效classless 跟随无类前向路由规则default-network 标志网络作为缺省网关候选default-gateway 指定缺省网(如果没有路由IP)domain-list 完成无资格主机的域名domain-lookup 打开IP域名服务系统主机转换domain-name 定义缺省域名forward-protocol 控制前向的、物理的、直接的IP广播host 为IP主机表增加一个入口host-routing 打开基于主机的路由(代理ARP和再定向)hp-host 打开HP代理探测服务mobile-host 移动主机数据库multicast-routing 打开前向IPname-server 指定所用名字服务器的地址ospf-name-lookup 把OSPF路由作为DNS名显示pim PIM 全局命令route 建立静态路由routing 打开IP路由security 指定系统安全信息source-route 根据源路由头的选择处理包subnet-zero 允许子网0子网tcp 全局TCP参数2思科交换机常用配置命令switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名hostname aptech2950 以aptech2950为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。
思科交换机 路由器配置命令大全

思科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路由协议。
交换机路由器命令合集(思科)

交换机路由器命令合集(思科)1.基础Switch> !⼀般⽤户模式Switch# !特权模式Switch(config)# !全局配置模式Switch(config)#honstname S1 !更改交换机设备[h S1]S1(config)#exit !从当前模式返回到上⼀级模式S1(config)#end !从任何模式直接退回到特权模式S1#show running-config !查看交换机配置S1(config)#do show running-config !查看交换机配置S1#save !保存配置⽂件,以便设备关闭电源重启后能继续使⽤2.配置a.对控制端⼝(Console)添加密码保护S1#configure terminal [conf t]S1(config)#line consloe 0 !进⼊控制⼝⾏配置模式S1(config-line)#password 123456 !设置密码为123456S1(config-line)#login !开始密码检查S1(config-line)#endS1#b.在全局配置模式下设置特权明⽂密码和密⽂密码(同时设置密⽂密码优先)S1(config)#enable password 123 !设置特权铭⽂密码为123S1(config)#enable secret 456 !设置特权密码为456c.使⽤Telnet远程登陆⽅式登陆交换机进⾏配置i。
设置交换机管理ip地址交换机出⼚时都有⼀个默认的虚拟端⼝VLAN1⽤于管理S1(config)#interface Vlan 1 !进⼊交换机默认的虚拟端⼝1,进⼊配置模式S1(config-if)#ip address 192.168.1.1 255.255.255.0 !配置虚拟端⼝的ip和⼦⽹掩码S1(config-if)#no shutdown !通常对端⼝作相关配置后都要开启端⼝S1(config-if)#exitS1(config)#ii。
思科路由器和交换机各种命令

交换机支持的命令:(注:交换机支持命令对应的为思科2系列以上型号的交换机。
)交换机基本状态:switch: ;交换机的ROM态rommon> ;路由器的R状态switch > ;用户模式switch# ;特权模式switch(config)# ;全局配置模式switch(vlan)# 交换机VLAN配置模式switch(config-if)# ;端口配置模式switch(config-line)# ; 指定连接状态(console连接telnet连接)交换机显示命令:switch#write ;保存配置信息switch#show running ;查看当前配置信息switch#show startup 查看交换机NVROM配置信息switch#show vlan ;查看vlan配置信息switch#show vlan-switch 同样为查看vlan配置信息(一些高端交换机比如3系列的交换机必须用这个命令才能查看vlan配置信息)switch#show vtp status 查看VTP配置信息switch#show interface ;查看所有的端口信息switch#show interface f0/3 ;查看指定的f0/3快速以太网端口信息switch#show interfacef0/3 switchport 查看指定的f0/3快速以太网端口trunk信息switch #show ip inerface brief 用类似表格的形式列出路由器或者交换机接口对应的第三层配置,这个命令是使用频率最高的一个,也是最实用的一个。
switch #show spanning-tree 查看交换机生成树协议情况switch #show spanning-tree vlan 2 查看交换机VLAN2的生成树协议情况switch #show spanning-tree interface f0/1 查看交换机F0/1端口生成树协议情况switch #show cdp 显示交换机当前邻居更新信息switch #show cdp neighbor ;显示邻居直连路由信息switch #show cdp neighbor detail 显示邻居直连路由详细信息switch #show cdp interface 显示所有端口是否开启cdp功能switch (config-if)#no cdp enable 关闭指定端口的cdp功能switch (config-if)#cdp enable 打开指定端口的cdp功能switch (config)#no cdp run 关闭所有端口的cdp功能switch (config)#cdp run 打开所有端口的cdp功能switch#show version 查看交换机版本信息switch#show flash 查看flash里面的IOS信息switch#show mac-address-table 查看交换机所有端口的MAC地址信息switch#show logging 查看交换机日志信息交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <hostname> 设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令(真正进入enable特权模式需要输入这个口令)switch(config)#enable password xxa ;设置特权非密口令登录console控制台需要输入密码的方法switch(config)#line console 0 ;进入console控制台口switch(config-line)#login ;允许登录控制台switch (config-line)# password xx 设置登陆控制台口口令switch (config-line)#exec-timeout 0 0 设置控制台口多长时间不操作会自动退出,前面一个0表示分钟后面一个0表示秒两个都是0表示一直不会自动退出。
思科交换机路由基本配置命令

思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。
下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。
cisco交换机和路由器配置命令大全

cisco交换机和路由器配置命令大全最近在学习交换机和路由器的配置,把整理的资料发到博文上,以便日后的学习。
switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#noshut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet0/17 以17端口为例aptech2950(conf-if)#duplexfull/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。
思科交换机路由器命令大全

思科交换机路由器命令大全思科交换机和路由器命令大全本文档为思科交换机和路由器命令的最新最全范本,供参考使用。
以下是详细的命令列表,包括每个命令的说明和用法。
一、接口配置命令1、ip address:设置接口的IP地质示例:ip address 192.168.1.1 255.255.255:02、no shutdown:启用接口示例:no shutdown3、duplex:设置接口的双工模式示例:duplex auto4、speed:设置接口的速度示例:speed 1005、exit:退出接口配置模式示例:exit二、VLAN命令1、vlan database:进入VLAN数据库模式示例:vlan database2、vlan id name:创建VLAN并设置名称示例:vlan 10 name VLAN-103、vlan id:删除VLAN示例:no vlan 104、show vlan:显示VLAN信息示例:show vlan5、exit:退出VLAN数据库模式示例:exit三、路由命令1、ip route:设置静态路由示例:ip route 192.168.2:0 255.255.255:0 192.168.1.22、router rip:启用RIP路由协议示例:router rip3、network:将网络添加到RIP路由表中示例:network 10:0:0:04、redistribute:将静态路由或其他路由协议添加到RIP路由表中示例:redistribute static5、exit:退出路由配置模式示例:exit四、ACL命令1、access-list:创建标准或扩展ACL示例:access-list 10 permit 192.168.1:0 0:0:0.2552、ip access-group:应用ACL到接口示例:ip access-group 10 in3、show access-lists:显示ACL信息示例:show access-lists4、exit:退出ACL配置模式示例:exit五、SNMP命令1、snmp-server community:设置SNMP团体字符串示例:snmp-server community public RO2、snmp-server enable traps:启用SNMP陷阱示例:snmp-server enable traps3、snmp-server host:配置SNMP陷阱接收主机示例:snmp-server host 192.168.1.1004、exit:退出SNMP配置模式示例:exit六、SSH命令1、ip ssh version:设置SSH协议版本示例:ip ssh version 22、crypto key generate rsa:RSA密钥对示例:crypto key generate rsa3、username:创建新的本地用户示例:username admin privilege 15 password password1234、exit:退出SSH配置模式示例:exit七、其他命令1、show running-config:显示当前配置示例:show running-config2、copy running-config startup-config:将当前配置保存到启动配置中示例:copy running-config startup-config3、reload:重新启动设备示例:reload4、exit:退出CLI命令行模式示例:exit本文档涉及附件:1、无附件本文所涉及的法律名词及注释:1、ACL(Access Control List):访问控制列表,用于控制网络流量的进出。
Cisco交换机命令大全

Cisco交换机命令大全Cisco:交换机配置命令Switch命令:一、模式命令:1. 用户模式:Switch>2. 特权模式:Switch>enableSwitch#3. 全局配置模式:Switch#config terminalSwitch(config)#4. 接口配置模式:Switch(config)#interface fastethernet0/1Switch(config-if)#5. Line模式:Switch(config)#line console 0Switch(config-line)#二、特权模式下的命令:1. 查看交换机MAC地址:Switch#show mac-address-table2. Cisco发现协议(CDP):Switch#show cdpSwitch#show cdp interface fastethernet0/1Switch#show cdp neighborsSwitch#show cdp neighbors detailSwitch#show cdp entry3. 保存交换机配置:Switch#copy running-config startup-config或者Switch#write4. 恢复交换机出厂值:Switch#erase startup-configSwitch#reload三、全局配置模式下的命令:1. 配置主机名:Switch(config)#hostname Sw1Sw1(config)#2、设置登陆台密码:Switch(config)#line console 0Switch(config-line)#password 密码Switch(config-line)#login3. 使能口令:Switch(config)#enable Password 密码4. 加密保存的使能口令:Switch(config)#enable secret 密码5. 配置IP地址:Switch(config)#interface vlan 1Switch(config-if)#ip address IP地址网关Switch(config-if)#no shutdown6. 配置交换机网关:Switch(config)#ip default-gateway 网关四、VLAN配置命令:1. 创建vlan命令:a) 全局配置模式下:Switch(config)#vlan 2Switch(config)#name v2Switch(config)#mtu 数值Switch(config)#endb) Vlan数据库下:Switch#vlan databaseSwitch#vlan 2 name v2Switch#vlan 2 mut 数值Switch#exit2. 删除vlan命令:a) 全局配置模式下:Switch(config)#no vlan 2Switch(config)#endb) Vlan数据库下:Switch#no vlan 2 name v2Switch#exit3. 在vlan中添加端口:Switch#config terminalSwitch(config)#interface f0/1(端口)Switch(config-if)#Switchport mode accessSwitch(config-if)#switchport access vlan 2Switch(config-if)#end一次将多个端口添加到vlan中:Switch#config terminalSwitch(config)#interface range f0/1 - 5(端口)Switch(config-if)#switchport access vlan 2Switch(config-if)#end注:switch#show vlan biref(查看vlan信息)4. 配置vlan trunk:1. 配置接口为trunk命令:Switch(config)# interface f0/1(端口)Switch(config-if)#Switchport mode trunk2. 配置接口为动态协商模式的命令:Switch(config)# interface f0/1(端口)Switch(config-if)#switchport mode dynamic desirable/auto 3. 从trunk中删除vlan:Switch(config)# interface f0/1(端口)Switch(config-if)#Switchport trunk allowed vlan remove 2 4. 在trunk中添加vlan:Switch(config)# interface f0/1(端口)Switch(config-if)#Switchport trunk allowed vlan add 2-----------------------------------------------------------Catalyst 2950交换机密码恢复(1)拔下交换机的电源。
思科交换机路由器常规配置命令大全

思科交换机路由器常规配置命令大全你还在为不知道思科交换机路由器常规配置命令大全而烦恼么?接下来是小编为大家收集的思科交换机路由器常规配置命令大全教程,希望能帮到大家。
思科交换机路由器常规配置命令大全一、基本路由器的检验命令show versionshow processesshow protocolsshow memshow ip routeshow startup-configshow running-configshow flash>show interfaces二、基本路由配置命令进入:config terminal/memory/network 配置网络时常采用的命令:copy和load1.标识:hostname 标识名2.启动标识:banner 启动标识3.接口:interface 端口号4.密码:line 0 6loginpasswd 口令enable password/secret 口令5.接口:1)配置端口interface 端口号clock rate 时钟速率(64000)/* 在串口中配置*/ bandwidth 带宽(缺省56) /* 在串口中配置*/ media-type 介质类型/* 在以太网口上*/ early-token release /* 在令牌环网口上*/ ring-speed 16 /* 在令牌环网口上*/no shutdownwrite memory2)检验端口show interfacesshow controllers6. 配置环境1) 引导方式boot system flash IOS-filenameboot system tftp IOS-filename tftp-address boot system rom2) 配置Register值config-register 0x21027. 查看邻居路由show cdp interfaceshow cdp neighbors [detail]show cdp entry routerA8.IP Address 配置Ip address 网络地址掩码Ip host 主机名addressIp name-server 服务器地址1 服务器地址2 。
思科交换路由常用命令

交换路由常用命令一、基础配置1、修改主机名配置:S(config)#hostname SWITCHA2、enable口令:Switch(config)#enable password1233、TELNET:只需密码的telnet需用户名和密码的telnetS(config)#line vty04S(config)#username S2password123S(config-line)#password123S(config)#line vty04S(config-line)#login//启用登陆时口令检查S(config-line)#login local//启用登陆本地验证只允许pc所在的网段对交换路由进行远程登陆:S(config)#access-list99permit192.168.1.00.0.0.255S(config)#line vty04S(config-line)#access-class99inS(config-line)#password123S(config-line)#login4、console配置:S(config)#line console0S(config-line)#password123S(config-line)#login5、显示当前配置:switch#show run6、保存当前配置:switch#write7、进入全局配置模式:switch#conf t8、进入接口配置模式:S(config)#interface f0/1二、二层接入交换机常见配置1、创建vlan10及命名:S(config)#vlan10S(config-vlan)#name caiwubu2、多个端口划分入vlan:vlan:S(config)#int range fa0/1-5S(config-if)#sw access vlan103、接口trunk模式配置:S(config)#inter f0/0S(config-if)#sw mode trunk4、二层交换机管理ip配置:S2(config)#interface vlan100//进入vlan100接口S2(config-if)#ip address192.168.10.1255.255.255.0//为vlan100接口上设置管理ip S2(config)#ip default-gateway192.168.10.2545、生成树配置:S(config)#spanning-tree mode rapid-pvst//配置快速生成树S(config)#spanning-tree vlan10,20priority0//配置根网桥S(config)#spanning-tree vlan10,20,30priority4096//配置备份根网桥6、端口双工、带宽设置:S(config)#int F0/2S(config-if)#duplex fullS(config-if)#speed100三、三层交换机常见配置1、三层交换机开启路由功能:S(config)#ip routing//开启后可实现vlan间相互通信2、三层交换机接口配置成路由口:S(config-if)#no swtichport//在接口模式下配置,可配置ip地址3、三层交换机创建SVI接口(SVI接口常作为vlan的网关):S(config)#interface vlan104、三层交换机接口改trunk模式:Switch(config-if)#switchport trunk encapsulation dot1q//先封装Switch(config-if)#switchport mode trunk//再设置trunk模式5、trunk允许vlan通过:S(config)#inter fa0/23S(config-if)#switchport trunk allowed vlan2,3//trunk口只让vlan2,3通过S(config-if)#switchport trunk allowed vlan all//trunk口允许所有的vlan通过四、路由器常见配置1、ip地址设置:router(config-if)#ip address192.168.1.1255.255.255.0//接口模式下配置2、静态路由配置:router(config)#ip route192.168.1.0255.255.255.010.1.1.1{f0/0}//下一跳地址可替换为出接口3、默认路由配置:router(config)#ip route0.0.0.00.0.0.010.1.1.14、浮动静态路由作为备份路由:R(config)#ip route172.16.20.0255.255.255.010.10.10.4R(config)#ip route172.16.20.0255.255.255.010.10.10.6100//路由开销值100比默认值1大,作为备份路由5、路由可达,有去有回。
思科路由器命令大全完整版

思科路由器命令大全完整版一、基本配置命令1、`enable`:进入特权模式。
2、`configure terminal`:进入全局配置模式。
3、`hostname 主机名`:设置路由器的主机名。
4、`interface 接口类型接口编号`:进入指定接口的配置模式,例如`interface ethernet 0/0`。
5、`ip address IP 地址子网掩码`:为接口配置 IP 地址和子网掩码。
6、`no shutdown`:启用接口。
二、路由配置命令1、`ip route 目标网络子网掩码下一跳地址`:添加静态路由。
2、`router ospf 进程号`:启用 OSPF 路由协议,并指定进程号。
3、`network 网络地址反掩码 area 区域号`:在 OSPF 中宣告网络。
三、访问控制列表(ACL)命令1、`accesslist 编号 permit|deny 源地址源掩码目的地址目的掩码协议端口`:创建访问控制列表规则。
2、`ip accessgroup 编号 in|out`:将访问控制列表应用到接口的入站或出站方向。
四、NAT 配置命令1、`ip nat inside source list 访问控制列表编号 interface 外部接口overload`:配置 PAT(端口地址转换)。
2、`interface 接口 ip nat inside`:指定接口为内部接口。
3、`interface 接口 ip nat outside`:指定接口为外部接口。
五、VLAN 配置命令1、`vlan VLAN 号`:创建 VLAN。
2、`name VLAN 名称`:为 VLAN 命名。
3、`interface vlan VLAN 号`:进入 VLAN 接口配置模式。
六、端口镜像命令1、`monitor session 会话号source interface 源接口`:指定源端口。
2、`monitor session 会话号 destination interface 目的接口`:指定目的端口。
Cisco(恩科)路由器-交换机命令大全

Cisco(恩科)路由器-交换机命令大全1.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号或旧的来进行修改。
CISCO交换机配置命令大全

CISCO交换机配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令: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-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于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}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN: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)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线: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的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于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}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征: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|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 multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(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高速缓存区的内容。
思科路由器交换机配置命令大全

思科路由器交换机配置命令大全1. 交换机支持的命令:交换机基本状态:switch: ;ROM状态,路由器是rommon> hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#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 ;当前端口加入vlan 2 switch(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 ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息2. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xxrouter(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address ;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address ;设置子接口IProuter(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
CISCO交换机和路由器基本配置

一CISCO交换机和路由器基本配置交换机的配置1用户模式switch >2进入特权模式switch > enable3 进入全局配置模式,全局模式的配置对整个交换机生效. switch # config terminalswitch (config)#4进入接口模式,配置只对当前的接口生效switch(config) # interface f0/1switch(config-if) #进入line 模式,这个模式主要用来对控制台做相应的配置5 switch(config) # line console 0switch(config-line)6配置主机名switch(config) #hostname 主机名7配置使能口令switch(config) # enable password 密码8 配置加密使能口令switch(config) # enable secret 密码9配置ip地址switch(config) # interface vlan 1switch(config) # ip add ip地址子网掩码switch(config) # no shutdown10配置交换机的网关switch(config) # ip default-gateway ip地址11 保存配置switch # copy runing-config startup-configswitch # write12清空配置switch # erase startup-config13 清空接口配置switch (config) # interface f0/1switch (config-if) # default interface f0/114清空交换机密码(1) 关闭电源.(2) 开启电源, 并且按住交换机的mode键,当交换机进入................................ ................................flash_initload_helperbootswitch:(3) 在switch 后执行 flash_init命令switch: flash-init(4) 在查看flash中的文件switch: dir flash:/(5) 把config.text文件后缀名改了就可以,并且重新启动.(交换机重启后不会在读取配置文件了)switch:rename flash:config.text config.oldswitch:boot(6) 启动后进入特权模式查看flash里面的文件,并且把config.text文件改回来.并且把flash里面的文件复制到内存中switch # rename flash:config.old flash:config.textswitch # copy startup-config running-config15创建vlan 2switch (config) # vlan 216删除vlan 2switch (config) # no vlan 217 把端口 f0/5到10 添加到vlan 2switch (config) # interface range f0/5 - 10switch (config) # switchport access vlan 218将f0/1设置成中 trunkswitch (config) # interface f0/1switch (config) # switchport mode trunk19将f0/1 设置成期望型或自动型switch (config) # switchport dynamic desirable / auto20如果不需要trunk 传送vlan 2的数据,可以将vlan 2 从trunk中删除.switch (config) # interface f*/* (trunk接口)switch (cofnig-if) # switchprot trunk allowed vlan remove vlan 221也可以添加vlan 2switch (config) # interface f*/* (trunk接口)switch (config) # switchprot trunk allowed vlan add vlan 2二交换机的查看命令switch # show mac-address-table 查看本机的mac地址表switch # show cdp neighbors 列出与本设备相连的cisco设备switch # show running-config 查看交换机的配置switch # show vlan brief 查看vlan的详细信息switch # show Internet trunk 可以查看生成树协议三路由器配置命令1 配置默认路由route (config) # ip route 0.0.0.0 0.0.0.0 下一跳2 配置静态路由route (config) # ip route 目的ip 子网掩码下一跳3 对所有密码进行加密route (config) # enable password-encryption4 如果要使enable密码也以加密的形式保存在running-config中,中需运行route (config) # service password-encryption5 接口route (config-if) # speed 10/100/auto (配置速率)route (config-if) # duplex auto/full/half (工作模式,自动/半双工/全双工)route (config-if) # description 文本 (接口模式为当前接口列出希望跟踪的信息文本)6 对接口进行标识route (config) # interface f0/1route (config) # description 内容7 配置超时route (route) # line console 0route (route_line) #exec-timeout 0 0 (第一个0代表分钟,第二个0代表秒)8 配置telnetroute (route) # line vty 05 (配置同时登陆的个数)route (route) # password 密码 (配置telnet密码)route (route) # login9 配置sshroute (route) # line vty 05route (route-line) # transport ipput telnet ssh (同时接受telnet和ssh登陆)route (route) # username 用户名 password 密码 (配置用户名和密码)route (route) # ip domain-name 域名 (配置一个dns域名)route (route) # crypto key generate RSA (配置交换机生成一对匹配的公钥和私钥,以及一个共享的加密密钥)route # show crypto key mypubkey rsa (查看ssh密钥的副本)route # show running-config | begin line vty (查看当前运行的配置,从包含第一个line bty开始)10显示同步route (config) # line ocnsole 0route (config_line) # logging synchronous11 配置禁用dnsroute (config) # no ip domain-lookup12 路由器的密码恢复(1) 重新启动路由器,在启动的60 s内按下ctrl + break 使路由器进入rom monitor模式(2) 在提示符下输入命令修改配置寄存器的值,然后程序启动rommon 1>confreg 0x2142rommon 2>resetroute >enableroute #copy startup-config running-config (然后修改密码在保存)route #config-register 0x2102 (上系统在启动时读取配置文件)route # write13 路由器和交换机的单臂路由route (config) # interface 接口类型槽位/接口序号.子接口route (config-subif) # ip add ip地址子网掩码route (config-subif) # encapsolation dot1q vlan-id14 rip路由协议的配置rip v2的配置route (config) # route riproute (config-route) # version 2route (config-route) # no uato -summaryroute (config-route) # network 主网络宣告主网络号四路由器查看命令route # show interface 接口查看接口的状态route # show ip int b 查看接口起用状态route # show ip route 查看路由表route # show version 查看路由器的版本信息route # show clock 查看路由器当前的时间route # show ip protocol 查看路由协议配置route # show protocols 显示配置的协议route # show debug ip rip 开启调试命令route # Trace ip地址跟踪ip 路由五备份los和上传losroute # copy startup-config tftp 备份losroute # copy tftp startup-config 上传losroute # copy running-config tftp 备份配置文件route # copy tftp running-config 下载配置文件六组合键ctrl + shift + 6 中止解析ctrl + z 取消上一次操作七 vtp协议1 vtp 协议慨述vtp 是vlan.中继协议,vtp协议是cisco的专用协议,做作用如下:(1) 保持vlan配置的一致性(2) 提供从一个交换机在正规管理域增加虚拟局域网的方法2 vtp的工作原理要使用vtp,就必须为每台交换机指定vtp域名一台交换机只能属于一个vtp域,不同域中的交换机不能共享vtp信息.vtp服务器上进行了vlan配置变更后,所做的vtp域内的所有交换机上.vtp消息通过所有的中继连接进行传播.域内的交换机都必须使用相同的vtp域名,不论是同配置实现,还是由交换机自动学到.交换机必须是相邻的,在交换机之间,必须启用中继.3 vtp的运行模式(1) 服务器模式每个域中至少有一个服务器,服务器可以创建,修改,删除vlan信息,向外提供vtp通告.并且会监听学习域名相同的vtp通告.(2) 客户机模式每个域中至少有一个客户机,客户机不可以创建,修改,删除vlan信息.但向外发送vtp请求.并且会监听学习域名相同的vtp通告.(3) 透明模式能转发vtp消息.可以创建和删除本地的vlan信息.4 vtp 的通告来自客户机的通告请求-----服务器以汇总和子集通告作为回应.汇总通告-----在vlan1上,每隔300秒进行一次,每当拓扑发生改变时,也会发出该通告,包含了变化的配置修订号,配置发生改变和超时以后.都会发送汇总通告子集通告-----包含与vlan有关的详细信息5 vtp的配置switch (config) # vtp domain 域名switch (config) # vtp mode server | client | transparentswitch (config) # vtp vtp password 密码switch (config) # vtp pruning vtp修剪switch (config) # vtp version 2 运行版本2switch (config) # shutdown vlan 2 在该交换机上禁用vlan 2switch (config) # switchport trunk encapsulation dotlq | isl | negotiate 定义中继使用类型,假定中继已配置或经过协商的接口子命令.switch (config) # switchport voice vlan 定义来自cisco ip 电话以及用于发生帧的vlan接口子命令6 vtp 查看命令switch # show vtp status 查看vtp配置switch # show vtp password 查看vtp密码switch (config-~~~) # do show ~~~查看交换机或路由器配置八 stp 协议1 stp慨述stp生成树协议. 一方面保证网络的可靠性 ,另一方面还可以防止广播风暴的产生.2 stp工作原理通过发送BPDU选择根网桥,根端口,指定端口.再阻塞剩下的端口,达到stp收敛的效果.BPDU 有两种通告,一种是配置BPDU,用于生成树计算另一种是拓扑变更BPDU用于通告网络拓扑的变化3 stp 配置switch (config) # spanning-tree vlan vlan-id "启用生成树协议"switch (config) # spanning-tree vlan vlan-id root primary | secondary "配置交换机为根网桥"switch (config) # spanning-tree vlan vlan-id priority 优先级 "修改交换机的优先级"switch (config-if) # spanning-tree vlan vlan-id cost 路径成本 "修改端口的路径成本"switch (config-if) # spanning-tree vlan vlan-id port-priority 优先级 "修改端口的优先级"switch (config) # spanning-tree uplinkfast "配置上行链路"switch (config-if) # spanning-tree portfast "配置速端口"switch (config) # spanning-tree mode mst | rapidpvst | pvst "启用pvst+ 和802.1q(pvst)".pvrst和802.1w(rapid-pvst) ,或IEEE802.1s(多生成树)和802.1w(mst)"4以太通道配置switch (config) # Internet range fastethernet 0/1 - 2switch (config-if-range) # channel-group 1 mode on | auto | desirable5交换机查看命令switch # show spanning-treeswitch # show spanning-tree vlan vlan-id 查看特定的vlan 的stp信息switch # show spanning-tree vlan vlan-id root 查看特定的vlan的根信息switch # show spanning-tree events 上交换机提供关于stp拓扑结构变化的信息消息switch # show etherchannel 以太编号 brief | detail | port |port-channel | summary 查看交换机上以太通道的状态信息.九 ppp协议(1)工作过程:链路不可用状态-->链路建立状态-->认证阶段-->网络层协议阶段-->链路终止阶段在以上的建立过程中任何阶段建立失败都会返回到链路不可用状态.(2) pap认证过程由被认证方发起认证请求,发送用户名和口令到主认证方。
cisco路由器和交换机命令

29、配置RIP的管理距离
Router (config-router) # distance 50
30、配置RIP的邻居路由器
Router (config-router) # neighbor 202.112.7.2
31、配置单个IP地址参与OSPF
Router (config) # router ospf 63
Router (config-if) # no ip mroute-cache
24、配置静态路由
Router (config) # ip route 195.65.96.0 255.255.240.0 222.112.37.1(静态路由的配置)
25、进入RIP配置模式
Router # sh ip protocols
15、配置接口描述信息
Router (config-if) # description To-BeiJing Foreign Studies University
16、配置接口带宽
Router (config-if) # bandwidth 2500,000
1、Switch-3548 > enable
Password : ********
Switch-3548 # config t
Switch-3548 (config) #
2、Switch-3548 (config) # ip http server
Router (config-router) # passive-interface vlan37
35、配置路由过滤
Router (config) # access-list 12 deny any
Cisco路由器配置命令大全

Cisco路由器配置命令大全1.路由器基本配置1.1 主机名和域名配置1.2 版本和许可证配置1.3 密码和登陆设置1.4 接口配置1.5 接口描述1.6 IP地质配置2.路由配置2.1 静态路由配置2.2 默认路由配置2.3 动态路由配置(OSPF, EIGRP, RIP)2.4 路由过滤(ACL)3.VLAN配置3.1 VLAN的创建和删除3.2 VLAN接口和IP配置3.3 VLAN间的路由配置3.4 VLAN间的链路聚合4.交换机端口配置4.1 接口模式配置4.2 速率和双工模式配置 4.3 接口安全配置4.4 VLAN端口模式配置4.5 接口状态检查与调试5.NAT配置5.1 静态NAT配置5.2 动态NAT配置5.3 PAT配置5.4 NAT过载配置6.VPN配置6.1 VPN服务器配置6.2 VPN客户端配置6.3 IPsec配置6.4 SSL VPN配置7.安全配置7.1 防火墙配置7.2 ACL配置7.3 IDS/IPS配置7.4 AAA服务器配置7.5 网络攻击防护配置8.QoS配置8.1 ACL配置8.2 优先级配置8.3 带宽限制配置8.4 压缩和分片配置9.网络服务配置9.1 DHCP配置9.2 DNS配置9.3 NTP配置9.4 Syslog配置9.5 SNMP配置10.管理配置10.1 网络管理协议配置(Telnet, SSH, HTTP, HTTPS)10.2 文件传输配置(FTP, TFTP)10.3 配置备份和恢复10.4 日志记录和监控10.5 系统升级和恢复附件:本文档涉及的附件包括配置文件样例、示意图等。
法律名词及注释:- ACL: 访问控制列表,用于限制网络流量的过滤规则。
- NAT: 网络地质转换,用于实现内网IP地质与外网IP地质之间的映射。
- VPN: 虚拟专用网络,通过加密通道实现远程访问和安全通信。
- QoS: 服务质量,用于优化网络性能并保证特定应用程序的带宽和延迟要求。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
cisco交换机和路由器配置命令大全最近在学习交换机和路由器的配置,把整理的资料发到博文上,以便日后的学习。
switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#noshut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet0/17 以17端口为例aptech2950(conf-if)#duplexfull/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。
用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch: flash_ini查看flash中的文件: switch: dir flash:把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old执行boot: switch: boot交换机进入是否进入配置的对话,执行no :进入特权模式察看flash里的文件: show flash :把“config.old”文件改名为“config.text”: switch: rename flash: config.old flash: config.text把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure把配置模式重新设置密码存盘,密码恢复成功。
13:交换机telnet远程登录设置:switch>enswitch#c onfigure terminalswitch(conf)#hostname aptech-2950aptech2950(conf)#enable password cisco 以cisco为特权模式密码aptech2950(conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0aptech2950(conf-if)#no shutaptech2950(conf-if)#exitaptech2950(conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆aptech2950(conf-line)#loginaptech2950(conf-line)#password edge 以edge为远程登录的用户密码主机设置:ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telnet 192.168.1.1进入telnet远程登录界面password : edgeaptech2950>enpassword: ciscoaptech#14:交换机配置的重新载入和保存设置完成交换机的配置后:aptech2950(conf)#reload是否保存(y/n) y: 保存设置信息 n:不保存设置信息路由器命令router> 用户模式1:进入特权模式 enablerouter > enablerouter #2:进入全局配置模式 configure terminalrouter > enablerouter #c onfigure terminalrouter (conf)#3:交换机命名 hostname routera 以routerA为例router > enablerouter #c onfigure terminalrouter(conf)#hostname routerAroutera (conf)#4:配置使能口令 enable password cisco 以cisco为例router > enablerouter #c onfigure terminalrouter(conf)#hostname routerArouterA (conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例router > enablerouter #c onfigure terminalrouter(conf)#hostname routerArouterA (conf)# enable secret ciscolab6:进入路由器某一端口 interface fastehernet 0/17 以17端口为例router > enablerouter #c onfigure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17routerA (conf-if)#进入路由器的某一子端口 interface fastethernet 0/17.1 以17端口的1子端口为例router > enablerouter #c onfigure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17.17:设置端口ip地址信息router > enablerouter #c onfigure terminalrouter(conf)#hostname routerArouterA(conf)# interface fastehernet 0/17 以17端口为例routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码routerA (conf-if)#noshut 是配置处于运行中routerA (conf-if)#exit8:查看命令 showrouter > enablerouter # show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间show controllers serial + 编号查看串口类型show ip router 查看路由器的路由表9:cdp相关命令router > enablerouter # show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备10:csico2600的密码恢复重新启动路由器,在启动过程中按下win+break键,使路由器进入rom monitor在提示符下输入命令修改配置寄存器的值,然后重新启动路由器remmon1>confreg 0x2142remmon2>reset重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器改回0x2102:router>enablerouter#copy startup-config running-configrouter#c onfigure terminalrouter(conf)#enable password ciscorouter(conf)#c onfig-register 0x2102保存当前配置到startup-config , 重新启动路由器。