【正文】
:9600 數(shù)據(jù)位 :8 停止位 :1 奇偶校驗: 無 二、命令狀態(tài) 1. router 路由器處于用戶命令狀態(tài),這時用戶可以看路由器的連接狀態(tài),訪問其它網(wǎng)絡和主機,但不能看到和更改路由器的設置內(nèi)容。 router(configrouter)。[]39。 mask is /24 在設置完所有接口的參數(shù)后,系統(tǒng)會把整個設置對話過程的結(jié)果顯示出來: The following configuration mand script was created: hostname Router enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1 enable password pass ………… 請注意在enable secret后面顯示的是亂碼,而enable password后面顯示的是設置的內(nèi)容。命令ip nat pool c2501 netmask 。 Router1: ip route Router3: ip route ip route 同時由于路由器Router3除了與路由器Router2相連外,不再與其他路由器相連,所以也可以為它賦予一條默認路由以代替以上的二條靜態(tài)路由, ip route 即只要沒有在路由表里找到去特定目的地址的路徑,。 go top 4. 使用網(wǎng)絡地址翻譯(NAT) NAT(Network Address Translation)起到將內(nèi)部私有地址翻譯成外部合法的全局地址的功能,它使得不具有合法IP地址的用戶可以通過NAT訪問到外部Internet. 當建立內(nèi)部網(wǎng)的時候,建議使用以下地址組用于主機,這些地址是由Network Working Group(RFC 1918)保留用于私有網(wǎng)絡地址分配的. Class A: to Class B: to Class C: to 命令描述如下: 任務 命令 定義一個標準訪問列表 accesslist accesslistnumber permit source [sourcewildcard] 定義一個全局地址池 ip nat pool name startip endip {netmask netmask | prefixlengthprefixlength} [type rotary] 建立動態(tài)地址翻譯 ip nat inside source {list {accesslistnumber | name} pool name[overload] | static localip globalip} 指定內(nèi)部和外部端口 ip nat {inside | outside} 如下圖所示, 路由器的Ethernet 0端口為inside端口,即此端口連接內(nèi)部網(wǎng)絡,并且此端口所連接的網(wǎng)絡應該被翻譯,Serial 0端口為outside端口,其擁有合法IP地址(由NIC或服務提供商所分配的合法的IP地址),,經(jīng)由Serial 0口訪問Internet。 接下來,系統(tǒng)會對每個接口進行參數(shù)的設置。?39。 4. router(configif)。 3. router(config) 在router提示符下鍵入configure terminal,出現(xiàn)提示符router(config),此時路由器處于全局設置狀態(tài),這時可以設置路由器的全局參數(shù)?! ∵M入設置對話過程后,路由器首先會顯示一些提示信息: System Configuration Dialog At any point you may enter a question mark 39。首先你可以看到各端口當前的狀況: 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 IPAddress OK? Method Sta