ospf综合实验

1.配置所有设备:

        第一步:配置R3/4/5/6/7公网地址,其次写缺省

        第二步:R3/5/6/7起MGRE

        第三步:其他底层均配置合法IP

        第四步:起ospf协议,在对应区域进行宣告

        第五步:查看邻居表(area0 tunnel 默认接口网络类型为P2P,需修改为broadcast)

        第六步:查看路由表(area4为远离骨干的非骨干,在R9将进程2—area4重发布进进程1,

                      *先不要把R9进程1重发布进ospf进程2里面;R12后面的rip重发布到ospf进程1,

                       因rip后面无跑rip的其他设备,故只将rip重发布进 ospf进程即可)

         第七步:减少LSA更新                                                                                                                                      ①  汇总——减少骨干区域的LSA数量
                              在R3/R6/R7 abr上进行区域汇总 
                              在R9/R12 ASBR上进行域外汇总
                         ②  特殊区域——减少非骨干区域的LSA数量
                              在area1调成完全stub区域
                              在area2/3调成完全nssa区域
          第八步:将R9调成nssa区域生成的缺省路由重发布进ospf进程2里面

          第九步:将R7/8 R8/9 R9/10 R6/R11 R11/R12接口网络类型改为P2P(加快收敛)

          第十步:R3/5/6/7做nat

[R1]dis curr
[V200R003C00]
#
 sysname R1
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 172.16.32.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.33.1 255.255.255.0 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 172.16.32.0 0.0.0.255 
  network 172.16.33.1 0.0.0.0 
  stub 
#
return
[R2]dis curr
[V200R003C00]
#
 sysname R2
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 172.16.32.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.34.1 255.255.255.0 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.1 
  network 172.16.32.0 0.0.0.255 
  network 172.16.34.1 0.0.0.0 
  stub 
#
return
[R3]dis curr
[V200R003C00]
#
 sysname R3
#
interface GigabitEthernet0/0/0
 ip address 34.1.1.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 172.16.32.3 255.255.255.0 
 ospf enable 1 area 0.0.0.1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.35.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 34.1.1.1
 ospf network-type broadcast
 nhrp entry multicast dynamic
 nhrp network-id 100
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
 area 0.0.0.1 
  abr-summary 172.16.32.0 255.255.252.0
  network 172.16.32.0 0.0.0.0 
  network 172.16.35.1 0.0.0.0 
  stub no-summary
#
ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
#
return
[R4]dis curr
#
sysname R4
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface GigabitEthernet0/0/0
 ip address 34.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 46.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/3
 ip address 47.1.1.2 255.255.255.0
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
[R5]dis curr
[V200R003C00]
#
 sysname R5
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.1.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.2 255.255.255.0 
 tunnel-protocol gre p2mp
 source 45.1.1.1
 ospf network-type broadcast
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 172.16.0.1 34.1.1.1 register
#
ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.1.1 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 45.1.1.2
#
return
[R6]dis curr
[V200R003C00]
#
 sysname R6
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0
 ip address 172.16.64.1 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
 ip address 46.1.1.1 255.255.255.0 
 nat outbound 2000
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.2.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source 46.1.1.1
 ospf network-type broadcast
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 172.16.0.1 34.1.1.1 register
#
ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.2.1 0.0.0.0 
 area 0.0.0.1 
 area 0.0.0.2 
  abr-summary 172.16.64.0 255.255.224.0
  network 172.16.64.0 0.0.0.255 
  nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 46.1.1.2
ip route-static 172.16.64.0 255.255.224.0 NULL0
#
return
[R7]dis curr
[V200R003C00]
#
 sysname R7
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0
 ip address 47.1.1.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 172.16.96.1 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.3.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source 47.1.1.1
 ospf network-type broadcast
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 172.16.0.1 34.1.1.1 register
#
ospf 1 router-id 7.7.7.7 
 default-route-advertise
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.3.1 0.0.0.0 
 area 0.0.0.3 
  network 172.16.96.0 0.0.0.255 
  nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 47.1.1.2
#
return
[R8]dis curr
[V200R003C00]
#
 sysname R8
#
interface GigabitEthernet0/0/0
 ip address 172.16.96.2 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/1
 ip address 172.16.98.1 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.97.1 255.255.255.0 
#
ospf 1 router-id 8.8.8.8 
 area 0.0.0.3 
  network 172.16.0.0 0.0.255.255 
  nssa
#
return
[R9]dis curr
[V200R003C00]
#
 sysname R9
#
interface GigabitEthernet0/0/0
 ip address 172.16.100.1 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/1
 ip address 172.16.98.2 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.102.1 255.255.255.0 
#
ospf 1 router-id 9.9.9.9 
 asbr-summary 172.16.100.0 255.255.252.0
 import-route ospf 2
 area 0.0.0.3 
  network 172.16.98.0 0.0.0.255 
  nssa
#
ospf 2 router-id 9.9.9.9 
 default-route-advertise
 import-route ospf 1
 area 0.0.0.4 
  network 172.16.99.1 0.0.0.0 
  network 172.16.100.0 0.0.0.255 
#
ip route-static 172.16.100.0 255.255.252.0 NULL0
#
return
[R10]dis curr
[V200R003C00]
#
 sysname R10
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 172.16.100.2 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.101.1 255.255.255.0 
#
ospf 1 router-id 4.4.4.4 
 area 0.0.0.4 
  network 172.16.0.0 0.0.255.255 
#
return
[R11]dis curr
[V200R003C00]
#
 sysname R11
#
interface GigabitEthernet0/0/0
 ip address 172.16.66.1 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/1
 ip address 172.16.64.2 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.65.1 255.255.255.0 
#
ospf 1 router-id 11.11.11.11 
 area 0.0.0.2 
  network 172.16.0.0 0.0.255.255 
  nssa
#
return
[R12]dis curr
[V200R003C00]
#
 sysname R12
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 172.16.66.2 255.255.255.0 
 ospf network-type p2p
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 172.16.67.1 255.255.255.128 
#
interface LoopBack1
 ip address 172.16.67.129 255.255.255.128 
#
interface LoopBack2
#
ospf 1 router-id 12.12.12.12 
 asbr-summary 172.16.67.0 255.255.255.0
 import-route rip 1
 area 0.0.0.2 
  network 172.16.66.0 0.0.0.255 
  nssa
#
rip 1
 undo summary
 version 2
 network 172.16.0.0
#
return
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值