您的位置:首页 > 其它

OSPF的高级配置扩展

2010-03-04 21:31 309 查看
实验目的:
掌握OSPF的高级配置 (路由优化、地址汇总、虚链路和重分发)
实验环境拓扑图及要求:



要求:
1、 如图所示,根据要求配置动态路由协议,配置路由重分发和虚链路,实现全网互通。
2、 查看RouterA路由表,路由标志E2和IA分别表示什么含义
3、 优化路由:配置区域3完全末梢区域
4、 优化路由:配置区域2 NSSA,比较路由器D路由表的变化,能否再学习到路由器E的路由?
5、 在路由器D上ping 100.16.1.1,能否ping通,若不通,该如何解决?
6、 优化路由:在路由器A、B、D上进行路由汇总,在路由器A上查看路由表,比较路由表的变化。
实验步骤:【必写】
分类写出你的实验进行中的步骤,可用文字或图片加水印标记
配置文档:
RA:
en
conf t
host RA
no ip domain-lookup
int loop 0 //配置loop的IP地址
ip add 10.0.0.1 255.255.0.0
exit
int loop 1
ip add 200.16.1.1 255.255.255.0
exit
int loop 2
ip add 200.16.2.1 255.255.255.0
exit
int loop 3
ip add 200.16.3.1 255.255.255.0
exit
int f0/0 //配置端口IP地址
ip add 192.168.1.2 255.255.255.0
no sh
exit
router ospf 250 //启动ospf协议
network 10.0.0.0 0.0.255.255 area 0 //宣告相应的网段并加入相应的区域
network 192.168.1.0 0.0.0.255 area 0
network 200.16.0.0 0.0.3.255 area 3
area 3 range 200.16.0.0 255.255.252.0 //配置汇总地址
ip route 200.16.0.0 255.255.252.0 Null0 //配置一条黑洞路由,将不必要的路由信息丢弃
end
------------------------------------------------------
RB:
en
conf t
host RB
no ip domain-lookup
int loop 0
ip add 20.0.0.2 255.255.0.0
exit
int f0/0
ip add 192.168.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.1.1 255.255.255.0
no sh
exit
int f2/0
ip add 200.1.1.1 255.255.255.0
no sh
exit
router rip //启用RIP协议
redistribute ospf 250 metric 10 //配置协议重分发并设置跳数为10
version 2 //配置rip为版本2
no auto-summary //关闭自动汇总
network 200.1.1.0 //宣告网段
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets //配置协议重分发并设置管理距离为200,连同子网一起宣告
network 20.0.0.0 0.0.255.255 area 1
network 192.168.0.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 0
area 1 virtual-link 30.0.0.3 //在区域1上配置一条虚链路并指向对应的端口
end
------------------------------------------------------------
RC:
en
conf t
host RC
no ip domain-lookup
int loop 0
ip add 30.0.0.3 255.255.0.0
exit
int f0/0
ip add 172.16.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.0.2 255.255.255.0
no sh
exit
router ospf 250
network 192.168.0.0 0.0.0.255 area 1
network 30.0.0.0 0.0.255.255 area 2
network 172.16.0.0 0.0.0.255 area 2
area 1 virtual-link 20.0.0.2 //在区域1上配置一条虚链路并指向对应的端口
end
-------------------------------------------------------------------
RD:
en
conf t
host RD
no ip domain-lookup
int loop 0
ip add 40.0.0.4 255.255.0.0
exit
int loop 1
ip add 172.16.1.1 255.255.255.0
exit
int loop 2
ip add 172.16.2.1 255.255.255.0
exit
int loop 3
ip add 172.16.3.1 255.255.255.0
exit
int f0/0
ip add 172.16.0.2 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 172.16.1.0
network 172.16.2.0
network 172.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
network 172.16.0.0 0.0.0.255 area 2
network 40.0.0.0 0.0.255.255 area 2
end
----------------------------------------------------------------------
RE:
en
conf t
host RE
no ip domain-lookup
int loop 1
ip add 100.16.1.1 255.255.255.0
exit
int loop 2
ip add 100.16.2.1 255.255.255.0
exit
int loop 3
ip add 100.16.3.1 255.255.255.0
exit
int f0/0
ip add 200.1.1.2 255.255.255.0
no sh
exit
router rip
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
end
-------------------------------------------------------------------
测试截图:













再按照题目3,4的要求做。。。。
RA:
en
conf t
host RA
no ip domain-lookup
int loop 0
ip add 10.0.0.1 255.255.0.0
exit
int loop 1
ip add 200.16.1.1 255.255.255.0
exit
int loop 2
ip add 200.16.2.1 255.255.255.0
exit
int loop 3
ip add 200.16.3.1 255.255.255.0
exit
int f0/0
ip add 192.168.1.2 255.255.255.0
no sh
exit
router ospf 250
network 10.0.0.0 0.0.255.255 area 0
network 192.168.1.0 0.0.0.255 area 0
network 200.16.0.0 0.0.3.255 area 3
area 3 range 200.16.0.0 255.255.252.0
area 3 stub no-summary //配置区域三为完全末梢区域
ip route 200.16.0.0 255.255.252.0 Null0
end
------------------------------------------------------
RB:
en
conf t
host RB
no ip domain-lookup
int loop 0
ip add 20.0.0.2 255.255.0.0
exit
int f0/0
ip add 192.168.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.1.1 255.255.255.0
no sh
exit
int f2/0
ip add 200.1.1.1 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
network 20.0.0.0 0.0.255.255 area 1
network 192.168.0.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 0
summary-address 100.16.0.0 255.255.252.0 //外部汇总
area 1 virtual-link 30.0.0.3
end
------------------------------------------------------------
RC:
en
conf t
host RC
no ip domain-lookup
int loop 0
ip add 30.0.0.3 255.255.0.0
exit
int f0/0
ip add 172.16.0.1 255.255.255.0
no sh
exit
int f1/0
ip add 192.168.0.2 255.255.255.0
no sh
exit
router ospf 250
network 192.168.0.0 0.0.0.255 area 1
network 30.0.0.0 0.0.255.255 area 2
network 172.16.0.0 0.0.0.255 area 2
area 1 virtual-link 20.0.0.2
area 2 nssa no-summary //配置区域2为完全非纯末梢区域
end
-------------------------------------------------------------------
RD:
en
conf t
host RD
no ip domain-lookup
int loop 0
ip add 40.0.0.4 255.255.0.0
exit
int loop 1
ip add 172.16.1.1 255.255.255.0
exit
int loop 2
ip add 172.16.2.1 255.255.255.0
exit
int loop 3
ip add 172.16.3.1 255.255.255.0
exit
int f0/0
ip add 172.16.0.2 255.255.255.0
no sh
exit
router rip
redistribute ospf 250 metric 10
version 2
no auto-summary
network 172.16.1.0
network 172.16.2.0
network 172.16.3.0
exit
router ospf 250
redistribute rip metric 200 subnets
summary-address 172.16.0.0 255.255.252.0 //外部汇总
network 172.16.0.0 0.0.0.255 area 2
network 40.0.0.0 0.0.255.255 area 2
area 2 nssa //配置区域2为非纯末梢区域
end
----------------------------------------------------------------------
RE:
en
conf t
host RE
no ip domain-lookup
int loop 1
ip add 100.16.1.1 255.255.255.0
exit
int loop 2
ip add 100.16.2.1 255.255.255.0
exit
int loop 3
ip add 100.16.3.1 255.255.255.0
exit
int f0/0
ip add 200.1.1.2 255.255.255.0
no sh
exit
router rip
version 2
no auto-summary
network 200.1.1.0
network 100.16.1.0
network 100.16.2.0
network 100.16.3.0
end
-------------------------------------------------------------------
测试截图:


















7、 在路由器D上ping 100.16.1.1,能否ping通,若不通,该如何解决?
Ping不通。。。。由router E可以看出来,路由器E已经学到了到172.16.0.0的路由。。。但是在D上却没有学到。。。。我想在D上配置几条到E的静态路由就能够实现了。。。试试先!?
在路由器D上加上这几条命令。。。该方法可行,但是在大型网络中,配置静态路由太繁杂了。
其实只需在RC上将非纯末梢区域改成完全非纯末梢区域就可以了。
RD:
en
conf t
ip route 192.168.0.0 255.255.255.0 172.16.0.1 //配置静态路由
ip route 200.1.1.0 255.255.255.0 192.168.0.1
ip route 100.16.1.0 255.255.255.0 200.1.1.2
ip route 100.16.2.0 255.255.255.0 200.1.1.2
ip route 100.16.3.0 255.255.255.0 200.1.1.2
end
测试截图:




内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: