{"id":892,"date":"2008-10-07T21:59:00","date_gmt":"2008-10-07T13:59:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=892"},"modified":"2023-11-07T22:13:23","modified_gmt":"2023-11-07T14:13:23","slug":"ios-configure","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/892","title":{"rendered":"IOS Configure"},"content":{"rendered":"\n<p><strong>\u7528setup\u8a2d\u5b9a\u7d44\u614b\u6a94<\/strong><br>#setup<br>\u9032\u5230setup mode,\u4e5f\u7a31\u4e92\u52d5\u6a21\u5f0f,\u6216\u88dd\u914d\u6a21\u5f0f<br>\u7528\u4e92\u52d5\u7684\u65b9\u5f0f\u8a2d\u5b9a\u7d44\u614b\u6a94,\u5305\u62ecglobal\u548cinterface\u7684\u8a2d\u5b9a,\u5b8c\u6210\u5f8c\u6703\u8f09\u5165ram\u4e26\u5132\u5b58\u5728nvram\u4e2d<\/p>\n\n\n\n<p><strong>\u5099\u4efd\u7d44\u614b<\/strong><br>#copy &lt; source conf&gt; &lt; dest conf&gt;<br>source\u53cadest conf\u82e5\u70ba:<br>\u3000running-config,\u8868\u793a\u5728ram\u88e1\u7684\u7d44\u614b\u6a94<br>\u3000starup-config,\u8868\u793a\u5728nvram\u88e1\u7684\u7d44\u614b\u6a94<br>\u3000tftp,\u8868\u793a\u5728tftp\u4e0a\u7684\u7d44\u614b\u6a94,\u82e5copy\u6d89\u53catftp,\u6703\u8981\u6c42\u8f38\u5165tftp\u4f4d\u7f6e,\u4ee5\u53ca\u4f86\u6e90\u6216\u76ee\u7684\u7684\u6a94\u6848\u540d\u7a31<br>ex:#copy running-config startup-config \u5f9eram\u8f09\u5165\u7d44\u614b\u5230nvram\u4e2d<br>ex:#copy startup-config running-config \u5f9envram\u8f09\u5165\u7d44\u614b\u5230ram\u4e2d&nbsp;ps:\u820a\u7248\u547d\u4ee4\u70baconfig men<br>ex:#copy running-config tftp \u5f9eram\u8f09\u5165\u7d44\u614b\u5230tftp\u4e2d&nbsp;ps:10.3\u7248\u4ee5\u524d\u70bawrite network<br>ex:#copy tftp running-config \u5f9etftp\u8f09\u5165\u7d44\u614b\u5230ram\u4e2d&nbsp;ps:\u820a\u7248\u547d\u4ee4\u70baconfig net<br>ps:copy\u7d44\u614b\u9032ram\u5f8c\u4ecb\u9762\u6703shutdown,\u9700\u8981\u5728\u624b\u52d5\u91cd\u555f\u4ecb\u9762<\/p>\n\n\n\n<p><strong>\u7528ftp\u5099\u4efd\u7d44\u614b<\/strong><br>\u9700\u5148\u5efa\u7acbftp\u5e33\u865f\u53ca\u5bc6\u78bc<br>(config)#ip ftp username &lt; username&gt;<br>(config)#ip ftp password &lt; password&gt;<br>\u8a2d\u5b9aftp\u70ba\u975e\u88ab\u52d5\u6a21\u5f0f<br>(config)#no ip ftp passive<br>\u958b\u59cb\u5099\u4efd<br>#copy start ftp:\/\/&lt; ftp ip&gt;<br>ps<br>\u82e5\u76ee\u5730\u70bahttp,\u53ef\u7528\u4ee5\u4e0b\u547d\u4ee4\u8a2d\u5b9ahttp\u9810\u8a2d\u5e33\u865f\u548c\u5bc6\u78bc\u3000&nbsp;<br>(config)# ip http client password &lt; default key&gt;<br>(config)# ip http client username &lt; default username&gt;<\/p>\n\n\n\n<p><strong>\u8a2d\u5b9a\u81ea\u52d5\u5099\u4efd<\/strong><br>(config)#archive<br>(config-archive)#path &lt; remote host&gt;<br>(config-archive)#write-memory<br>(config-archive)#[time-period &lt; minute &gt;]<br>ex:<br>(config)#archive<br>(config-archive)#path ftp:\/\/192.168.1.1\/r1config<br>(config-archive)#write-memory<br>(config-archive)#time-period 1440<\/p>\n\n\n\n<p><strong>\u5c07\u81ea\u52d5\u5099\u4efd\u7d44\u614b\u53d6\u4ee3\u5230running-config<\/strong><br># configure replace &lt; remote host&gt;<br>ex:<br># configure replace ftp:\/\/192.168.1.1\/r1config-3<\/p>\n\n\n\n<p><strong>\u986f\u793a\u7d44\u614b<\/strong><br>#show startup-config \u986f\u793a\u5728nvram\u4e2d\u76ee\u524d\u7684\u7d44\u614b,\u4e5f\u5c31\u662f\u4e0b\u6b21\u958b\u6a5f\u6642\u8f09\u5165\u7528\u7684\u7d44\u614b<br>#show running-config \u986f\u793a\u5728ram\u4e2d\u7684\u7d44\u614b<br>#show archive \u986f\u793a\u81ea\u52d5\u5099\u4efd\u7684\u6240\u6709\u6a94\u6848&nbsp;<\/p>\n\n\n\n<p><strong>\u79fb\u9664\u7d44\u614b<\/strong><br>#erase startup-config \u5c07\u76ee\u524d\u7684\u7d44\u614b\u5f9envram\u4e2d\u79fb\u9664<br>ps:1900switch\u9700\u4f7f\u7528delete nvram\u79fb\u9664\u7d44\u614b<br>ps:2950switch\u8981\u5728\u57f7\u884creload,\u7d44\u614b\u624d\u6703\u79fb\u9664<br>ps:\u82e5\u53d6\u5f97\u65b0\u7684\u8a2d\u5099,\u4f46\u5df2\u6709\u7d44\u614b\u5728\u4e0a\u9762,\u5efa\u8b70\u5148\u5c07nvram\u4e2d\u7684\u7d44\u614b\u6e05\u9664\u5728\u91cd\u958b\u6a5f<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p>ios\u6620\u50cf\u6a94\u547d\u540d\u898f\u5247<br>\u4ee5c2600-js-l_121-3.bin\u70ba\u4f8b<br>platform(\u786c\u9ad4\u5e73\u53f0):c2600<br>\u7279\u6027\u96c6:js<br>ps:j=enterprise image,s=extended capabilities of the image file<br>\u6a94\u6848\u683c\u5f0f:l<br>version number(\u7248\u672c\u7de8\u865f):121<br>file extension(\u526f\u6a94\u540d):bin<\/p>\n\n\n\n<p>\u5099\u4efd\u6620\u50cf\u6a94<br>#copy flash tftp \u5c07ios\u6620\u50cf\u6a94\u5099\u4efd\u5230tftp\u4e0a<br>#copy tftp flash \u5c07ios\u6620\u50cf\u6a94\u5f9etftp\u4e0a\u56de\u5b58,\u591a\u7528\u5728\u66f4\u65b0ios<br>\u4ee5\u4e0a\u547d\u4ee4\u6703\u8981\u6c42\u4f86\u6e90\u548c\u76ee\u7684\u6620\u50cf\u6a94\u4f4d\u7f6e\u4ee5\u53catftp\u4f4d\u7f6e<br>ps:\u6700\u5e38\u51fa\u73fe\u7684\u5931\u6557\u554f\u984c\u662f\u627e\u4e0d\u5230tftp\u4f4d\u7f6e<br>ex:tftp\u4f4d\u7f6e\u70ba192.168.1.100<br>#copy tftp flash<br>&#8230;\u7701\u7565<br>Address or name of remote host [255.255.255.255]?192.168.1.100 \/\/\u8981\u6c42\u8f38\u5165tftp\u4f4d\u7f6e<br>Source file name?c2600-js-l_121-3.bin \/\/\u8981\u6c42\u8f38\u5165\u4f86\u6e90\u6620\u50cf\u6a94\u540d\u7a31<br>Destination file name [c2600-js-l_121-3.bin]? \/\/\u8981\u6c42\u8f38\u5165\u6620\u50cf\u6a94\u76ee\u7684\u4f4d\u7f6e<br>Accessing file &#8216;c2600-js-l_121-3.bin&#8217; on 192.168.1.100&#8230;<br>Loading c2600-js-l_121-3.bin from 192.168.1.100 (via Ethernet0): ! [OK]<br>#copy flash tftp<br>Source filename []?c2600-i-mz.122-11.bin<br>Address or name of remote host []? 192.168.1.100<br>Destination filename [c2600-i-mz.122-11.bin]?<br>5998292 bytes copied in 324.071 secs (18509 bytes\/sec)<\/p>\n\n\n\n<p>\u5347\u7d1aIOS<br>1<br>\u5c07IOS\u5f9etftp\u4e0b\u8f09\u5230switch\u4e2d<br><strong>#copy tftp flash<\/strong><br>ps:\u53ef\u900f\u904everify\u6307\u4ee4\u9a57\u8b49IOS\u662f\u5426\u6709\u554f\u984c<br>ex:<br>#verify flash:c2950-i6k2l2q4-mz.121-22.EA13.bin<br>2<br>\u6307\u5b9a\u958b\u6a5f\u8981\u4f7f\u7528\u7684IOS<br><strong>(config)#boot system flash:&lt; IOS path&gt;<\/strong><br>ex:<br>(config)#boot system flash:c2960-lanbasek9-mz.150.SE.bin<br>ps:\u53ef\u900f\u904eshow boot\u6307\u4ee4\u6aa2\u67e5\u958b\u6a5f\u4f7f\u7528\u7684IOS\u662f\u5426\u6709\u8a2d\u932f<br>3<br><strong>#copy running-config startup-config<\/strong><br>4<br><strong>#reload<\/strong><br>5<br>\u7b49\u5f85\u958b\u6a5f\u904e\u7a0b\u7d50\u675f\u5f8c<br>\u4f7f\u7528show version\u78ba\u8a8d\u76ee\u524d\u4f7f\u7528\u6307\u5b9a\u7684IOS&nbsp;<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p>&gt;show version<br>\u7b49\u540c\u65bcdir flash:<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Cisco Internetwork Operating System Software<br>IOS &#8482; 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fc1) \/\/ios\u7248\u672c<br>Copyright (c) 1986-1999 by cisco Systems, Inc.<br>Compiled Mon 08-Feb-99 18:18 by phanguye<br>Image text-base: 0x03050C84, data-base: 0x00001000<\/p>\n\n\n\n<p>ROM: System Bootstrap, Version 11.0(10c), SOFTWARE \/\/\u627e\u4e0d\u5230ios\u6620\u50cf\u6a94\u555f\u7528\u7684\u5099\u7528ios\u7248\u672c<br>BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE(fc1)<\/p>\n\n\n\n<p>wg_ro_a uptime is 20 minutes<br>System restarted by reload \/\/\u82e5\u662fby abort \u8868\u793a\u8b80\u53d6\u6620\u50cf\u6a94\u5931\u6557<br>System image file is &#8220;flash:c2500-js-l_120-3.bin&#8221; \/\/ios\u6620\u50cf\u6a94\u540d\u7a31,\u4ee5\u53ca\u4f86\u6e90<\/p>\n\n\n\n<p>Cisco 1841 (revision 5.0) with 114688K\/16384K bytes of memory. \/\/RAM\u9084\u6709114m,\u5df1\u4f7f\u752816m<br>Processor board ID FTX0927W1XE<\/p>\n\n\n\n<p>2 Fast Ethernet\/IEEE 802.3 interface(s)<br>1 Serial network interface(s)<\/p>\n\n\n\n<p>32K bytes of simulated non-volatile configuration memory. \/\/nvram\u70ba32kb<br>8192K bytes of processor board System flash (Read\/Write) \/\/flash\u70ba8192kb<\/p>\n\n\n\n<p>Configuration register is 0x2102 \/\/\u555f\u52d5\u7528\u7684\u7d44\u614b\u503c<\/p>\n\n\n\n<p>&gt;show flash<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>System flash directory:<br>File Length Name\/status<br>1 5880916 c2500-js-mz.121-9.T.bin \/\/\u76ee\u524dios\u6620\u50cf\u6a94\u540d\u7a31\u8207\u5927\u5c0f<br>[5880980 bytes used, 2507628 available, 8388608 total] \/\/\u986f\u793aflash\u5bb9\u91cf<br>8192K bytes of processor board System flash (Read\/Write)<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p>rom monitor(\u552f\u8b80\u76e3\u63a7\u6a21\u5f0f)<br>\u57f7\u884cbootstrap(\u57f7\u884c\u958b\u6a5f\u555f\u52d5),\u63d0\u4f9b\u4f4e\u968e\u7684\u529f\u80fd\u8207\u8a3a\u65b7,\u53ef\u5beb\u5165flash memory\u66f4\u63dbios\u8edf\u9ad4\u6620\u50cf\u6a94<br>\u5728\u7cfb\u7d71\u6545\u969c\u53ca\u5bc6\u78bc\u907a\u5931\u5fa9\u539f\u6642\u4f7f\u7528<br>\u53ea\u53ef\u4f7f\u7528console port\u4f86\u64cd\u4f5c<br>\u50c5\u80fd\u4f7f\u7528ios\u8edf\u9ad4\u7684\u4e00\u90e8\u4efd\u529f\u80fd<br>\u63d0\u793a\u7b26\u865f\u70baRommon&gt;<br>ps:\u5728hyperterminal\u4e2d\u555f\u52d5router\u6642\u6309ctrl+break\u9032\u5165<\/p>\n\n\n\n<p>\u76f8\u95dc\u6307\u4ee4:<br>Rommon&gt;dir flash: \u6aa2\u8996\u5feb\u9583\u8a18\u61b6\u9ad4<br>Rommon&gt;boot flash:&lt; image_file_name&gt; \u4f7f\u7528\u6b64\u6620\u50cf\u6a94\u958b\u6a5f<br>ex:rommon&gt;boot flash:c2600-is-mz.121-5 \u4ee5c2600-is-mz.121-5\u9019\u500b\u6620\u50cf\u6a94\u958b\u6a5f<br>Rommon&gt;confreg \u6539\u8b8a\u7d44\u614b<br>Rommon&gt;xmodem -c &lt; image_file_name&gt; \u5f9epc\u56de\u5b58ios\u6620\u50cf\u6a94,-c\u8868\u793a\u4f7f\u7528crc\u9032\u884c\u932f\u8aa4\u6aa2\u67e5<br>Rommon&gt;set \u67e5\u770b\u74b0\u5883\u8b8a\u6578<br>Rommon&gt;tftpdnld \u4f9d\u74b0\u5883\u8b8a\u6578\u7684\u5167\u5bb9\u4e0b\u8f09tftp\u4e2d\u7684\u6620\u50cf\u6a94<\/p>\n\n\n\n<p>\u74b0\u5883\u8b8a\u6578:<br>\u4e3b\u8981\u7528\u5728\u4e0b\u8f09tftp\u88e1\u7684\u6620\u50cf\u6a94<br>\u4ee5name=value\u7684\u65b9\u5f0f\u8a2d\u5b9a,name\u6709\u4ee5\u4e0b<br>_IP_ADDRESS,\u7b2c\u4e00\u500blan\u57e0\u4e0a\u7684ip\u4f4d\u7f6e<br>_IP_SUBNET_MASK,l\u7b2c\u4e00\u500blan\u57e0\u4e0a\u7684mask<br>_DEFAULT_GATEWAY,\u7b2c\u4e00\u500blan\u57e0\u4e0a\u7684gateway<br>_TFTP_SERVER,tftp server\u7684ip\u4f4d\u7f6e<br>_TFTP_FILE,tftp\u4e0aios\u7684\u6620\u50cf\u6a94\u540d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528setup\u8a2d\u5b9a\u7d44\u614b\u6a94#setup\u9032\u5230setup mode, &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[32],"tags":[],"class_list":["post-892","post","type-post","status-publish","format-standard","hentry","category-cisco-network"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=892"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/892\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}