签到成功

知道了

CNDBA社区CNDBA社区

OSPF 路由

2016-12-05 14:47 1937 0 原创
作者: Anshen

目录

Ospf综合实验... 2

1       实验拓补... 2

2       Ip规划说明... 2

3       实验说明... 3

4       命令查看... 3

5       效果查看... 10

全网互通:... 10

死亡时间... 11

末节和汇总:... 17

路由表... 17

拓补表... 23

虚拟链路信息... 28http://www.cndba.cn/redhat/article/1605

6       实验总结... 28

 


 

Ospf综合实验

1.  实验拓补

http://www.cndba.cn/redhat/article/1605

2.  Ip规划说明

R1 s1/1:12.12.12.1/24

           Lo 1:172.16.13.9/24

           Lo 2:172.16.15.11/24

           Lo 3:172.16.17.13/24

           Lo 4:172.16.18.15/24
R2:    s1/0:12.12.12.2/24

           S1/1:23.23.23.1/24

           F0/1:192.168.1.1/24

R3:    s1/0:23.23.23.2/24

           S1/1:34.34.34.1/24

           F0/0:192.168.1.2/24

           F0/1:192.168.2.1/24

R4:    s1/0:34.34.34.2/24

           S1/1:45.45.45.1/24

           Lo 1:200.123.24.1/16

           Lo 2:200.124.26.1/16

           Lo 3:200.126.27.1/16

           Lo 4:200.127.28.1/16

R5:    s1/0:45.45.45.2/24

http://www.cndba.cn/redhat/article/1605

           S1/1:56.56.56.1/24

           F0/1:192.168.3.1/24

R6:    s1/0:56.56.56.2/24

           S1/1:69.69.69.1/24

           Lo 1:10.17.13.9/24

           Lo 2:10.17.15.11/24

           Lo 3:10.17.16.13/24

           Lo 4:10.17.18.15/24

R7:    f0/0:192.168.3.2/24

           Lo 1:110.117.113.9/24

           Lo 2:110.117.115.11/24

           Lo 3:110.117.116.13/24

           Lo 4:110.117.118.15/24

R8:    f0/0:192.168.2.2/24

R9:    69.69.69.2/24

Rip:   r1:s1/1 ,lo 1-4

           R2:s1/0

Area 1(NSSA):

           R2:s1/1, f0/1

           R3:s1/0, f0/0

Area 5(STUB):

           R3:f0/1

           R8:f0/0

Area 0(骨干):

           R3:s1/1

           R4:s1/0

Area 3(virtual-link):

           R4:s1/1, lo 1-4

           R5:s1/0

Rip:   r5:f0/1

           R6:f0/0, lo 1-4

Area 4(STUB):

           R5:s1/1

           R6:s1/0, s1/1, lo 1-4

           R9:s1/0

3.  实验说明

实验平台:gns3-v0.8.6

使用终端:SecureCRT-v6.5.0

截图工具:SnagIt-v8.0.1

Iosunzip-c7200-advsecurityk9-mz.124-11.T.bin

实验要求:综合使用ospf路由协议,达到网络要求

 

4.  命令查看

r1:

 

conf t

int s1/1

ip add 12.12.12.1 255.255.255.0

no sh

int lo 1

ip add 172.16.13.9 255.255.255.0

int lo 2

ip add 172.16.15.11 255.255.255.0

int lo 3

ip add 172.16.17.13 255.255.255.0

int lo 4

ip add 172.16.18.15 255.255.255.0

exit

 

router rip

ver 2

no au

net 12.12.12.0

net 172.16.13.0

net 172.16.15.0

net 172.16.17.0

net 172.16.18.0

exit

 

r2:

 

conf t

int s1/0

ip add 12.12.12.2 255.255.255.0

no sh

int s1/1

ip add 23.23.23.1 255.255.255.0

ip ospf dead-interval 12

ip ospf message-digest-key 1 md5 wangmu

no sh

int f0/1

ip add 192.168.1.1 255.255.255.0

ip ospf priority 255

ip ospf dead-interval 12

ip ospf message-digest-key 1 md5 wangmu

no sh

exit

 

router rip

ver 2

no au

net 12.12.12.0

red ospf 110 metric 15

exit

 

router ospf 110

router-id 2.2.2.2

net 23.23.23.0 0.0.0.255 a 1

net 192.168.1.0 0.0.0.255 a 1

red rip sub metric-type 1

summary-address 172.16.0.0 255.255.224.0

area 1 nssa no-summary

area 1 authentication message-digest

exit

 

 

r3:

 

conf t

int s1/0

ip add 23.23.23.2 255.255.255.0

ip ospf dead-interval 12

ip ospf message-digest-key 1 md5 wangmu

no sh

int s1/1

ip add 34.34.34.1 255.255.255.0

ip ospf dead-interval 12

no sh

int f0/0

ip add 192.168.1.2 255.255.255.0

ip ospf dead-interval 12

ip ospf message-digest-key 1 md5 wangmu

no sh

int f0/1

ip add 192.168.2.1 255.255.255.0

ip ospf network point-to-point

ip ospf dead-interval 12

no sh

exit

 

router ospf 110

router-id 3.3.3.3

net 23.23.23.0 0.0.0.255 a 1

net 192.168.1.0 0.0.0.255 a 1

net 34.34.34.0 0.0.0.255 a 0

net 192.168.2.0 0.0.0.255 a 5

area 1 nssa default-in no-summary

area 5 stub no-summary

area 1 authentication message-digest

exit

 

r4:

 

conf t

int s1/0

ip add 34.34.34.2 255.255.255.0

ip ospf dead-interval 12

no sh

int s1/1

ip add 45.45.45.1 255.255.255.0

ip ospf dead-interval 12

no sh

int lo 1

ip add 200.123.24.1 255.255.0.0

ip ospf dead-interval 12

int lo 2

ip add 200.124.26.1 255.255.0.0

ip ospf dead-interval 12

int lo 3

ip add 200.126.27.1 255.255.0.0

ip ospf dead-interval 12

int lo 4

ip add 200.127.28.1 255.255.0.0

ip ospf dead-interval 12

exit

 http://www.cndba.cn/redhat/article/1605

router ospf 110

router-id 4.4.4.4

net 34.34.34.0 0.0.0.255 a 0

net 45.45.45.0 0.0.0.255 a 3http://www.cndba.cn/redhat/article/1605

net 200.123.0.0 0.0.255.255 a 3

net 200.124.0.0 0.0.255.255 a 3

net 200.126.0.0 0.0.255.255 a 3

net 200.127.0.0 0.0.255.255 a 3

area 3 range 200.120.0.0 255.248.0.0

area 3 virtual-link 5.5.5.5 message-digest-key 1 md5 kina

area 3 virtual-link 5.5.5.5 authentication message-digest

exit

 

r5:

 

conf t

int s1/0

ip add 45.45.45.2 255.255.255.0

ip ospf dead-interval 12

no sh

int s1/1

ip add 56.56.56.1 255.255.255.0

ip ospf dead-interval 12

no sh

int f0/1

ip add 192.168.3.1 255.255.255.0

no sh

 

router ospf 110

router-id 5.5.5.5

net 45.45.45.0 0.0.0.255 a 3

net 56.56.56.0 0.0.0.255 a 4

red rip sub metric-t 1

summary-address 110.117.112.0 255.255.248.0

area 4 range 10.17.0.0 255.255.224.0

area 4 stub no-summary

area 3 virtual-link 4.4.4.4 message-digest-key 1 md5 kina

area 3 virtual-link 4.4.4.4 authentication message-digest

exithttp://www.cndba.cn/redhat/article/1605

 

router rip

http://www.cndba.cn/redhat/article/1605

ver 2

no au

net 192.168.3.0

red os 110 metric 15

exit

 

r6:

 

conf t

int s1/0

ip add 56.56.56.2 255.255.255.0

ip ospf dead-interval 12

no sh

int s1/1

ip add 69.69.69.1 255.255.255.0

ip ospf dead-interval 12

no sh

int lo 1

ip add 10.17.13.9 255.255.255.0

ip ospf dead-interval 12

int lo 2

ip add 10.17.15.11 255.255.255.0

ip ospf dead-interval 12

int lo 3

ip add 10.17.16.13 255.255.255.0

ip ospf dead-interval 12

int lo 4

ip add 10.17.18.15 255.255.255.0

ip ospf dead-interval 12

exit

 

router ospf 110

router-id 6.6.6.6

net 56.56.56.0 0.0.0.255 a 4

net 69.69.69.0 0.0.0.255 a 4

net 10.17.13.0 0.0.0.255 a 4

net 10.17.15.0 0.0.0.255 a 4

net 10.17.16.0 0.0.0.255 a 4

net 10.17.18.0 0.0.0.255 a 4

area 4 stub

exit

 

http://www.cndba.cn/redhat/article/1605

r7:

 

conf t

int f0/0

ip add 192.168.3.2 255.255.255.0

no sh

int lo 1

ip add 110.117.113.9 255.255.255.0

int lo 2

ip add 110.117.115.11 255.255.255.0

int lo 3

ip add 110.117.116.13 255.255.255.0

int lo 4

ip add 110.117.118.15 255.255.255.0

exit

 

router rip

ver 2

no au

net 192.168.3.0

net 110.117.113.0

net 110.117.115.0

net 110.117.116.0

net 110.117.168.0

exit

 

r8:

 

conf t

int f0/0

ip add 192.168.2.2 255.255.255.0

ip ospf network point-to-point

ip ospf dead-interval 12

no sh

exit

 

router ospf 110

router-id 8.8.8.8

net 192.168.2.0 0.0.0.255 a 5

area 5 stub

exit

 

r9:

 

conf t

int s1/0

ip add 69.69.69.2 255.255.255.0

http://www.cndba.cn/redhat/article/1605

ip ospf dead-interval 12

no sh

exit

 

router ospf 110

router-id 9.9.9.9

net 69.69.69.0 0.0.0.255 a 4

area 4 stub no-summary

exit

 

 

路由表

 

r1-9:

 

do sh ip ro

 

拓补表

 

r2-689

 

do sh ip ospf da

 

全网互通

 

r1:

 

do tracero 192.168.2.2

 

do tracero 69.69.69.2

 

do tracero 192.168.3.2

 

查看死亡时间

 

r2-689

 

do sh ip ospf int

 

查看drbdr

r2-3,8

 

do sh ip ospf nei

 

 

查看虚拟链路

r4-5

 

do sh ip ospf virt

 

5.  效果查看

全网互通:


  从r1到r7的通讯经过r2的s1/0         R3的f0/0         R4的s1/0         R5的s1/0         R7的f0/0成功完成 

  从r1到r9的通讯经过r2的s1/0         R3的f0/0         R4的s1/0         R5的s1/0         R6的s1/0         R9的s1/0成功完成 
  从r1到r8的通讯经过r2的s1/0         R3的f0/0         R8的f0/0成功完成 


死亡时间

R2

  R2的s1/1接口优先级为255.所以r2会被选为DR 


R3


  R3和r8是以太网接口,默认广播网络,现改为点到点网络,不会选举DR/BDR 


R4:

  此接口为虚拟链路在r4,r5上启用的ospf_VL0接口Hello包死亡时间不用改,建立邻居关系后用单播发送hello包 


R5:

R6:

R8:

R9:

 

DR/BDR的选举(area 5不选举)

R2


  邻居表看不到自身信息R2里看到r3是BDRR3里看到r2是DRR8里看不到r3的身份信息证明area 5不参与选举 


R3

R8

 

末节和汇总:

路由表

R1:

R2:

R3:

R4:

R5:

R6:

R7:

R8:

R9:

拓补表

R2:

文本框: 默认路由是完全末节区域将3类lsa汇总而来

  Area 7 内的7类lsa,学习外网路由,做了stub由5类转化而来,默认路由代表非邻居的异种路由 

  Area 1内的3类lsa,学习其他区域路由 
  Area1内的2类lsa,选举DR 
  Area 1内的1类lsa,通告本区域路由 


R3:


  Area 0内的4类lsa,通告ASBR 

  Area 0内的3类lsa,通告其它区域路由DNA是通过virtual-link学习过来的路由,不受LSA老化时间影响 
  Area 1内的3类lsa,通告其它区域路由 
  Area 1内的2类lsa,选举DR 
  Area 1内的1类lsa,通告本区域路由 
  Area 0内的1类lsa,通告本区域路由 



  5类lsa,通告外网路由 

  Area 5内的1类lsa,通告本区域路由 
  Area 5内的3类lsa,通告其它区域路由 
  Area 1内的7类lsa,通告外网路由 


R4:


  Area 3内的3类lsa,通告其它区域路由 

  Area 3内的1类lsa,通告本区域路由 
  Area 0内的4类lsa,通告ASBR 
  Area 0内的3类lsa,通告其它区域路由 
  Area 0内的1类lsa,通告本区域路由 



  5类lsa,通告外网路由 

  Area 3内的4类lsa,通告ASBR 


R5:

R6:http://www.cndba.cn/redhat/article/1605

R8:

R9:

 

虚拟链路信息

R4

R5

 

6.  实验总结

ospf广播网络里将所有接口的ospf优先级改为0也不能阻止选举DR,而且由于选不出DR,邻居信息一直是two-way状态,无法收敛。

不能在设置virtual link的区域配置stub/nssa区域,互相冲突。(tunnel可以)

Virtual link的两个非骨干区域直接可以通讯,tunnel的两个非骨干区域要通过骨干区域转发。

重发布后的路由器会学习到外网信息在路由条目前都会标示E1E2两个信息,默认的为E2,凡是标示E2的路由条目cost值都是20,准确的说名字应该是seed cost (种子值),因为不同的路由协议衡量开销是不一样的,当他们都发布到ospf时,ospf会给他们分一个cost定值20,那么其他路由器上看到的开销信息都是20,在默认的E2下面我们是没办法看到该路径的真实开销的,我们可以在重发布时加上metric-type 1,可改为E1

做认证,既要在接口里做,也要在协议里做。


版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
Anshen

Anshen

关注

成功不是将来才有的,而是从决定去做的那一刻起,持续累积而成。

  • 69
    原创
  • 0
    翻译
  • 5
    转载
  • 8
    评论
  • 访问:291054次
  • 积分:326
  • 等级:中级会员
  • 排名:第13名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ