欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

eigrp rip ospf 静态路由重发布

程序员文章站 2024-02-11 14:01:58
...
                         路由重发布
                         ![这里写图片描述](https://img-blog.csdn.net/20180818154741263?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1lfNjI4enlq/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)

边界路由器的配置
router eigrp 1 只要其它路由协议往EIGRP导入都给五参数
redistribute rip metric 1000 0 100 100 100
redistribute ospf 1 metric 1000 100 100 100 1000
redistribute static metric 1000 100 100 100 1000
redistribute connected metric 100 100 100 100 100
network 7.7.7.0 0.0.0.255
auto-summary
!
router ospf 1
log-adjacency-changes
redistribute rip subnets
redistribute eigrp 1 subnets
redistribute static subnets
redistribute connected subnets
network 5.5.5.0 0.0.0.255 area 0
!
router rip
redistribute eigrp 1 metric 15
redistribute ospf 1 metric 2
redistribute static metric 1
redistribute connected
network 1.0.0.0
!
ip route 4.4.4.0 255.255.255.0 3.3.3.2

注意1:
第一种路由协议计算METRIC值不一样。
RIP跳数 EIGRP带宽延迟 可靠性 负载 MTU
其它路由协议重分到OSPF的时候。要给其它进到OSPF的路由设置一个初始METRIC:
Router(config-router)#redistribute rip metric-type ?
1 Set OSPF External Type 1 metrics
2 Set OSPF External Type 2 metrics

Metric-type 1 导入到OSPF的条目初始值为20.并且这个条路由再传其它OSPF的路由器时会发累加+1。(E1)
Metric-type 2 (默认):导入到OSPF的条目初始值为20.并且这个条路由再传其它OSPF的路由器时不会发累加。(E2)

特点:E1的路由要优先于E2的路由

Router(config)#router ospf 1
Router(config-router)#redistribute rip metric-type 1 subnets

注意2:
静态路由在导向所有动态路由协议的时候。必须加上。
Router(config)#router rip
Router(config-router)#redistribute connected
Router(config-router)#redistribute static metric 1
所有动态路由导向静态路的时候。在静态路由协议的路由器上配置默认路由。

重分布:配置是路由协议相交换设备上去配置.
因为这台设备有全网路由。
Router#show ip route
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 12.0.0.0/8 [90/25676800] via 18.1.1.8, 00:07:25, Ethernet1/1
C 12.1.1.0/24 is directly connected, FastEthernet0/0
14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 14.0.0.0/8 [90/25676800] via 18.1.1.8, 00:07:25, Ethernet1/1
C 14.1.1.0/24 is directly connected, Ethernet1/0
16.0.0.0/24 is subnetted, 1 subnets
C 16.1.1.0 is directly connected, FastEthernet0/1
18.0.0.0/24 is subnetted, 1 subnets
C 18.1.1.0 is directly connected, Ethernet1/1
R 23.0.0.0/8 [120/1] via 12.1.1.2, 00:00:22, FastEthernet0/0
45.0.0.0/24 is subnetted, 1 subnets
O 45.1.1.0 [110/11] via 14.1.1.4, 00:06:36, Ethernet1/0
67.0.0.0/24 is subnetted, 1 subnets
S 67.1.1.0 [1/0] via 16.1.1.6
D 89.0.0.0/8 [90/284160] via 18.1.1.8, 00:07:25, Ethernet1/1

路由表的拆分
Router#show ip route connected
C 12.1.1.0/24 is directly connected, FastEthernet0/0
C 14.1.1.0/24 is directly connected, Ethernet1/0
C 16.1.1.0/24 is directly connected, FastEthernet0/1
C 18.1.1.0/24 is directly connected, Ethernet1/1
Router#show ip route rip
18.0.0.0/24 is subnetted, 1 subnets
R 23.0.0.0/8 [120/1] via 12.1.1.2, 00:00:03, FastEthernet0/0
Router#show ip route ospf
45.0.0.0/24 is subnetted, 1 subnets
O 45.1.1.0 [110/11] via 14.1.1.4, 00:07:45, Ethernet1/0
Router#show ip route eigrp
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 12.0.0.0/8 [90/25676800] via 18.1.1.8, 00:08:40, Ethernet1/1
14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 14.0.0.0/8 [90/25676800] via 18.1.1.8, 00:08:40, Ethernet1/1
67.0.0.0/24 is subnetted, 1 subnets
D 89.0.0.0/8 [90/284160] via 18.1.1.8, 00:08:40, Ethernet1/1
重分的原理就是将本台设备的不同路由表进行交换。

RIP 与EIGRP进行相互导路由

开销值 :不同路由协议的开销值计算方式不一样的。
Rip的开销值是跳数。最多支持15。
EIGRP的开销值是:(带宽 延迟 负载 可靠性 MTU)
Router(config)#router eigrp 10
Router(config-router)#redistribute rip metric 100 100 100 100 100
Router(config)#router rip
Router(config-router)#redistribute eigrp 10 metric 1

静态路由–OSPF相互导路由
Router(config)#router ospf 1
Router(config-router)#redistribute connected metric-type 2 subnets
Router(config-router)#redistribute static metric-type 1 subnets

将动态路由协议的网段导入到静态的时候,命令不支持,只有在静态路由协议的路由器上添加默认路由。

1:将静态路由导入到动态路由的时候都要导直连
2:往EIGRP导给五个值 ,往RIP导跳数不能超15,往OSPF导的时候两种类subnet