Chinaunix首页 | 论坛 | 博客
  • 博客访问: 852976
  • 博文数量: 275
  • 博客积分: 3904
  • 博客等级: 中校
  • 技术积分: 4605
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:10
文章分类

全部博文(275)

文章存档

2014年(9)

2013年(124)

2012年(142)

分类:

2012-08-06 13:52:24

实验~~配置Ospf与Eigrp的再发布
 
环 境:三台路由器串口相连,接口配置如图
要 求:1.配置EIGRP和关闭自动路由汇总
2.在R1上配置LOOP口的EIGRP 手工路由汇总
3.在R2和R3配置Ospf 接口验证
4.在ASBR(R2)上做eigrp 和ospf双向再发布
5.在R3上将所有loopback 口再发布到ospf中,但loopback2不能被R2,R3 学到,不允许使用network命令
6.练习本课所有show命令
 
 
步 骤一:配置三个路由器接口使其连通。
 
R1的配置
R1()# interface Loopback0
R1(config-if)#ip address 172.168.1.1 255.255.255.0
R1(config)# interface Loopback1
R1(config-if)#ip address 172.168.2.1 255.255.255.0
R1(config)#interface Loopback2
R1(config-if)#ip address 172.168.3.1 255.255.255.0
R1(config)# interface s0
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
 
R2的配置
R2(config)#interface s0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface s1
R2(config-if)# ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shutdown
 
R3的配置
R3(config)# interface Loopback0
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config)# interface Loopback1
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config)#interface Loopback2
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config)# interface s1
R3(config-if)# ip address 20.1.1.2 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
 
 
步 骤二: 配置Eigrp ,Ospf
 
R1 的配置
R1(config)# router eigrp 100 à启用EIGRP
R1(config-router)# network 10.1.1.0 0.0.0.255 à发布相应接口
R1(config-router)#network 172.168.1.0 0.0.0.255
R1(config-router)#network 172.168.2.0 0.0.0.255
R1(config-router)#network 172.168.3.0 0.0.0.255
R1(config-router)# no auto-summary à关闭自动汇总
 
R2 的配置
R2(config)# router eigrp 100
R2(config-router)# network 10.1.1.0 0.0.0.255
R2(config-router)# no auto-summary
R2(config)# router ospf 10 àR2 上即启用EIGRP并且启用OSPF
R2(config-router)# network 20.1.1.0 0.0.0.255 area 0
 
R3 的配置
R3(config)# router ospf 10
R3(config-router)# network 20.1.1.0 0.0.0.255 area 0
 
 
步 骤三:配置EIGRP手工路由汇总和Ospf接口验证
 
R1 的配置
R1(config)# interface s0
R1(config-if)# ip summary-address eigrp 100 172.168.0.0 255.255.252.0 à手工汇总
 
R2 的配置
R2(config)# interface s0
R2(config-if)# ip ospf authentication message-digest à启用接口验证
R2(config-if)# ip ospf message-digest-key 1 md5 cisco
 
R3 的配置
R3(config)# interface s1
R3(config-if)# ip ospf authentication message-digest à启用接口认证
R3(config-if)# ip ospf message-digest-key 1 md5 cisco
 
 
步 骤四:在R2,R3上做路由再发布并控制loopback2不能被R1,R2学到
 
R2 的配置
R2(config)# router eigrp 100
R2(config-router)# redistribute ospf 10 metric 10000 100 255 1 1500àospf重分发进eigrp
R2(config)# router ospf 10
R2(config-router)# redistribute eigrp 100 subnets àeigrp路由重分发到ospf
 
R3 的配置
R3(config)# access-list 1 permit 192.168.1.0 0.0.0.255 à定义分发条件列表
R3(config)# access-list 1 permit 192.168.2.0 0.0.0.255
R3(config)# access-list 2 permit 192.168.3.0 0.0.0.255
R3(config)# route-map o-e permit 10   à做映射列表允许相应条目
R3 (config-route-map)# match ip address 1 à将列表加载
R3(config)# route-map o-e deny 20 à拒绝相应条目的映射列表
R3 (config-route-map)# match ip address 2 à将列表加载
R3(config)# route-map o-e permit 25 à最后允许其它所有
R3(config)# router ospf 10
R3(config-router)# redistribute connected subnets route-map o-e
 
 
步 骤五:查看路由表
 
#sh ip route




阅读(489) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~