思科路由重發布配置小案例,新手入門級,值得學習

在大型的企業中,可能在同一網內使用到多種路由協議,為了實現多種路由協議的協同工作,路由器可以使用路由重分發(route redistribution)將其學習到的一種路由協議的路由通過另一種路由協議廣播出去,這樣網絡的所有部分都可以連通了。 為了實現重分發,路由器必須同時運行多種路由協議,這樣,每種路由協議才可以取路由表中的所有或部分其他協議的路由來進行廣播。

重分發分為兩種

雙向重分發:在兩個路由選擇進程之間重分發所有路由

單向重分發:將一條路由傳遞給一種路由選擇協議,同時只將通過該路由選擇協議獲得網絡傳遞給其他路由選擇協議。

思科路由重發布配置小案例,新手入門級,值得學習

重發布常用命令

<code>redistriute  protocol [metric metric-value] [match internal | external nssa-external type][route-map map-tag]/<code>

路由重發布是,必須給重分佈而來的路由指定的度量值被稱為默認度量值(metric值)或種子度量值,它是在重分發配置期間定義的。OSPF度量值為:代價,RIP度量值為:跳數

路由重發布案例

思科路由重發布配置小案例,新手入門級,值得學習

關鍵配置

1、配置R1接口IP地址

R1(config)#interface gigabitEthernet 0/0

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#no shutdown

2、配置R1動態路由RIP

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#network 192.168.1.0

3、配置R2接口IP地址

R2(config)#interface gigabitEthernet 0/0

R2(config-if)#ip address 192.168.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config)#interface gigabitEthernet 0/1

R2(config-if)#ip address 192.168.2.2 255.255.255.0

R2(config-if)#no shutdown

4、配置R2動態路由RIP和OSPF

R2(config)#router rip

R2(config-router)#version 2

R2(config-router)#network 192.168.1.0

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

R2(config-router)#router-id 2.2.2.2

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

6、配置R3的接口地址

R3(config)#interface gigabitEthernet 0/1

R3(config-if)#ip address 192.168.2.3 255.255.255.0

R3(config-if)#no shutdown

7、配置R3的OSPF

R3(config)#router ospf 1

R3(config-router)#router-id 3.3.3.3

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

8、配置路由重發布策略

R2(config)#router rip

R2(config-router)#redistribute ospf 1 metric 5

R2(config)#router ospf 1

R2(config-router)#redistribute rip subnets

思科路由重發布配置小案例,新手入門級,值得學習


分享到:


相關文章: