思科交换机N7K常用命令
思科常用命令大全

VLAN 2
NAME 2
2。特权模式下
VLAN DATABASE
VLAN 2 NAME 2
查看VLAN
SHOW VLAN
删除VLAN
NO VLAN 2
验证:SHOW VLAN BRIEF
在VLAN中添加端口
INTERFACE F0/2 (单端口添加)
sw1(config)#int vlan 1
sw1(config-if)#ip address 172.16.0.1 255.255.0.0
sw1(config-if)#no shutdown
sw1(config)#ip default-gateway 172.16.0.254
//以上是vlan 1接口上配置了管理地址,接在vlan 1 上的计算机可以直接进行telnet 该地址,为了其他网段的计算机也可以telnet 交换机,
r1#show int g0/0 (查看g0/0接口的mac地址)
(2)步骤2:配置交换机端口安全
sw1(config)#int f0/1
sw1(config-if)#shutdown
sw1(config-if)#switch mode access
//以上命令是把端口改为访问模式,即用来接入计算机
sw1(config-if)#speed (10|100|1000|auto)
//speed命令用来配置交换机的接口速度 10-10mbps 100-100mbps 1000-1000mbps auto-自动监测接口速度
(4)配置管理地址
交换机允许被telnet ,这时需要在交换机上配置一个ip地址,这个地址是在vlan接口上配置的
思科路由器交换机配置命令

思科路由器交换机配置命令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的密码恢复拔下交换机电源线。
思科交换机路由器命令大全

思科交换机路由器命令大全思科交换机和路由器命令大全本文档为思科交换机和路由器命令的最新最全范本,供参考使用。
以下是详细的命令列表,包括每个命令的说明和用法。
一、接口配置命令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):访问控制列表,用于控制网络流量的进出。
思科交换机常用的100个命令

思科交换机常用的100个命令思科交换机常用的100个命令在思科交换机上的命令有哪些?哪些命令最实用,你知道吗?下面yjbys店铺为大家分享最常用的思科交换机基本命令,希望能帮助到大家!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 的密码恢复拔下交换机电源线。
思科命令大全(完整版)

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

思科命令大全思科常用命令大权1用户模式2:特权模式enableshow vlanshow versionshow interfaceshow mac-address-tableshow running-configcopy running-config startup-config3:全局配置模式config terminalhostnameenable passwordip default-gateway4:接口配置模式interface 端口switchport mode trunk5:line模式line console 0第2章交换机的基本配置1.配置主机hostname2.查看交换机的配置show running-config使能口令enable password加密保存的使能口令enable secret配置IP地址interface vlan1ip addressno shutdown配置交换机的网关ip default-gateway ipaddress查看交换机的MAC地址表show mac-address-table使用CDP协议show cdpshow cdp interfaceshow cdp neighborsshow cdp neighbors detailshow cdp traffic保存与删除交换机配置copy running-config startup-config第三章:虚拟局域网(VLAN)VLAN的概述VLAN是对连接在第2层交换机端口的网络用户的逻辑分段。
VLAN的作用:1。
广播控制2。
安全(副产品)3。
带宽利用4。
延迟VLAN的种类静态:基于端口的VLAN动态:基于MAC地址的VLAN在交换机上配置静态VLAN创建VLAN1。
CONFIG TERMINALVLAN 2NAME 22。
特权模式下VLAN DATABASEVLAN 2 NAME 2查看VLANSHOW VLAN删除VLANNO VLAN 2验证:SHOW VLAN BRIEF在VLAN中添加端口INTERFACE F0/2INTERFACE RANGE F0/2 - 5SWITCHPORT MODE ACCESSSWITCHPORT ACCESS VLAN 2VLAN配置实例在交换机上添加VLAN2,VLAN3,VLAN3,端口范围分别为1-4,5-8,9-12这个实例的作用就是让不同的VLAN的计算机之间的通信隔开。
Cisco交换机常用配置命令

Cisco交换机常用配置命令Cisco交换机常用配置命令CISCO交换机基本配置switch>ena 進入特权模式switch#erase nvram 全部清除交换机的所有配置switch#reload 重新启动交换机(初始提示符为switch> )------------------------------------------------------------------------------------CISCO交换机基本配置:Console端口连接用户模式hostname> ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switch>enable ;进入特权模式switch#config;进入全局配置模式switch(config)#hostname cisco ;设置交换机的主机名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 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit ;返回命令配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时switch#conf tswitch(config)#line con 0switch(config-line)#exec-timeout 0---------------------------------------------------------------------------------交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show vlan name vlan2switch#show interface ;查看端口信息switch(config)#int f0/1 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)switch(config-if)#do show int f0/21 显示21口配置信息switch(config-if)#shut ;shutdown 关闭当前端口switch(config-if)#no shut ;no shutdown 开启当前端口switch(config)#duplex ? 查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(auto/half)switch(config)#description TO_PC1 这是该端口描述为TO_PC1switch(config)#interface f0/21switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式) switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(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/6f0/7 加入静态地址目标端口f0/6源端口f0/7switch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址-----------------------------------------------------------------------------------交换机端口加入vlan将多个端口加入到VLAN2switch(config)#interface range fa 0/17-24switch(config-if-range)#switchport access vlan 2单个端口加入VLANswitch(config)#interface f0/1switch(config-if-range)#switchport access vlan 2-------------------------------------------------------------------------------- 交换机的端口和MAC地址表的设置2960交换机配置端口属性switch#conf tswitch#interface ethernet 0/1进入第1个端口switch#description switch-e0/1-pc1给端口写入注释信息switch#duplex auto/full/full-flow-control/half设置端口的工作模式switch#port secure启用端口安全性switch#port secure max-mac-count 1设置该端口允许对应的MAC地址数(默认132个)switch#sh mac-address-table security查看端口安全性2912交换机配置端口属性switch#conf t进入全局配置模式switch#interface fastethernet 0/1进入第1个端口switch#description switch-f0/1-pc1给端口写入注释信息switch#duplex auto/full/half设置端口的工作模式switch#port security启用端口安全性switch#port security max-mac-count 1设置该端口允许对应的MAC地址数(默认132个)switch#end返回特权模式switch#sh port security查看端口安全性配置和查看MAC地址表1924交换机配置MAC地址表switch#mac-address-table aging-time 600设置动态地址超时时间switch#mac-address-table permanent 0000.0cdd.5a4d e0/3定义永久MAC地址(绑定MAC地址)switch#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7 定义受限MAC地址switch#address-violation disable/ignore/suspend定义地址安全违规switch#show mac-address-table查看上述配置switch#clear mac-addr restric static清除受限MAC地址表项2912交换机配置MAC地址表switch#mac-address-table aging-time 700设置动态地址超时时间switch#mac-address-table static 0000.0cdd.5a4d e0/3定义永久MAC地址(绑定MAC地址)switch#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1定义受限MAC地址switch#port security action shutdown/trap定义地址安全违规switch#show port security查看上述配置配置VTP、VLAN、VLAN Trunk和STP配置VTPswitch#conf tswitch#vtp server定义VTP的工作模式switch#vtp domain cisco定义VTP的域名switch#trunk on启用干道switch#vtp domain cisco加入VTP域switch#vtp client定义VTP的工作模式switch#trunk on启用干道switch#show trunk bswitch#show trunk b allowed-vlans 查看干道信息配置VLANswitch#vlan 10 dept1switch#vlan 20 dept2switch#vlan 30 dept3switch#vlan 40 dept4定义所需VLANswitch#show vlan查看VLAN信息switch#show vlanswitch#show vtp查看VTP的信息switch#int e0/1switch#vlan-membership static 10 switch#int e0/2switch#vlan-membership static 20 switch#int e0/3switch#vlan-membership static 30 switch#int e0/4switch#vlan-membership static 40 把接口划入各自VLAN配置spanning treeswitch#spantree vlan 1对vlan1启用生成树协议switch#sh spantree vlan 1查看生成树信息switch#no spantree vlan 1关闭生成树协议switch#sh spantree vlan 1查看生成树信息交换机上屏蔽个别MAC地址方法configure terminalinterface gigabitEthernet 0/20 switchportsw mode accsw port-secsw port-sec mac-add [macaddress] sw port-sec max 1sw port-sec violation restrict部分命令缩写要看详细按tab键。
思科交换机N7K常用命令

查看BIOS和EPLD版本
show version module 1 模块BIOS版本
show version module 1 epld 模块EPLD版本
恢复密码步骤:
1.如果存在2个管理引擎,那么断电或拆除其中一个。
2.用console线连接活跃状态的管理引擎,然后重启整个设备。
3.当系统重新启动过程中,看到如下提示时?“Loading system software”同时按下“CRTL+]”键组合。
4.应该出现“switch(boot)#” kickstart image 提示。
1备份配置copyrunningconfigstartupconfig2清楚启动文件writeerase3查看系统相关信息showversion4查看硬件相关信息showmodule5查看相关特性showfeature基本查看状态命令showversion获取软硬件信息showmodule验证模块状态reloadmodule重启或关闭模块showmoduleuptime确定每个模块已运行时间showmodulefabric确定每个功能模块状态showhardwarefabricutilization查看当前模块使用情况showenvironmentfan查看机箱风扇和电源风扇的状态showenvironmentpower查看功率的预算及使用showenvironmenttemperature查看每个模块温度值若minormajor数值相同snmp将会发送报警信息showsystemredundancystatus查看activestandby和ha的管理状态systemswitchover强制standby转换为active状态showinterfacebriefshowinterfaceswitchportshowinterfacetrunk基本配置命令showrunningconfigshowstartupconfigcopyrunningconfigstartupconfig保存当前运行配置writeerase删除启动配置清除配置attachmodule登陆到一个模块exit或登出模块许可证安装及功能管理showlicensehostid显示hostid用于在ciscocom创建许可文件installlicensebootflash
思科交换机命令大全(完整版)

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

本人的机房核心交换机为N7K,各地子公司通过MPLS-VPN连接到N7K。
由于VPN专线带宽较低,有视频会议和客服语音、OA等其他流量,需要做QoS,各子公司的设备是Cisco2811路由器,基本配置如下:policy-map QOS-OUTclass CLASS-VOIPpriority 1500set dscp efclass CLASS-OAbandwidth 1000random-detect dscp-basedset dscp af31shape average 1000000class class-defaultfair-queuerandom-detect dscp-basedshape average 1000000类似的配置在N7K上太难做了,一方面网上没有类似的配置可供参考,而官方的配置是零散的,变化大,难以配置一个完整的实例。
本人摸索好久,得出N7K一个结论就是在一个policy-map中,priority和bandwidth无法共存。
N7K上的QoS主要配置如下:policy-map type queuing QOS-OUTclass type queuing 1p3q4t-out-pq1priority level 1 //用不了bandwidth,做不了带宽限制,会抢占全部带宽吗?class type queuing 1p3q4t-out-q3bandwidth remaining percent 20 //用不了bandwidth命令,否则报错queue-limit 10 mbytesrandom-detect cos-based //是否与queue-limit矛盾?前者是尾丢弃,后者是随机丢弃,只有一个起作用吧?class type queuing 1p3q4t-out-q-defaultbandwidth remaining percent 10queue-limit 20 mbytesrandom-detect cos-based另:自定义class-map type queuing match-any my-1p2q4t-out-pq1时,match 后只能跟class-map及cos,没有dscp,而且那个class-map后跟任何已创建好的class-map都报错。
思科网络设备常用命令

网络设备安装与调试考纲要求1、IPV4地址划分(判断网络号,网段)2、交换机、路由器基本知识及配置3、交换机、路由器的Telnet远程登入4、虚拟局域网VLAN的配置5、PPP协议基本配置6、静态路由、缺省路由、RIP、OSPF的基本配置7、Ipconfig、Ping、Telnet等常用命令的应用一、交换机、路由器基本配置1.配置模式切换1.用户模式进入特权模式sw>enableSw#2. 特权模式进入全局配置模式Sw#configure terminalSw(config)#3. 全局配置模式进入接口配置模式Sw(config)#interface fastEthernet 0/1Sw(config-if)#2.路由器端口IP地址的配置Router(config)#interface fastEthernet 0/1 -----进入相应接口(进入F0/1接口)Router (config-if)#no shutdown -----开启端口(路由器默认为关闭)Router (config-if)#ip address 192.168.1.1 255.255.255.0 -----设置IP地址IP地址掩码备注:输入shutdown可关闭对应的端口或(可使用图形界面):(路由器端口默认是关闭,需要把On打钩)3.配置设备名称Switch(config)#hostname SW -----在配置模式输入hostname+名字或:二、交换机、路由器的Telnet远程登入Telnet 默认是开启,需要在设备接口配置可连通的IP地址,路由器在具体的物理接口上配置IP地址,交换机在VLAN上配置IP地址,确保PC机可以连通远程登入的设备(使用PING测试)。
可以连通在做如下操作(1)只配置登入密码Sw(config)#line vty 0 4 ---启用5条线路让5个用户接入,并进入line配置模式Switch(config-line)#password abc ----设置登录密码abcSwitch(config-line)#login ----要求密码登入(只要输入密码)(2)配置登入账号以及密码Sw(config)#username admin password admin ---------配置账号密码Sw(config)#line vty 0 4 ----启用5条线路让5个用户接入,并进入line配置模式Switch(config-line)#login local ----要求本地账号登入(需要输入账号以及密码)(3)无账号密码登入Sw(config)#line vty 0 4 ---启用5条线路让5个用户接入,并进入line配置模式Switch(config-line)#no login ----无账号密码登入注意1:在设置密码后如果无法登入,需要在输入命令login\login local,也就是login\login local需在设置完密码后输入。
思科交换机命令大全共16页文档

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail] CLI:switch(enable) show cdp neighbors[module/port][vlan|duplex|capabilities|detail]6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string 7.设置端口速度IOS:switch(config-if)# speed{10|100|auto}CLI:switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list CLI:switch(enable)set trunk module/port[on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道IOS:switch(config-if)# port group group-number [distribution{source|destination}] CLI:switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [costcost][vlan-list]17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priorityport-priorityCLI:switch(enable)set spantree portpri {mldule/port}priority switch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age secondsCLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable} 20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-ratepkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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-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 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 fastagingtimepkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录: switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
(整理)思科交换机配置命令

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
思科nexus 7K 5K 交换机入门学习教程

思科技术交流——Nexus交换技术目录一、Nexus系列物理硬件 (2)1.1 Nexus 7010 (2)1.2 Nexus 5K/2K (2)1.3 N7K引擎 (3)1.3.1 Supervisor 1 (3)1.3.2 Supervisor 2/2e (3)二、Nexus NX-OS开机初始化 (4)2.1 系统升级和license安装 (4)2.1.1 NX-OS系统升级 (4)2.1.2 EPLD升级 (5)2.1.3 License 安装 (7)2.2 开机配置 (7)2.2.1 带外管理配置 (7)2.2.2 远程登录配置 (8)2.3 密码重置 (9)2.3.1 Nexus 7K密码重置 (9)2.3.2 Nexus 5K密码重置 (9)三、Nexus Features (10)3.1 VDC (10)3.1.1 VDC介绍 (10)3.1.2 VDC资源分派命令详解 (11)3.1.3 NX-OS不同版本VDC数量的对比 (12)3.1.4 创建Admin VDC (12)3.1.5 Admin VDC的限制 (12)3.1VPC (13)3.2.2 VPC介绍 (13)3.2.3 VPC部署场景 (16)3.3 10GE ”共享” VS”专用”模式 (17)3.4 RBAC (17)四、Nexus 5K与Nexus 2K互联架构 (18)4.1 Nexus 2K介绍 (18)4.2 农商行N5K/N2K互联架构 (18)一、Nexus系列物理硬件1.1 Nexus 70101.2 Nexus 5K/2K1.3 10GE ”共享” VS”专用”模式32口的10GE模块拥有80G的带宽,所以在“共享”模式下,端口超额占用了4倍的资源。
默认情况下,4个端口共享10G带宽。
而在“专用”模式下,8个端口可以被配置成线速性能以及独享QoS缓存。
n7000(config)# interface ethernet 1/1n7000(config-if)# rate mode dedicated//在端口上激活“专用”模式,“共享”模式允许4个接口共享10G带宽。
n7k config

establishing the vpc peer keepalive link
config the vpc peer link
config the vpcs
make sure config are consistent
配置vpc domain
feature vpc
span-tr port type edge
no shut
配置ospf
feature OSPF 1
router ospf 1
int lo 0
ip add
ip router os 1 a 0
为ospf配置bfd技术
feature
查看bfd邻居关系
vpc damain x
role pri x
配置vpc peer keepalive link
vrf context x
feature lacp
interface e x
channel-g x mode ac
通过前面板来实现VDC之间的通讯,resources templates被用来限制vdc对引擎资源影响,在一个VDC中的VLAN和VRF限制数量,可以直接被设置。
查看关联资源:sh vdc n7k resource
配置resource template
vdc tmeplate x
limit-resource vlan min x max x
vlan x
no shut
int vlan x
ip add
no shut
配置port-channel
int ethernet x
思科路由交换设备常用命令

思科路由交换设备常用命令一、常用查看命令:1、登录方式有两种,一种是通过接口地址远程telnet登录,一种是通过console口登录。
✧远程telnet登录:telnet 10.140.100.254(互联网接入路由器地址)✧通过console口登录,需要有控制线缆(设备自带),串口线。
用笔记本直接连到console口即可。
2、思科路由交换设备权限界面有三种✧用户模式,即route>模式,这个模式只能查看一些简单内容,如vlan,接口等,但是不能看配置。
✧特权模式,即route#模式,这个模式可以使用show命令查看路由器信息,也可以使用debug命令监测设备。
✧全局模式,即route(config)#,这个模式可以配置路由器。
3、show的主要命令集:✧show running-config 查看路由器当前配置,用空格可以翻页,用回车可以一行一行查看。
✧show ip interface brief 可以查看路由器接口的简单信息,包括,接口IP地址,接口链路状态和链路协议状态。
举例如下:✧show processes cpu 可以查看CPU利用率,举例如下:✧show processes memory可以查看内存利用率,举例如下:✧show interface 接口名查看接口详细信息,举例如下:✧show cdp neighbor 查看邻居,只能查看直连的思科产品。
CDP(思科发现协议)协议时思科自有的协议。
举例如下:如果使用show cdp neighbor detail命令,可以查看每个邻居的详细信息,包括发现接口的地址信息。
✧show ip route 查看路由,举例如下:✧show version 查看路由器系统和版本信息,举例如下:✧show vlan 查看vlan信息,可以看到接口属于哪个vlan。
举例如下:✧show interface 接口trunk 可以查看trunk状态。
思科交换机配置命令

一、基本配置switch>enable //进入特权模式switch#config terminal //进入全局配置模式switch(config)#hostname //设置交换机的主机名switch(config)#enable secret xxx //设置进入特权MD5加密口令switch(config)#enable password xxa //设置进入特权明文加密口令switch(config)#line console 0 //进入控制台口switch(config-line)#line vty 0 4 //设置进入虚拟终端的连接数目0~4 5个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)# interface range fastethernet 0/1-5 //进入同种类型多端口配置三、端口操作switch(config)#int f0/1 //进入端口1switch(config-if)#switchport access vlan 2 // 将端口1当前端口加入vlan 2 switch(config-if)#switchport mode trunk //将f0/1设置为中继干线switch(config-if)#switchport trunk allowed vlan 1,2 //设置允许通过中继的vlanswitch(config-if)#switchport trunk encap dot1q //设置vlan 中继执行的协议VLAN的端口聚合叫TRUNK,用来在不同的交换机之间进行连接,以保证在跨越多个交换机上建立的同一个VLAN的成员能够相互通讯。
思科交换机命令大全-思科交换机命令

思科交换机常用命令大全1.1 用户模式与特权模式用户模式:可以使用一些基本的查询命令特权模式:可以对交换机进行相关的配置进入特权模式命令:Switch>enable退出特权模式命令:Switch#exit启用命令查询:?时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求)显示信息命令:Switch#show 可选参数注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数查看交换机配置: Switch#show running-config保存交换机配置:Switch#copy running-config startup-configSwitch#wr查看端口信息:Switch#show interface查看MAC地址表:Switch#show mac-address-table查看交换机CPU的状态信息:Switch#show processes1.2 全局配置模式进入全局配置模式:Switch#configure terminal主机名修改:Switch(config)#hostname 主机名(自选参数)特权模式进入密码: Switch(config)#enable secret 密码(自选参数)取消特权模式密码:Switch(config)#no enable secret取消主机名设置: Switch(config)#no hostname退出配置模式: Switch(config)#exit需要特别注意的是在配置模式中无法使用show命令,如果要使用的话show前必须加do和空格,例如:do show *指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary例如: Switch(config)#spanning-tree vlan 1 root primary需要注意的是:设置根交换机是基于VLAN的关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号)例如: Switch(config)#no spanning-tree vlan 11.3 接口配置模式进入接口配置模式:Switch(config)#interface 端口名称(可选参数)启用端口:Switch(config-if)#no shutdown停用端口:Switch(config-if)#shutdown进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2退出接口配置模式:Switch(config-if)#exit1.4 二层端口的配置端口速率: Switch(config-if)#speed 可选参数双工模式: Switch(config-if)#duplex 可选参数禁用链路协商:Switch(config-if)#no negotiation auto 启用链路协商:Switch(config-if)#negotiation auto1.5 VLAN的配置新建VLAN:Switch(config)#vlan 自选参数(VLAN号)Switch(config-vlan)#name自选参数(VLAN名)例如:Switch(config)#vlan 1Switch(config-vlan)#name lab1Switch(config-vlan)#exit删除VLAN: Switch#vlan databaseSwitch(vlan)#no vlan 自选参数(vlan号)例如:Switch#vlan databaseSwitch(vlan)#no vlan 2将一个接口加入VLAN:Switch(config)#interface 可选参数(接口号)Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 自选参数(VLAN号)Switch(config-if)#no shutdownSwitch(config-if)#exit例如:Switch(config)#interface f0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 1Switch(config-if)#no shutdownSwitch(config-if)#exit将一个接口退出VLAN:Switch(config)#interface 可选参数(接口号)Switch(config-if)#no switchport access vlan 自选参数(VLAN号)例如:Switch(config)#interface f0/1Switch(config-if)#no switchport access vlan 2修改一个接口为端口汇聚模式Switch(config)#interface 可选参数(接口号)Switch(config-if)#switchport mode trunkVLAN的验证命令:Switch#show vlan 显示VLAN列表Switch#show interface switchport 查看具体接口的VLAN成员资格信息1.6 VTP的配置VTP Domain Name(VTP域名)Switch#configure terminalSwitch(config)#vtp domain 自选参数例如: Switch(config)#vtp domain Lab_NetworkVTP mode(VTP模式)Switch(config)#vtp mode 可选参数(Server|Client| Transparent)例如: Switch(config)#vtp mode ServerVTP Pruning(VTP修剪)Switch(config)#vtp pruning注意:有的交换机不支持VTP修剪命令查看VTP的配置命令:Switch#show vtp status显示交换机运行的VTP模式,配置修订号和交换机所属的VTP域Switch#show vtp counters显示VTP消息相关的统计数据1.7 远程登录交换机设置配置管理VLAN:Switch(conf)#interface vlan 1Switch(config-if)#ip address x.x.x.x 255.255.255.0Switch(config-if)#no shutdown注意:IP地址必须与远程连接交换机的PC机地址在同一网段在交换机上指定默认网关:Switch(config)#ip default-gateway x.x.x.x注意:指定的默认网关仅当前交换机有效。
思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度IOS:switch(config-if)# speed{10|100|auto}CLI:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list CLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道IOS:switch(config-if)# port group group-number [distribution {source|destination}] CLI:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况: router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录: switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
reload module 1 重启或关闭模块
show module uptime 确定每个模块已运行时间
show module fabric 确定每个功能模块状态
show hardware fabric-utilization 查看当前模块使用情况
show environment fan 查看机箱风扇和电源风扇的状态
恢复密码步骤:
1.如果存在2个管理引擎,那么断电或拆除其中一个。
2.用console线连接活跃状态的管理引擎,然后重启整个设备。
3.当系统重新启动过程中,看到如下提示时?“Loading system software”同时按下“CRTL+]”键组合。
4.应该出现“switch(boot)#” kickstart image 提示。
1、备份配置
copy running-config startup-config
2、清楚启动文件
write erase
3、查看系统相关信息
show version
4、查看硬件相关信息
show module
5、查看相关特性
show feature
基本查看状态命令
show version 获取软/硬件信息
write erase 删除启动配置(清除配置)
attach module 1 登陆到一个模块(exit或$登出模块)
许可证安装及功能管理
show license host-id 显示host-id 用于在创建许可文件
install license bootflash:license_file.lic 安装许可证
license grace-period 启用宽限期许可证,延期高达120天
show license usage 验证安装的许可证
show license usage LAN_ENTERPRISE_SERVICES_PKG
show license file mds20080623110250757.lic 显示一个许可证文件(如果已安装)
ISSU服务中软件升级服务,可在没有任何停机或数据包丢失的情况下完成升级和修复问题
2.冷启动
dir 查看flash中文件
show boot 查看引导参数
boot kickstart bootflash:n7000-s1-kickstart.4.0.1.bin sup1 sup2
reload 手动重启
sup1/sup2(Supervisor):引擎是一块板卡,和接口板差不多,引擎上面一般也有接口,比较少,还有console口,模块化的交换机如果没有接口板可以工作,但没有引擎是不能工作的。
查看BIOS和EPLD版本
show version module 1 模块BIOS版本
show version module 1 epld 模块EPLD版本
feature bgp/... 启用或禁用功能
sபைடு நூலகம்ow feature 查看功能状态
软件升级两个
1.拷贝NX-OS系统镜像到FLASH,并用一条命令升级
install all kickstart bootflash:n7000-s1-kickstart.4.0.3.bin system bootflash:n7000-s1-dk9.4.0.3.bin
show version fan 1 epld 风扇EPLD版本
show version xbar 1 epld 交换矩阵EPLD版本
EPLD: ( Erasable Programmable Logic Device) 可擦除可编辑逻辑器件 是一种集成电路,包括一系列的编程逻辑器件,其无需进行再次连接。
show environment power 查看功率的预算及使用
show environment temperature 查看每个模块温度值(若minor==major数值相同,snmp将会发送报警信息)
show system redundancy status 查看active/standby和HA的管理状态
9.保存running-configuration到startup-configuration
10.安装之前断电或拆除的引擎。
5.使用“config t” 和“admin-password xxxxxxx”命令配置管理密码并exit推出配置模式。
6.加载NX-OS 使用“load bootflash:NX-OS” 命令。
7.登陆NX-OS 使用新的“admin”密码。
8.再次更改“admin” 密码以便同步 SNMPv3。
system switchover 强制standby转换为active状态
show interface brief
show interface switchport
show interface trunk
基本配置命令
show running-config
show startup-config
copy running-config to startup-config 保存当前运行配置