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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

路由器ospf动态路由配置

發布時間:2025/3/8 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 路由器ospf动态路由配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

技術原理:

? ? ? ? Ospd開放式最短路徑優先協議。是目前網絡中應用最廣泛的路由協議之一。屬于內部網絡路由協議。能夠適應各種規模的網絡環境,是典型的鏈路狀態協議。Ospf路由協議通過向全網擴散本設備的鏈路狀態信息,使網絡中每臺設備最終同步一個具有全網鏈路狀態的數據庫,然后路由器采用spf算法。以自己為根,計算到達網絡的最短路徑,最終形成全網路由信息。

實驗步驟:

1.在本實驗中的三層交換機上劃分vlan10vlan20,其中vlan10用于連接主機,vlan20用于連接R1.

2.路由器之間通過v35電纜通過串口連接,DCE端連接在R1上,配置其時鐘頻率64000.

3.主機和交換機通過直連線,主機與路由器通過交叉線連接。

4.S3560上配置ospf路由協議。

5.在路由器R1R2上配置ospf路由協議

6.pc1pc2主機默認網關設置為與直連網絡設備接口IP地址

7.驗證pc1pc2主機之間可以互相通

實驗圖:

S3650配置:

Switch>en

Switch>enable

Switch#config t

Enter configuration commands, one perline. ?End with CNTL/Z.

Switch(config)#host s3650

s3650(config)#vlan 10

s3650(config-vlan)#name v10

s3650(config-vlan)#exit

s3650(config)#vlan 20

s3650(config-vlan)#name v20

s3650(config-vlan)#exit

s3650(config)#int fa0/10

s3650(config-if)#switchport access vlan 10

s3650(config-if)#exit

s3650(config)#int fa0/20

s3650(config-if)#switchport access vlan 20

s3650(config-if)#exit

s3650(config)#int vlan 10


%LINK-5-CHANGED: Interface Vlan10, changedstate to up


%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan10, changed state to up

s3650(config-if)#ip address 192.168.1.1255.255.255.0

s3650(config-if)#no shut

s3650(config-if)#exit

s3650(config)#int vlan 20

s3650(config-if)#

%LINK-5-CHANGED: Interface Vlan20, changedstate to up


s3650(config-if)#ip address 192.168.3.1255.255.255.0

s3650(config-if)#no shut

s3650(config-if)#router ospf 1

s3650(config-router)#network 192.168.1.00.0.0.255 area 0

s3650(config-router)#network 192.168.3.00.0.0.255 area 0

s3650(config-router)#exit

s3650(config)#exit

s3650#

%SYS-5-CONFIG_I: Configured from console byconsole

R1配置:

Router>en

Router#config t

Enter configuration commands, one perline. ?End with CNTL/Z.

Router(config)#host R1

R1(config)#int fa0/0

R1(config-if)#ip address 192.168.3.2255.255.255.0

R1(config-if)#no shut


%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up


%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up


R1(config-if)#exit

R1(config)#int serial2/0

R1(config-if)#clock rate 64000

R1(config-if)#ip address 192.168.4.1255.255.255.0

R1(config-if)#no shut


%LINK-5-CHANGED: Interface Serial2/0,changed state to down

R1(config-if)#exit

R1(config)#router ospf 1

R1(config-router)#network 192.168.3.00.0.0.255 area 0

R1(config-router)#network

01:10:13: %OSPF-5-ADJCHG: Process 1, Nbr192.168.3.1 on FastEthernet0/0 from LOADING to FULL, Loading Done


% Incomplete command.

R1(config-router)#network 192.168.4.00.0.0.255 area 0

R1(config-router)#

R2配置:

Router>en

Router#config t

Enter configuration commands, one perline. ?End with CNTL/Z.

Router(config)#host R2

R2(config)#int fa0/0

R2(config-if)#ip address 192.168.2.1255.255.255.0

R2(config-if)#no shut


%LINK-5-CHANGED: Interface FastEthernet0/0,changed state to up


%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up


R2(config-if)#exit

R2(config)#int serial2/0

R2(config-if)#ip address 192.168.4.2255.255.255.0

R2(config-if)#no shut


R2(config-if)#

%LINK-5-CHANGED: Interface Serial2/0,changed state to up


R2(config-if)#exit

R2(config)#

%LINEPROTO-5-UPDOWN: Line protocol onInterface Serial2/0, changed state to up


R2(config)#router ospf 1

R2(config-router)#network 192.168.2.00.0.0.255 area 0

R2(config-router)#network 192.168.4.00.0.0.255 area 0

R2(config-router)#exit

R2(config)#

測試:

pc2 pingpc1.不通

s3650上配置:

s3650#config t

Enter configuration commands, one perline. ?End with CNTL/Z.

s3650(config)#ip routing

s3650(config)#exit

s3650#

此時測試已通

轉載于:https://blog.51cto.com/1054054/1252313

總結

以上是生活随笔為你收集整理的路由器ospf动态路由配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。