45IT.COM- 电脑学习从此开始!
DIY硬件教程攒机经验装机配置
设计Photoshop网页设计特效
系统注册表DOS系统命令其它
存储主板显卡外设键鼠内存
维修显卡CPU内存打印机
WinXPVistaWin7unix/linux
CPU光驱电源/散热显示器其它
修技主板硬盘键鼠显示器光驱
办公ExcelWordPowerPointWPS
编程数据库CSS脚本PHP
网络局域网QQ服务器
软件网络系统图像安全
页面导航: 首页 > 电脑学院 > 局域网技术 >

ospf 区域类型详细

电脑软硬件应用网 45IT.COM 时间:2014-07-05 11:17 作者:佚名

  我们知道ospf中有几种区域类型:stub ,totally stub ,nssa ,totally nssa.

  下面分别讲一下各种区域类型对路由的改变,实验图如下:


  按如图配置好相关接口和参数,配置好后,查看R6路由如下:

  O IA 192.168.123.0/24 [110/20] via 192.168.36.3, 00:00:04, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

  O IA 192.168.14.0/24 [110/30] via 192.168.36.3, 00:00:04, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O 3.3.3.3 [110/11] via 192.168.36.3, 00:00:04, FastEthernet0/0

  O IA 192.168.25.0/24 [110/30] via 192.168.36.3, 00:00:05, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  O IA 4.4.4.4 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

  5.0.0.0/32 is subnetted, 1 subnets

  O IA 5.5.5.5 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

  6.0.0.0/32 is subnetted, 1 subnets

  C 6.6.6.6 is directly connected, Loopback0

  172.16.0.0/24 is subnetted, 4 subnets

  O E2 172.16.0.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 172.16.1.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 172.16.2.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 172.16.3.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  C 192.168.36.0/24 is directly connected, FastEthernet0/0

  O E2 192.168.0.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 192.168.1.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 192.168.2.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

  O E2 192.168.3.0/24 [110/20] via 192.168.36.3, 00:00:06, FastEthernet0/0

  配置R3及R6 area 3 为stub区域:

  配置命令为:

  R3(config-router)#area 3 stub

  R6(config-router)#area 3 stub

  修改完成后,R6路由如下:

  O IA 192.168.123.0/24 [110/20] via 192.168.36.3, 00:00:04, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

  O IA 192.168.14.0/24 [110/30] via 192.168.36.3, 00:00:04, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O 3.3.3.3 [110/11] via 192.168.36.3, 00:00:04, FastEthernet0/0

  O IA 192.168.25.0/24 [110/30] via 192.168.36.3, 00:00:05, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  O IA 4.4.4.4 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

  5.0.0.0/32 is subnetted, 1 subnets

  O IA 5.5.5.5 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

  6.0.0.0/32 is subnetted, 1 subnets

  C 6.6.6.6 is directly connected, Loopback0

  C 192.168.36.0/24 is directly connected, FastEthernet0/0

  O*IA 0.0.0.0/0 [110/11] via 192.168.36.3, 00:00:07, FastEthernet0/0

  由此可知stub区域不接收任何外部路由,用一条默认路由替代所有外部路由。

  先在R4上查看路由表:

  O IA 192.168.123.0/24 [110/20] via 192.168.14.1, 00:00:51, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/11] via 192.168.14.1, 00:00:51, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/21] via 192.168.14.1, 00:00:51, FastEthernet0/0

  C 192.168.14.0/24 is directly connected, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O IA 3.3.3.3 [110/21] via 192.168.14.1, 00:00:51, FastEthernet0/0

  O IA 192.168.25.0/24 [110/30] via 192.168.14.1, 00:00:52, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  C 4.4.4.4 is directly connected, Loopback0

  5.0.0.0/32 is subnetted, 1 subnets

  O IA 5.5.5.5 [110/31] via 192.168.14.1, 00:00:52, FastEthernet0/0

  6.0.0.0/32 is subnetted, 1 subnets

  O IA 6.6.6.6 [110/31] via 192.168.14.1, 00:00:52, FastEthernet0/0

  172.16.0.0/24 is subnetted, 4 subnets

  O E2 172.16.0.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

  O E2 172.16.1.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

  O E2 172.16.2.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

  O E2 172.16.3.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

  O IA 192.168.36.0/24 [110/30] via 192.168.14.1, 00:00:52, FastEthernet0/0

  C 192.168.0.0/24 is directly connected, Loopback1

  C 192.168.1.0/24 is directly connected, Loopback1

  C 192.168.2.0/24 is directly connected, Loopback1

  C 192.168.3.0/24 is directly connected, Loopback1

  在R4和R1上运行以下命令:

  R2(config-router)#area 2 nssa no-summary

  R4(config-router)#area 2 nssa no-summary

  再次查看路由表:

  C 192.168.14.0/24 is directly connected, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  C 4.4.4.4 is directly connected, Loopback0

  C 192.168.0.0/24 is directly connected, Loopback1

  C 192.168.1.0/24 is directly connected, Loopback1

  C 192.168.2.0/24 is directly connected, Loopback1

  C 192.168.3.0/24 is directly connected, Loopback1

  O*IA 0.0.0.0/0 [110/11] via 192.168.14.1, 00:00:19, FastEthernet0/0
  由此可知nssa totally 区域去掉所区域间和外部路由

 

 先来查看一下R5路由表:

  O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:35:59, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:35:59, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:35:59, FastEthernet0/0

  O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:35:59, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:35:59, FastEthernet0/0

  C 192.168.25.0/24 is directly connected, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:02:07, FastEthernet0/0

  5.0.0.0/32 is subnetted, 1 subnets

  C 5.5.5.5 is directly connected, Loopback0

  6.0.0.0/32 is subnetted, 1 subnets

  O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:12:47, FastEthernet0/0

  172.16.0.0/24 is subnetted, 4 subnets

  C 172.16.0.0 is directly connected, Loopback1

  C 172.16.1.0 is directly connected, Loopback1

  C 172.16.2.0 is directly connected, Loopback1

  C 172.16.3.0 is directly connected, Loopback1

  O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:12:47, FastEthernet0/0

  O E2 192.168.0.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

  O E2 192.168.1.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

  O E2 192.168.2.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

  O E2 192.168.3.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

  在R2和R5上运行如下命令:

  R2(config-router)#area 1 nssa

  R5(config-router)#area 1 nssa

  O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:00:02, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:00:02, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:00:02, FastEthernet0/0

  O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:00:02, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:00:02, FastEthernet0/0

  C 192.168.25.0/24 is directly connected, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:00:03, FastEthernet0/0

  5.0.0.0/32 is subnetted, 1 subnets

  C 5.5.5.5 is directly connected, Loopback0

  6.0.0.0/32 is subnetted, 1 subnets

  O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:00:03, FastEthernet0/0

  172.16.0.0/24 is subnetted, 4 subnets

  C 172.16.0.0 is directly connected, Loopback1

  C 172.16.1.0 is directly connected, Loopback1

  C 172.16.2.0 is directly connected, Loopback1

  C 172.16.3.0 is directly connected, Loopback1

  O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:00:03, FastEthernet0/0

  这时发现没有默认路由,需运行以下命令:

  R2(config-router)#area 1 nssa default-information-originate

  这时R5路由如下:

  O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:01:57, FastEthernet0/0

  1.0.0.0/32 is subnetted, 1 subnets

  O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:01:57, FastEthernet0/0

  2.0.0.0/32 is subnetted, 1 subnets

  O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:01:57, FastEthernet0/0

  O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:01:57, FastEthernet0/0

  3.0.0.0/32 is subnetted, 1 subnets

  O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:01:57, FastEthernet0/0

  C 192.168.25.0/24 is directly connected, FastEthernet0/0

  4.0.0.0/32 is subnetted, 1 subnets

  O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:01:59, FastEthernet0/0

  5.0.0.0/32 is subnetted, 1 subnets

  C 5.5.5.5 is directly connected, Loopback0

  6.0.0.0/32 is subnetted, 1 subnets

  O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:01:59, FastEthernet0/0

  172.16.0.0/24 is subnetted, 4 subnets

  C 172.16.0.0 is directly connected, Loopback1

  C 172.16.1.0 is directly connected, Loopback1

  C 172.16.2.0 is directly connected, Loopback1

  C 172.16.3.0 is directly connected, Loopback1

  O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:01:59, FastEthernet0/0

  O*N2 0.0.0.0/0 [110/1] via 192.168.25.2, 00:00:06, FastEthernet0/0

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
无法在这个位置找到: baidushare.htm
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码:点击我更换图片
推荐知识