Cisco设备配置命令

合集下载

cisco交换机(Switch)配置命令大全

cisco交换机(Switch)配置命令大全

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

Cisco配置命令大全

Cisco配置命令大全

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

思科命令大全(完整版)

思科命令大全(完整版)

思科命令大全(完整版)1.设置主机名/系统名IOS:witch(config)#hotname"hotname"CLI:witch(enable)etytemnamename-tring2.设置登录口令IOS:witch(config)#enablepawordlevel1pawordCLI:witch(enable)etpawordwitch(enable)etenalbepa3.设置远程访问IOS:witch(config)#interfacevlan1witch(config-if)#ipaddreip-addrenetmakwitch(config-if)#ipdefault-gatewayip-addreCLI:witch(enable)etinterfacec0ip-addrenetmakbroadcat-addre witch(enable)etinterfacec0vlanwitch(enable)etiproutedefaultgateway4.启用和浏览CDP信息IOS:witch(config-if)#cdpenablewitch(config-if)#nocdpenableCLI:witch(enable)etcdp{enable|diable}module/port5.查看Cico邻接设备的CDP通告IOS:witch#howcdpinterface[typemodle/port]witch#howcdpneighbor[typemodule/port][detail]CLI:witch(enable)howcdpneighbor[module/port][vlan|duple某|capabilitie|detail]6.端口描述IOS:witch(config-if)#decriptionecription-tring CLI:witch(enable)etportnamemodule/numberdecription-tring 7.设置端口速度IOS:witch(config-if)#peed{10|100|auto}CLI:witch(enable)etportpeedmoudle/number{10|100|auto}witch(enable)etportpeedmoudle/number{4|16|auto}8.设置以太网的链路模式IOS:witch(config-if)#duple某{auto|full|half}CLI:witch(enable)etportduple某module/number{full|half}9.配置静态VLANIOS:witch#vlandatabaewitch(vlan)#vlanvlan-numnamevlawitch(vlan)#e某itwitch#configureteriminalwitch(config)#interfaceinterfacemodule/numberwitch(config-if)#witchportmodeaccewitch(config-if)#witchportaccevlanvlan-numwitch(config-if)#endCLI:witch(enable)etvlanvlan-num[namename]witch(enable)etvlanvlan-nummod-num/port-lit10.配置VLAN中继线IOS:witch(config)#interfaceinterfacemod/portwitch(config-if)#witchportmodetrunkwitch(config-if)#witchporttrunkencapulation{il|dotlq}witch(config-if)#witchporttrunkallowedvlanremovevlan-litwitch(config-if)#witchporttrunkallowedvlanaddvlan-litCLI:witch(enable)ettrunkmodule/port[on|off|deirable|auto|nonegotiate] Vlan-range[il|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-nameCLI:witch(enable)etvtp[domaindomain-name]12.配置VTP模式IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-namewitch(vlan)#vtp{ever|cilent|tranparent}witch(vlan)#vtppawordpawordCLI:witch(enable)etvtp[domaindomain-name][mode{ever|cilent|tranparent}][pawordpaword] 13.配置VTP版本IOS:witch#vlandatabaewitch(vlan)#vtpv2-modeCLI:witch(enable)etvtpv2enable14.启动VTP剪裁IOS:witch#vlandatabaewitch(vlan)#vtppruningCLI:witch(enable)etvtppruningenable15.配置以太信道IOS:witch(config-if)#portgroupgroup-number[ditribution{ource|detination}]CLI:witch(enable)etportchannelmoudle/port-rangemode{on|off|deirable|auto}16.调整根路径成本IOS:witch(config-if)#panning-tree[vlanvlan-lit]cotcotCLI:witch(enable)etpantreeportcotmoudle/portcotwitch(enable)etpantreeportvlancotmoudle/port[cotcot][vlan-lit]17.调整端口IDIOS:witch(config-if)#panning-tree[vlanvlan-lit]port-priorityport-priorityCLI:witch(enable)etpantreeportpri{mldule/port}prioritywitch(enable)etpantreeportvlanpri{module/port}priority[vlan] 18.修改STP时钟witch(config)#panning-tree[vlanvlan-lit]ma某-ageecondCLI:witch(enable)etpantreehellointerval[vlan]witch(enable)etpantreefwddelaydelay[vlan]witch(enable)etpantreema某ageagingtiame[vlan]19.启用或禁用PortFat特征IOS:witch(config-if)#panning-treeportfatCLI:witch(enable)etpantreeportfat{module/port}{enable|diable}20.启用或禁用UplinkFat特征IOS:witch(config)#panning-treeuplinkfat[ma某-update-ratepkt-per-econd]CLI:witch(enable)etpantreeuplinkfat{enable|diable}[rateupdate-rate][all-protocoloff|on]为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:witch(config)#cluterenablecluter-name21.为了从一条中继链路上删除VLAN,可使用下列命令:witch(enable)cleartrunkmodule/portvlan-range22.用howvtpdomain显示管理域的VTP参数.23.用howvtptatitic显示管理域的VTP参数.24.在Catalyt交换机上定义TrBRF的命令如下:witch(enable)etvlanvlan-name[namename]typetrbrfbridgebridge-num[tp{ieee|ibm}]25.在Catalyt交换机上定义TrCRF的命令如下:witch(enable)etvlanvlan-num[namename]typetrcrf{ringhe某-ring-num|decringdecimal-ring-num}parentvlan-num26.在创建好TrBRFVLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:witch(enable)etvlanvlan-nummod-num/port-num27.命令howpantree显示一个交换机端口的STP状态.28.配置一个ELAN的LES和BUS,可以使用下列命令:ATM(config)#interfaceatmnumber.ubintmultiointATM(config-ubif)#laneerber-buethernetelan-name29.配置LECS:ATM(config)#lanedatabaedatabae-nameATM(lane-config-databade)#nameelan1-nameerver-atm-addrele1-nap-addreATM(lane-config-databade)#nameelan2-nameerver-atm-addrele2-nap-addreATM(lane-config-databade)#name...30.创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)#interfaceatmnumberATM(config-if)#laneconfigdatabaedatabae-nameATM(config-if)#laneconfigauto-config-atm-addre31.将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)#interfaceatmnumber.ubintmultipointATM(config)#laneclientethernetvlan-numelan-num32.用howlaneerver显示LES的状态.33.用howlanebu显示bu的状态.34.用howlanedatabae显示LECS数据库可内容.35.用howlaneclient显示LEC的状态.36.用howmodule显示已安装的模块列表.37.用物理接口建立与VLAN的连接:router#configureterminalrouter(config)#interfacemediamodule/portrouter(config-if)#decriptiondecription-tringrouter(config-if)#ipaddreip-addrubnet-makrouter(config-if)#nohutdown38.用中继链路来建立与VLAN的连接:router(config)#interfacemodule/port.ubinterface router(config-ig)#encapulation[il|dotlq]vlan-number router(config-if)#ipaddreip-addreubnet-mak39.用LANE来建立与VLAN的连接:router(config)#interfaceatmmodule/portrouter(config-if)#noipaddrerouter(config-if)#atmpvc105qaalrouter(config-if)#atmpvc2016ilnirouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-makrouter(config-if)#laneclientethernetelan-numrouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-namerouter(config-if)#laneclientethernetelan-namerouter(config-if)#...40.为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)#iproutingrouter(config)#routerip-routing-protocolrouter(config-router)#networkip-network-numberrouter(config-router)#networkip-network-number41.配置默认路由:witch(enable)etiproutedefaultgateway42.为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvlan-idvlan-id-num43.在路由处理器启用MLSP:router(config)#mlrpip44.为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvtp-domaindomain-name45.查看指定的VTP域的信息:router#howmlrpvtp-domainvtpdomainname46.要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mlrpmanagement-interface47.要检验MLS-RP的配置情况:router#howmlrp48.检验特定接口上的MLS配置:router#howmlrpinterfaceinterfacenumber49.为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:etmlflow[detination|detination-ource|full]50.为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)#mlrpipinput-acl51.当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:witch(enable)etmlenable52.若想改变老化时间的值,可在特权模式下输入以下命令:54.确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:witch(enable)howmlinclude55.显示MLS高速缓存记录:witch(enable)howmlentry56.用命令howinarp显示ARP高速缓存区的内容。

思科交换机路由基本配置命令

思科交换机路由基本配置命令

思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。

下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。

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

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

干货!思科网络设备配置命令大全础配置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。

CISCO思科交换机3650G配置命令大全

CISCO思科交换机3650G配置命令大全

CISCO思科交换机3650G配置命令⼤全CISCO思科交换机3650G配置命令⼤全1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录⼝令:switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录⼝令: switch(enable) set password switch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway 4.在基于IOS的交换机上启⽤和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启⽤和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端⼝描述:switch(config-if)# description description-string 基于CLI的交换机的端⼝描述:switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端⼝速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端⼝速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太⽹的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太⽹的链路模式:switch(enable) set port duplex module/number {full|half} 8.在基于IOS的交换机上配置静态VLAN: switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/number switch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-num switch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list 9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/port switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name] 11.在基于IOS的交换机上配置VTP 模式: switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式: switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12. 在基于IOS的交换机上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本: switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁: switch# vlan database switch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁: switch(enable) set vtp pruning enable 14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端⼝ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端⼝ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan] switch(enable) set spantree fwddelay delay [vlan] switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端⼝上启⽤或禁⽤Port Fast 特征: switch(config-if)#spanning-tree portfast在基于CLI的交换机端⼝上启⽤或禁⽤Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable} 19. 在基于IOS的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成⼀个集群的命令交换机,⾸先要给管理接⼝分配⼀个IP地址,然后使⽤下列命令: switch(config)# cluster enable cluster-name 21. 为了从⼀条中继链路上删除VLAN,可使⽤下列命令: switch(enable) clear trunk module/port vlan-range 22. ⽤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-num 27. 命令show spantree显⽰⼀个交换机端⼝的STP状态.28. 配置⼀个ELAN的LES和BUS,可以使⽤下列命令:ATM (config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接⼝上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31. 将每个LEC配置到⼀个不同的ATM⼦接⼝上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32. ⽤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-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38. ⽤中继链路来建⽴与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39. ⽤LANE 来建⽴与VLAN的连接:router(config)# interface atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …40. 为了在路由处理器上进⾏动态路由配置,可以⽤下列IOS命令来进⾏: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-number router(config-router)# network ip-network-number 41. 配置默认路由:switch(enable) set ip route default gateway42. 为⼀个路由处理器分配VLANID,可在接⼝模式下使⽤下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43. 在路由处理器启⽤MLSP: router(config)# mls rp ip44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface number44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name 45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接⼝,可以在接⼝模式下输⼊下列命令: router(config-if)#mls rp management-interface 47. 要检验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 agingtime 53. 设置快速⽼化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显⽰交换机引⽤列表中的内容再确定: switch(enable) show mls include 55. 显⽰MLS⾼速缓存记录: switch(enable) show mls entry56. ⽤命令show in arp显⽰ARP⾼速缓存区的内容。

Cisco路由器配置基本命令

Cisco路由器配置基本命令

Cisco路由器配置基本命令特权模式:enableRouter1 # show running-configRouter1 # show ip routeRouter # show ip interface briefSwitch # show vlanSwitch # show ip interface配置模式:configure terminal1) console密码SW2(config)#line console 0SW2(config-line)#password ciscoSW2(config-line)#login //启⽤密码认证,默认没有,需要加上去SW2(config-line)#login local //本地开启⽤户认证SW2(config)username xiao password fan //创建本地⽤户SW2(config)username xiao privilege 15 password fan //以该⽤户登⼊设备后直接进⼊特权模式说明---对⽤户的权限定义0-15级,最⾼为15,任何命令都可操作SW2(config)service password-encryption //明⽂密码加密2)特权模式密码(设置全局密码)SW2>enadleSW2(config)#configure terminal1.(config)#enable password en cisco←密码encisco2.(config)#enable secret jmcisco←密码jmcisco #2个同时设,只有secret 有效,因为其优先极⾼(config)#login <--⼀定要加,表⽰启⽤全局密码设置完成exitenable password xiaofan 优先级低enable secret cisco 优先级⾼思科加密⽅式:0 显⽰的是密码本⾝7 密⽂加密,容易破解5 复杂密⽂加密3)虚拟通道密码SW2>enadleSW2(config)#configure terminalSW2(config)#line vty 0 4SW2(config-line)#password telnetciscoSW2(config-line)#login //默认就有SW2(config-line)#login local //开启本地⽤户认证,使⽤本地⽤户数据库SW2(config-line)no login //不需要密码就可登陆路由类(静态路由和动态路由)静态路由:ip route address subnet-mask address默认路由ip route 0.0.0.0 0.0.0.0 address动态路由:rip v2* Router1配置RIP协议Router(config)# router rip !开启RIP协议进程Router(config-router)# network 172.16.1.0 !申明本设备的直连⽹段Router(config-router)# network 172.16.2.0Router(config-router)# version 2Router(config-router)# no auto-summary !关闭路由信息的⾃动汇总功能* 三层交换机配置RIP协议Switch (config)# router rip !开启RIP协议进程Switch (config-router)# network 172.16.1.0 !申明本设备的直连⽹段Switch (config-router)# network 172.16.5.0Switch (config-router)# version 2vlan和trunk*三层交换机基本配置Switch# configure terminalSwitch (config)# vlan 10Switch (config-vlan)# exitSwitch (config)# vlan 50Switch (config-vlan)# exitSwitch (config)# interface f0/1Switch (config-if)# switchport access vlan 10Switch (config-if)# exitSwitch (config)# interface f0/5Switch (config-if)# switchport access vlan 50Switch (config-if)# exitSwitch (config)# interface vlan 10 !创建VLAN虚接⼝,并配置IPSwitch (config-if)# ip address 172.16.1.2255.255.255.0Switch (config-if)# no shutdownSwitch (config-if)# exitSwitch (config)# interface vlan 50 !创建VLAN虚接⼝,并配置IPSwitch (config-if)# no shutdownSwitch (config-if)# exittrunk在sw1、sw2之间使⽤sw1(config)#interface f0/0 进⼊要设置的端⼝(f0/0)sw1(config-if)#switchport mode trunk 将端⼝进⾏trunk设置sw1(config-if)#no shutdown 激活此端⼝访问控制(ACL)标准访问列表配置实例:R1(config)#access-list 10 deny 192.168.2.0 0.0.0.255R1(config)#access-list 10 permit anyR1(config)#int fa0/0.1R1(config-subif)#ip access-group 10 out扩展访问控制列表配置实例:R2(config)#access-list 110 deny tcp any host 192.168.1.12 eq wwwR2(config)#access-list 110 deny tcp any host 192.168.1.12 eq ftpR2(config)#int fa0/0R2(config-if)#ip access-group 110 out上⾯配置的含义是拒绝访问192.168.1.12的www和ftp服务access-list 101 permit tcp any 172.16.4.13 0.0.0.0 eq www //设置ACL101,容许源地址为任意IP,⽬的地址为172.16.4.13主机的80端⼝即WWW服务。

思科交换机配置命令大全

思科交换机配置命令大全

交换机配置1、基本配置:Switch >enable /进入特权模式Switch#conf t /进入全局配置模式Switch (conf-if)#duplex full/half/auto /有full , half, auto 三个可选switch# erase startup-configure / 恢复出场配置switch# reload / 重启交换机远程登录和con口还有接口配置和路由器配置命令一样,不再下面总结。

2配置VLAN和TRUNKSwitch(config)# vlan xxx /创建一个VLANSwitch(config-vlan)# name xxx /给VLAN命名或Switch# vlan database /进入保存VLAN配置的配置文件Switch(vlan)# vlan 20 name test20 /创建VLAN并给它命名Switch(config-if)# switchport mode access /配置端口模式是accessSwitch(config-if)# switchport access vlan xxx / 把接口划入一个VLAN Switch(config-if)#switchport trunk encapsulation {isl | dot1q | negotiate} /配置trunk封装ISL 或 802.1Q 或自动协商Switch(config-if)#switchport mode {dynamic {auto | desirable} | trunk} /配置二层trunk模式。

Switch(config-if)#switchport trunk allowed vlan {add | all | except | remove} vlan-list可选) / 配置trunk允许的VLAN3查看命令switch#show version /察看系统中的所有版本信息switch#show interface vlan xxx /查看交换机有关ip 协议的配置信息switch#show running-configure /查看交换机当前起作用的配置信息switch#show interface fastethernet xxx /察看交换机xxx接口具体配置和统计信息switch#show mac-address-table /查看mac 地址表switch#show mac-address-table aging-time / 查看mac 地址表自动老化时间4 cdp 相关命令switch#show cdp / 查看设备的cdp 全局配置信息switch#show cdp interface fastethernet xxx /查看xxx 端口的cdp 配置信息switch#show cdp traffic / 查看有关cdp 包的统计信息switch#show cdp nerghbors / 列出与设备相连的cisco 设备VTP配置switch# vlan databaseswitch(vlan)# vtp domain xxx / 配置VTP名字Switch(vlan)#vtp server / 配置VTP模式为serverSwitch(vlan)#vtp client / 配置VTP模式为clientSwitch(vlan)#vtp password xxx / 配置VTP密码switch(vlan)# vtp pruning / 开启VTP剪裁switch#show vtp domain /显示管理域的VTP 参数还有没总结的,我会抓紧时间完善。

CISCO路由器常用配置命令大全

CISCO路由器常用配置命令大全

CISCO路由器常用配置命令大全在网络世界中,CISCO 路由器就像是交通枢纽中的指挥中心,而配置命令则是指挥其运作的指令。

熟练掌握 CISCO 路由器的常用配置命令,对于网络管理员来说至关重要。

下面就让我们一起来了解一下这些常用的配置命令。

一、基础配置命令1、`enable`:用于进入特权模式。

特权模式下可以执行更多高级的配置操作。

2、`configure terminal`:进入全局配置模式,在这个模式下可以对路由器的各种参数进行设置。

3、`hostname router_name`:设置路由器的主机名,方便识别和管理。

4、`interface interface_type interface_number`:进入指定的接口配置模式,例如`interface ethernet 0/0` 进入以太网接口 0/0 的配置。

5、`ip address ip_address subnet_mask`:为接口配置 IP 地址和子网掩码。

6、`no shutdown`:激活接口,使其处于工作状态。

二、路由配置命令1、`ip route destination_network subnet_mask next_hop_ip`:添加静态路由,指定数据包到达目标网络的路径。

2、`router rip`:启用 RIP 路由协议。

3、`network network_address`:在 RIP 协议中宣告参与路由的网络。

4、`router ospf process_id`:启用 OSPF 路由协议,并指定进程 ID。

5、`network network_address area_id`:在 OSPF 协议中宣告网络和所属区域。

三、访问控制列表(ACL)配置命令1、`accesslist access_list_number permit|deny source_addresssource_mask destination_address destination_mask protocol port`:创建访问控制列表规则,指定允许或拒绝的流量。

Cisco(思科)交换机配置命令

Cisco(思科)交换机配置命令

Cisco(思科)交换机配置命令1. 交换机支持的命令:交换机基本状态:switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息补充:3层交换机多出的就是路由能力,体现在vlan的互相通信功能和端口的路由能力,下面介绍:开启路由功能:ip routing进入vlan 配置网段网关与路由配置接口相同interface vlan 1ip 192.168.1.1 255.255.255.0路由配置与路由器配置相同只是把接口换为VLAN+VLAN号,开启接口路由功能,进入接口配置:no swichport。

思科常用配置命令及参数

思科常用配置命令及参数

思科常用配置命令及参数思科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。

思科交换机基本配置命令

思科交换机基本配置命令

思科交换机基本配置命令目录1、基本概念介绍 (2)2、密码、登陆等基本配置 (2)3、CISCO设备端口配置详解 (4)4、VLAN的规划及配置 (6)4.1核心交换机的相关配置 (6)4.2接入交换机的相关配置 (8)5、配置交换机的路由功能 (9)6、配置交换机的DHCP功能 (9)7、常用排错命令 (10)1、基本概念介绍IOS: 互联网操作系统,交换机和路由器常用操作系统VLAN: 虚拟lanVTP: VLAN TRUNK PROTOCOLDHCP: 动态主机配置协议ACL:访问控制列表三层交换机:具有三层路由转发能力的交换机2、密码、登陆等基本配置本节介绍cisco路由器或者交换机的基本配置,本教程用的是cisco的模拟器做的介绍,一些具体的端口显示可能与实际的设备不符,但并不影响基本配置命令的执行。

Router># 显示稳定后,出现最初的提示符,提示符“>”表示目前所处的状态为用户模式。

Router>Router>en# 如果在当前状态下没有重复的命令,可以用“TAB”键来补齐命令Router>enable# 从用户模式(user mode)进入到特权模式(exec mode),提示符变为“#”Router#configure terminal#在特权模式下输入configure terminal进入全局配置模式(global configuration mode),在这之下输入的命令叫做全局命令,一旦输入,将对整个router产生即时影响。

*Mar 1 00:44:26.491: %SYS-5-CONFIG_I: Configured from console by console t # 在输入命令的过程中,IOS会出现一些即时提示。

Enter configuration commands, one per line. End with CNTL/Z.Router(config)#exit # 退出当前模式Router(config)#hostname test# 更改当前设备的名字,主要是为了便于区分设备。

Cisco路由器配置命令大全

Cisco路由器配置命令大全

Cisco路由器配置命令大全本文档旨在提供一份最新最全的Cisco路由器配置命令范本,旨在帮助用户快速配置和管理Cisco路由器。

以下是具体的章节内容:⒈设置基本参数⑴主机名设置命令⑵控制台设置命令⑶用户密码设置命令⑷物理接口配置命令⒉配置IP网络⑴设置IP地质和子网掩码⑵配置静态路由⑶配置动态路由协议(如OSPF或EIGRP)⑷ ICMP设置命令⒊网络管理和监控⑴远程管理设置命令⑵ SNMP配置命令⑶日志记录命令⑷监控和排错命令⒋安全配置⑴访问控制列表(ACL)配置命令⑵ VPN配置命令⑶防火墙配置命令⑷加密和身份验证命令⒌功能扩展⑴ NAT配置命令⑵ QoS配置命令⑶ VLAN配置命令⑷ DHCP配置命令附件:本文档涉及附件,请参阅附件文件以获取更详细的配置示例和说明。

注释:⒈Cisco路由器:Cisco公司生产的用于网络互联的路由器设备。

⒉配置命令:指通过命令行界面输入的一系列指令,用于配置和管理Cisco路由器。

⒊IP地质:Internet协议地质,用于在网络中标识设备的唯一地质。

⒋子网掩码:用于确定IP地质中网络地质和主机地质的部分。

⒌静态路由:通过手动配置的路由信息,用于指定数据包的下一跳路径。

⒍动态路由协议:通过协议自动交换路由信息,动态更新路由表。

⒎OSPF:开放最短路径优先(Open Shortest Path First)协议,用于计算路径的最佳选择。

⒏EIGRP:增强型内部网关路由协议(Enhanced Interior Gateway Routing Protocol),Cisco公司开发的路由协议。

⒐ICMP:Internet控制报文协议,用于在IP网络中发送错误和控制消息。

⒑SNMP:简单网络管理协议,用于管理和监控网络设备。

1⒈ACL:访问控制列表,用于控制流经路由器的数据包的访问权限。

1⒉VPN:虚拟专用网络,通过加密和认证技术实现安全的远程连接。

1⒊防火墙:用于保护网络免受未经授权的访问和攻击的安全设备。

(完整)Cisco配置命令

(完整)Cisco配置命令

switch〉用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch〉 enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch〉 enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192。

168.1。

1 255.255。

255.0 配置交换机端口ip和子网掩码aptech2950(conf—if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default—gateway 192。

Cisco路由器配置命令

Cisco路由器配置命令

Cisco路由器配置命令本文档详细介绍了Cisco路由器配置命令的使用方法,包括各个章节的具体细化。

请注意,下文所述的配置命令仅供参考。

具体配置需根据实际需求进行调整。

1.连接路由器- 使用一根RJ45网线将计算机与路由器的控制台端口连接。

- 打开终端仿真软件,如SecureCRT或PuTTY,设置串口连接参数。

2.进入特权模式- 打开终端仿真软件后,通过控制台端口进入路由器。

- 输入enable命令,输入特权级别密码,进入特权模式。

3.为路由器配置IP地质- 进入全局配置模式:configure terminal。

- 输入interface命令进入接口配置模式。

- 输入interface类型和编号命令,例如:interface FastEthernet0/1.- 输入ip address命令为该接口配置IP地质和子网掩码。

- 输入no shutdown命令启用该接口。

4.配置静态路由- 进入全局配置模式:configure terminal。

- 输入ip route命令配置静态路由。

- 输入目标网络地质和下一跳地质。

- 输入exit命令返回上一级。

5.配置动态路由- 进入全局配置模式:configure terminal。

- 输入router命令进入路由器配置模式。

- 输入选择的动态路由协议,如RIP、OSPF等。

- 配置相关的路由参数,如网段、下一跳地质等。

- 输入exit命令返回上一级。

6.配置访问控制列表(ACL)- 进入全局配置模式:configure terminal。

- 输入access-list命令创建访问控制列表。

- 配置允许或拒绝的规则。

- 将ACL应用到特定接口上。

- 输入exit命令返回上一级。

7.配置NAT(网络地质转换)- 进入全局配置模式:configure terminal。

- 输入ip nat inside source命令将内部地质转换为外部地质。

- 配置相关的参数,如访问控制列表、内部接口、外部接口等。

CISCO配置命令大全

CISCO配置命令大全

Access-enable允许路由器在动态访问列表中创建临时访问列表入口Access-group把访问控制列表(ACL)应用到接口上Access-list定义一个标准的IP ACLAccess-template在连接的路由器上手动替换临时访问列表入口Appn向APPN子系统发送命令Atmsig执行ATM信令命令B 手动引导操作系统Bandwidth 设置接口的带宽Banner motd 指定日期信息标语Bfe 设置突发事件手册模式Boot system 指定路由器启动时加载的系统映像Calendar 设置硬件日历Cd 更改路径Cdp enable 允许接口运行CDP协议Clear 复位功能Clear counters 清除接口计数器Clear interface 重新启动接口上的件逻辑Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI连接管理功能Config-register 修改配置寄存器设置Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息Configure memory 从NVRAM加载配置信息Configure terminal 从终端进行手动配置Connect 打开一个终端连接Copy 复制配置或映像数据Copy flash tftp 备份系统映像文件到TFTP服务器Copy running-config startup-config 将RAM中的当前配置存储到NVRAMCopy running-config tftp 将RAM中的当前配置存储到网络TFTP 服务器上Copy tftp flash 从TFTP服务器上下载新映像到FlashCopy tftp running-config 从TFTP服务器上下载配置文件Debug 使用调试功能Debug dialer 显示接口在拨什么号及诸如此类的信息Debug ip rip 显示RIP路由选择更新数据Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程Debug ppp 显示在实施PPP中发生的业务和交换信息Delete 删除文件Deny 为一个已命名的IP ACL设置条件Dialer idle-timeout 规定线路断开前的空闲时间的长度Dialer map 设置一个串行接口来呼叫一个或多个地点Dialer wait-for-carrier-time 规定花多长时间等待一个载体Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号Dir 显示给定设备上的文件Disable 关闭特许模式Disconnect 断开已建立的连接Enable 打开特许模式Enable password 确定一个密码以防止对路由器非授权的访问Enable password 设置本地口令控制不同特权级别的访问Enable secret 为enable password命令定义额外一层安全性(强制安全,密码非明文显示)Encapsulation frame-relay 启动帧中继封装Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco 的密码是sapEnd 退出配置模式Erase 删除闪存或配置缓存Erase startup-config 删除NVRAM中的内容Exec-timeout 配置EXEC命令解释器在检测到用户输入前所等待的时间Exit 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXECExit 终止任何配置模式或关闭一个活动的对话和结束EXECformat 格式化设备Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)Help 获得交互式帮助系统History 查看历史记录Hostname 使用一个主机名来配置路由器,该主机名以提示符或者缺省文件名的方式使用Interface 设置接口类型并且输入接口配置模式Interface 配置接口类型和进入接口配置模式Interface serial 选择接口并且输入接口配置模式Ip access-group 控制对一个接口的访问Ip address 设定接口的网络逻辑地址Ip address 设置一个接口地址和子网掩码并开始IP处理Ip default-network 建立一条缺省路由Ip domain-lookup 允许路由器缺省使用DNSIp host 定义静态主机名到IP地址映射Ip name-server 指定至多6个进行名字-地址解析的服务器地址Ip route 建立一条静态路由Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互联网协议(IP)的处理过程Ipx delay 设置点计数Ipx ipxwan 在串口上启动IPXWAN协议Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量Ipx network 在一个特定接口上启动互联网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)Ipx router 规定使用的路由选择协议Ipx routing 启动IPX路由选择Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受Isdn spid1 在路由器上规定已经由ISDN业务供应商为B1信道分配的业务简介号(SPID)Isdn spid2 在路由器上规定已经由ISDN业务供应商为B2信道分配的业务简介号(SPID)Isdntch-type 规定了在ISDN接口上的中央办公区的交换机的类型Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制Lat 打开LAT连接Line 确定一个特定的线路和开始线路配置Line concole 设置控制台端口线路Line vty 为远程控制台访问规定了一个虚拟终端Lock 锁住终端控制台Login 在终端会话登录过程中启动了密码检查Login 以某用户身份登录,登录时允许口令验证Logout 退出EXEC模式Mbranch 向下跟踪组播地址路由至终端Media-type 定义介质类型Metric holddown 把新的IGRP路由选择信息与正在使用的IGRP路由选择信息隔离一段时间Mrbranch 向上解析组播地址路由至枝端Mrinfo 从组播路由器上获取邻居和版本信息Mstat 对组播地址多次路由跟踪后显示统计数字Mtrace 由源向目标跟踪解析组播地址路径Name-connection 命名已存在的网络连接Ncia 开启/关闭NCIA服务器Network 把一个基于NIC的地址分配给一个与它直接相连的路由器把网络与一个IGRP的路由选择的过程联系起来在IPX路由器配置模式下,在网络上启动加强的IGRPNetwork 指定一个和路由器直接相连的网络地址段Network-number 对一个直接连接的网络进行规定No shutdown 打开一个关闭的接口Pad 开启一个X.29 PAD连接Permit 为一个已命名的IP ACL设置条件Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断Ping 发送回声请求,诊断基本的网络连通性Ppp 开始IETF点到点协议Ppp authentication 启动Challenge握手鉴权协议(CHAP)或者密码验证协议(PAP)或者将两者都启动,并且对在接口上选择的CHAP和PAP 验证的顺序进行规定Ppp chap hostname 当用CHAP进行身份验证时,创建一批好像是同一台主机的拨号路由器Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP 对同等层请求数据包验证过程中使用sent-username和password Protocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRPPwd 显示当前设备名Reload 关闭并执行冷启动;重启操作系统Rlogin 打开一个活动的网络连接Router 由第一项定义的IP路由协议作为路由进程,例如:router rip 选择RIP作为路由协议Router igrp 启动一个IGRP的路由选择过程Router rip 选择RIP作为路由选择协议Rsh 执行一个远程命令Sdlc 发送SDLC测试帧Send在tty线路上发送消息Service password-encryption 对口令进行加密Setup 运行Setup命令Show 显示运行系统信息Show access-lists 显示当前所有ACL的内容Show buffers 显示缓存器统计信息Show cdp entry 显示CDP表中所列相邻设备的信息Show cdp interface 显示打开的CDP接口信息Show cdp neighbors 显示CDP查找进程的结果Show dialer 显示为DDR(数字数据接受器)设置的串行接口的一般诊断信息Show flash 显示闪存的布局和内容信息Show frame-relay lmi 显示关于本地管理接口(LMI)的统计信息Show frame-relay map 显示关于连接的当前映射入口和信息Show frame-relay pvc 显示关于帧中继接口的永久虚电路(pvc)的统计信息Show hosts 显示主机名和地址的缓存列表Show interfaces 显示设置在路由器和访问服务器上所有接口的统计信息Show interfaces 显示路由器上配置的所有接口的状态Show interfaces serial 显示关于一个串口的信息Show ip interface 列出一个接口的IP信息和状态的小结Show ip interface 列出接口的状态和全局参数Show ip protocols 显示活动路由协议进程的参数和当前状态Show ip route 显示路由选择表的当前状态Show ip router 显示IP路由表信息Show ipx interface 显示Cisco IOS软件设置的IPX接口的状态以及每个接口中的参数Show ipx route 显示IPX路由选择表的内容Show ipx servers 显示IPX服务器列表Show ipx traffic 显示数据包的数量和类型Show isdn active 显示当前呼叫的信息,包括被叫号码、建立连接前所花费的时间、在呼叫期间使用的自动化操作控制(AOC)收费单元以及是否在呼叫期间和呼叫结束时提供AOC信息Show isdn ststus 显示所有isdn接口的状态、或者一个特定的数字信号链路(DSL)的状态或者一个特定isdn接口的状态Show memory 显示路由器内存的大小,包括空闲内存的大小Show processes 显示路由器的进程Show protocols 显示设置的协议Show protocols 显示配置的协议。

CISCO配置命令大全

CISCO配置命令大全

CISCO配置命令大全路由器的基本配置1 .配置以太网(Ethernet)端口:# conf t从终端配置路由器。

# int e0指定E0口。

# ip addr ABCD XXXXABCD为以太网地址,XXXX为子网掩码。

# ip addr ABCD XXXX secondaryE0口同时支持两个地址类型。

如果第一个为A类地址,则第二个为B或C类地址。

# no shutdown激活E0口。

# exit2.X.25的配置# conf t# int S0指定S0口.# ip addr ABCD XXXXABCD为以太网S0的IP地址,XXXX为子网掩码.。

# encap X25-ABC封装X.25协议。

ABC指定X.25为DTC或DCE操作,缺省为DTE。

# x25 addr ABCDABCD为S0的X.25端口地址,由邮电局提供。

# x25 map ip ABCD XXXX br映射的X.25地址.ABCD为对方路由器(如:S0)的IP地址,XXXX为对方路由器(如:S0)的X.25端口地址。

# x25 htc X配置最高双向通道数.X的取值范围1-4095,要根据邮电局实际提供的数字配置。

# x25 nvc X配置虚电路数。

X不可超过据邮电局实际提供的数,否则,将影响数据的正常传输。

# exit---- 3 .专线的配置:# conf t# int S2指定S2口。

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

# exit4.帧中继的配置# conf t# int s0# ip addr ABCD XXXXABCD为S0的IP地址,XXXX为子网掩码。

# encap frante_relay封装frante_relay协议。

# no nrzi_encodingNRZI=NO# frame_relay lmi_type q933aLMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。

Cisco路由器配置命令大全

Cisco路由器配置命令大全

Cisco路由器配置命令大全1.路由器基本配置1.1 主机名和域名配置1.2 版本和许可证配置1.3 密码和登陆设置1.4 接口配置1.5 接口描述1.6 IP地质配置2.路由配置2.1 静态路由配置2.2 默认路由配置2.3 动态路由配置(OSPF, EIGRP, RIP)2.4 路由过滤(ACL)3.VLAN配置3.1 VLAN的创建和删除3.2 VLAN接口和IP配置3.3 VLAN间的路由配置3.4 VLAN间的链路聚合4.交换机端口配置4.1 接口模式配置4.2 速率和双工模式配置 4.3 接口安全配置4.4 VLAN端口模式配置4.5 接口状态检查与调试5.NAT配置5.1 静态NAT配置5.2 动态NAT配置5.3 PAT配置5.4 NAT过载配置6.VPN配置6.1 VPN服务器配置6.2 VPN客户端配置6.3 IPsec配置6.4 SSL VPN配置7.安全配置7.1 防火墙配置7.2 ACL配置7.3 IDS/IPS配置7.4 AAA服务器配置7.5 网络攻击防护配置8.QoS配置8.1 ACL配置8.2 优先级配置8.3 带宽限制配置8.4 压缩和分片配置9.网络服务配置9.1 DHCP配置9.2 DNS配置9.3 NTP配置9.4 Syslog配置9.5 SNMP配置10.管理配置10.1 网络管理协议配置(Telnet, SSH, HTTP, HTTPS)10.2 文件传输配置(FTP, TFTP)10.3 配置备份和恢复10.4 日志记录和监控10.5 系统升级和恢复附件:本文档涉及的附件包括配置文件样例、示意图等。

法律名词及注释:- ACL: 访问控制列表,用于限制网络流量的过滤规则。

- NAT: 网络地质转换,用于实现内网IP地质与外网IP地质之间的映射。

- VPN: 虚拟专用网络,通过加密通道实现远程访问和安全通信。

- QoS: 服务质量,用于优化网络性能并保证特定应用程序的带宽和延迟要求。

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

Cisco设备配置命令
做了修改后记得做保存操作,否则断电后配置会被清掉。

一、模式
1.1 用户模式
Router>
1.2 特权模式
输入enable转到
Router#
1.3 全局模式
输入config terminal
Router(config)#
Router(config-)#
1.4 局部模式
Router(config-if)#
二、查看配置信息
2.1 交换机配置
只能在用户模式和特权模式
2.2 查看VLAN信息
Show vlan
2.3 查看ip信息
Show ip +参数
2.4 风暴控制信息
接口视图下,show storm-control unicast(组播为multicast,广播为broadcast,单播为unicast)
2.5 查看接口
Show interface fa0/1
2.6 查看整个MAC地址表
switch#show mac-address-table
2.7 查看路由表
show ip route
三、中断
Ctrl +shift +6
四、同时配置多个端口
有时需要逐条在每个端口视图下配置,,为省时,可以同时配置,只需输一遍命令。

如同时配置接口8到24口,则命令为
int ran fa0/8 - 24
五、端口流量限制
端口流量限制有2种方法
5.1 风暴控制
5.1.1
默认情况下,风暴控制被禁用。

它基于端口视图下进行配置
5.1.2 作用
防止被物理设备上的LAN端口被广播、组播或单播流量风暴破坏。

如果在每秒之内发生的数据报流量过多,就会直接导致交换机等网络设备的CPU利用率高,设置利用率会达到100%从而导致网络中断。

5.1.3 具体配置
(1)进入接口视图
(2)设置检测到storm时端口采取的动作
shutdown参数表示端口将被置于error-disable,trap参数表示产生一个SNMP Trap 消息,命令如下
storm-control action shutdown或trap
(3)设置开始抑制的带宽上限
如下设置该端口单播为30M带宽上限,命令如下
storm-control unicast level bps 30000000
单播为unicast,组播为multicast,广播为broadcast
(4)每秒数据包上限
storm-control unicast levell pps
(5)端口流量百分比上限
storm-control unicast level
5.2 QOS
5.2.1启动QoS
Switch(config)#mls qos
5.2.2 定义访问控制列表
(1)控制这个端口下59.215.45.0网段的上传流量
Switch(config)#access-list 10 permit 59.215.45.0 0.0.0.127
(2)控制这个端口下59.215.45.0网段的下载流量
Switch(config)#access-list 100 permit 59.215.45.0 0.0.0.127
5.2.3 定义类,并绑定访问控制列表
Switch(config)# class-map rate-limit-uplink///定义上行的类.并绑定访问列表10 Switch(config-cmap)# match access-group 10
Switch(config-cmap)# exit
Switch(config)# class-map rate-limit-downlink///定义下行的类.并绑定访问列表100
Switch(config-cmap)# match access-group 100
5.2.4 定义策略,把定义的类绑定到该策略
(1)定义上行的速率为30M
Switch(config)# policy-map rate-limit-uplink
Switch(config-pmap)# class rate-limit-uplink
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 30000000 1000000 exceed-action drop
注意事项://这里30M不能写成30720000,否则会报以下错误:%Error: policer rate should be multiples of 1000000. Please choose either 3000000 or 4000000 (bits per second) as the policer rate
(2)定义下行的速率为30M
Switch(config)# policy-map rate-limit-downlink
Switch(config-pmap)# class rate-limit-downlink
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 30000000 1000000 exceed-action drop Switch(config-pmap-c)# exit
5.2.5 在接口上应用
(1)上联口
Switch(config)# interface g0/20
Switch(config-if)# service-policy input rate-limit-downlink
(2)下联口
Switch(config)# interface f0/1
Switch(config-if)# service-policy input rate-limit-uplink
六、操作配置文件
6.1 保存配置或者修改
有2种方式保存
(1)switch#write
(2)Switch#copy running-config startup-config
6.2 导出配置
copy running-config startup-config
copy running-config tftp
copy running-config 文件名
6.3导入配置
copy tftp startup-config
copy 文件名startup-config
6.4 恢复出厂设置
输入以下命令后重启设备
erase startup-config
七、配置静态路由
ip route 目的网段子网掩码下一跳/出口
八、设置密码
8.1设置console密码
>enable
#configure trminal
(confing)#line console 0←console口
(config-line)#password (cisco)←密码
(config-line)#login ← 一定不能少的.
console密码设置完成
exit
8.2 设置特权密码
enadle
#configure terminal
(config)#enable secret (class)←密码
(config)#login
全局密码设置完成
exit
8.3 设置远程登入(telnet)密码
(1)enable
#config terminal
(config)#line vty 0 4(0 4是口)
(config-line)#password (class)←密码
(config-lline)#login
Exit
(2)限制Telnet登录的设备
(config)#ip access-list extended telnet
(config-ext-nacl)#10 permit ip host X.X.X.X any (config-ext-nacl)#20 permit ip host X.X.X.X any (config-ext-nacl)#exit
(config)#line vty 0 15
(config-line)#access-class telnet in
(config-line)#exit
(3)取消telnet准入控制
Line vty 0 15
No access-class telnet in
九、配置端口类型
十、镜像口
镜像口就是把交换机上的其他口的数据流量全部转到一个口或者两个口上,通常被用作排查问题或者获取数据流量。

10.1 设置源镜像口
在全局模式下,如设置1到5口为源镜像,则命令为
monitor session 1 source interface gi 1/0/1- 5
注意事项:5后面没有参数表上both,监听双向数据,5后面加上rx只监听接收数据,5后面加tx只监听发送数据
10.2 查看镜像口配置
show monitor
11、cactiez配置
需要在交换机上加命令snmp-server community spyj RO。

相关文档
最新文档