OSPF基础实验

文章目录

  • OSPF基础实验
    • 实验拓扑
    • 实验要求
    • 实验步骤

OSPF基础实验

实验拓扑

OSPF基础实验_第1张图片

实验要求

  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
      ......
      

你可能感兴趣的:(OSPF,OSPF,基础实验,路由协议)