enablePassword: zebraspeedmetal# configure terminalspeedmetal(config)# interface eth0speedmetal(config-if)# ip address 192.168.2.1/30speedmetal(confi。專用Cisco路由器的替代品Zebra( 三 )。" />

日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

專用Cisco路由器的替代品Zebra( 三 )


User Access VerificationPassword: zebraspeedmetal> enablePassword: zebraspeedmetal# configure terminalspeedmetal(config)# interface eth0speedmetal(config-if)# ip address 192.168.2.1/30speedmetal(config-if)# quitspeedmetal(config)# interface eth1speedmetal(config-if)# ip address 192.168.1.1/30speedmetal(config-if)# quitspeedmetal(config)# interface dummy0speedmetal(config-if)# ip address 10.0.2.1/24speedmetal(config-if)# writeConfiguration saved to /etc/zebra/zebra.confspeedmetal(config-if)# endspeedmetal# show run Current configuration:!hostname speedmetalpassword zebraenable password zebra!interface lo!interface eth0 ip address 192.168.2.1/30!interface dummy0 ip address 10.0.2.1/24!interface eth1 ip address 192.168.1.1/30!!line vty!end
要注重的是我們沒有用常規(guī)的方法設(shè)置 ThinkPad 的 IP 地址;而是通過 Zebra 來設(shè)置它們 。這些設(shè)置保存在 /etc/zebra/zebra.conf 配置文件中,因此每次當 Zebra 服務(wù)啟動時,這些設(shè)置就會生效 。
Zebra.conf 文件中由 Zebra 修改的部分如下:

清單 4. 由 Zebra 修改過的 /etc/zebra/zebra.conf 文件
!! Zebra configuration saved from vty!2003/08/20 00:07:51!hostname speedmetalpassword zebraenable password zebra!interface lo!interface eth0 ip address 192.168.2.1/30!interface dummy0 ip address 10.0.2.1/24!interface eth1 ip address 192.168.1.1/30!!line vty!我們還可以用 MRLG 來檢查接口的狀態(tài),方法是:選擇默認值,"router1",選中單選按鈕 "show interface",然后點擊 "Execute" 。
使用 Zebra 安裝配置 RIP 路由
我們已經(jīng)在 ThinkPad/router 上安裝配置了網(wǎng)絡(luò)接口,接下來我們再對它進行配置,使之可以與 RIP 更新協(xié)同工作 。正如我們已經(jīng)提到過的,Zebra 使用單獨的守護進程來實現(xiàn)路由協(xié)議,所以我們必須首先為 RIP 守護進程在/etc/zebra 目錄下創(chuàng)建一個簡單的配置文件ripd.conf 。
清單 5. 一個基本的 /etc/zebra/ripd.conf 文件
hostname speedmetal-rippassword zebraenable password zebra然后我們啟動 ripd 守護進程 :
# service ripd start
完成后,我們可以 telnet 到我們的 Zebra 路由器的 2602 端口來配置 RIP 守護進程 。
清單 6. 配置 RIP
User Access VerificationPassword: zebraspeedmetal-rip> enablePassword: zebraspeedmetal-rip# configure terminalspeedmetal-rip(config)# router ripspeedmetal-rip(config-router)# network 10.0.0.0/8speedmetal-rip(config-router)# network 192.168.0.0/16speedmetal-rip(config-router)# endspeedmetal-rip# show runCurrent configuration:!hostname speedmetal-rippassword zebraenable password zebra!interface lo!interface eth0!interface dummy0!router rip network 0.0.0.0/0 network 192.168.0.0/16!line vty!endspeedmetal-rip# writeConfiguration saved to /etc/zebra/ripd.confspeedmetal-rip#
;生成的 ripd.conf 配置文件如下所示:
清單 7. 生成的 /etc/zebra/ripd.conf 文件
!! Zebra configuration saved from vty!2003/08/19 13:50:30!hostname speedmetal-rippassword zebraenable password zebra!interface lo!interface eth0!interface eth1!interface dummy0!router rip network 10.0.0.0/8 network 192.168.0.0/16!line vty!在 Cisco 路由器上安裝配置 RIP 路由
我們將兩個 Cisco 路由器稱為 "A" 和 "B",為了簡化這兩個路由器的配置,我們只配置了一些讓路由器能正常運行的基本設(shè)置,包括設(shè)置接口的 IP 地址、環(huán)回地址,以及用于串口通信的串口時鐘頻率 。
清單 8. 配置路由器 A
Router#config terminalRouter(config)#hostname RouterARouterA(config)#int s0/0RouterA(config-if)#ip address 192.168.0.1 255.255.255.252RouterA(config-if)#no shutRouterA(config-if)# interface fastEthernet 0/0RouterA(config-if)#ip address 192.168.2.2 255.255.255.252RouterA(config-if)#no shutRouterA(config-if)#int loopback 0RouterA(config-if)#ip address 10.0.0.1 255.255.255.0RouterA(config-if)#endRouterA#write

推薦閱讀