動態路由配置

2021-10-23 11:41:41 字數 3027 閱讀 9457

實驗目的:

掌握ospf協議的相關配置

1.配置pc機ip位址,以pc0為例

2.在二層交換機建立vlan,並劃入對應埠,再配置trunk,以switch0為例。

3.三層交換機開啟路由功能,劃分vlan、設定trunk、配置虛擬介面。switch0與switch1配置基本相同,vlan和埠ip需要注意分清。

switch>enable

switch#conf t

switch(config)#ip routing

switch(config)#vlan 10

switch(config-vlan)#exit

switch(config)#vlan 20

switch(config-vlan)#exit

switch(config)#int vlan 10

switch(config-if)#ip address 192.168.1.254 255.255.255.0

switch(config-if)#int vlan 20

switch(config-if)#ip address 192.168.2.254 255.255.255.0

switch(config-if)#exit

switch(config)#int f0/3

switch(config-if)#switchport trunk encapsulation dot1q

switch(config-if)#switchport mode trunk

switch(config-if)#exit

switch(config)#int f0/1

switch(config-if)#no switchport

switch(config-if)#ip address 10.1.1.1 255.255.255.0

switch(config-if)#no shutdown

switch(config-if)#exit

4.路由器開啟埠,並配置ip位址。以router0為例,router1配置基本相同,需注意ip位址不同。

router>enable

router#conf t

enter configuration commands, one per line. end with cntl/z.

router(config)#int g0/0

router(config-if)#no shutdown

router(config-if)#

%link-5-changed: inte***ce gigabitethernet0/0, changed state to up

router(config-if)#ip address 20.1.1.1 255.255.255.0

router(config-if)#int g0/1

router(config-if)#no shutdown

router(config-if)#

%link-5-changed: inte***ce gigabitethernet0/1, changed state to up

%lineproto-5-updown: line protocol on inte***ce gigabitethernet0/1, changed state to up

router(config-if)#ip address 10.1.1.2 255.255.255.0

router(config-if)#

5.配置動態路由,以switch0交換機為例,switch1交換機配置相同,ip位址不同。

switch>en

switch#conf t

enter configuration commands, one per line. end with cntl/z.

switch(config)#router ospf 1

switch(config-router)#network 192.168.1.0 0.0.0.255 area 0

switch(config-router)#network 192.168.2.0 0.0.0.255 area 0

switch(config-router)#network 10.1.1.0 0.0.0.255 area 0

switch(config-router)#

01:33:43: %ospf-5-adjchg: process 1, nbr 20.1.1.1 on fastethernet0/1 from loading to full, loading done

6.配置動態路由,以router0路由器為例,router1交換機配置相同,ip位址不同。

router>en

router#conf t

enter configuration commands, one per line. end with cntl/z.

router(config)#router ospf 1

router(config-router)#network 10.1.1.0 0.0.0.255 area 0

router(config-router)#network 20.1.1.0 0.0.0.255 area 0

router(config-router)#

01:21:19: %ospf-5-adjchg: process 1, nbr 30.1.1.1 on gigabitethernet0/0 from loading to full, loading done

7.測試連通結果

動態路由配置

1.需要的環境packettracer6 思科 2.對路由器配置動態路由實現不同網段之間的通訊,網路拓撲結構如下 3.按要求搭建上面的網路拓撲結構 使用滑鼠拖動將所需要的結構放入到空白處 4.配置好各台pc機的ip位址以及閘道器位址 ip位址以及各閘道器位址註明在上面 閘道器 其他pc機的配置一樣 ...

動態路由配置

動態路由 網路中的路由器之間相互通訊,傳遞路由資訊利用收到的路由資訊更新和維護路由表的過程 基於某種路由協議實現的 特點 減少管理任務,但是占用網路頻寬 動態路由協議的作用 向其他路由器傳遞路由資訊 接收其他路由器的路由資訊 根據收到的路由資訊計算出到每個目的網路的最優路徑,並由此生成路由表 根據網...

RIP動態路由配置

rip動態路由配置 問題 在相對較小而且結構不變的網路中,靜態路由是很好的解決方案,它配置簡單而且不過多消耗裝置資源 動態路由協議在執行時要消耗路由器內部資源,在與其他路由器更新資訊時又會消耗網路資源 然而在大型網路中,網路非常多,而且很有可能因為某些因素的影響,網路拓撲會有輕微變化。這時如果仍然採...