簡單的OSPF與RIP的相互引入(華為筆記回顧)
R1 配置
//介面配置
interface Serial0/0/0
link-protocol fr //這裡需要更改為幀中繼協議,預設為PPP協議
ip address 10.0.123.1 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf 1 router-id 1.1.1.1
peer 10.0.123.2 //串列埠線無法自己尋找路經,所以這裡手動指定一下路徑
,peer 10.0.123.3
area 0.0.0.0
network 10.0.123.0 0.0.0.255
R2 配置
interface Serial0/0/0
link-protocol fr
ip address 10.0.123.2 255.255.255.0
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
ospf 1 router-id 2.2.2.2
peer 10.0.123.1
peer 10.0.123.3
area 0.0.0.0
network 10.0.123.0 0.0.0.255
R3 配置
interface Serial0/0/0
link-protocol fr
ip address 10.0.123.3 255.255.255.0
interface GigabitEthernet0/0/0
ip address 10.0.34.3 255.255.255.0
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf 1 router-id 3.3.3.3
peer 10.0.123.1
peer 10.0.123.2
area 0.0.0.0
network 10.0.123.0 0.0.0.255
network 10.0.34.0 0.0.0.255
R4 配置
/*本章要點在於R4配置 一邊是OSPF協議,而另一邊則是RIP協議。為了可以通訊,需要在不同程序之間相互引入
interface GigabitEthernet0/0/0
ip address 10.0.34.4 255.255.255.0
interface GigabitEthernet0/0/1
ip address 10.0.45.4 255.255.255.0
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
ospf 1 router-id 4.4.4.4
import-route rip 1 //ospf程序下引入rip
area 0.0.0.0
network 10.0.34.0 0.0.0.255
network 10.0.123.0 0.0.0.255
rip 1
version 2
network 10.0.0.0
import-route ospf 1 //rip裡引入OSPF
R5 配置
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
interface GigabitEthernet0/0/1
ip address 10.0.45.5 255.255.255.0
rip 1
version 2
network 10.0.0.0