思科交换机密码配置命令

合集下载

思科交换机密码配置命令

思科交换机密码配置命令

思科交换机密码配置一.设置console 密码>enable#configure trminal(confing)#line console 0 J console①(config- line)#password (cisco) <密码(config- line)#login 一定不能少的.console密码设置完成exit二:设置全局密码enadle#configure terminal②(config)#enable secret (class) 密码(config)#login全局密码设置完成exit三.设置远程登入(telnet)密码enable#config terminal(config)#line vty 0 4(0 4 是口)③(config- line)#password (class) <密码(config-lline)#loginexit四.保存以上设置>enadle#copy running-config strat-config思科交换机密码的破解1. 连接交换机的console 口到终端或PC仿真终端。

用无Modem的直连线连接PC的串行口到交换机的console 口。

2. 首先得拔掉电源,因为思科交换机上没有开关所以我们只能拔掉电源接下来我们要做的就是按住MODE按钮接着插上电源等端口指示灯灭掉松开3. 初始化flash。

>flash_init4. 更名含有password的配置文件。

>rename flash:config.text flash:config.old5. 启动交换机。

>boot6. 进入特权模式。

>enable7. 此时开机是已忽略password 。

#rename flash:config.old flash:config.text 8. copy配置文件到当前系统中。

#copy flash:config.text system:running-config 9. 修改口令。

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

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

思科路由器交换机配置命令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交换机配置口令大全

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-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(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高速缓存区的内容。

思科交换机路由器常规配置命令

思科交换机路由器常规配置命令
rl# show interface serial 0 查看s0信息,如果看到serial和line protocol都显示up,说明链路两端都设置成功,注意:如果出现serial down, line down 可能对方的端口没有打开;no shutdown 或者电缆没有插好;如果出现serial up, line down 可能是DCE端没有设置clock rate, 也可能是封装格式不对
Neighbor 相邻网络号 remote-as 自治域号 /* 自治域间的网络 */
四、流量控制
1)被动端口
passive interface 端口号
2)缺省路由
ip default 网络号/端口网络
3)静态路由
ip route 目标网络号 掩码 端口号
rl(config)# enable password cisco 配置进入enable模式的密码, 区分大小写
rl(config)# enable secret ciscocisco 配置进入enable模式的密码,是加密的密码,show run是看不见的
rl(config)# line console 0
rl# show cdp neighbors 查看CDP邻居信息
rl(config-if)# ip add 10.0.0.1 255.0.0.0 进入相应的接口,配置相应的IP地址
rl# ping 10.0.0.2 使用ping命令查看邻居的连通性
Ppp chap password
2)X.25
encapsulation x25 [dce]
x25 address
x25 map 协议地址 /*SVC */
x25 pvc pvc号 ip地址 x25地址 /*PVC */

思科交换机密码修改

思科交换机密码修改

思科交换机密码修改1、接上Console线,重新加电,加电后按住mode键,STAT灯亮起后松开;2、机器上会提示flash_init,load_helper,switchboot;3、依次输入flash_init,load_helper;4、进入特权模式,dir flash:,有一个config.text,就是这个文件保存3550的配置信息;5、 Rename flash:config.text flash:config.old;6、 Reboot;7、启动以后,会提示是否进入setup,输入no;8、进入特权模式,rename flash:config.old flash:config.text;9、再运行copy flash:config.text system:running-config,完了后进入config mode,no enable password,保存即可。

------------------------------------------------------------------------------那你还有enable吗?能登陆进去的话只接该部就可以了吗?如果enable密码都丢失了那么可以用下面的方法恢复。

然后进去在该line cons lin vty.拔掉交换机的电源线2。

用超级终端和控制线连到交换机,超级终端的设置是:9600 baud rateNo parity8 data bits1 stop bitNo flow control3。

按住交换机前面板的“mode”按钮,插上电源线,当端口1上面的灯不亮后,放松“mode”按钮;4。

这时超级终端上应该显示:The system has been interrupted prior to initializing the flash file system.The following commands will initialize the flash file system, and finish loadingthe operating system software:flash_initload_helperboot5。

CISCO交换机配置命令大全

CISCO交换机配置命令大全

CISCO交换机配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)#hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable)set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)#enable password level1password在基于CLI的交换机上设置登录口令:switch(enable)set passwordswitch(enable)set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)#interface vlan1switch(config-if)#ip address ip-address netmaskswitch(config-if)#ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable)set interface sc0ip-address netmask broadcast-address switch(enable)set interface sc0vlanswitch(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/number switch(config-if)#switchport mode accessswitch(config-if)#switchport access vlan vlan-num switch(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-list switch(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 v2enable13.在基于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-ratepkts-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 bridgebridge-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-addressles1-nsap-addressATM(lane-config-databade)#name elan2-name server-atm-addressles2-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 pvc105qsaalrouter(config-if)#atm pvc2016ilnirouter(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高速缓存区的内容。

思科交换机配置命令(都是咱学过的总结)

思科交换机配置命令(都是咱学过的总结)
从TRUNK中添加某个VLAN
switch(config)#in f0/15
switch(config)#interface f0/15
switch(config-if)#sw t a v ad 3
switch(config-if)#switchport trunk allowed vlan add 3
删除VLAN
switch(vlan)#n vl 20
switch(vlan)#no vlan 20
Deleting VLAN 2...
Deleting VLAN 2...
switch(vlan)#e
switch(vlan)#exit
简写命令
完整命令
23
将端口加入到VLAN
将端口加入到VLAN
switch(config)#in f0/2
switch(config)#interface f0/2
switch(config-if)#sw a v 30
switch(config-if)#switchport access vlan 30
24
验证VLAN配置信息
验证VLAN配置信息
switch#sh vlan b
switch#show vlan brief
switch(config-if)#switchport trunk allowed vlan remove 3
switch(config-if)#end
switch(config-if)#end
30
验证接口模式(检查中断端口允许的VLAN列表)
验证接口模式(检查中断端口允许的VLAN列表)
switch#sh int f0/15 switchp

思科交换机配置常用命令

思科交换机配置常用命令

Cisco三层交换机配置命令及解释(2011-07-11 08:54:50)标签:分类:IT资讯cisco杂谈基本配置S> enable 进入特权模式S# configure terminal 进入全局配置模式S(config)# hostname name 改变交换机名称S(config)# enable password level level_# password 设置用户口令〔level_#=1)或特权口令〔level_#=15)S(config)# line console 0 进入控制台接口S(config-line)# password console_password 接上一条命令,设置控制台口令S(config)# line vty 0 15 进入虚拟终端S(config-line)# password telnet_password 接上一条命令,设置Telnet口令S(config-line)# login 允许Telnet登录S(config)# enable password|secret privilege_password 配置特权口令〔加密或不加密〕S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式S(config-if)# [no] shutdown 关闭或启用该接口〔默认启用〕S(config)# ip address IP_address sunbet_mask 指定IP地址S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关S# show running-config 查看当前的配置S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中S> show interface [type slot_#/port_#] 查看所有或指定接口的信息S> show ip 显示交换机的IP配置〔只在1900系列上可用〕S> show version 查看设备信息S# show ip interface brief 验证IP配置S(config-if)# speed 10|100|auto 设置接口速率S(config-if)# duplex auto|full|half 设置接口双工模式S> show mac-address-table 查看CAM表S# clear mac-address-table 清除CAM表中的动态条目1900(config)# mac-address-table permanent MAC_address type [slot_#/]port_# 在CAM表中创建静态条目2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# 在CAM表中创建静态条目1900(config)# mac-address-table restricted static MAC_address source_portlist_of_allowed_interface 设置静态端口安全措施1900(config-if)# port secure 启用粘性学习1900(config-if)# port secure max-mac-count value 设置粘性学习特性能够学到的地址数量〔默认132,取值范围是1-132〕1900(config)# address-violation suspend|ignore|disable 改变安全选项1900> show mac-address-table security 验证端口安全措施2950(config)# switchport mode access 定义接口为主机端口而不是中继端口2950(config)# switchport port-security 启用端口安全措施2950(config)# switchport port-security maximum value 指定可与此接口相关的设备的最大数量2950(config)# switchport port-security violation protect|restrict|shutdown 指定出现安全违规时应该发生的事2950(config)# switchport port-security mac-address MAC_address 指定允许与此接口相关确实切的MAC地址2950(config)# switchport port-security mac-address sticky 启用粘性学习特性2950(config)# show port interface type [slot_#/] port_# 验证接口配置2950(config-if) description name 设置接口描述信息2950# show buffers 查看系统缓存的大小1900# copy nvram tftp:// IP_address_of_TFTP_server/ file_name 将配置文件备份到TFTP服务器上1900# copy tftp:// IP_address_of_TFTP_server/ file_name nvram 从TFTP服务器上恢复配置到NVRAM1900# delete nvram 删除配置文件2950# erase startup-config 删除配置文件3550# show tcam qos TCAM_ID statistics 查看TCAM剩余容量4000> enable 进入特权模式4000>(enable) set password 设置用户模式密码4000>(enable) set enablepass 设置授权密码4000>(enable) set interface sc0 IP_address mask 配置IP地址4000>(enable) set port enable|disable slot_#/port_# 启用/禁用接口4000>(enable) show port [slot_#/port_#] 显示接口信息4000>(enable) set port name slot_#/port_# name 设置交换机接口描述信息4000>(enable) set port speed slot_#/port_# 4|10|16|100|auto 设置交换机接口速率4000>(enable) set port duplex slot_#/port_# full|half 设置交换机接口双工模式4000>(enable) clear config all 删除NVRAM中的配置信息4000>(enable) erase all 删除FLASH中的内容4000>(enable) show flash 显示FLASH中的内容4000>(enable) show cam [count] dynamic|static|permanent|system [vlan_#] 显示CAM表VLAN 1900(config)# vtp domain VTP_domain_name 定义交换机域名1900(config)# vtp server|client|transparent 定义交换机VTP模式〔默认服务器〕1900(config)# vtp password VTP_password 配置VTP口令1900(config)# vtp pruning enable|disable 启用/禁用修剪〔默认启用〕1900(config)# vtp trap enable 启用SNMP陷阱〔默认启用〕1900# show vtp 验证VTP配置2950# vtp database 访问VLAN和VTP配置〔以下均是在前用,后全是在全局配置模式下〕2950(vlan)# vtp domain VTP_domain_name 定义交换机域名2950(vlan)# vtp server|client|transparent 定义交换机VTP模式〔默认服务器〕2950(vlan)# vtp password VTP_password 配置VTP口令2950(vlan)# vtp pruning 启用/禁用修剪〔默认启用〕2950(config)# snmp-server enable traps vtp 启用SNMP陷阱〔默认启用〕2950# show vtp status 检查VTP配置2950# show vtp counters 显示与VTP消息发送与接收相关的VTP统计信息1900(config-if)# trunk on|off|desirable|auto 指定中继类型1900# show trunk A|B 验证接口中继〔A是fa0/26,B是fa0/27〕2950(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate 指定中继类型(默认自动协商〕2950(config-if)# switchport trunk native|allowed|pruning vlan VLAN_# 配置中继2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希望消减的VLAN 2950# show interfaces [type 0/port_#] switchport|trunk 验证接口中继1900(config)# vlan VLAN_# [name VLAN_name] 创建VLAN1900(config-if)# vlan-membership static VLAN_# 将该接口静态地分配给一个VLAN1900# show vlan 验证VLAN1900# show vlan-membership 查看VLAN成员关系1900# show spantree [VLAN_#] 查看VLAN的STP信息2950# vlan database 进入VLAN数据库〔前用〕2950(vlan)# vlan VLAN_# [name VLAN_name] 创建VLAN2950(config)# vlan VLAN_# 进入VLAN数据库〔后用〕2950(config-vlan)# name VLAN_name 创建VLAN2950(config-if)# switchport mode access 指定连接是接入链路连接2950(config-if)# switchport access vlan VLAN_# 指定VLAN是接入链路连接4000>(enable) set vlan VLAN_# name VLAN_name 配置VLAN4000>(enable) set vlan VLAN_# slot_#/port_#-port_# 为VLAN分配端口4000>(enable) set trunk slot_#/port_# [on|off|desirable|auto|nonegotiate] [VLAN_#][isl|dot1q|dot10|lane|negotiate] 配置中继4000>(enable) clear trunk slot_#/port_# VLAN_# 删除VLAN4000>(enable) show trunk slot_#/port_# 验证中继端口4000>(enable) set vtp v2 enable 配置VTPv24000>(enable) set vtp [domain name] [mode client|server|transparent] [passwd password] [pruning enable|disable] [v2 enable|disable] 设置VTP4000>(enable) show vtp domain 验证VTP域的信息4000>(enable) show vtp statistics 显示发出或收到的VTP通告信息的摘要内容4000>(enable) set vtp pruneeligible VLAN_# 设置VTP消减4000>(enable) clear vtp pruneeligible VLAN_# 清除不希望消减的VLANSTP 4000>(enable) set spantree enable|disable VLAN_# 启用/禁用STP〔默认启用〕2950(config)# [no] spanning-tree vlan VLAN_# 启用/禁用STP〔默认启用〕4000>(enable) show spantree [VLAN_#] 验证STP状态2950# show spanning-tree 验证STP状态4000>(enable) set spantree root [secondary] VLAN_# [dia network_diameter] [hello hello_time] 设置主根节点桥、备份节点桥、最大桥数量〔2-7〕、持续时间〔1-10,默认2〕4000>(enable) set spantree portcost slot_#/port_# cost_# 设置端口开销2950(config-if)# spanning-tree cost cost_# 设置端口开销4000>(enable) set spantree portpri slot_#/port_# priority_# 设置端口优先级4000>(enable) set spantree portvlanpri slot_#/port_# priority_# [VLAN_#] 改变VLAN的优先级设置2950(config-if)# spanning-tree vlan VLAN_# port-priority priority_# 设置端口优先级4000>(enable) set spantree fwddelay delay_# [VLAN_#] 设置从侦听状态到学习状态再到转发状态的时间间隔〔默认15秒,取值范围是4-30秒〕4000>(enable) set spantree hello interval_time [VLAN_#] 设置根节点交换机发送BPDU的时间间隔〔默认2秒,取值范围是1-10秒〕4000>(enable) set spantree maxage agingtime [VLAN_#] 设置交换机持有BPDU的时间〔默认20秒,取值范围是6-40秒〕2950(config)# spanning-tree vlan VLAN_# forward-time forward_time 设置从侦听状态到学习状态再到转发状态的时间间隔〔默认15秒,取值范围是4-30秒〕2950(config)# spanning-tree vlan VLAN_# hello-time hello_time 设置根节点交换机发送BPDU的时间间隔〔默认2秒,取值范围是1-10秒〕2950(config)# spanning-tree vlan VLAN_# max-age maxage 设置交换机持有BPDU的时间〔默认20秒,取值范围是6-40秒〕4000>(enable) set port channel slot_#/port_# on 建立以太通道集合4000>(enable) show port capabilities slot_#/port_# 查看端口的配置4000>(enable) show port channel 验证以太通道集合的配置2950(config-if)# channel-group group_number mode auto|desirable|on 建立以太通道集合2950# show etherchannel group_number|brief|detail|load-balance|port|port-channel|summary 验证以太通道集合的配置4000>(enable) set spantree portfast slot_#/port_# enable 配置PortFast2950(config-if)# spanning-tree portfast 配置PortFast4000>(enable) set spantree uplinkfast enable|disable [rate station_update_rate] [all-protocolsoff|on] 启用/禁用UplinkFast4000>(enable) show spantree uplinkfast 验证UplinkFast配置2950(config)# spanning-tree uplinkfast [max_update_rate] 启用/禁用UplinkFast2950# show spanning-tree uplinkfast 验证UplinkFast配置4000>(enable) set spantree backbonefast enable|disable 启用/禁用BackboneFast4000>(enable) show spantree backbonefast 验证BackboneFast配置2950(config)# spanning-tree backbonefast 启用BackboneFast虚拟网间路由2600(config)# interface type slot_#/port_#.subint_number 配置子接口2600(config-subif)# encapsulation dot1q|isl|sde|tr-isl VLAN_# 配置封装类型4000>(enable) show module 查看交换机的硬件配置4000>(enable) session module_# 访问L3SML3SM(config-if)# mac-address mac_address 分配MAC地址MLS 2600(config)# mls rp ip 启动MLS2600(config-if)# mls rp vtp-domain domain_name 分配路由器接口到VTP域中2600(config-if)# mls rp vlan-id VLAN_# 向接口分配VLAN2600(config-if)# mls rp management-interface 指定该接口为管理接口2600# show mls rp 提供全局MLS信息2600# show mls rp interface type slot_#/port_# 提供指定接口的MLS信息2600# show mls rp vtp-domain domain_name 提供VTP域的MLS信息6500>(enable) set mls enable 在MLS-SE上启动MLS6500>(enable) set mls include rp_ip_address 告诉交换机哪一个IP地址是正确的6500>(enable) show mls include 显示外部路由处理器的IP地址列表6500>(enable) set mls flow [destination|destination-source|full] 告诉MLS交换机要缓存候选数据包的哪些信息6500>(enable) show mls entry 显示第三层缓存表6500>(enable) set mls agingtime aging_time 改变缓存的衰老时间〔默认256秒,取值范围是8-2032秒中的8的倍数值〕6500>(enable) set mls agingtime fast fast_aging_time pkt_threshold 改变快速衰老周期和数据包门限值6500>(enable) show mls ip 验证MLS-SE的配置6500>(enable) clear mls entry [destination IP_address] [source IP_address] [flow protocol] [source_port] [destination_port] [all] 删除所有或指定MLS缓存记录3550(config)# ip routing 启动IP路由3550(config)# ip cef 启动CEF3550(config-if)# no switchport 将第二层接口转换为第三层接口3550(config-if)# ip route-cache cef 在接口上启动CEF3550# show ip cef 验证CEF组播3640(config)# ip multicast-routing 启动路由器上的组播服务3640(config-if)# ip pim dense-mode 将接口设置为PIM密集模式3640(config-if)# ip pim sparse-mode 将接口设置为PIM稀疏模式3640(config-if)# ip pim sparsed-dense-mode 将接口设置为PIM稀疏-密集模式3640(config)# ip pim rp-address IP_address group_ACL_# [override] 手工配置RP3640(config)# ip pim send-rp-announce type slot_#/port_# scope ttl_value group-list ACL_# 通告RP组的分配3640(config)# ip pim send-rp-discovery scope ttl_value 配置RP映射代理3640(config-if)# ip multicast ttl-threshold ttl_value 设置TTL门限值3640(config-if)# ip igmp join-group group_address 加入组播组3640# show ip mroute 查看组播信息3640# ping 验证RP之间或其他组播路由器之间的连接3640# mtrace source_IP_address [destination_IP_address] [group] 组播traceroute3640(config-if)# ip cgmp 配置CGMP路由器4000>(enable) set cgmp enable 启动CGMP4000>(enable) show cgmp statistics 查看CGMP统计信息4000>(enable) show multicast group cgmp 查看交换机了解到的组播组信息4000>(enable) set cgmp leave enable 检查由客户端产生的IGMPv2的离开信息4000>(enable) set igmp enable 启动IGMP4000>(enable) ip igmp snooping 启动IGMP探听4000>(enable) set igmp fastleave enable 启动快速离开过程4000>(enable) show igmp statistics 显示交换机上IGMP探听的状态信息QoS 2950(config)# wrr-queue cos-map queue_ID cos_value 建立队列2950(config)# wrr-queue bandwidth bandwidth_value 设置队列门限2950(config)# class-maps name 定义对信息传输分类时的匹配标准2950(config-cmap)# match access-group ACL_# 识别被分类的信息传输2950(config)# policy-map name 确定为接入信息传输所设置的分类标准2950(config-pmap)# class name2950(config-pmap-c)# set ip dscp number2950(config-if)# service-policy input name 对该接口应用策略3550(config)# mls qos 启动QoS3550(config-if)# auto qos voip 在接口上启动自动服务质量3550(config)# priority-list priority_queue_# protocol protocol high|medium|normal|low [list ACL_#] 为优先级队列定义信息流3550(config)# priority-list priority_queue_# queue-limit limit_# 定义特定优先级队列的最大队列空间3550(config-if)# priority-group priority_queue_# 向特定输出接口分配优先级队列3550(config)# queue-list queue_list_# interface type slot_#/port_# queue_number 为一个特定的定制队列定义信息流3550(config)# queue-list queue_list_# queue queue_number byte-count size_in_bytes [limit number_of_queue] 为特定的定制队列定义队列的最大空间3550(config-if)# custom-queue-list custom_queue_number 为特定的输出接口分配优先级队列4840(config)# ip slb serverfarm serverfarm_name 配置SLB冗余4840(config-slb-sfarm)# real IP_address [port_#] 指定虚拟IP地址4840(config-slb-sfarm)# inservice 启动服务器4840(config)# virtual IP_address [network_mask] tcp|udp [port_number|wsp|wsp-wtp|wsp-wtls|wsp-wtp-wtls] [service service_name] 建立虚拟服务器IP地址。

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

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

思科交换机路由器常规配置命令大全你还在为不知道思科交换机路由器常规配置命令大全而烦恼么?接下来是小编为大家收集的思科交换机路由器常规配置命令大全教程,希望能帮到大家。

思科交换机路由器常规配置命令大全一、基本路由器的检验命令show versionshow processesshow protocolsshow memshow ip routeshow startup-configshow running-configshow flash&gt;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 。

思科交换机配置命令大全

思科交换机配置命令大全

思科交换机配置命令大全前几天我们了解了华为交换机的配置命令,有朋友问到思科,那么今天我们来了解思科交换机的配置方式。

一、基本配置命令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交换机有什么基本配置命令呢?下面yjbys店铺为大家分享最新思科交换机配置命令大全,希望对大家学习思科认证有所帮助!CISCO交换机基本配置:Console端口连接用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname csico ;设置交换机的主机名switch(config)#enable secret csico1 ;设置特权加密口令switch(config)#enable password csico8 ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;虚拟终端允许登录switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6switch#exit ;返回命令交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mb/s(10/auto)switch(config)#duplex ? 查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(auto/half)switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain vtpserver ;设置vtp域名相同switch(config)#vtp password ;设置发vtp密码switch(config)#vtp server ;设置vtp服务器模式switch(config)#vtp client ;设置vtp客户机模式交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关switch(config)#ip domain-name 设置域名switch(config)#ip name-server 192.168.1.18 设置域名服务器switch(config)#mac-address-table? 查看mac-address-table 的子命令switch(config)#mac-address-table aging-time 100 设置超时时间为100msswitch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息switch#show int f0/0 status;查看指定端口状态switch#dir flash: ;查看闪存(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 保存信息到NVRAM write 保存信息到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配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

设置思科设备console密码、enable密码、vty登录密码

设置思科设备console密码、enable密码、vty登录密码

设置思科设备console密码、enable密码、vty登录密码思科设备各级密码:1) console密码SW2(config)#line console 0SW2(config-line)#password 123123SW2(config-line)#login //启⽤密码认证,默认没有,需要加上去SW2(config-line)#login local //本地开启⽤户认证SW2(config)username Fyao1988 password 123123//创建本地⽤户SW2(config)username Fyao1988 privilege 15 password 123123//以该⽤户登⼊设备后直接进⼊特权模式说明---对⽤户的权限定义0-15级,最⾼为15,任何命令都可操作SW2(config)service password-encryption //明⽂密码加密2)特权模式密码(设置全局密码)SW2>enadleSW2(config)#configure terminal1.(config)#enable password en 123←密码1232.(config)#enable secret 123123←密码123123#2个同时设,只有secret 有效,因为其优先极⾼(config)#login <--⼀定要加,表⽰启⽤全局密码设置完成exitenable password 123123优先级低enable secret 123123优先级⾼思科加密⽅式:0 显⽰的是密码本⾝7 密⽂加密,容易破解5 复杂密⽂加密3)虚拟通道密码SW2>enadleSW2(config)#configure terminalSW2(config)#line vty 0 4SW2(config-line)#password Fyao1988SW2(config-line)#login //默认就有SW2(config-line)#login local //开启本地⽤户认证,使⽤本地⽤户数据库SW2(config-line)no login //不需要密码就可登陆telnet登⼊交换机或路由器,若不设置line vty密码,则默认客户端不能远程访问到设备ctrl + shift + 6⼀起松开再按X即退出show users/who 查看当前有哪些⽤户存在,console段是⾃⼰登陆到别的设备,vty段是别⼈登录到⾃⼰这端,*代表⾃⼰登陆⽤的lineshow sessions 显⽰当前所有会话show line 显⽰当前所有线路,*代表有⽤户在线的lineR#disconnect 2 断开由⾃⼰建⽴的会话2R#clear line 3 关闭别的设备登录到⾃⼰的会话3ssh登⼊设备:只能以username和password登⼊设备端做配置:ip domain name Fyao1988 #设置交换机domaincrypto key generatehostname Fyao1988//要有domain name和hostnameusername Fyao1988 password 123123在vty下:login localtransport input ssh //只允许以ssh⽅式登⼊,telnet时抓包可以看到⽤户和密码,ssh采⽤⾮对称加密技术,⽐telnet安全登⼊端登⼊命令:ssh -l Fyao1988 3.3.3.3关于Cisco IOS 的登录密码以及权限分配设置enable password xxxx 初级密码,⽤于验证从⽤户模式到特权模式的验证enable secret xxxxx MD5加密密码⽤法同上enabl password level xx 指定密码作⽤于哪个级别enable secret level xx 作⽤同上R2(config)#enable password ?0 Specifies an UNENCRYPTED password will follow7 Specifies a HIDDEN password will followLINE The UNENCRYPTED (cleartext) 'enable' passwordlevel Set exec level passwordR2(config)#enable secret ?0 Specifies an UNENCRYPTED password will follow5 Specifies an ENCRYPTED secret will followLINE The UNENCRYPTED (cleartext) 'enable' secretlevel Set exec level password注意这⾥:0 5 7 的含义不同。

思科交换机配置命令大全

思科交换机配置命令大全

思科交换机配置命令大全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:设置虚拟局域网vlan1interface vlan1switch>enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)#interface vlan1aptech2950(conf-if)#ip address192.168.1.1255.255.255.0配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway192.168.254设置网关地址7:进入交换机某一端口interface fastehernet0/17以17端口为例switch>enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)#interface fastehernet0/17aptech2950(conf-if)#8:查看命令showswitch>enableswitch#show version察看系统中的所有版本信息show interface vlan1查看交换机有关ip协议的配置信息show running-configure查看交换机当前起作用的配置信息show interface fastethernet0/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)#duplex full/half/auto有full,half,auto三个可选项11:cdp相关命令switch>enableswitch#show cdp查看设备的cdp全局配置信息show cdp interface fastethernet0/17查看17端口的cdp配置信息show cdp traffic查看有关cdp包的统计信息show cdp nerghbors列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

思科交换机密码设置方法

思科交换机密码设置方法

思科交换机密码设置方法你还在为思科交换机密码设置方法而烦恼么?不用担心,接下来是店铺为大家收集的思科交换机密码设置方法,欢迎大家阅读:思科交换机密码设置方法:开启交换机telnet的命令步骤:第一步:给telnet登陆配置密码:Switch>Switch>en 用户模式进入特权模式Switch#conf t 特权模式进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#linSwitch(config)#line vtSwitch(config)#line vty 0 4 允许5个用户登陆Switch(config-line)#passwSwitch(config-line)#password 123456 设置telnet时的登陆密码Switch(config-line)#login 使登陆密码生效Switch(config-line)#^Z 退出到特权模式%SYS-5-CONFIG_I: Configured from console by consoleSwitch#cop r s 保存配置文件Destination filename [startup-config]?Building configuration...[OK] 保存成功第二步:telnet密码虽然配置成功了,可是一想,IP还没配置啊,telnet登陆谁呢?~! 所以这个时候需要开启交换机的管理vlan,给管理vlan配置Ip,一般交换机都有初始的默认vlan1,用他来做管理vlan吧【说说管理vlan的作用:管理VLAN是指设备的IP地址所在的VLAN ,主要用来远程连接这个设备进行管理使用如果不配置这个,你将无法通过网络管理这台设备,业务VLAN就是普通的接台式机的VLAN, 接业务使用...】,下面配置二层交换机的管理vlan的Ip:test02# conf t 特权模式进入配置模式Enter configuration commands, one per line. End with CNTL/Z.test02(config)#int vlan 1 进入vlan1虚拟口test02(config-if)#ip add 10.1.1.1 255.255.255.0 给vlan1设置IP地址test02(config-if)#no shutdown 开启vlan1%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to uptest02(config-if)#^Z 由配置模式推出到特权模式;%SYS-5-CONFIG_I: Configured from console by consoletest02#cop r s 保存配置文件;第三步:现在看来telnet是有目标IP地址了,也有telnet登陆时候的密码了,但是我在telnet的时候虽然成功了,但是又出现了令一个问题,我无法由用户模式进入特权模式:PC>telnet 10.1.1.1Trying 10.1.1.1 ...User Access VerificationPassword: 此处输入设置的vty密码;test02>en% No password settest02>en% No password settest02>? 查看可以使用的命令;Exec commands:<1-99> Session number to resumeconnect Open a terminal connectiondisconnect Disconnect an existing network connectionenable Turn on privileged commandsexit Exit from the EXEClogout Exit from the EXECping Send echo messagesresume Resume an active network connectionshow Show running system informationtelnet Open a telnet connectionterminal Set terminal line parameterstraceroute Trace route to destinationtest02>enable% No password set总是提示我没有设置密码;可见,通过telnet登陆交换机,还需要提高从用户模式到特权模式的密码,如果不设置密码,还是不能成功远程登陆一台交换机的。

CISCO交换机的常用操作项-思科常用命令手册速查手册

CISCO交换机的常用操作项-思科常用命令手册速查手册

交换机的常用操作项1、更改主机名switch(config)#hostname sw12、设置进入特权模式的密码switch(config)#enable password 1234switch(config)#enable secret cisco3、设置console口密码switch(config)#line console 0switch(config-line)#password 123switch(config-line)#login4、查看mac地址列表switch#show mac-address-table5、查看mac地址列表刷新时间switch#show mac-address-table aging-time6、更改mac地址列表刷新时间switch(config)#mac-address-table aging-time 200 7、查看当前配置(RAM)switch#show running-config8、查看交换机的配置(NVRAM)switch#show startup-config9、保存配置switch#copy running-config startup-configswitch#write10、恢复出厂默认设置switch#erase startup-configswitch#reload11、查看cdp的全局信息switch#show cdp12、查看接口的cdp配置信息switch#show cdp interface f0/213、查看有关cdp包的统计信息switch#show cdp traffic14、查看邻居信息switch#show cdp neighbors15、查看所有入口项的详细信息switch#show cdp neighbors detailswitch#show cdp entry *16、添加接口的描述信息switch(config-if)# description connection to routerA 17、设置交换机的网关switch(config)#ip default-gateway 192.168.1.118、关掉DNS解析switch(config)# no ip domain-lookup19、实现交换机的远程管理switch(config)#enable secret ciscoswitch(config)#interface vlan 1switch(config-if)#ip address 192.168.1.100 255.255.255.0switch(config-if)#no shutdownswitch(config)#line vty 0 4switch(config-line)#password 123switch(config-line)#loginc:\>telnet 192.168.1.10020、交换机的密码恢复1、将交换机的电源拔下2、按mode键将电源插上,当出现switch:时将手松开3、switch:flash_init //加载到flash中4、switch:dir flash: //查看flash中的文件5、rename flash:config.text flash:config.old //更改文件名6、boot //重新启动交换机7、rename flash:config.old flash:config.text //将文件名改回8、copy flash:config.text running-config9、enable password cisco //重新设置密码10、write //保存21、创建vlan方法一switch#vlan databaseswitch(vlan)#vlan 10 name scswitch(vlan)#exit22、创建vlan方法二switch(config)#vlan 10switch(config-vlan)#name sc23、删除vlan方法一switch(vlan)#no vlan 10switch(vlan)#exit24、删除vlan方法二switch(config)#no vlan 1025、删除vlan方法三switch#delete vlan.dat26、将端口加入到vlan中switch(config-if)#switchport access vlan 1027、将一组连续的端口加入到vlan中switch(config)# interface range f0/1 – 5 (端口范围管理switch(config-if-range)#switchport access vlan 10 端口范围管理模式28、将端口从vlan中删除switch(config-if)#no switchport access vlan 10switch(config-if)#switchport access vlan 1switch(config-if-range)#no switchport access vlan 10 switch(config-if-range)#switchport access vlan 1 29、查看所有vlan的摘要信息switch#show vlan brief30、查看指定vlan的信息switch#show vlan id 1031、指定端口成为trunkswitch(config-if)#switchport mode trunk 两个端口全要设成trunk32、Trunk的自动协商switch(config-if)#switchport mode dynamic desirable switch(config-if)#switchport mode dynamic auto注意:如果中继链路两端都设置成auto将不能成为trunk 33、查看端口状态switch#show interface f0/24 switchport34、在trunk上移出vlanswitch(config-if)#switchport trunk allowed vlan remove 235、在trunk上添加vlanswitch(config-if)#switchport trunk allowed vlan add236、Cisco 2600路由器的基本操作从用户模式进入特权模式router>enablerouter#从特权模式进入全局配置模式router#config terminalrouter(config)#为路由器配置主机名router(config)#hostname teacherteacher(config)#进入路由器的以太口配置模式teacher(config)#interface fastethernet 0/0teacher(config_if)#37、查看Cisco 2600路由器的串口状态router#show interface serial 0/0serial 0/0 is up ,line protocol is up可操作状态………serial 0/0 is up ,line protocol is up连接问题…………serial 0/0 is up ,line protocol is down接口问题…………serial 0/0 is down ,line protocol isdown禁用状态…………serial 0/0 is administratively down ,line protocol is down38、 静态路由的实现router(config)#hostname AA(config)#interface f0/0 A(config-if)#ip address 192.168.1.1 255.255.255.0 A(config-if)#no shutdownA(config)#interface f0/1A(config-if)#ip address 192.168.2.1 255.255.255.0 A(config-if)#no shutdownA(config)#iproute 192.168.3.0 255.255.255.0 192.168.2.2B(config)#iproute 192.168.1.0 255.255.255.0 192.168.2.139、 配置默认路由route(config)#ip route 0.0.0.0 0.0.0.0 下一跳地址40、 查看路由表router#show ip route其中C 代表直连的网络,S 代表静态的路由,S*代表默认的路由 192.168.1.1 192.168.2.2 192.168.2.1 192.168.3.1 192.168.1.10 192.168.3.1041、为Cisco 2600路由器配置密码配置控制台密码router (config)#line console 0router (config-line)# password ciscorouter (config-line)# login42、配置特权模式密码router (config)#enable password cisco43、配置安全的加密密码router (config)#enable secret 123444、配置路由器标识router(config)#banner motd $This is Aptech company’s Router! Please don’t change the configuration whithout permissions$45、对所有密码进行加密router (config)#service password-encryption46、配置超时router(config)#line console 0router(config-line)#exec-timeout 0 0 //第一个0代表分钟,第二个0代表秒47、显示同步router(config)#line console 0router(config-line)#logging synchronous48、配置禁用DNSrouter(config)#no ip domain-lookup49、利用三台路由器实现静态路由和默认路由50、路由器密码恢复重启路由器按Ctrl+Break键进入ROM Monitor 模式rommon 1>confreg 0x2142rommon 2>reset重启后选择norouter>enablerouter#copy startup-config running-configrouter#config terminalrouter(config)#enable password ciscorouter(config)#config-register 0x2102router#copy running-config startup-configrouter#reload51、单臂路由——实现不同vlan之间的通信V L A N11、划分vlanswitch#vlan databaseswitch(vlan)#vlan 2写NAME,不行,switch(vlan)#vlan 3switch(vlan)#exit2、将端口加入vlanswitch(config)#interface range f0/6 -8switch(config-if-range)#switchport access vlan 2 switch(config-if-range)# interface range f0/9 -11 switch(config-if-range)#switchport access vlan 3 3、配置trunkswitch(config)#interface f0/12switch(config-if)#switchport mode trunk4、配置路由器的子接口封装dot1q,并设置IP地址router(config)#interface f0/0.1router(config-subif)#encapsulation dot1q 1router(config-subif)#ip address 192.168.0.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0.2router(config-subif)#encapsulation dot1q 2router(config-subif)#ip address 192.168.1.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0.3router(config-subif)#encapsulation dot1q 3router(config-subif)#ip address 192.168.2.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0router(config-if)#no shut5、设置pc的IP地址和默认网关52、RIP版本V1和V2 的区别RIP v1发送路由更新时不携带子网掩码,属于有类路由协议发送路由更新时,目标地址为广播地址:255.255.255.255RIP v2发送路由更新时携带子网掩码,属于无类路由协议发送路由更新时,目标地址为组播地址:224.0.0.953、 RIP V1的配置配置步骤:1、配置路由器接口IP 地址routerA(config)#interface f0/0routerA(config-if)#ipaddress 192.168.1.1 255.255.255.0routerA(config-if)#no shutdownrouterA(config-if)#interface f0/1routerA(config-if)# ip address 10.0.0.2 255.0.0.0routerA(config-if)#no shutdownrouterB(config)#interface f0/0routerB(config-if)#ip address 10.0.0.1 255.0.0.0 192.168.2.0/24192.168.1.0/24routerB(config-if)#no shutdownrouterB(config)#interface f0/1routerB(config-if)#ip address 20.0.0.2 255.0.0.0 routerB(config-if)#no shutdownrouterC(config)#interface f0/0routerC(config-if)#ip address 20.0.0.1 255.0.0.0 routerC(config-if)#no shutdownrouterC(config)#interface f0/1routerC(config-if)#ip address 192.168.2.2 255.255.255.0routerC(config-if)#no shutdown2、在路由器上启动RIP进程,并宣告网络号:routerA(config)#router riprouterA(config-router)#network 10.0.0.0routerA(config-router)#network 192.168.1.0routerB(config)#router riprouterB(config-router)#network 10.0.0.0routerB(config-router)#network 20.0.0.0routerC(config)#router riprouterC(config-router)#network 20.0.0.0routerC(config-router)#network 192.168.2.03、验证配置是否正确1)查看路由表router#show ip route2)查看路由协议配置router#show ip protocols3)打开RIP协议调试命令router#debug ip rip4)退出router# no debug ip rip4、在PC上设置IP地址、子网掩码、默认网关,用ping命令测试连通性54、RIP V2的配置10.1.1.0/24 192.168.1.0/241、配置各路由器接口IP地址routerA(config)#interface f0/0routerA(config-if)#ip address 10.1.1.1 255.255.255.0routerA(config-if)#no shutdownrouterA(config-if)#interface f0/1routerA(config-if)# ip address 192.168.1.1 255.255.255.0routerA(config-if)#no shutdownrouterB(config)#interface f0/0routerB(config-if)#ip address 10.1.2.1 255.255.255.0routerB(config-if)#no shutdownrouterB(config)#interface f0/1routerB(config-if)#ip address 192.168.1.2 255.255.255.0routerB(config-if)#no shutdownrouterC(config)#interface f0/0routerC(config-if)#ip address 192.168.1.3 255.255.255.0routerC(config-if)#no shutdownrouterC(config)#interface f0/1routerC(config-if)#ip address 192.168.2.1 255.255.255.0routerC(config-if)#no shutdown2、在路由器上配置RIP V2 路由协议routerA(config)#router riprouterA(config-router)#version 2routerA(config-router)#no auto-summary不合并同段网络routerA(config-router)#network 10.0.0.0 routerA(config-router)#network 192.168.1.0 routerB(config)#router riprouterB(config-router)#version 2routerB(config-router)# no auto-summary routerB(config-router)#network 10.0.0.0 routerB(config-router)#network 192.168.1.0 routerC(config)#router riprouterC(config-router)# version 2routerC(config-router)# no auto-summary routerC(config-router)#network192.168.1.0 routerC(config-router)#network 192.168.2.0 3、验证配置是否正确1)查看路由表router#show ip route2)查看路由协议配置router#show ip protocols3)打开RIP协议调试命令router#debug ip rip4、在PC上设置IP地址、子网掩码、默认网关,用ping命令测试连通性55、上传路由器上的IOSrouter#show flash //查看IOS文件名router#copy flash tftpSource filename []? c2600-ik8o3s-mz.122-11.T.binAddress or name of remote host []? 192.168.1.11Destination filename [c2600-ik8o3s-mz.122-11.T.bin]?下载IOS到路由器router#copy tftp flash上传路由器上配置文件router#copy nvram:startup-config tftp:Address or name of remote host []? 192.168.1.11Destination filename [router-config]? startup-config下载配置文件到路由器router#copy tftp:startup-config nvramC2600路由器IOS被删除的恢复方法:1、ctrl+breakrommon 1>IP_ADDRESS=192.168.0.100 //路由器接口地址rommon 2>IP_SUBNET_MASK=255.255.255.0rommon 3>DEFAULT_GATEWAY=192.168.0.100rommon 4>TFTP_SERVER=192.168.0.254rommon 5>TFTP_FILE=c2600-ik8o3s-mz.122-11.T.binrommon 6>tftpdnld希望各位学员努力学习,将交换机和路由器的操作命令练会、练熟学如逆水行舟,不进则退。

(整理)思科交换机配置命令

(整理)思科交换机配置命令
switch(config)#interface f0/2
switch(config-if)#sw a v 30
switch(config-if)#switchport access vlan 30
24
验证VLAN配置信息
验证VLAN配置信息
switch#sh vlan b
switch#show vlan brief
switch(config)#ip default-gateway 192.168.0.1
16
查看交换机的MAC地址表
查看交换机的MAC地址表
switch#sh mac-a
switch#show mac-address-table
17
查看思科交换机相邻设备的详细信息
查看思科交换机相邻设备的详细信息
switch#sh cdp nei de
benet(config)#
7
配置进入特权模式的明文口令
配置进入特权模式的明文口令
switch(config)#en pass 123
switch(config)#enable password 123
8
删除进入特权模式的明文口令
删除进入特权模式的明文口令
switch(config)#no ena pass
30
验证接口模式(检查中断端口允许的VLAN列表)
验证接口模式(检查中断端口允许的VLAN列表)
switch#sh int f0/15 switchp
switch#show interface f0/15 switchport
31
查看用过的命令
查看用过的命令
switch#sh hi
switch#show history
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

思科交换机密码配置
一.设置console密码
>enable
#configure trminal
(confing)#line console 0←console口
①(config-line)#password (cisco)←密码
(config-line)#login ← 一定不能少的.
console密码设置完成
exit
二:设置全局密码
enadle
#configure terminal
②(config)#enable secret (class)←密码
(config)#login
全局密码设置完成
exit
三.设置远程登入(telnet)密码
enable
#config terminal
(config)#line vty 0 4(0 4是口)
③(config-line)#password (class)←密码
(config-lline)#login
exit
四.保存以上设置
>enadle
#copy running-config strat-config
思科交换机密码的破解
⒈连接交换机的console口到终端或PC仿真终端。

用无Modem的直连线连接PC的串行口到交换机的console口。

⒉首先得拔掉电源,因为思科交换机上没有开关所以我们只能拔掉电源接下来我们要做的就是按住MODE按钮接着插上电源等端口指示灯灭掉松开
⒊初始化flash。

>flash_init
⒋更名含有password的配置文件。

>rename flash: flash:
⒌启动交换机。

>boot
⒍进入特权模式。

>enable
⒎此时开机是已忽略password。

#rename flash: flash:
⒏copy配置文件到当前系统中。

#copy flash: system:running-config
⒐修改口令。

#configure terminal #enable secret
⒑保存配置。

#write。

相关文档
最新文档