Comprehensive Experimental Advanced Configuration --OSPF dynamic routing (static routes, default routes, RIP)

FIG experimental GNS3 topology:

image.png

Experiment:

R2 and R3 belong AREA1, R3 and R4 are belong AREA0 routing protocol OSPF, RIP is the routing protocol between R4 and R5, R6 belong to a telecommunications operator, to achieve interoperability of the whole network

Experimental Procedure:

1, the configuration environment according to the port topology of experimental port address, and the routing protocol

a、R1

R1 # conf t into the overall pattern 
R1 (config) #int f0 / 0 Enter interface F0 / 0 
Rl (config-IF) arranged #ip the Add 192.168.10.1 255.255.255.0 IP address 
R1 (config-if) #no shut enabled interface 
R1 (config-if) #int f0 / 1 enters the Interface 0/1 
Rl (config-IF) arranged #ip the Add 192.168.20.1 255.255.255.0 IP address 
R1 (config-if) #no shut open
R1 (config-if) #ex exit interface mode 
R1 (config) #ip route 0.0.0.0 0.0.0.0 192.168.20.2 be configured as the default route R1

image.png

b, R 2

Rt#conft                                                                                  进入全局模式
R2(config)#intf0/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                                                                         退出接口模式
R2(config)#ip route 192.168.10.0 255 255.255.0192.168.20.1              设置R2为静态路由
R2(config)#router ospf 1                                                              启动ospf进程 1
R2(config-router)#router-id 2.2.2.2                                              设置路由id
R2(config-router)#network 192 16830.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

image.png

image.png

c、R3

R3#conft                                           进入全局模式
R3(config)#int f0/0                       设置接口f0/0
R3(config-if)#ip add 192.168.30.2 255 255 255.0                   配置IP地址
R3(config-if)#no shut                                       开启
R3(config-if)#int f0/1                                       设置接口f0/1
R3(config-if)ip add 192.168 40.1255.255 255.0                                 配置IP地址
R3(config-if)#no shut                                         开启
R3(config-if)#int1/0                                                        设置接口f1/0
R3(config-if)ip add 12.0.0.1 255 255.255.0             配置IP地址
R3(config-if)#no shut                                           开启
R3(config-if)#intf2/0                                                      设置接口f2/0
R3(config-if)# ip add 192.168.70.1 255255 255.0          配置IP地址
R3(config-if)#no shut                                                   开启
R3(config-if)#ex
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.33                                       设置路由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查看路由表

image.png

image.png

image.png

d、R4

Rt4#conf t                                                  进入全局模式
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.1255 255.255.0
R4(config- if)#no shut                                    开启
R4(config)#router rip                                     进入rip协议
R4(config router)#ver2                                     版本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查看路由信息

image.png

image.png

image.png

e、R5

Rrs#conft                                                    进入全局模式
R5(config)#int f0/0                                          配置接口f0/0
R5(config- if)ip add 192.168 50.2255.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

image.png

image.png

f、  R6

R6 # conf t enters the global mode 
R6 (config) #int f0 / 0 Interface Configuration F0 / 0 
R6 (config-IF) 255 #ip the Add 12.0.0.2 255,255.0 
R6 (config-IF) #no Shut 
R6 (config-IF) #int f0 / 1 configuration Interface F0 /. 1 
R6 (configif) #ip the Add 255.255 255.0 13.0.0.1 
R6 (configif) #no Shut 
R6 (config) #ip route 192.168.0.0 static set 255 255.0.0 12.0.0.1 routing

image.png

2, configure the IP address and gateway pc

a、pc1

ip 192.168.10.2 192.168.10.1 address configuration pc1IP

image.png

b、pc2

ip 192.168.70.2 192.168.70.1 address configuration pc2IP

image.png

c、pc3

ip 13.0.0.13 13.0.0.1 address configuration pc3IP

image.png

d, pc4

ip 192.168.160.2 192.168.60.1 address configuration pc4IP

image.png

3, the whole network interoperability testing

image.png


Ospf agreement to build a comprehensive agreement with the rip successful experiment.


Guess you like

Origin blog.51cto.com/14475876/2438369