OSPF基础配置命令
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                OSPF基础配置命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                第一步
如圖:劃分ip并進行命令配置回環配置
第二部
啟動ospf并且宣告激活接口(注意宣告每個接口時要進行反掩碼配置)
匯總配置
[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優先級設置為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認證
[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全網可達:?
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總結
以上是生活随笔為你收集整理的OSPF基础配置命令的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 使用pbrt遇到的问题及解决方法
- 下一篇: 电商系统——订单页面展示
