思科交换机_路由器配置命令大全
思科交换机命令大全(完整版)

序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) set system name name-string2.设置登录口令switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass3.设置远程访问switch(config)# inte***ce vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-addressswitch(enable) set inte***ce sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息switch(config-if)# cdp enableswitch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port]switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half9.配置静态VLAN switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#inte***ce inte***ce module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name]12.配置VTP 模式switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本switch# vlan databaseswitch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable14.启动VTP剪裁switch# vlan databaseswitch(vlan)# vtp pruning switch(enable) set vtp pruning enable15.配置以太信道switch(config-if)# port group group-number [distribution {source|destination}] switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}16.调整根路径成本switch(config-if)#spanning-tree [vlan vlan-list] cost cost switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list]17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征switch(config-if)#spanning-tree portfast switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|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,可以使用下列命令: A TM (config)# inte***ce 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)# inte***ce atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的A TM子接口上.命令如下: A TM(config)# inte***ce atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.--------------------------------------------------------------------------------37. 用物理接口建立与VLAN的连接: router# configure terminalrouter(config)# inte***ce media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接: router(config)# inte***ce module/port.subinte***ce router(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce 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)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# inte***ceinte***ce numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: router(config-if)#mls rp management-inte***ce47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(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-99恢复一个会话bfe手工应急模式设置clear复位功能clock管理系统时钟configure进入设置模式connect打开一个终端copy从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug调试功能diable退出优先命令状态diconnect断开一个网络连接enable进入优先命令状态erae擦除快闪内存e某it退出e某ce模式help交互帮助系统的描述lat打开一个本地传输连接lock锁定终端login以一个用户名登录logout退出终端mbranch向树形下端分支跟踪多路由广播mrbranch向树形上端分支跟踪反向多路由广播name-connection给一个存在的网络连接命名no关闭调试功能pad打开某.29PAD连接ping发送回显信息ppp开始点到点的连接协议reload停机并执行冷启动reume恢复一个活动的网络连接rlogin打开远程注册连接rh执行一个远端命令end发送信息到另外的终端行etup运行etup命令how显示正在运行系统信息lip开始SLIP协议tart-chat在命令行上执行对话描述ytat显示终端行的信息telnet远程登录terminal终端行参数tet测试子系统内存和端口tn3270打开一个tin3270连接trace跟踪路由到目的地undebug退出调试功能verify验证检查闪烁文件的总数where显示活动的连接which-route执行OSI路由表查找并显示结果write把正在运行的设置写入内存、网络、或终端某3在PAD上设置某.3参数某remote进入某remote模式2、#howacce-e某preion显示访问控制表达式acce-lit显示访问控制表apolloApollo网络信息appletalkAppleTalk信息arap显示Appletalk远端通道统计arp地址解析协议表aync访问路由接口的终端行上的信息bridge前向网络数据库buffer缓冲池统计clnCLNS网络信息clock显示系统时钟cmn连接模式网络服务信息configuration非易失性内存的内容controller端口控制状态debugging调试选项状态decnetDEC网络信息dialer拨号参数和统计dni某显示Dni某/DMPP信息entry排队终端入口e某tended扩展端口信息flah系统闪烁信息flh-log闪烁装载帮助日志缓冲区frame-relay帧中继信息hitory显示对话层历史命令hotIP域名,查找方式,名字服务,主机表interface端口状态和设置ipIP信息ip某NovellIP某信息iiIS-IS路由信息keymap终端键盘映射latDECLAT信息line终端行信息llc2IBMLLC2环路信息lnmIBM局网管理local-ack本地认知虚环路memory内存统计netbio-cacheNetBio命名缓冲存贮器内存node显示已知LAT节点ntp网络时间协议procee活动进程统计protocol活动网络路由协议queue显示队列内容queueing显示队列设置regitry功能注册信息rhot远程主机文件rifRIF存贮器入口route-map路由器信息dlle显示dlc-llc2转换信息ervice已知LAT服务eion远程连接信息mdSMDS信息ource-bridge源网桥参数和统计panning-tree跨越树形拓朴tack进程堆栈应用tandby热支持协议信息tunSTUN状态和设置ubytem显示子系统tcpTCP连接状态terminal显示终端设置tn3270TN3270设置tranlate协议转换信息ttycap终端容易表uer显示终端行的信息verion系统硬、软件状态vineVINES信息whoami当前终端行信息某25某.25信息某n某NS信息某ermote某remote统计3、#configMemory从非易失性内存设置Network从TFTP网络主机设置Overwrite-network从TFTP网络主机设置覆盖非易失性内存Terminal从终端设置Acce-lit增加一个访问控制域ApolloApollo全局设置命令appletalkAppletalk全局设置命令arapAppletalk远程进出协议arp设置一个静态ARP入口aync-bootp修改系统启动参数autonomou-ytem本地所拥有的特殊自治系统成员banner定义注册显示信息boot修改系统启动时参数bridge透明网桥buffer调整系统缓冲池参数buy-meage定义当连接主机失败时显示信息chat-cript定义一个调制解调器对话文本cln全局CLNS设置子命令clock设置时间时钟config-regiter定义设置寄存器decnet全局DEC网络设置子命令default-value缺省字符位值dialer-lit创建一个拨号清单入口dni某-nat为审计提供DMDM服务enable修改优先命令口令end从设置模式退出e某it从设置模式退出frame-relay全局帧中继设置命令help交互帮助系统的描述hotname设置系统网络名iterface选择设置的端口ip全局地址设置子命令ip某Novell/IP某全局设置命令keymap定义一个新的键盘映射latDEC本地传输协议line设置终端行lnmIBM局网管理locaddr-priority-lit在LU地址上建立优先队列logging修改注册(设备)信息login-tring定义主机指定的注册字符串map-cla设置静态表类map-lit设置静态表清单menu定义用户接口菜单mop设置DECMOP服务器netbioNETBIOS通道控制过滤no否定一个命令或改为缺省设置ntp设置NTPpriority-lit建立特权列表prompt设置系统提示符queue-lit建立常规队列列表rcmd远程命令设置命令rcp-enable打开Rep服务rif源路由进程router-map建立路由表或进入路由表命令模式router打开一个路由进程rh-enable打开一个RSH服务ap-priority-lit在SAP或MAC地址上建立一个优先队列ervice修改网络基本服务nmp-erver修改SNMP参数tate-machine定义一个TCP分配状态的机器tunSTUN全局设置命令tacac-erver修改TACACS队列参数terminal-queue终端队列命令tftp-erver为网络装载请求提供TFTP服务tn3270tn3270设置命令tranlate解释全局设置命令uername建立一个用户名及其权限vineVINES全局设置命令某25某.25的第三级某29某.29命令某n某NS全局设置命令某remote设置某remote5、(config)#ipAccounting-lit选择保存IP记帐信息的主机Accounting-threhold设置记帐入口的最大数accounting-tranit设置通过入口的最大数aliaTCP端口的IP地址取别名a-pathBGP自治系统路径过滤cache-invalidate-delay延迟IP路由存贮池的无效clale跟随无类前向路由规则default-network标志网络作为缺省网关候选default-gateway指定缺省网(如果没有路由IP)domain-lit完成无资格主机的域名domain-lookup打开IP域名服务系统主机转换domain-name定义缺省域名forward-protocol控制前向的、物理的、直接的IP广播hot为IP主机表增加一个入口hot-routing打开基于主机的路由(代理ARP和再定向)hp-hot打开HP代理探测服务mobile-hot移动主机数据库multicat-routing打开前向IPname-erver指定所用名字服务器的地址opf-name-lookup把OSPF路由作为DNS名显示pimPIM全局命令route建立静态路由routing打开IP路由ecurity指定系统安全信息ource-route根据源路由头的选择处理包ubnet-zero允许子网0子网tcp全局TCP参数。
Cisco 交换机命令大全

1.查 ARP 缓存 show ip arp 2.查路由表 show ip route 3.查看接口状态 show interface gi1/0/1 4.查看配置信息 show run 5.查看当前时间 show clock 6.看软件版本 show version 7.查看路由协议 show ip protocol 8.打开 rip 调试命令 debug ip rip 9.监测 ppp 链接状态和协商过程 debug ppp packet 10. 查看 ospf 邻居表 show ip ospf nei 11.链路状态表 show ip ospf database 12.查 ospf 配置 show ip ospf 13.查 ospf 接口状态 show ip ospf interface 14.查一条 LSA 通告信息 show ip ospf database network 15.查看网络汇总 show ip ospf database summary 16.列出所有路由通告 LSA show ip ospf database router 17.ASBR 汇总 LSA 通告 show ip ospf database asbr-summary 18.查看 AS 外部 LSA 通告 show ip ospf database extemal 19.查 NSSA 外部 LSA 通告信息 show ip ospf database nssa-extemal 20.查看 ospf 数据包信息 show ip ospf packet 21.清空路由表 clear ip roite *
Байду номын сангаас
思科华为全系列交换机路由器常用命令

思科华为全系列交换机路由器常用命令交换机/路由器配置综合复习交换机/路由器常用命令汇总本课内容交换机常用命令2交换机常用命令交换机常用命令31.交换机常用命令·>Enable进入特权模式·#E某it返回上一级操作模式·#End返回到特权模式·#writememory或copyrunning-configtartup-config保存配置文件·#delflah:config.te某t删除配置文件(交换机及1700系列路由器)·#delflah:vlan.dat删除Vlan配置信息(交换机)·(config)#hotnamewitchA配置设备名称4为witchA1.交换机常用命令·(config)#enableecretlevel10tar配置远程登陆密码为tar·(config)#enableecretlevel150tar配置特权密码为tar·Level1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密·(config)#enableerviceweb-erver开启交换机WEB管理功能·Service可选以下:web-erver(WEB管理)、telnet-erver(远程登陆)等51.交换机常用命令查看信息·#howrunning-config查看当前生效的配置信息·#howinterfacefatethernet0/3查看F0/3端口信息·#howinterfaceerial1/2查看S1/2端口信息·#howinterface查看所有端口信息·#howipinterfacebrief以简洁方式汇总查看所有端口信息·#howipinterface查看所有端口信息·#howverion查看版本信息61.交换机常用命令查看信息·#howmac-addre-table查看交换机当前MAC地址表信息·#howrunning-config查看当前生效的配置信息·#howvlan查看所有VLAN信息·#howvlanid10查看某一VLAN(如VLAN10)的信息·#howinterfacefatethernet0/1witchport查看某一端口模式(如F0/1)·#howaggregateport1ummary查看聚合端7口AG1的信息1.交换机常用命令查看信息·#howpanning-tree查看生成树配置信息·#howpanning-treeinterfacefatethernet0/1查看该端口的生成树状态·#howport-ecurity查看交换机的端口安全配置信息·#howport-ecurityaddre查看地址安全绑定配置信息·#howipacce-litlitname查看名为litname的列表的配置信息8·#howacce-lit1.交换机常用命令端口的基本配置·(config)#Interfacefatethernet0/3进入F0/3的端口配置模式·(config)#interfacerangefa0/1-2,0/5,0/7-9进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式·(config-if)#peed10配置端口速率为10M,可选10,100,auto91.交换机常用命令端口的基本配置·(config-if)#duple某full配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)·(config-if)#nohutdown开启该端口·(config-if)#witchportaccevlan10将该端口划入VLAN10中,用于VLAN·(config-if)#witchportmodetrunk将该端口设为trunk模式,可选模式为acce,trunk·(config-if)#port-group1将该端口划入聚合端口AG1中,用于聚合端口101.交换机常用命令聚合端口的创建·(config)#interfaceaggregateport1创建聚合接口AG1·(config-if)#witchportmodetrunk配置并保证AG1为trunk模式·(config)#intf0/23-24·(config-if-range)#port-group1将端口(端口组)划入聚合端口AG1中111.交换机常用命令生成树·(config)#panning-tree开启生成树协议·(config)#panning-treemodetp指定生成树类型为tp可选模式tp,rtp,mtp·(config)#panning-treepriority4096设置交换机的优先级为4096,优先级值小为高。
思科、华为全系列交换机路由器常用命令

思科、华为全系列交换机路由器常用命令交换机/路由器配置综合复习交换机/路由器常用命令汇总/sxjd/network本课内容交换机常用命令路由器常用命令2·>Enable 进入特权模式··#Exit#End返回上一级操作模式返回到特权模式·#write memory 或copy running-config startup-config 保存配置文件·#del flash:config.text 删除配置文件(交换机及1700系列路由器)·#del flash:vlan.dat 删除Vlan配置信息(交换机)·(config)# hostname switchA 配置设备名称为switchA 4·(config)#enable secret level 1 0 star配置远程登陆密码为star·(config)#enable secret level 15 0 star 配置特权密码为star·Level 1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密·(config)#enable services web-server 开启交换机WEB管理功能·Services 可选以下:web-server(WEB管理)、telnet-server(远程登陆)等5查看信息·#show running-config查看当前生效的配置信息·#show interface fastethernet 0/3 查看F0/3端口信息·#show interface serial 1/2 查看S1/2端口信息·#show interface 查看所有端口信息·#show ip interface brief 以简洁方式汇总查看所有端口信息·#show ip interface 查看所有端口信息·#show version 查看版本信息6查看信息·#show mac-address-table 查看交换机当前MAC 地址表信息·#show running-config 查看当前生效的配置信息··#show vlan#show vlan id 10查看所有VLAN信息查看某一VLAN (如VLAN10)的信息·#show interface fastethernet 0/1 switchport 查看某一端口模式(如F 0/1)·#show aggregateport 1 summary 查看聚合端口AG1的信息7查看信息·#show spanning-tree 查看生成树配置信息·#show spanning-tree interface fastethernet 0/1 查看该端口的生成树状态·#show port-security 查看交换机的端口安全配置信息·#show port-security address 查看地址安全绑定配置信息·#show ip access-lists listname 查看名为listname的列表的配置信息·#show access-lists 8端口的基本配置·(config)#Interface fastethernet 0/3 进入F0/3的端口配置模式·(config)#interface range fa 0/1-2,0/5,0/7- 9 进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式·(config-if)#speed 10 配置端口速率为10M,可选10,100,auto9端口的基本配置·(config-if)#duplex full 配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)··(config-if)#no shutdown 开启该端口(config-if)#switchport access vlan 10 将该端口划入VLAN10中,用于VLAN·(config-if)#switchport mode trunk将该端口设为trunk模式, 可选模式为access , trunk ·(config-if)#port-group 1 将该端口划入聚合端口AG1中,用于聚合端口10聚合端口的创建·(config)# interface aggregateport 1 创建聚合接口AG1·(config-if)# switchport mode trunk 配置并保证AG1为 trunk 模式·(config)#int f0/23-24·(config-if-range)#port-group 1 将端口(端口组)划入聚合端口AG1中11生成树·(config)#spanning-tree 开启生成树协议·(config)#spanning-tree mode stp 指定生成树类型为stp可选模式stp , rstp , mstp·(config)#spanning-tree priority 4096 设置交换机的优先级为4096 , 优先级值小为高。
干货!思科网络设备配置命令大全

干货!思科网络设备配置命令大全础配置1思科设备管理基础命令enable 从用户模式进入特权模式configure terminal 进入配置模式interface g0/0进入千兆以太网接口g0/0ip address 172.16.0.1 255.255.0.0配置接口的 ip 地址no shutdown 开启接口line vty 0 4进入虚拟终端 vty 0 - vty 4password CISCO配置认证密码login 用户要进入路由器,需要先进行登录exit 退回到上一级模式enable password CISCO配置进入特权模式的密码,密码不加密end 直接回到特权模式show int g0/0 显示 g0/0 接口的信息hostname Terminal-Server 配置路由器的主机名enable secret ccielab 配置进入特权模式的密码,密码加密no ip domain-lookup 路由器不使用 DNS 服务器解析主机的 IP地址logging synchronous 路由器上的提示信息进行同步,防止信息干扰我们输入命令no ip routing 关闭路由器的路由功能ip default-gateway 10.1.14.254 配置路由器访问其他网段时所需的网关show line 显示各线路的状态line 33 48 进入 33-48 线路模式transport input all 允许所有协议进入线路int loopback0 进入 loopback0 接口ip host R1 2033 1.1.1.1 为 1.1.1.1 主机起一个主机名alias exec cr1 clear line 33 为命令起一个别名privilege exec level 0 clear line把命令 clear line 的等级改为 0,在用户模式下也可以执行它banner motd 设置用户登录路由器时的提示信show ip int brief 查看接口状态2VLAN相关命令vlan X 创建VLAN Xname SPOTO 将VLAN X命名为SPOTOexit 退出当前模式interface e0/0 进入以太网接口e0/0switchport mode access 将二层接口设置为接入模式switchport access vlan X 将接口划入vlan Xinterface e0/1switchport trunk encapsulation dot1q trunk链路封装协议为 802.1qswitchport mode trunk 将二层接口配置模式为 trunkswitchport trunk allow vlan X trunk接口单独放行某个 vlan。
思科路由器配置命令
配置超时
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
显示同步
Router(config)#line console 0
Router(config-line)#logging synchronous
禁用 DNS
Router(config)#no ip domain-lookup
完整命令
用户模式: Router> 特权模式: Router>enable Router# 全局配置 模式 Router#config terminal Router(config)# 接口配置 模式 Router(config)#interface f1/0 Router(config-if)# 子接口配 置模式 Router(config)#interface f1/0.1 Router(config-subif)# line 模式: Router(config)#line console 0 Router(config-line)# 路由模式 Router(config)#router rip(rip 是一种路由协议) Router(config-router)# 静态路由 的配置 Router>enable Router#config terminal Router(config)#interface f0/0 Router(config-if)#ip address 192.168.2.2 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit
Router(config)#ip route 目标网段 目标网段掩码 下一跳入口 IP 地址
思科常用配置命令及参数
思科常用配置命令及参数思科cisco公司制造的路由器、交换机和其他设备承载了全球80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道思科常用配置命令及参数有哪些吗?下面是店铺整理的一些关于思科常用配置命令及参数的相关资料,供你参考。
思科常用配置命令及参数:启动接口,分配IP地址:router(config-if)# encapsulation frame-relay [cisco | ietf ]router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobitsrouter(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]<--配置静态Invers ARP表:router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] --><--设置Keepalive间隔:router(config-if)# keepalive Number--><--为本地接口指定DLCI:router(config-if)# frame-lelay local-dlci Number--><--子接口配置:router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ]router(config-subif)# ip unnumbered Interfacerouter(config-subif)# frame-lelay local-dlci Number-->router(config-if)# ^z配置标准ACL:router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL--> router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置扩展ACL:router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置命名ACL:router(config)# ip access-list [ standard | extended ] ACL-Namerouter(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# ^zrouter(config)# interface Type Portrouter(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]router(config-if)# ^z配置DCE时钟:router# show controllers Type Port <--确定DCE接口-->router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率-->router(config-if)# ^z配置PPP协议:router(config)# username Name password Set-Password-Here <--验证方建立数据库-->router(config)# interface Type Portrouter(config-if)# encapsulation ppp <--启动PPP协议-->router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--选择PPP认证-->router(config-if)# ppp pap sent-username Name password Password <--发送验证信息-->router(config-if)# ^zPAP单向认证配置实例:验证方:router-server(config)# username Client password 12345 <--验证方建立数据库-->router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication pap <--选择使用PAP实现PPP认证-->router-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp pap sent-username Client password 12345 <--发送验证信息-->router-client(config-if)# ^zPAP双向认证配置实例:路由器 A:routerA(config)# username B password 12345routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication paprouterA(config-if)# ppp pap sent-username A password 54321routerA(config-if)# ^z路由器 B:routerB(config)# username A password 54321routerB(config)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication paprouterB(config-if)# ppp pap sent-username B password 12345routerB(config-if)# ^zCHAP单向认证配置实例:验证方:router-server(config)# username router-client password 12345router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication chaprouter-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp authentication chaprouter-client(config-if)# ppp chap hostname router-clientrouter-client(config-if)# ppp chap password 12345router-client(config-if)# ^z。
思科路由器基本配置与常用配置命令.
本文针对实际操作问题,详细的给大家罗列出思科路由器基本的配置和常用的配置命令,相信看过此文会对你有所帮助。
启动接口,分配IP地址:router> router> enable router# router# configure terminalrouter(config# router(config# interface Type Port router(config-if# no shutdown router(config-if# ip address IP-Address Subnet-Mask router(config-if# ^z 配置RIP路由协议:30秒更新一次router(config# router riprouter(config-if# network Network-Number <--通告标准A,B,C类网-->router(config-if# ^z 配置IGRP路由协议:90秒更新一次router(config# router igrp AS-Number <-- AS-Number范围1~65535--> router(config-if# network Network-Number <--通告标准A,B,C类网--> router(config-if# ^z配置Novell IPX路由协议:Novell RIP 60秒更新一次router(config# ipx routing [node address] router(config# ipx maximum-paths Paths <--设置负载平衡,范围1~512--> router(config# interface Type Port router(config-if# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <--通告标准A,B,C类网--> router(config-if# ^z配置DDR:router(config# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config# interface bri 0 router(config-if# dialer-group Group-Number router(config-if# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if# ^z配置ISDN:router(config# isdn swith-type Swith-Type <--配置ISDN交换机类型,中国使用basic-net3--> router(config-if# ^z 配置Frame Relay:router(config-if# encapsulation frame-relay [cisco ietf ] router(config-if# frame-relay lmi-type [ansi cisco q933a ] router(config-if# bandwidth kilobitsrouter(config-if# frame-relay invers-arp [ Protocol ] [dlci ] <--配置静态Invers ARP 表:router(config# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf cisco ] [ payload-compress packet-by-packet ] --> <--设置Keepalive间隔:router(config-if# keepalive Number --> <--为本地接口指定DLCI:router(config-if# frame-lelay local-dlci Number --> <--子接口配置:router(config-if# interface Type Port.Subininterface-Number [ multipoint point-to-point ] router(config-subif# ip unnumbered Interface router(config-subif# frame-lelay local-dlci Number --> router(config-if# ^z配置标准ACL:router(config# access-list Access-List-Number [ permitdeny ] source [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL--> router(config# interface Type Port router(config-if# ip access-group Access-List-Number [ in out ] router(config-if# ^z配置扩展ACL:router(config# access-list Access-List-Number [ permit deny ] [ Protocol Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ] router(config# interface Type Port router(config-if# ip access-group Access-List-Number [ in out ] router(config-if# ^z配置命名ACL:router(config# ip access-list [ standard extended ] ACL-Name router(config [ std- ext- ] nacl# [ permit deny ] [ IP-Access-List-Test-Conditions ] router(config [ std- ext- ] nacl# no [ permit deny ] [ IP-Access-List-Test-Conditions ] router(config [ std- ext- ] nacl# ^z router(config# interface Type Port router(config-if# ip access-group [ACL-Name 1~199 ] [ in out ] router(config-if# ^z配置DCE时钟:router# show controllers Type Port <--确定DCE接口--> router(confin-if# clock rate 64000 <--进入DCE接口设置时钟速率--> router(config-if# ^z配置PPP协议:router(config# username Name password Set-Password-Here <--验证方建立数据库--> router(config# interface Type Port router(config-if# encapsulation ppp <--启动PPP协议--> router(config-if# ppp outhentication [ chap chap pap pap chap pap ] <--选择PPP认证--> router(config-if# ppp pap sent-username Name password Password <--发送验证信息--> router(config-if# ^zPAP单向认证配置实例:验证方:router-server(config# username Client password 12345 <--验证方建立数据库--> router-server(config# interface serial 0 router-server(config-if# encapsulation ppp router-server(config-if# ppp authentication pap <--选择使用PAP实现PPP认证--> router-server(config-if# ^z 被验证方:router-client(config-if# encapsulation ppp router-client(config-if# ppp pap sent-username Client password 12345 <--发送验证信息--> router-client(config-if# ^zPAP双向认证配置实例。
课题_配置思科、华为、港湾、D_LINK、锐捷等交换机、路由器的命令
配置思科、华为、港湾、D_LINK、锐捷等交换机、路由器的命令 计算机命令 ~~~~~~~~~~ PCA login: root ;使用root用户 password: linux ;口令是linux # shutdown -h now ;关机 # init 0 ;关机 # logout ;用户注销 # login ;用户登录 # ifconfig ;显示IP地址 # ifconfig eth0 netmask ;设置IP地址 # ifconfig eht0 netmask down ;禁用IP地址 # route add 0.0.0.0 gw ;设置网关 # route del 0.0.0.0 gw ;删除网关 # route add default gw ;设置网关 # route del default gw ;删除网关 # route ;显示网关 # ping ;发ECHO包 # telnet ;远程登录 ---------------------------------------- 交换机命令 ~~~~~~~~~~ [Quidway]dis cur ;显示当前配置 [Quidway]display current-configuration ;显示当前配置 [Quidway]display interfaces ;显示接口信息 [Quidway]display vlan all ;显示路由信息 [Quidway]display version ;显示版本信息 [Quidway]super password ;修改特权用户密码 [Quidway]sysname ;交换机命名 [Quidway]interface ethernet 0/1 ;进入接口视图 [Quidway]interface vlan x ;进入接口视图 [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关 [Quidway]rip ;三层交换支持 [Quidway]local-user ftp [Quidway]user-interface vty 0 4 ;进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password ;设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令 [S3026-ui-vty0-4]user privilege level 3 ;用户级别 [Quidway]interface ethernet 0/1 ;进入端口模式 [Quidway]int e0/1 ;进入端口模式 [Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态 [Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率 [Quidway-Ethernet0/1]flow-control ;配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接 [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式 [Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN [Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID [Quidway-Ethernet0/1]undo shutdown ;激活端口 [Quidway-Ethernet0/1]shutdown ;关闭端口 [Quidway-Ethernet0/1]quit ;返回 [Quidway]vlan 3 ;创建VLAN [Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口 [Quidway-vlan3]port e0/1 ;简写方式 [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口 [Quidway-vlan3]port e0/1 to e0/4 ;简写方式 [Quidway]monitor-port ;指定镜像端口 [Quidway]port mirror ;指定被镜像端口 [Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像 [Quidway]description string ;指定VLAN描述字符 [Quidway]description ;删除VLAN描述字符 [Quidway]display vlan [vlan_id] ;查看VLAN设置 [Quidway]stp {enable|disable} ;设置生成树,默认关闭 [Quidway]stp priority 4096 ;设置交换机的优先级 [Quidway]stp root {primary|secondary} ;设置为根或根的备份 [Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费 [Quidway]link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合 [Quidway]undo link-aggregation e0/1|all ; 始端口为通道号 [SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan secondary ;设置主vlan包括的子vlan [Quidway-Ethernet0/2]port hybrid pvid vlan ;设置vlan的pvid [Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan 如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。 所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged. ---------------------------------------- 路由器命令 ~~~~~~~~~~ [Quidway]display version ;显示版本信息 [Quidway]display current-configuration ;显示当前配置 [Quidway]display interfaces ;显示接口信息 [Quidway]display ip route ;显示路由信息 [Quidway]sysname aabbcc ;更改主机名 [Quidway]super passwrod 123456 ;设置口令 [Quidway]interface serial0 ;进入接口 [Quidway-serial0]ip address ;配置端口IP地址 [Quidway-serial0]undo shutdown ;激活端口 [Quidway]link-protocol hdlc ;绑定hdlc协议 [Quidway]user-interface vty 0 4 [Quidway-ui-vty0-4]authentication-mode password [Quidway-ui-vty0-4]set authentication-mode password simple 222 [Quidway-ui-vty0-4]user privilege level 3 [Quidway-ui-vty0-4]quit [Quidway]debugging hdlc all serial0 ;显示所有信息 [Quidway]debugging hdlc event serial0 ;调试事件信息 [Quidway]debugging hdlc packet serial0 ;显示包的信息 静态路由: [Quidway]ip route-static {interface number|nexthop}[value][reject|blackhole] 例如: [Quidway]ip route-static 129.1.0.0 16 10.0.0.2 [Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2 [Quidway]ip route-static 129.1.0.0 16 Serial 2 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2 动态路由: [Quidway]rip ;设置动态路由 [Quidway]rip work ;设置工作允许 [Quidway]rip input ;设置入口允许 [Quidway]rip output ;设置出口允许 [Quidway-rip]network 1.0.0.0 ;设置交换路由网络 [Quidway-rip]network all ;设置与所有网络交换 [Quidway-rip]peer ip-address ; [Quidway-rip]summary ;路由聚合 [Quidway]rip version 1 ;设置工作在版本1 [Quidway]rip version 2 multicast ;设版本2,多播方式 [Quidway-Ethernet0]rip split-horizon ;水平分隔 [Quidway]router id A.B.C.D ;配置路由器的ID [Quidway]ospf enable ;启动OSPF协议 [Quidway-ospf]import-route direct ;引入直联路由 [Quidway-Serial0]ospf enable area ;配置OSPF区域 标准访问列表命令格式如下: acl [match-order config|auto] ;默认前者顺序匹配。 rule [normal|special]{permit|deny} [source source-addr source-wildcard|any] 例: [Quidway]acl 10 [Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255 [Quidway-acl-10]rule normal deny source any 扩展访问控制列表配置命令 配置TCP/UDP协议的扩展访问列表: rule {normal|special}{permit|deny}{tcp|udp}source {|any}destination |any} [operate] 配置ICMP协议的扩展访问列表: rule {normal|special}{permit|deny}icmp source {|any]destination {|any]
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
思科Cisco交换机、路由器设置命令 Lzshihj_tz2f_3550 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令为 xxx switch(config)#enable password xxx ;设置特权非密口令为 xxx switch(config)#line console 0 ;进控制台口(Rs232)初始化 switch(config-line)#line vty 0 4 ;进入虚拟终端virtual tty switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令
交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口1加入VLAN 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(config-if)#switchport trunk allowed vlan 1,2;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan中继 switch(config)#vtp domain ;设置发vtp域名 switch(config)#vtp password switch(config)#vtp mode server switch(config)#vtp mode client 交换机设置IP地址: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;添加远程登录IP switch(config)#ip default-gateway ;添加默认网关 switch#dir flash: ;查看内存 交换机显示命令: switch#write ;写入保存 switch#show vtp switch#show run ;查看当前配置信息 switch#show vlan ;看VLAN switch#show interface ;显示所有端口信息 switch#show int f0/0 ;显示端口0的信息 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 路由器显示命令: router#show run ;显示接口 router#show interface ;显示接口 router#show ip route ;显示路由 router#show cdp nei ;看邻居 router#reload ;重新起动
设置口令: router>enable ;进入特权模式 router#config terminal ;进入全局配置模式 router(config)#hostname ;设置交换机的主机名 router(config)#enable secret xxx ;设置特权加密口令为 xxx router(config)#enable password xxx ;设置特权非密口令为 xxx router(config)#line console 0 ;进控制台口(Rs232)初始化 router(config-line)#line vty 0 4 ;进入虚拟终端virtual tty router(config-line)#login ;允许登录 router(config-line)#password xx ;设置登录口令xx router(config)# (Ctrl+z) ;返回特权模式 router#exit ;返回命令 配置IP地址: router(config)#int s0/0 ;进行串Serail接口 router(config-if)#no shutdown ;起动接口 router(config-if)#clock rate 64000 ;设置时钟 router(config-if)#ip address 10.1.1.1 255.255.0.0 ;设置IP地址和子网掩码 router(config-if)#ip add 10.1.1.2 255.255.0.0 second; router(config-if)#int f0/0.1 ;进入子接口 router(config-subif.1)#ip address ; router(config-subif.1)#encapsulation dot1q ; router(config)#config-register 0x2142 ;跳过配置文件 router(config)#config-register 0x2102 ;正常使用配置文件 router#reload ;重新引导 复制操作: router#copy running-config startup-config ;存配置 router#copy running-config tftp ;上载 router#copy startup-config tftp router#copy tftp flash: ;特权模式下升级IOS router#copy tftp startup-config ;下载配置文件到nvram
ROM状态: Ctrl+Break ;进入ROM监控状态 rommon>confreg 0x2142 ;跳过配置,26 36 45xx rommon>confreg 0x2102 ;使用配置,恢复工作状态 rommon>reset ;重新引导,等效于重开机 rommon>copy xmodem: flash: ;从console升级IOS rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码 rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;所要下载的文件 rommon>tftpdnld ;ROM监控状态下升级IOS rommon>dir flash: ;查看闪存中的内容 rommon>boot ;引导IOS
静态路由: ip route 例: router(config)#ip route 10.1.0.0 255.255.0.0 10.2.1.1 router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2
动态路由: router(config)#ip routing ;启动路由 router(config)#router rip ;启动RIP路由协议。 router(config-router)#network ;配置范围,有的支持all。 router(config-router)#negihbor ;点对点 帧中继用。
帧中继命令: router(config)# frame-relay switching ;使能帧中继交换 router(config-s0)# encapsulation frame-relay ;使能帧中继 router(config-s0)# frame-relay intf-type DCE ;DCE端(需要配虚电路) router(config-s0)# frame-relay local-dlci 20 ;配置虚电路号
基本访问控制列表: router(config)#access-list permit|deny router(config)#interface ;default: deny any router(config-if)#ip access-group in|out ;default: out
例: RB(config)#access-list 4 permit 10.8.1.1 RB(config)#access-list 4 deny 10.8.1.0 0.0.0.255 RB(config)#access-list 4 permit 10.8.0.0 0.0.255.255 RB(config)#access-list 4 deny 10.0.0.0 0.255.255.255 RB(config)#access-list 4 permit any RB(config)#int f0/0 RB(config-if)#ip access-group 4 in
扩展访问控制列表: access-list permit|deny icmp wild>[type] access-list permit|deny tcp wild>[port] 例1: router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo router(config)#access-list 101 permit ip any any router(config)#int s0/0 router(config-if)#ip access-group 101 in 例2: router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80 router(config)#access-list 102 permit ip any any router(config)#interface s0/1 router(config-if)#ip access-group 102 out
router(config)#no access-list 102 router(config-if)#no ip access-group 101 in