linux ospf 命令,Linux运维知识之linux下使用quagga配置ospf协议
本文主要向大家介紹了Linux運維知識之linux下使用quagga配置ospf協(xié)議,通過具體的內(nèi)容向大家展現(xiàn),希望對大家學(xué)習(xí)Linux運維知識有所幫助。
環(huán)境:三臺redhat6.5(VM虛擬機)一、ospf協(xié)議??OSPF(Open?Shortest?Path?First開放式最短路徑優(yōu)先)是一個內(nèi)部網(wǎng)關(guān)協(xié)議(Interior?Gateway?Protocol,簡稱IGP),用于在單一自治系統(tǒng)(autonomous?system,AS)內(nèi)決策路由。是對鏈路狀態(tài)路由協(xié)議的一種實現(xiàn),隸屬內(nèi)部網(wǎng)關(guān)協(xié)議(IGP),故運作于自治系統(tǒng)內(nèi)部。PS:這里不過多講解ospf協(xié)議,可在網(wǎng)上自行查找學(xué)習(xí)二、配置首先下載安裝軟件包,其他yum源以及網(wǎng)絡(luò)配置就不再介紹了,三臺配置也是一樣的下載地址:http://download.openpkg.org/components/cache/quagga/本人這里使用的版本是quagga-0.99.17.tar.gz相關(guān)依賴包:gcc?readline?readline-devel#tar?zxf?quagga-0.99.17.tar.gz
#yum?install?-y?gcc?readline?readline-devel
#cd?quagga-0.99.17????????????#進入目錄進行源碼編譯安裝
#./configure?--enable-vtysh--enable-user=root?--enable-group=root?--enable-vty-group=root
#?make?&&?make?install?修改配置文件:在/etc/services文件里面添加以下內(nèi)容:#?vim?/etc/services
zebrasrv????2600/tcp?????#?zebra?service
zebra?????2601/tcp?????#?zebra?vty
ripd?????2602/tcp?????#?RIPd?vty
ripngd?????2603/tcp?????#?RIPngd?vty
ospfd?????2604/tcp?????#?OSPFd?vty
bgpd?????2605/tcp?????#?BGPd?vty
ospf6d?????2606/tcp?????#?OSPF6d?vty
ospfapi?????2607/tcp?????#?ospfapi
isid?????2608/tcp?????#?ISISd?vty?修改quagga的配置文件:?#?mkdir?/usr/local/etc/sample
#?mv?/usr/local/etc/*.sample/usr/local/etc/sample/
#?mv?/usr/local/etc/bgpd.conf.sample2/usr/local/etc/sample/
#?cp?/usr/local/etc/sample/bgpd.conf.sample/usr/local/etc/bgpd.conf
#?cp/usr/local/etc/sample/ospfd.conf.sample?/usr/local/etc/ospfd.conf
#?cp/usr/local/etc/sample/ospf6d.conf.sample?/usr/local/etc/ospf6d.conf
#?cp?/usr/local/etc/sample/ripd.conf.sample/usr/local/etc/ripd.conf
#?cp?/usr/local/etc/sample/vtysh.conf.sample/usr/local/etc/vtysh.conf
#?cp/usr/local/etc/sample/ripngd.conf.sample?/usr/local/etc/ripngd.conf
#?cp/usr/local/etc/sample/zebra.conf.sample?/usr/local/etc/zebra.conf?修改ospfd的配置文件:#?vim?/usr/local/etc/ospfd.conf
!?-*-?ospf?-*-
!
!?OSPFd?sample?configuration?file
!
!
hostname?ospfd
password?zebra
enable?password?please-set-at-here
router?ospf
network?10.235.117.0/24?area?0??????????????????#將網(wǎng)段宣告進ospf中
log?stdout?三、啟動驗證接下來啟動即可:#?/usr/local/sbin/ospfd?-d
#?/usr/local/sbin/zebra?-d
#?vtysh
Hello,?this?is?Quagga?(version?0.99.17).
Copyright?1996-2005?Kunihiro?Ishiguro,?etal.
test.xiaomi.com#?show?running-config
Building?configuration...
Current?configuration:
hostname?Router
hostname?ospfd
log?stdout
password?zebra
enable?password?zebra
enable?password?please-set-at-here
interface?eth0
ipv6nd?suppress-ra
interface?lo
router?ospf
network?10.235.117.0/24?area?0.0.0.0
line?vty
end
test.xiaomi.com#?show?ip?ospf??database
OSPF?Router?with?ID?(10.235.117.22)
Router?Link?States?(Area0.0.0.0)
Link?ID?????????ADV?Router??????Age?Seq#???????CkSum??Link?count
10.235.117.22???10.235.117.22??????3?0x80000003?0x0735?1
10.235.117.27???10.235.117.27??????9?0x80000005?0xf832?1
10.235.117.28???10.235.117.28?????10?0x80000005?0xf631?1
Net?Link?States?(Area0.0.0.0)
Link?ID?????????ADV?Router??????Age?Seq#???????CkSum
10.235.117.28???10.235.117.28?????10?0x80000003?0xe5cfvtysh是quagga進入模擬路由的,進去可以像正常路由器上面命令一樣去查看信息。我這里是啟動了三臺ospfd進程,配置都是一樣的,重復(fù)上面步驟即可,趕緊get起來吧!
本文由職坐標(biāo)整理并發(fā)布,希望對同學(xué)們有所幫助。了解更多詳情請關(guān)注系統(tǒng)運維Linux頻道!
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的linux ospf 命令,Linux运维知识之linux下使用quagga配置ospf协议的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 荆门 php,荆门php培训
- 下一篇: iOS连接linux服务器用什么,iOS