路由器、交换机基本配置_第1页
路由器、交换机基本配置_第2页
路由器、交换机基本配置_第3页
路由器、交换机基本配置_第4页
路由器、交换机基本配置_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一.熟悉交换机,路由器的基本配置 //用户模式敲入enable进入模Router#configureterminal //模式敲入configuretermina进入配置模式Router(config)#interfaceethernet0 //配置模式敲入interface+接口类型+接口编号,进入配置模式(如:interfaceserial0或是interfaceserial0/1,interfacefast1/1,接口编号是多少具体要看是Router(config-if)#exit//从接口模式退出到配置模式Router(config)#exitenable模式Router#//enable模式,也是模式.例如:把路由器的主机名命名为XM-WEN-R2600-ARouter(config)#hostnameXM-WEN-R2600-AXM-WEN-R2600-A(config)#XM-WEN-R2600-A(config)#hostnameWisdom Wisdom(config)#Wisdom#clockset23:46:50sep4 //showclock23:46:57.527UTCMonSep44.给路由器设置banner Wisdom(config)#bannermotd#EnterTEXTmessage. Endwiththecharacter'#'.etowisdom!!#03:12:58:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleWisdomcon0isnowavailablePressRETURNtogetstarted.etowisdom //banner之后无论谁登录到路由器都会先看到的信息Banner信息很多情况下是一些警告的信息:bannermotd Ifyouarenotauthorisedtoaccessthis exitimmedia Unauthorisedaccesstothissystemisforbidden policies,national,andinternational Unauthorisedusersaresubjecttocriminaland penaltiesaswell initiated Byentryintothissystemyouacknowledgethat areauthorisedtoaccessitandhavethelevel privilegeatwhichyousubsequentlyoperate this Youconsentbyentryintothissystemto monitoringofyour Wisdom(config-if)#descriptionTo //描述ethernet0口是接到福州的路由器A,一般都要尽可以的描述详细一点,这样有利于日后的.enable的设置(enable的就是从用户模式到模式的,enable的有两种,一种是加密的,一种是不加的,建议使用enablesecret设置)Wisdom(config)#enablepasswordciscoWisdom(config)#enablesecretcisco103:29:29:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsolePassword://这里要输入的是cisco1,如果enable的两个同时设置,只是secret生效Wisdom#showrunBuildingconfiguration...Current!enablesecret5 enablepasswordcisco //显示为明文,容易被.不过可以手工加密,用命令servicepassword-encryption进行加密Wisdom#showrunBuildingconfiguration...Current!enablesecret5 enablepassword7 设置交换机路由器的console口 //启用nologin是不启用Wisdom(config-line)#passwordcisco//设置的为cisco03:39:51:%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleWisdomcon0isnowPressRETURNtogetstarted.etowisdom!!UserAccess //要输入console口cisco才可以进入用户模设置路由器交换机的vty(也是就是登 net的Wisdom(config)#linevty04 //04的意思是0到4,5个人可以同时登录 //启用,nologin是不启用Wisdom(config-line)#passwordcisco //设置的为ciscoD:删除enable,console,vtyWisdom(config)#noenablepasswordWisdom(config)#noenablesecretWisdom(config)#lineconWisdom(config)#lineconsole0Wisdom(config-line)#nopasswordWisdom(config)#linevty04Wisdom(config-line)#nopassword两条常用使光标还原到原来的位置,重新显示被覆盖里--logging //0分0秒表示不超时,等同于noexec-Wisdom(config)#lineconsole net到交换机.Switch(config)#hostnameSW2950 SW2950(config)#interfacevlan SW2950(config-if)#ipadd192.168.10.225SW2950(config-if)#no SW2950(config)#linevty04SW2950(config-line)#passwordciscopc>net192.168.10.225Trying192.168.10.225...OpenUserAccess这证 net成功G:配置R1.R2.R3的基本配置,使得在R1可以通12.1.1.2,通R1(config)#no - R1(config)#lineconsole0R1(config-line)#passwordciscoR1(config-line)#loggingsynchronousR1(config-line)#exec-timeout00E0口IPR1(config)#interfaceethernet //E0接口的IPR1(config-if)#ipaddress11.1.1.1255.255.255.0R1(config-if)#noshutdownR1(config-if)#nokeepaliveS0IPR1(config)#interfaceserialR1(config-if)#ipaddress12.1.1.1R1(config-if)#clockrate //DCE接口配置时钟R1(config-if)#noshutdownS1IPR1(config)#interfaceserialR1(config-if)#ipaddress13.1.1.1255.255.255.0R1(config-if)#clockrateR1(config-if)#noR2(config)#no - R2(config)#lineconsole0R2(config-line)#passwordciscoR2(config-line)#loggingsynchronousR2(config-line)#exec-timeout00Router(config)#hostnameR2R2(config)#interfaceethernet0R2(config-if)#ipaddress22.1.1.2255.255.255.0R2(config-if)#noshutdownR2(config-if)#nokeepaliveR2(config)#interfaceserialR2(config-if)#ipaddress12.1.1.2255.255.255.0R2(config-if)#noshutdownR3(config)#no - R3(config)#lineconsole0R3(config-line)#passwordciscoR3(config-line)#loggingsynchronousR3(config-line)#exec-timeout00Router(config)#hostnameR3R3(config)#interfaceethernet0R3(config-if)#ipaddress33.1.1.3255.255.255.0R3(config-if)#noshutdownR3(config-if)#noR3(config)#intserialR3(config-if)#ipaddress13.1.1.3255.255.255.0R3(config-if)#noshutdownshowinterface检查接口的状态R1#showipinterfaceIP-OK?MethodYESmanualYESmanualYESmanualR1#showinterfacesethernet0Ethernet0isup,lineprotocolisupHardwareisLance,addressis00e0.b05b.018e(bia00e0.b05b.018e)Internetaddressis11.1.1.1/24MTU1500bytes,BW10000Kbit,DLY1000usec,reliability255/255,txload1/255,rxload1/255EncapsulationARPA,loopbacknotsetKeepalivenotsetR1#showinterfacesserial0Serial0isup,lineprotocolisupHardwareisHD64570Internetaddressis12.1.1.1/24MTU1500bytes,BW1544Kbit,DLY20000usec,reliability255/255,txload1/255,rxload1/255EncapsulationHDLC,loopbacknotsetKeepaliveset(10sec)R1#showinterfacesserial1Serial1isup,lineprotocolisupHardwareisHD64570Internetaddressis13.1.1.1/24MTU1500bytes,BW1544Kbit,DLY20000usec,reliability255/255,txload1/255,rxload1/255EncapsulationHDLC,loopbacknotsetKeepaliveset(10sec)R2#showipinterfaceIP-OK?MethodYESmanualYESmanual YES administrativelydownR3#showipinterface IP- OK?Method YESmanualYESmanual YES administrativelydown在R1测试到R2R3的连通性,使用+ipaddress如R1#TypeescapesequencetoSending5,100-byteICMPEchosto12.1.1.2,timeoutis2 //5个!Successrateis100percent(5/5),round-tripmin/avg/max=4/4/8R1#TypeescapesequencetoSending5,100-byteICMPEchosto13.1.1.3,timeoutis2 Successrateis100percent(5/5),round-tripmin/avg/max=4/4/8ms在路由器或是交换机里使用命 如 的结果是…..则表明网络不通如 的结果是U.U.U则表明下一跳不可达H:路由器交换机几条常用令Showversion//showrunning-config//查看当前运行的配置文件showstartup-config//查看已保存过的配置文件showipintbrie//查看接口基本状态showinterface//showcontrollerserial0 s0口的串行线是否连接好copyshowcontrollerserial0 s0口的串行线是否连接好R1#showcontrollersserialHDunit0,idb=0x29A524,driverstructure

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论