日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

OSPF基础配置命令

發(fā)布時(shí)間:2023/12/14 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 OSPF基础配置命令 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

第一步

如圖:劃分ip并進(jìn)行命令配置回環(huán)配置

第二部

啟動(dòng)ospf并且宣告激活接口(注意宣告每個(gè)接口時(shí)要進(jìn)行反掩碼配置)

匯總配置

[r1]ospf 1 router-id 1.1.1.1 [r1-ospf-1]ar [r1-ospf-1]area 0 [r1-ospf-1-area-0.0.0.0]net [r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.31 [r1-ospf-1-area-0.0.0.0]net [r1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.31[r2]ospf 1 router-id 2.2.2.2 [r2-ospf-1]ar [r2-ospf-1]area 0 [r2-ospf-1-area-0.0.0.0]net [r2-ospf-1-area-0.0.0.0]network 192.168.1.35 0.0.0.31 [r2-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.31r3]ospf 1 router-id 3.3.3.3 [r3-ospf-1]a [r3-ospf-1]area 0 [r3-ospf-1-area-0.0.0.0]net [r3-ospf-1-area-0.0.0.0]network 192.168.1.34 0.0.0.31 [r3-ospf-1-area-0.0.0.0]network 192.168.1.97 0.0.0.31 [r3-ospf-1-area-0.0.0.0] [r3-ospf-1-area-0.0.0.0]abr [r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128 [r3-ospf-1]area 1 [r3-ospf-1-area-0.0.0.1]net [r3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.31 [r3-ospf-1-area-0.0.0.1]ab [r3-ospf-1-area-0.0.0.1]abr-summary 192.168.1.128 255.255.255.224 [r3-ospf-1-area-0.0.0.1]q[r4]ospf 1 router-id 4.4.4.4 [r4-ospf-1]ar [r4-ospf-1]area 1 [r4-ospf-1-area-0.0.0.1]net [r4-ospf-1-area-0.0.0.1]network 192.168.1.130 0.0.0.31

還需要在邊界路由器上配一條缺省

[r4-ospf-1]default-route-advertise always

第三步

R1-R3中要求R3是DR無BDR

將r1和r2優(yōu)先級設(shè)置為0? ? ?并且重啟ospf

[r1]int g0/0/0 [r1-GigabitEthernet0/0/0]osp [r1-GigabitEthernet0/0/0]ospf dr [r1-GigabitEthernet0/0/0]ospf dr-priority 0[r2]int g0/0/0 [r2-GigabitEthernet0/0/0]os [r2-GigabitEthernet0/0/0]ospf dr [r2-GigabitEthernet0/0/0]ospf dr-priority 0

第四步

ospf認(rèn)證

[r1]int g0/0/0 [r1-GigabitEthernet0/0/0]os [r1-GigabitEthernet0/0/0]ospf au [r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 c [r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456 [r1-GigabitEthernet0/0/0][r2]int g0/0/0 [r2-GigabitEthernet0/0/0]os [r2-GigabitEthernet0/0/0]ospf au [r2-GigabitEthernet0/0/0]ospf authentication-mode m [r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 c [r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456 [r2-GigabitEthernet0/0/0][r3]int g0/0/0 [r3-GigabitEthernet0/0/0]os [r3-GigabitEthernet0/0/0]ospf au [r3-GigabitEthernet0/0/0]ospf authentication-mode md [r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 c [r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456 [r3-GigabitEthernet0/0/0]q [r3]int g0/0/1 [r3-GigabitEthernet0/0/1]os [r3-GigabitEthernet0/0/1]ospf au [r3-GigabitEthernet0/0/1]ospf authentication-mode md [r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 c [r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456[r4]int g0/0/0 [r4-GigabitEthernet0/0/0]ospf au [r4-GigabitEthernet0/0/0]ospf authentication-mode md [r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 c [r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456 [r4-GigabitEthernet0/0/0]

第五步

每臺路由器上配空接口路由

[r1]ip route-static 192.168.1.0 27 NULL 0 [r2]ip route-static 192.168.1.64 27 NULL 0 [r3]ip route-static 192.168.1.96 27 NULL 0 [r4]ip route-static 192.168.1.128 27 NULL 0

全網(wǎng)可達(dá):?

r1>ping 4.4.4.4PING 4.4.4.4: 56 data bytes, press CTRL_C to breakReply from 4.4.4.4: bytes=56 Sequence=1 ttl=254 time=40 msReply from 4.4.4.4: bytes=56 Sequence=2 ttl=254 time=30 msReply from 4.4.4.4: bytes=56 Sequence=3 ttl=254 time=60 msReply from 4.4.4.4: bytes=56 Sequence=4 ttl=254 time=30 msReply from 4.4.4.4: bytes=56 Sequence=5 ttl=254 time=40 ms--- 4.4.4.4 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 30/40/60 ms<r1>ping 192.168.1.129PING 192.168.1.129: 56 data bytes, press CTRL_C to breakReply from 192.168.1.129: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.1.129: bytes=56 Sequence=2 ttl=255 time=50 msReply from 192.168.1.129: bytes=56 Sequence=3 ttl=255 time=40 msReply from 192.168.1.129: bytes=56 Sequence=4 ttl=255 time=40 msReply from 192.168.1.129: bytes=56 Sequence=5 ttl=255 time=30 ms--- 192.168.1.129 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 30/42/50 ms

總結(jié)

以上是生活随笔為你收集整理的OSPF基础配置命令的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。