Redistribution Between EIGRP and OSPF

简介:

 

 

1按拓扑配置IP地址

2启用EIGRP

R1(config)#router eigrp 1

R1(config-router)#no auto-summary 

R1(config-router)#network 172.16.0.0

R1(config-router)#network 192.168.48.0

R1(config-router)#network 192.168.49.0

R1(config-router)#network 192.168.50.0

R1(config-router)#network 192.168.51.0

R1(config-router)#network 192.168.70.0


R2(config)#router eigrp 1

R2(config-router)#no auto-summary 

R2(config-router)#network 172.16.0.0


3查看eigrp邻居


R1(config-router)#do show ip eig nei

IP-EIGRP neighbors for process 1

H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

0   172.16.12.2             Se1/0             11 00:00:36  108   648  0  3


4查看eigrp拓扑

R1#SHOW IP ROUTE eigrp 

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:03:03, Serial1/0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:03:03, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:03:03, Serial1/0


R2#show ip route eigrp 

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.1.0 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.51.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.50.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.49.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.70.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.48.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0


5把s1/1设置为被动接口

R2(config)#router eigrp 1

R2(config-router)#no passive-interface s1/1


6在s1/0下汇总r1路由

R1(config)#int s1/0

R1(config-if)#ip summary-address eigrp 192.168.48.0 255.255.254.0


R1(config-if)#do show ip route eig

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:11:01, Serial1/0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:11:01, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:11:01, Serial1/0

D    192.168.48.0/23 is a summary, 00:00:11, Null0


在r2,r3上配置ospf


R2#  show ip route ospf

     192.168.30.0/32 is subnetted, 1 subnets

O       192.168.30.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.8.0/32 is subnetted, 1 subnets

O IA    192.168.8.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.25.0/32 is subnetted, 1 subnets

O       192.168.25.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.9.0/32 is subnetted, 1 subnets

O IA    192.168.9.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.10.0/32 is subnetted, 1 subnets

O IA    192.168.10.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.40.0/32 is subnetted, 1 subnets

O       192.168.40.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks

O       172.16.3.1/32 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.11.0/32 is subnetted, 1 subnets

O IA    192.168.11.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.20.0/32 is subnetted, 1 subnets

O       192.168.20.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.35.0/32 is subnetted, 1 subnets

O       192.168.35.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1


r2 ,r3所有环回接口配置为点到点

R2(config)#int lo100

R2(config-if)#ip ospf network point-to-point 

R2#show ip route ospf

O    192.168.30.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.8.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O    192.168.25.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.9.0/24 [110/65] via 172.16.23.3, 00:00:14, Serial1/1

O IA 192.168.10.0/24 [110/65] via 172.16.23.3, 00:00:14, Serial1/1

O    192.168.40.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

     172.16.0.0/24 is subnetted, 6 subnets

O       172.16.3.0 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.11.0/24 [110/65] via 172.16.23.3, 00:00:04, Serial1/1

O    192.168.20.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O    192.168.35.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1


汇总area 20

R3(config)#router ospf 1

R3(config-router)#area 20 range 192.168.8.0 255.255.252.0


R2# show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


O    192.168.30.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

O    192.168.25.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

O    192.168.40.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

     172.16.0.0/24 is subnetted, 6 subnets

C       172.16.23.0 is directly connected, Serial1/1

C       172.16.12.0 is directly connected, Serial1/0

D       172.16.1.0 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

C       172.16.2.0 is directly connected, Loopback0

O       172.16.3.0 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

C       172.16.100.0 is directly connected, Loopback100

O    192.168.20.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

D    192.168.51.0/24 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

D    192.168.50.0/24 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

O    192.168.35.0/24 [110/65] via 172.16.23.3, 00:02:27, Serial1/1

D    192.168.70.0/24 [90/2297856] via 172.16.12.1, 00:27:05, Serial1/0

O IA 192.168.8.0/22 [110/65] via 172.16.23.3, 00:00:16, Serial1/1

D    192.168.48.0/23 [90/2297856] via 172.16.12.1, 00:16:15, Serial1/0


eigrp发布往ospf中

R2(config)#router ospf 1

R2(config-router)#redistribute eigrp 1 subnets 

ospf发布往eigrp中

R2(config)#router eigrp 1

R2(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500

R2(config-router)#default-metric 10000 100 255 1 1500

R2(config-router)#redistribute ospf 1

R1#show ip 

*Apr  9 15:34:36.939: %SYS-5-CONFIG_I: Configured from console by console

R1#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


D EX 192.168.30.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D EX 192.168.25.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D EX 192.168.40.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

     172.16.0.0/24 is subnetted, 6 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:32:55, Serial1/0

C       172.16.12.0 is directly connected, Serial1/0

C       172.16.1.0 is directly connected, Loopback0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:32:55, Serial1/0

D EX    172.16.3.0 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:32:55, Serial1/0

D EX 192.168.20.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

C    192.168.51.0/24 is directly connected, Loopback51

C    192.168.50.0/24 is directly connected, Loopback50

D EX 192.168.35.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

C    192.168.49.0/24 is directly connected, Loopback49

C    192.168.70.0/24 is directly connected, Loopback70

C    192.168.48.0/24 is directly connected, Loopback48

D EX 192.168.8.0/22 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D    192.168.48.0/23 is a summary, 00:22:06, Null0


R1#tclsh

+>(tcl)#foreach address {

+>(tcl)#172.16.1.1

+>(tcl)#192.168.48.1

+>(tcl)#192.168.49.1

+>(tcl)#192.168.50.1

+>(tcl)#192.168.51.1

+>(tcl)#192.168.70.1

+>(tcl)#172.16.12.1

+>(tcl)#172.16.2.1 

+>(tcl)#172.16.100.1

+>(tcl)#172.16.12.2 

+>(tcl)#172.16.23.2

+>(tcl)#172.16.3.1 

+>(tcl)#192.168.20.1

+>(tcl)#192.168.25.1

+>(tcl)#192.168.30.1

+>(tcl)#192.168.35.1

+>(tcl)#192.168.40.1

+>(tcl)#192.168.8.1

+>(tcl)#192.168.9.1

+>(tcl)#192.168.10.1

+>(tcl)#192.168.11.1

+>(tcl)#172.16.23.3 

+>(tcl)#} { ping $address }


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.48.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.49.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.51.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.70.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.12.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/23/36 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/30/108 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.100.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/44/112 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.12.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/30/72 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.23.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/49/92 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/77/144 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/92 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.25.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/27/64 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/26/64 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.35.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/36/60 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/29/56 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/96 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.9.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/78/132 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/37/104 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/72 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.23.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/92 ms




















本文转自zhang25yun51CTO博客,原文链接:http://blog.51cto.com/1585654/1144119 ,如需转载请自行联系原作者


相关文章
|
15天前
|
人工智能 JSON 供应链
畅用7个月无影 JVS Claw |手把手教你把JVS改造成「科研与产业地理情报可视化大师」
LucianaiB分享零成本畅用JVS Claw教程(学生认证享7个月使用权),并开源GeoMind项目——将JVS改造为科研与产业地理情报可视化AI助手,支持飞书文档解析、地理编码与腾讯地图可视化,助力产业关系图谱构建。
23512 12
畅用7个月无影 JVS Claw |手把手教你把JVS改造成「科研与产业地理情报可视化大师」
|
4天前
|
人工智能 BI 持续交付
Claude Code 深度适配 DeepSeek V4-Pro 实测:全场景通关与真实体验报告
在 AI 编程工具日趋主流的今天,Claude Code 凭借强大的任务执行、工具调用与工程化能力,成为开发者与自动化运维的核心效率工具。但随着原生模型账号稳定性问题频发,寻找一套兼容、稳定、能力在线的替代方案变得尤为重要。DeepSeek V4-Pro 作为新一代高性能大模型,提供了完整兼容 Claude 协议的 API 接口,只需简单配置即可无缝驱动 Claude Code,且在任务执行、工具调用、复杂流程处理上表现极为稳定。
1263 3
|
9天前
|
人工智能 缓存 Shell
Claude Code 全攻略:命令大全 + 实战工作流(完整版)
Claude Code 是一款运行在终端环境下的 AI 编码助手,能够直接在项目目录中理解代码结构、编辑文件、执行命令、执行开发计划,并支持持久化记忆、上下文压缩、后台任务、多模型切换等专业能力。对于日常开发、项目维护、快速重构、代码审查等场景,它可以大幅减少手动操作、提升编码效率。本文从常用命令、界面模式、核心指令、记忆机制、图片处理、进阶工作流等维度完整说明,帮助开发者快速上手并稳定使用。
2320 4
|
3天前
|
Shell API 开发工具
Claude Code 快速上手指南(新手友好版)
AI编程工具卷疯啦!Claude Code凭借任务驱动+终端原生的特性,成了开发者的效率搭子。本文从安装、登录、切换国产模型到常用命令,手把手带新手快速上手,全程避坑,30分钟独立用起来。
910 7
|
19天前
|
人工智能 缓存 BI
Claude Code + DeepSeek V4-Pro 真实评测:除了贵,没别的毛病
JeecgBoot AI专题研究 把 Claude Code 接入 DeepSeek V4Pro,跑完 Skills —— OA 审批、大屏、报表、部署 5 大实战场景后的真实体验 ![](https://oscimg.oschina.net/oscnet/up608d34aeb6bafc47f
5906 22
Claude Code + DeepSeek V4-Pro 真实评测:除了贵,没别的毛病
|
20天前
|
人工智能 JSON BI
DeepSeek V4 来了!超越 Claude Sonnet 4.5,赶紧对接 Claude Code 体验一把
JeecgBoot AI专题研究 把 Claude Code 接入 DeepSeek V4Pro 的真实体验与避坑记录 本文记录我将 Claude Code 对接 DeepSeek 最新模型(V4Pro)后的真实体验,测试了 Skills 自动化查询和积木报表 AI 建表两个场景——有惊喜,也踩
7077 16
|
2天前
|
人工智能 JSON BI
DeepSeek V4-Pro 接入 Claude Code 完全实战:体验、测试与关键避坑指南
Claude Code 作为当前主流的 AI 编程辅助工具,凭借强大的代码理解、工程执行与自动化能力深受开发者喜爱,但原生模型的使用成本相对较高。为了在保持能力的同时进一步降低开销,不少开发者开始寻找兼容度高、价格更友好的替代模型。DeepSeek V4 系列的发布带来了新的选择,该系列包含 V4-Pro 与 V4-Flash 两款模型,并提供了与 Anthropic 完全兼容的 API 接口,理论上只需简单修改配置,即可让 Claude Code 无缝切换为 DeepSeek 引擎。
751 0