




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1、进入 SETUP 模式 Router#setup2、时间设置 router#clock set hh:mm:ss date moth year3、routershow historyRouterterminal history size lines4、router#show version5、router#show running-config6、router#show starup-config7、router(config)#hostname name 主机命名8、router(config)#banner motd # message # 开机时的固定显示信息9、router(con
2、fig)#enable password password 特权模式明文密码10、router(config)#no enable password11、router(config)#enable secret password 特权模式加密密码12、router(config)#no enable secret13、router(config)#service password-encryption 特权模式把明文密码加密密码,但没enable secret安全可以反解14、router(config)#line console 控制台密码15、router(config-line)#log
3、in16、router(config-line)#password password17、router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、router(config-line)#logging synchronous 重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、router(config)#line vty 0 4 虚拟终端密码20、router(config-line)#login21、router(config-line)#password password22、ro
4、uter(config)#interface type number(slot/port)端 口设置23、router(config-if)#ip address ip summast24、router(config-if)#clock rate 64000 (时钟频率单位为 bps,只在 DCE 端设置)25、router(config-if)#bandwith 64(带宽设置,单位为 KB)26、router(config-if)#no shutdown(shutdown)27、router(config-if )#media-type type(10base)为以太网端口选择适当的介质类
5、型28、router(config-if )#ctrl+z保存退出到特权模式29、router#30、router用户模式enable进入router# 特权模式 config terminal 进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置LineRouter(config-line)# 虚拟口设置Router Router(config-router)# 路
6、由设置IPX router Router(config-ipx-router)#IPX 路由设置32、router#show interface33、router#show interface Ethernet 034、router#show interface serial 035、router#show running-config36、router#show starup-config37、router#show flash38、router#show controller39、router#show controller interface type40、router#show run
7、ning-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash端口状态Serial1 is up, line protocol is up 正常工作Serial1 is up, line protocol is down 连接问题Serial1 is down, line protocol i
8、s down 端口问题Serial1 is administratively down, line protocol is down 人为关闭配置寄存器的值I、关闭路由器的电源重新启动按住ctrl+break键入进2、3、o/r 0 x2142(跳过nvarm启动恢复密码)4、I5、当系统提示是否进入setup模式时,按N6、router7、routerenable8、router#9、进入修改后(包括密码、寄存器的值:0 x2100为rom monitor启动、0 x2101为setup模式启动、0 x2102为10、router#copy running-config starup-con
9、figII、router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要 到达的网络号掩码)ip address(下一跳或出口 ip地址)router(config)#ip route s0 (出口端口或下一跳IP地址)rip设置router(config-router)#network network-numberrouter#show ip protocol 查看 RIP 信息、router#show ip route 查看路由表router#debug ip rip 查
10、看 RIP 更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收 1、2RIP 版本信息、igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route 查看路由表router#debug ip igrp events 查看IGRP路由更新大概信息router#debug ip igrp tr
11、ansaction 查看 IGRP 路由更新详细信息Router(config-router)#variance multiplier 控制 IGRP load balancingRouter(config-router)#traffic-share balanced | min控制 load-balanced traffic的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(co
12、nfig)# auto-summry打开自动汇总(默认是打开的)router#show ip route eigrp显示当前的路由表里的EIGRP条目router#show ip protocol显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被 EIGRP 发现的邻居router#show ip eigrp traffic显示发出和收到的IP EIGRP包的数量router#show ip eigrp topology 显示 IP EIGRP 的拓扑表Router#debug ip eigrpospf 设置Router(config)
13、#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是 Ip 地址 mask (通配掩码)area area-idRouter(config-if)# ip ospf priority numbe 配置 OSPF 的优先级Router#show ip protocols 验证 OSPF 的配置Router#show ip route显示路由器学到的所有路由Router#show ip ospf interface type number 显示 area-ID 和邻接信息Router#show ip ospf
14、 neighbor基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packetRouter(config)# interface loopback number(lookback回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改 OSPF 的 Cost 数值Router(config-if)# ip ospf authentication-key key 配置明文口
15、令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置 MD5 口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication message-digestmessage-digest为可选 项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF 区域的验证:Router(config-if)# ip ospf hello-interval seconds 配置 hello 间隔:Router(config-if)# ip osp
16、f dead-interval seconds配置 down 机判断间隔访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 deny 55Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#access-list 50 permit Router(config)#lin
17、e vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host eq 21Router(config)#access-list 110 deny tcp any hos
18、t eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚拟通道访问router(config)#access-list 12 permit 55router(config)#line vty 0 4outer(config-line)#access-class 12 inshow ip interface:只显示IP访问列表信息show ip interface:显示所有接口的信息和配置的ACL信息show ip
19、 interface 接口号:显示具体某个接口的信息和配置的ACL信息show running-config :显示DRAM信息和ACL信息,以及接口对ACL的应用信息.交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address ip address mask1
20、900(config)#ip address 1 2950(config#interface vlan 12950(config-if)#ip address ip_address mask2950(config)#interface vlan 12950(config-if)#ip address 1 default gateway1900/2950(config)#ip default-gateway ip address1900/2950(config)#ip default-gateway 查看交换机的IP地址1900#show ipIP address: 1Subnet mask:
21、Default gateway: Management VLAN: 12950#show interface vlan 1Vlanl is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia0010.f6a9.9800)Internet address is 9/24Broadcast address is 55设置双工选项1900(config)#interface e0/11900(config-if)#duplex auto | full |full-flow-
22、control | half2950(config)#interface fe0/12950(config-if)#duplex auto | full | half设置端口速度:switch(config-if)# speed 10|100|auto查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent mac-address type module/port1900(config)
23、#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr vlan vlan_id interfaceinti int2 . int15配置受限静态MAC地址1900(config)#mac-address-table restricted static mac-address typemodule/port src-if-list1900(config)#mac-address-table r
24、estricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface vlan vlan-id2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#int
25、erface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#por
26、t security action shutdown | trap2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram t HYPERLINK ftp:/host/dst_file ftp:/host/dst_file1900#copy t HYPERLINK ftp:/host/src_file ftp:/host/src_file nvram1950#copy nvram t HYPERLINK /wgswd.cfg /wgswd.cfg2950#copy startup-config
27、t HYPERLINK ftp:/host/dst_file ftp:/host/dst_file清除NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN 建立1900 下,使用 vlan vlan# name name vlan#命令,如下:en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#exit端口分配1900(config)#int e0/2190
28、0(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN 建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 na
29、me MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分配2950 下的端口配置,使用 switchport access vlan vlan#命令,2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(
30、config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900 trunk 配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950
31、(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation isl|dot1q2950(config-if)#人Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连接1900的trunk端
32、口配置,使用encapsulation isl vlan#命令,如下:2600Router(config)#int f0/0.12600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q vlan#2600Router(config-subif)#ip add ip add submaskVTP配置1900(config)#vtp server1900(config)#vtp doma
33、in noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950(config)#vtp mode server2950(config)#vtp domain noco验证信息
34、,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip netmask netmask | prefix-le
35、ngth prefix-lengthRouter(config)#access-list access-list-number permit source source-wildcardRouter(config)#ip nat inside source listaccess-list-number pool name配置 OverloadingRouter(config)#access-list access-list-number permit source source-wildcardRouter(config)#ip nat inside source listaccess-lis
36、t-number interface interface overload清除 NAT Translation TableRouter#clear ip nat translation *清除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip outside local-ip global-ip清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip清除一个简单的动态地址转换(夕卜)Router#clear ip
37、nat translation protocol inside global-ipglobal-port local-ip local-port outside local-iplocal-port global-ip global-port清除一个扩展动态地址 转换条目Show命令输出信息Router#show ip nat translations1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string在基于I
38、OS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:
39、switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface type modle/portswit
40、ch# show cdp neighbors type module/port detail在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp enable|disable module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighborsmodule/portvlan|duplex|capabilities|detail5.基于IOS的交换机的端口描述:switch(config-if)# de 月却本 ion de 月却本 ion-string基于CLI的交换机的端口描述:switch(
41、enable)set port name module/number de脚本 ion-string在基于IOS的交换机上设置端口速度:switch(config-if)# speed10|100|auto在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number 10|100|autoswitch(enable) set port speed moudle/number 4|16|auto在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex auto|full|half在基于CLI的交换
42、机上设置以太网的链路模式:switch(enable) set port duplex module/number full|half8.在基于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)#
43、switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num name nameswitch(enable) set vlan vlan-num mod-num/port-list9.在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchpor
44、t trunk encapsulation isl|dotlqswitch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port on|off|desirable|auto|nonegotiateVlan-range isl|dotlq|dotl0|lane|negotiate10.在基于IOS的
45、交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp domain domain-name在基于IOS的交换机上配置VTP模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp sever|cilent|transparentswitch(vlan)# vtp password password在基于CLI的交换机上配置VTP
46、模式:switch(enable) set vtp domain domain-namemode sever|cilent|transparent password password在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I的交换机上启动VTP剪裁:switch(e
47、nable) set vtp pruning enable在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number distributionsource|destination在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-rangemodeon|off|desirable|auto15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree vlan vlan-list cost cost在基于CLI的交换
48、机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port cost costvlan-list16.在基于IOS的交换机上调整端口 ID:switch(config-if)# spanning-treevlan vlan-listport-priority port-priority在基于CLI的交换机上调整端口 ID:switch(enable) set spantree portpri mldule/portprior
49、ityswitch(enable) set spantree portvlanpri module/portpriority vlans17.在基于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时钟:swi
50、tch(enable) set spantree hello intervalvlanswitch(enable) set spantree fwddelay delay vlanswitch(enable) set spantree maxage agingtiamevlan在基于IOS的交换机端口上启用或禁用Port Fast特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast特征:switch(enable) set spantree portfast module/portenable|disabl
51、e在基于IOS的交换机端口上启用或禁用UplinkFast特征:switch(config)# spanning-tree uplinkfast max-update-rate pkts-per-second在基于CLI的交换机端口上启用或禁用UplinkFast特征:switch(enable) set spantree uplinkfast enable|disablerate update-rate all-protocols off|on20.为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster en
52、able cluster-name cv21.为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range用show vtp domain显示管理域的VTP参数.用show vtp statistics显示管理域的VTP参数.在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name name name type trbrf bridge bridge-numstp ieee|ibm25.在Catalyst交换机上定义TrCRF的命令如下:swit
53、ch (enable) set vlan vlan-num name name type trcrfring hex-ring-num|decring decimal-ring-num parent vlan-num在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采 用如下命令给VLAN分配端口 :switch(enable) set vlan vlan-num mod-num/port-num命令show spantree显示一个交换机端口的STP状态.配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm
54、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
55、-databade)# name 30.创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-nu
56、m elan-num用 show lane server 显示 LES 的状态.用show lane bus显示bus的状态.用show lane database显示LECS数据库可内容.用 show lane client 显示 LEC 的状态.36.用show module显示已安装的模块列表.37.用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# de 脚本 ion de 脚本 ion-stringrouter(config-if
57、)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulationisl|dotlq vlan-numberrouter(config-if)# ip address ip-address subnet-mask用LANE来建立与VLAN的连接:router(config)# interface atm module/portrouter(
58、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 at
59、m 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-networ
60、k-numberrouter(config-router)# network ip-network-number (FengNet.Com)41.配置默认路由:switch(enable) set ip route default gateway为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num在路由处理器启用MLSP:router(config)# mls rp ip为了把一个外置的路由处理器接口和交换机安置
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- CT基础参数培训
- 教研组长老师述职报告
- 亲子教育之如何跟孩子有效沟通
- 月度订阅服务保证金协议
- 房产纠纷解决协议
- 家庭装修保险合同
- 护理人员工作流程
- 汽车轮胎养护服务协议
- 会议座位安排协议
- 抵押合同生效条件
- 《马克思主义原理》课件
- 冠心病课件完整版本
- 公路工程标准施工招标文件(2018年版)
- 申报高、中级专业技术职务量化测评表
- 西方文论概览(第二版)-第七章课件
- 看守所刑事解除委托书
- 统编版历史七年级下册 问答式复习提纲
- 医疗器械行业并购重组趋势及发展态势分析
- 江苏省徐州市邳州市2023-2024学年八年级下学期期中数学试题
- DL∕T 5776-2018 水平定向钻敷设电力管线技术规定
- 2024年福建省人民政府外事办公室翻译室日语翻译招录1人《行政职业能力测验》高频考点、难点(含详细答案)
评论
0/150
提交评论