HCIP:OSPF综合大实验

实验拓扑

请添加图片描述

实验目的

  1. R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
  2. R3-R5、R6、R7为MGRE环境,R3为中心站点;
  3. 整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
  4. 所有设备均可访问R4的环回;
  5. 减少LSA的更新量,加快收敛,保障更新安全;
  6. 全网可达;

实验思路

划分IP地址

我的划分思路是将172.16.0.0单独拿出来做主干路IP,采用29掩码来节约IP资源,然后环回全部采用24掩码具体如下:

  1. 主干路IP
    172.16.0.0/29
    172.16.0.8/29
    172.16.0.16/29
    172.16.0.24/29
    172.16.0.32/29
    172.16.0.40/29
  2. 环回地址:
    r1:172.16.1.0/24
    r2:172.16.2.0/24
    r3:172.16.3.0/24
    r4:172.16.4.0/24
    r5:172.16.5.0/24
    r6:172.16.6.0/24
    r7:172.16.7.0/24
    r8:172.16.8.0/24
    r9:172.16.9.0/24
    r10:172.16.10.0/24
    r11:172.16.11.0/24
    r12:172.16.12.0/24;172.16.13.0/24
  3. 隧道地址
    172.16.14.0/24

后续

  1. 配置每个接口的IP,确保私网内能通
  2. 公网配置静态路由缺省,确保公网能通
  3. 开始搭建隧道,配置区域0的ospf,让三个区域间用vpn连接
  4. 分别在其他区域上配置ospf,区域2和3采用引入的方式
  5. 全部基础ospf配置完成后检验全网通
  6. 全网通后开始减少路由条目(采用特殊区域和路由汇总)
  7. 确保全网通的情况下实施快速收敛
  8. 最后采用接口认证

实验过程

  1. r3路由器上的配置:
    ip route-static 0.0.0.0 0.0.0.0 34.0.0.4
    interface GigabitEthernet0/0/0
    ip address 172.16.0.3 255.255.255.248
    ospf authentication-mode md5 1 cipher 123
    ospf timer hello 1
    interface Tunnel0/0/0
    ip address 172.16.14.3 255.255.255.0
    tunnel-protocol gre p2mp
    source 34.0.0.3
    ospf authentication-mode md5 1 cipher 123
    ospf network-type broadcast
    ospf timer hello 1
    nhrp entry multicast dynamic
    nhrp network-id 100
    interface Serial4/0/0
    link-protocol ppp
    ip address 34.0.0.3 255.255.255.0
    nat outbound 2000
    ospf 1 router-id 3.3.3.3
    area 0.0.0.0
    network 172.16.14.0 0.0.0.255
    area 0.0.0.1
    network 172.16.0.0 0.0.0.255
    network 172.16.3.0 0.0.0.255
    stub no-summary

  2. r5路由器上配置:
    ip route-static 0.0.0.0 0.0.0.0 45.0.0.4
    interface Tunnel0/0/0
    ip address 172.16.14.5 255.255.255.0
    tunnel-protocol gre p2mp
    source 45.0.0.5
    ospf authentication-mode md5 1 cipher 123
    ospf network-type broadcast
    ospf dr-priority 0
    ospf timer hello 1
    nhrp network-id 100
    nhrp entry 172.16.14.3 34.0.0.3 register
    interface Serial4/0/0
    link-protocol ppp
    ip address 45.0.0.5 255.255.255.0
    ospf 1 router-id 5.5.5.5
    area 0.0.0.0
    network 172.16.5.0 0.0.0.255
    network 172.16.14.0 0.0.0.255

  3. r6路由器的配置
    ip route-static 0.0.0.0 0.0.0.0 46.0.0.4
    interface Tunnel0/0/0
    ip address 172.16.14.6 255.255.255.0
    tunnel-protocol gre p2mp
    source 46.0.0.6
    ospf authentication-mode md5 1 cipher 123
    ospf network-type broadcast
    ospf dr-priority 0
    ospf timer hello 1
    nhrp network-id 100
    nhrp entry 172.16.14.3 34.0.0.3 register
    interface Serial4/0/0
    link-protocol ppp
    ip address 46.0.0.6 255.255.255.0
    nat outbound 2000
    interface GigabitEthernet0/0/0
    ip address 172.16.0.33 255.255.255.248
    ospf authentication-mode md5 1 cipher 123
    ospf timer hello 1
    ospf 1 router-id 6.6.6.6
    area 0.0.0.0
    network 172.16.14.0 0.0.0.255
    area 0.0.0.2
    network 172.16.0.0 0.0.0.255
    network 172.16.6.0 0.0.0.255
    nssa no-summary

  4. r7路由器配置
    ip route-static 0.0.0.0 0.0.0.0 47.0.0.4
    interface Tunnel0/0/0
    ip address 172.16.14.7 255.255.255.0
    tunnel-protocol gre p2mp
    source 47.0.0.7
    ospf authentication-mode md5 1 cipher 123
    ospf network-type broadcast
    ospf dr-priority 0
    ospf timer hello 1
    nhrp network-id 100
    nhrp entry 172.16.14.3 34.0.0.3 register
    interface GigabitEthernet0/0/0
    ip address 47.0.0.7 255.255.255.0
    nat outbound 2000
    interface GigabitEthernet0/0/1
    ip address 172.16.0.9 255.255.255.248
    ospf authentication-mode md5 1 cipher % % SQI3-gwZ%Q;EpAINgTY.`6M’% %
    ospf timer hello 1
    ospf 1 router-id 7.7.7.7
    area 0.0.0.0
    network 172.16.14.0 0.0.0.255
    area 0.0.0.3
    network 172.16.0.0 0.0.0.255
    network 172.16.7.0 0.0.0.255
    nssa no-summary

  5. r9路由器配置
    ospf 1 router-id 9.9.9.9
    import-route ospf 2
    area 0.0.0.3
    network 172.16.0.16 0.0.0.7
    network 172.16.9.0 0.0.0.255
    nssa no-summary
    ospf 2 router-id 9.9.9.9
    default-route-advertise
    import-route ospf 1
    area 0.0.0.4
    network 172.16.0.24 0.0.0.7

  6. r12路由器配置
    ospf 1 router-id 12.12.12.12
    import-route rip 1
    area 0.0.0.2
    network 172.16.0.0 0.0.0.255
    nssa no-summary

  7. 结果
    请添加图片描述
    请添加图片描述
    请添加图片描述

请添加图片描述
请添加图片描述

请添加图片描述

总结

这次实验IP划分得不好,导致我汇总失败(汇总后全网不通了),所以以上我做了特殊区域的配置来减少路由和LSA;划分IP只考虑了划分,没想过汇总着东西

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值