Experimental topology structure:
Purpose:
R2 and R3 belong AREA1, R3 and R4 belong to AREA0 are OSPF, RIP is the routing protocol between R4 and R5, R6 belong to a telecommunications operator, to achieve interoperability of the whole network.
Environment Introduction:
R1:
f0 / 0 (192.168.10.1/24)
f0 / 1 (192.168.20.1/24)
R2:
f0 / 1 (192.168.20.2/24)
f0 / 0 (192.168.30.1/24)
R3:
f0 / 0 (192.168.30.2/24)
f0 / 1 (192.168.40.1/24)
f1 / 0 (12.0.0.1/24)
f2/0(192.168.70.1/24)
R4:
f0 / 1 (192.168.50.1/24)
f0 / 0 (192.168.40.2/24)
R5:
f0 / 1 (192.168.60.1/24)
f0 / 0 (192.168.50.2/24)
R6:
f0 / 0 (12.0.0.2/24)
f0 / 1 (13.0.0.1/24)
PC machine 1: (192.168.10.2/24)
PC machine 2: (192.168.70.2/24)
PC machine 3: (13.0.0.13/24)
PC-4: (192.168.60.2/24)
(A) Configuring the router interface R1, and R1 to configure a default route
R1#conf t 进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int f0/0 配置接口f0/0 R1(config-if)#ip add 192.168.10.1 255.255.255.0 R1(config-if)#no shut 开启 R1(config-if)#int f0/1 配置接口f0/1 R1(config-if)#ip add 192.168.20.1 255.255.255.0 R1(config-if)#no shut 开启 R1(config-if)#ex R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.20.2 将R1配置为默认路由 R1(config)#do show ip route 查看路由表信息
(二)配置R2路由器
1,设置R2接口
R2#conf t 进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. R2(config)#int f0/1 设置接口f0/1 R2(config-if)#ip add 192.168.20.2 255.255.255.0 R2(config-if)#no shut 开启 R2(config-if)#int f0/0 设置接口f0/0 R2(config-if)#ip add 192.168.30.1 255.255.255.0 R2(config-if)#no shut 开启 R2(config-if)#ex
2,启用ospf进程,并宣告网段
R2(config)#router ospf 1 启动ospf进程1 R2(config-router)#router-id 2.2.2.2 设置路由id R2(config-router)#network 192.168.30.0 0.0.0.255 area 1 宣告30网段在area1中 R2(config-router)#redistribute connected subnets 将直连的20网段宣告 R2(config-router)#redistribute static subnets 宣告默认路由10段 R2(config-router)#ex R2(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.1 设置R2为静态路由 R2(config)#do show ip route 查看路由表
(三)配置R3路由器
1,设置接口信息
R3#conf t 进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. R3(config)#int f0/0 设置接口f0/0 R3(config-if)#ip add 192.168.30.2 255.255.255.0 R3(config-if)#no shut 开启 R3(config-if)#int f0/1 设置接口f0/1 R3(config-if)#ip add 192.168.40.1 255.255.255.0 R3(config-if)#no shut R3(config-if)#int f1/0 设置接口f1/0 R3(config-if)#ip add 12.0.0.1 255.255.255.0 R3(config-if)#no shut R3(config-if)#int f2/0 设置接口f2/0 R3(config-if)#ip add 192.168.70.1 255.255.255.0 R3(config-if)#no shut R3(config-if)#ex
2,配置R3为默认路由,并开启ospf宣告网段
R3(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.2 将R3配置为默认路由 R3(config)#router ospf 1 开启ospf进程1 R3(config-router)#router-id 3.3.3.3 设置路由id R3(config-router)#network 192.168.30.0 0.0.0.255 area 1 宣告30网段在area1中 R3(config-router)#network 192.168.40.0 0.0.0.255 area 0 宣告40,70网段在area0中 R3(config-router)#network 192.168.70.0 0.0.0.255 area 0 R3(config-router)#default-information originate 注入外部默认路由 R3(config-router)#ex R3(config)#do show ip route 查看路由表
(四)配置R4路由器
1,配置接口信息
R4#conf t 进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. R4(config)#int f0/0 配置接口f0/0 R4(config-if)#ip add 192.168.40.2 255.255.255.0 R4(config-if)#no shut 开启 R4(config-if)#int f0/1 配置接口f0/1 R4(config-if)#ip add 192.168.50.1 255.255.255.0 R4(config-if)#no shut 开启
2,设置rip协议和ospf协议并宣告网段
R4(config)#router rip 进入rip协议 R4(config-router)#ver 2 版本2 R4(config-router)#no auto-summary 关闭路由汇总 R4(config-router)#network 192.168.50.0 宣告50网段 R4(config-router)#redistribute ospf 1 metric 5 在rip中注入ospf R4(config-router)#router ospf 1 开启ospf进程1 R4(config-router)#router-id 4.4.4.4 设置路由id R4(config-router)#network 192.168.40.0 0.0.0.255 area 0 宣告40网段在area0中 R4(config-router)#redistribute rip subnets 在ospf中注入rip R4(config-router)#ex R4(config)#do show ip route 查看路由信息
(五)配置R5路由器
R5#conf t 进入全局模式 Enter configuration commands, one per line. End with CNTL/Z. R5(config)#int f0/0 配置接口f0/0 R5(config-if)#ip add 192.168.50.2 255.255.255.0 R5(config-if)#no shut R5(config-if)#int f0/1 配置接口f0/1 R5(config-if)#ip add 192.168.60.1 255.255.255.0 R5(config-if)#no shut R5(config-if)#ex R5(config)#router rip 进入rip协议 R5(config-router)#ver 2 版本2 R5(config-router)#no auto-summary 关闭路由汇总 R5(config-router)#network 192.168.50.0 宣告50,60网段 R5(config-router)#network 192.168.60.0
(六)配置R6路由器
R6 # conf t Enter the global mode the Enter the Configuration Commands, One per Line. End with CNTL / the Z-. R6 (config) #ip route 192.168.0.0 255.255.0.0 12.0.0.1 static routing R6 (config) #int f0 / 0 configuration Interface F0 / 0 R6 (config-IF) #ip the Add 12.0.0.2 255.255.255.0 R6 (config-IF) #no Shut R6 (config-IF) #int F0 / Interface configuration. 1 F0 /. 1 R6 (config-IF) 13.0.0.1 255.255.255.0 the Add #ip R6 (config-IF) #no Shut
(Vii) the IP address and gateway to four PC's
ip 192.168.10.2 192.168.10.1
ip 192.168.70.2 192.168.70.1
ip 13.0.0.13 13.0.0.1
ip 192.168.60.2 192.168.60.1
(Viii) the whole network interoperability testing
To achieve interoperability in there and RIP routing protocol OSPF protocol
Experiment is successful
thanks for reading! ! !