HCIP OSPF实验

任务:

 1.使用三种解决ospf不规则区域的方法

2.路由器5、6、7、8、15使用mgre

3.使用各种优化

4.全网可达

5.保证更新安全

6.使用地址为172.16.0.0/16合理划分

7.每个路由器都有环回

拓扑图&IP划分如下:

第一步,配置IP&环回地址

以R1为例,R2~R15同理

interface LoopBack 0               //进入环回接口
ip address 1.1.1.1 32              //配置环回地址
interface GigabitEthernet 0/0/0    //进入G0/0/0接口
ip address 192.168.1.1 24          //配置G0/0/0IP地址

第二步,配置OSPF

配置OSPF1

以R1为例,R2&R3同理

ospf 1 router-id 1.1.1.1           //开启OSPF1,并输入id号
area 0                             //选择区域0
network 0.0.0.0 255.255.255.255    //全宣

R3

ip route-static 0.0.0.0 0 34.1.1.2    //使缺省指向运营商
ospf 1
default-route-advertise               //下放缺省
acl 2000
rule permit source any
interface GigabitEthernet 0/0/1
nat outbound 2000                     //配置NAT,使R1~R2可以与运营商连通

R1ping isp环回

配置OSPF2

以R7为例,R5&R6&R8~R15同理,注意区分区域

ospf 2 router-id 7.7.7.7        //开启OSPF2,并输入id号
area 0                          //选择区域0
network 172.16.16.1 0.0.0.0
network 7.7.7.7 0.0.0.0         //精准宣告
quit
area 4                          //选择区域4
network 172.16.128.1 0.0.0.0    //精准宣告

第三步,配置MGRE

R5

interface Tunnel 0/0/0                       //进入Tunnel接口
tunnel-protocol gre p2mp                     //更改连接方式为p2mp
source 172.16.0.1                            //定义源地址
nhrp entry multicast dynamic
nhrp network-id 100
ip address 10.1.1.1 24
ospf 2
area 0
network 10.1.1.1 0.0.0.0                     //宣告
ip route-static 172.16.8.0 21 172.16.0.2
ip route-static 172.16.16.0 21 172.16.0.2
ip route-static 172.16.24.0 21 172.16.0.2    //写静态,引流
ospf network-type broadcast

R6,R7&R8同理

interface Tunnel 0/0/0
tunnel-protocol gre p2mp
source 172.16.8.1
nhrp network-id 100
nhrp entry 10.1.1.1 172.16.0.1 reg
ip address 10.1.1.2 24
ospf 2
area 0
network 10.1.1.2 0.0.0.0
ip route-static 172.16.8.0 21 172.16.0.2
ip route-static 172.16.16.0 21 172.16.0.2
ip route-static 172.16.24.0 21 172.16.0.2
ospf network-type broadcast

R8pingR7

对R12进行双向重发布

R12

对R7&R13进行虚拟链路

对R3&R5进行隧道

R3,R5同理

测试

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-13 06:04:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-13 06:04:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-13 06:04:03       82 阅读
  4. Python语言-面向对象

    2024-01-13 06:04:03       91 阅读

热门阅读

  1. VCG 网格平滑之Laplacian平滑

    2024-01-13 06:04:03       53 阅读
  2. 小米路由器有线中继模式设置固定IP

    2024-01-13 06:04:03       211 阅读
  3. 使用Docker部署PDF多功能工具Stirling-PDF

    2024-01-13 06:04:03       58 阅读
  4. c# ref和out参数修饰符

    2024-01-13 06:04:03       59 阅读
  5. 生成并压缩多个word文件,写入response

    2024-01-13 06:04:03       46 阅读
  6. jenkins设置Jenkinsfile的pipeline脚本 nohup运行

    2024-01-13 06:04:03       59 阅读
  7. 解决chromebook kabylake安装linux没有声音问题

    2024-01-13 06:04:03       60 阅读
  8. @KafkaListener指定kafka集群

    2024-01-13 06:04:03       51 阅读