1. 顯示提示信息 2. 全局參數(shù)的設(shè)置 3. 接口參數(shù)的設(shè)置 4. 顯示結(jié)果 利用設(shè)置對(duì)話過(guò)程可以避免手工輸入命令的煩瑣,但它還不能完全代替手工設(shè)置,一些非凡的設(shè)置還必須通過(guò)手工輸入的方式完成。 進(jìn)入設(shè)置對(duì)話過(guò)程后,路由器首先會(huì)顯示一些提示信息: --- System Configuration Dialog --- At any point you may enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any PRompt. Default settings are in square brackets '[]'. 這是告訴你在設(shè)置對(duì)話過(guò)程中的任何地方都可以鍵入“?”得到系統(tǒng)的幫助,按ctrl-c可以退出設(shè)置過(guò)程,缺省設(shè)置將顯示在‘[]’中。然后路由器會(huì)問(wèn)是否進(jìn)入設(shè)置對(duì)話: Would you like to enter the initial configuration dialog? [yes]: 假如按y或回車,路由器就會(huì)進(jìn)入設(shè)置對(duì)話過(guò)程。首先你可以看到各端口當(dāng)前的狀況: First, would you like to see the current interface summary? [yes]: Any interface listed with OK? value "NO" does not have a valid configuration Interface ip-Address OK? Method Status Protocol Ethernet0 unassigned NO unset up up Serial0 unassigned NO unset up up ……… ……… … …… … … 然后,路由器就開(kāi)始全局參數(shù)的設(shè)置: Configuring global parameters: 1.設(shè)置路由器名: Enter host name [Router]: 2.設(shè)置進(jìn)入特權(quán)狀態(tài)的密文(secret),此密文在設(shè)置以后不會(huì)以明文方式顯示: The enable secret is a one-way cryptographic secret used instead of the enable passWord when it exists. Enter enable secret: cisco 3.設(shè)置進(jìn)入特權(quán)狀態(tài)的密碼(password),此密碼只在沒(méi)有密文時(shí)起作用,并且在設(shè)置以后會(huì)以明文方式顯示: The enable password is used when there is no enable secret and when using older software and some boot images. Enter enable password: pass 4.設(shè)置虛擬終端訪問(wèn)時(shí)的密碼: Enter virtual terminal password: cisco 5.詢問(wèn)是否要設(shè)置路由器支持的各種網(wǎng)絡(luò)協(xié)議: Configure SNMP Network Management? [yes]: Configure DECnet? [no]: Configure AppleTalk? [no]: Configure IPX? [no]: Configure IP? [yes]: Configure IGRP routing? [yes]: Configure RIP routing? [no]: ……… 6.假如配置的是撥號(hào)訪問(wèn)服務(wù)器,系統(tǒng)還會(huì)設(shè)置異步口的參數(shù): Configure Async lines? [yes]: 1) 設(shè)置線路的最高速度: Async line speed [9600]: 2) 是否使用硬件流控: Configure for HW flow control? [yes]: 3) 是否設(shè)置modem: Configure for modems? [yes/no]: yes 4) 是否使用默認(rèn)的modem命令: Configure for default chat script? [yes]: 5) 是否設(shè)置異步口的PPP參數(shù): Configure for Dial-in IP SLIP/PPP access? [no]: yes 6) 是否使用動(dòng)態(tài)IP地址: Configure for Dynamic IP addresses? [yes]: 7) 是否使用缺省IP地址: Configure Default IP addresses? [no]: yes 8) 是否使用TCP頭壓縮: Configure for TCP Header Compression? [yes]: 9) 是否在異步口上使用路由表更新: Configure for routing updates on async links? [no]: y 10) 是否設(shè)置異步口上的其它協(xié)議。 接下來(lái),系統(tǒng)會(huì)對(duì)每個(gè)接口進(jìn)行參數(shù)的設(shè)置。 1.Configuring interface Ethernet0: 1) 是否使用此接口: Is this interface in use? [yes]: 2) 是否設(shè)置此接口的IP參數(shù): Configure IP on this interface? [yes]: 3) 設(shè)置接口的IP地址: IP address for this interface: 192.168.162.2 4) 設(shè)置接口的IP子網(wǎng)掩碼: Number of bits in subnet field [0]: Class C network is 192.168.162.0, 0 subnet bits; mask is /24 在設(shè)置完所有接口的參數(shù)后,系統(tǒng)會(huì)把整個(gè)設(shè)置對(duì)話過(guò)程的結(jié)果顯示出來(lái): The following configuration command script was created: hostname Router enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1 enable password pass ………… 請(qǐng)注重在enable secret后面顯示的是亂碼,而enable password后面顯示的是設(shè)置的內(nèi)容。 顯示結(jié)束后,系統(tǒng)會(huì)問(wèn)是否使用這個(gè)設(shè)置: Use this configuration? [yes/no]: yes 假如回答yes,系統(tǒng)就會(huì)把設(shè)置的結(jié)果存入路由器的NVRAM中,然后結(jié)束設(shè)置對(duì)話過(guò)程,使路由器開(kāi)始正常的工作。 返回目錄
三、常用命令
1. 幫助 在IOS操作中,無(wú)論任何狀態(tài)和位置,都可以鍵入“?”得到系統(tǒng)的幫助。 2. 改變命令狀態(tài) 任務(wù) 命令 進(jìn)入特權(quán)命令狀態(tài) enable 退出特權(quán)命令狀態(tài) disable 進(jìn)入設(shè)置對(duì)話狀態(tài) setup 進(jìn)入全局設(shè)置狀態(tài) config terminal 退出全局設(shè)置狀態(tài) end 進(jìn)入端口設(shè)置狀態(tài) interface type slot/number 進(jìn)入子端口設(shè)置狀態(tài) interface type number.subinterface [point-to-point multipoint] 進(jìn)入線路設(shè)置狀態(tài) line type slot/number 進(jìn)入路由設(shè)置狀態(tài) router protocol 退出局部設(shè)置狀態(tài) exit 3. 顯示命令 任務(wù) 命令 查看版本及引導(dǎo)信息 show version 查看運(yùn)行設(shè)置 show running-config 查看開(kāi)機(jī)設(shè)置 show startup-config 顯示端口信息 show interface type slot/number 顯示路由信息 show ip router 4. 拷貝命令 用于IOS及CONFIG的備份和升級(jí)