重分布直连和静态

 

重分布_路由重分布

如上图所示:实验内容是

R1是静态的默认路由

R2是运行rip

R4是运行eigrp

R5是运行ospf

 

R3e0/0 ip 10.10.10.1  255.255.255.0

R3e0/1 ip 11.11.11.1  255.25.255.0

R3e0/2 ip 12.12.12.1  255.255.255.0

R3 e0/3 ip 13.13.13.1   255.255.255.0

 

其中r1  r2    r4   r5 ip地址分别为

10.10.10.2  255.255.255.0

11.11.11.2  255.255.255.0

12.12.12.2  255.255.255.0

13.13.13.2  255.255.255.0

 

然后再r3上分别启动rip  eigrp  ospf

R3(config)#router rip

R3(config-router)#no au

R3(config-router)#ver 2

R3(config-router)#net 11.11.11.0

R3(config-router)#exit

R3(config)#router e

R3(config)#router eigrp 111

R3(config-router)#no au

R3(config-router)#net 12.12.12.0

R3(config-router)#exit

R3(config)#router os

R3(config)#router ospf 111

R3(config-router)#net 13.13.13.0 0.0.0.255 area 0.

 

 

接着分别在r 2    r4   r5  上启动rip  eigrp  ospf

R2(config)#router rip

R2(config-router)#no au

R2(config-router)#ver 2

R2(config-router)#net 11.11.11.0

 

 

R4(config)#router eigrp 111

R4(config-router)#no au

R4(config-router)#net 12.12.12.0

 

 

R5(config)#router os

R5(config)#router ospf 111

R5(config-router)#net 13.13.13.0 0.0.0.255 area 0

 

 

接下来你肯定会想,这么几个路由器启用不同的协议,鬼才行会通呢,

不过还真的有鬼,只要我们敲上几个简单的命令,不通都难啊?这就是

重分布!!

 

 

首先我们在r3路由器上

 

R3(config)#router rip

R3(config-router)#redistribute connected

 

R3(config)#router eigrp 111

R3(config-router)#redistribute connected

 

R3(config)#router ospf 111

R3(config-router)#redistribute connected subnets (ospf比较特殊,所以后面要加上参数)

 

 

 

 

这时候就能使不同协议之间的路由实现相通了

 

接着我们再在r3r1上配个静态的默认路由

 

R3(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.2

R1(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1

 

然后再在r2   r4    r5

R2(config)#router rip

R2(config-router)#red

R2(config-router)#redistribute s

R2(config-router)#redistribute static

 

 

R4(config)#router eigrp 111

R4(config-router)#red

R4(config-router)#redistribute s

R4(config-router)#redistribute static

 

 

R5(config)#router ospf 111

R5(config-router)#default-information originate always   / ospf使特殊的 静态的只能敲这个命令

 

 

完毕!!!