OSPF基础实验

OSPF基础实验

实验拓扑

在这里插入图片描述

实验要求

  1. 按照图示配置IP地址
  2. R1,R2,R3 运行OSPF使内网互通,所有接口全部宣告进Area 0,使用环回口作为 Router-id
  3. 业务网段不允许出现协议报文
  4. R5模拟互联网,内网通过R1连接互联网,在R1上配置默认路由并引入到OSPF
  5. R1上配置EASYIP,只允许业务网段访问互联网
  6. 要求业务网段访问互联网流量经过R3,R2,R1

实验步骤

  1. 配置IP地址略

  2. 配置OSPF使内网互通

    R1
    #
    ospf 1 router-id 1.1.1.1
     area 0.0.0.0
      network 10.1.1.1 0.0.0.0
      network 10.2.2.1 0.0.0.0
    #
    
    R2
    #
    ospf 1 router-id 2.2.2.2
     area 0.0.0.0
      network 10.1.1.2 0.0.0.0
      network 10.3.3.2 0.0.0.0
    #
    
    R3#
    ospf 1 router-id 3.3.3.3
     area 0.0.0.0
      network 10.2.2.3 0.0.0.0
      network 10.3.3.3 0.0.0.0
      network 192.168.1.0 0.0.0.255
    #
    
  3. 配置静默接口

    R3
    #
    ospf 1 router-id 3.3.3.3
     silent-interface GigabitEthernet0/2
    #
    
  4. 配置默认路由并引入到OSPF

    R1
    #
     ip route-static 0.0.0.0 0 202.1.1.5
    #
     ospf 1 router-id 1.1.1.1
      default-route-advertise
    #
    
  5. 创建基本ACL只允许业务网段

    R1
    #
    acl basic 2000
     rule 0 permit source 192.168.1.0 0.0.0.255
    #
    
  6. 在公网接口配置easy ip

    R1
    #
    interface GigabitEthernet0/2
     nat outbound 2000
    #
    
  7. 修改cost值使流量经过R3-R2-R1

    R1
    #
    interface GigabitEthernet0/0
     ospf cost 1000
    #
    
    R3
    #
    interface GigabitEthernet0/0
     ospf cost 1000
    #
    
  8. 测试

    • R2和R3可以学习到默认路由

      [R2]dis ip routing-table 
      
      Destinations : 17       Routes : 18
      
      Destination/Mask   Proto   Pre Cost        NextHop         Interface
      0.0.0.0/0          O_ASE2  150 1           10.1.1.1        GE0/0
      ......
      
      [R3]dis ip routing-table 
      
      Destinations : 19       Routes : 19
      
      Destination/Mask   Proto   Pre Cost        NextHop         Interface
      0.0.0.0/0          O_ASE2  150 1           10.3.3.2        GE0/1
      ......
      
    • PC4能ping通R5

      [H3C]ping 100.1.1.1
      Ping 100.1.1.1 (100.1.1.1): 56 data bytes, press CTRL_C to break
      56 bytes from 100.1.1.1: icmp_seq=0 ttl=252 time=3.000 ms
      56 bytes from 100.1.1.1: icmp_seq=1 ttl=252 time=3.000 ms
      56 bytes from 100.1.1.1: icmp_seq=2 ttl=252 time=4.000 ms
      56 bytes from 100.1.1.1: icmp_seq=3 ttl=252 time=4.000 ms
      56 bytes from 100.1.1.1: icmp_seq=4 ttl=252 time=4.000 ms
      
      --- Ping statistics for 100.1.1.1 ---
      5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
      round-trip min/avg/max/std-dev = 3.000/3.600/4.000/0.490 ms
      
    • 业务网段路由经过R3-R2-R1

      [R3]dis ip routing-table 
      
      Destinations : 19       Routes : 19
      
      Destination/Mask   Proto   Pre Cost        NextHop         Interface
      0.0.0.0/0          O_ASE2  150 1           10.3.3.2        GE0/1
      ......
      
      [R2]dis ip routing-table 
      
      Destinations : 17       Routes : 18
      
      Destination/Mask   Proto   Pre Cost        NextHop         Interface
      0.0.0.0/0          O_ASE2  150 1           10.1.1.1        GE0/0
      192.168.1.0/24     O_INTRA 10  2           10.3.3.3        GE0/1
      ......
      
      [R1]dis ip routing-table 
      
      Destinations : 20       Routes : 20
      
      Destination/Mask   Proto   Pre Cost        NextHop         Interface
      192.168.1.0/24     O_INTRA 10  3           10.1.1.2        GE0/1
      ......
      
  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值