路由重分布
边界路由器的配置
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
所有动态路由导向静态路的时候。在静态路由协议的路由器上配置默认路由。