HOME > コンテンツリスト > ラボ・シナリオ for CCNA > [ < 前へ 次へ > ]

不連続サブネットワークでOSPFを使用する

ネットワーク構成図

    OSPF は、不連続サブネットワークをサポートしています。本シナリオではそれを確認します。

  1. RT-A に以下の設定をしなさい。
  2. ホスト名RT-A
    Lo0 のIPアドレス172.16.1.1/24
    F0/1 のIPアドレス192.168.0.1/24
    ルーティングプロトコルOSPF
    OSPF プロセス ID10
    < RT-A >
    Router# conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)# host RT-A
    RT-A(config)# int Lo0
    RT-A(config-if)# ip add 172.16.1.1 255.255.255.0
    RT-A(config-if)# ip ospf network point-to-point
    RT-A(config-if)# int f0/1
    RT-A(config-if)# ip add 192.168.0.1 255.255.255.0
    RT-A(config-if)# no shut
    RT-A(config-if)# router ospf 10
    RT-A(config-router)# net 192.168.0.0 0.0.0.255 area 0
    RT-A(config-router)# net 172.16.1.0 0.0.0.255 area 0
    RT-A(config-router)# ^Z
    RT-A#
    
  3. RT-B に以下の設定をしなさい。
  4. ホスト名RT-B
    F0/0 のIPアドレス192.168.0.2/24
    Lo0 のIPアドレス172.16.2.2/24
    ルーティングプロトコルOSPF
    OSPF プロセス ID10
    < RT-B >
    Router# conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)# host RT-B
    RT-B(config)# int f0/0
    RT-B(config-if)# ip add 192.168.0.2 255.255.255.0
    RT-B(config-if)# no shut
    RT-B(config-if)# int Lo0
    RT-B(config-if)# ip add 172.16.2.2 255.255.255.0
    RT-B(config-if)# ip ospf network point-to-point
    RT-B(config-if)# router ospf 10
    RT-B(config-router)# net 192.168.0.0 0.0.0.255 area 0
    RT-B(config-router)# net 172.16.2.0 0.0.0.255 area 0
    RT-B(config-router)# ^Z
    RT-B#
    
  5. 送信元アドレスに 172.16.1.1 を使い、RT-A から RT-B の Lo0 宛てに ping を実行しなさい。
  6. < RT-A >
    RT-A# ping 172.16.2.2 source 172.16.1.1  ← 172.16.1.1 が送信元IPアドレス
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:
    Packet sent with a source address of 172.16.1.1
    !!!!!           ← ping 成功
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
    RT-A#
    
    OSPF は不連続サブネットワークをサポートしているため、ping は成功します。
  7. RT-A、RT-B のルーティングテーブルを表示させなさい。
  8. < RT-A >
    RT-A# sh ip route | begin Gateway
    Gateway of last resort is not set
    
         172.16.0.0/24 is subnetted, 2 subnets
    C       172.16.1.0 is directly connected, FastEthernet0/0
    O       172.16.2.0 [110/1563] via 192.168.0.2, 00:05:14, Serial0/0/0
    C    192.168.0.0/24 is directly connected, Serial0/0/0
    RT-A#
    
    < RT-B >
    RT-B# sh ip route | begin Gateway
    Gateway of last resort is not set
    
         172.16.0.0/24 is subnetted, 2 subnets
    O       172.16.1.0 [110/1563] via 192.168.0.1, 00:05:59, Serial0/0/0
    C       172.16.2.0 is directly connected, FastEthernet0/0
    C    192.168.0.0/24 is directly connected, Serial0/0/0
    RT-B#
    
  9. RT-A、RT-B で sh ip protocols コマンドを実行しなさい。
  10. < RT-A >
    RT-A# sh ip protocols
    Routing Protocol is "ospf 10"
      Outgoing update filter list for all interfaces is not set
      Incoming update filter list for all interfaces is not set
      Router ID 192.168.0.1
      Number of areas in this router is 1. 1 normal 0 stub 0 nssa
      Maximum path: 4
      Routing for Networks:
        172.16.1.0 0.0.0.255 area 0
        192.168.0.0 0.0.0.255 area 0
     Reference bandwidth unit is 100 mbps
      Routing Information Sources:
        Gateway         Distance      Last Update
        192.168.0.2          110      00:06:27
      Distance: (default is 110) 
    
    RT-A#
    
    < RT-B >
    RT-B# sh ip protocols
    Routing Protocol is "ospf 10"
      Outgoing update filter list for all interfaces is not set
      Incoming update filter list for all interfaces is not set
      Router ID 192.168.0.2
      Number of areas in this router is 1. 1 normal 0 stub 0 nssa
      Maximum path: 4
      Routing for Networks:
        172.16.2.0 0.0.0.255 area 0
        192.168.0.0 0.0.0.255 area 0
     Reference bandwidth unit is 100 mbps
      Routing Information Sources:
        Gateway         Distance      Last Update
        192.168.0.1          110      00:06:25
      Distance: (default is 110) 
    
    RT-B#