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

VLSMネットワークでOSPFを使用する

ネットワーク構成図

    RIPv2、EIGRP 同様に、OSPF も VLSM をサポートしています。本シナリオではそれを確認します。

  1. RT-A に以下の設定をしなさい。
  2. ホスト名RT-A
    Lo0 のIPアドレス192.168.1.33/27
    F0/1 のIPアドレス192.168.1.1/30
    ルーティングプロトコル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 192.168.1.33 255.255.255.224
    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.1.1 255.255.255.252
    RT-A(config-if)# no shut
    RT-A(config-if)# router ospf 10
    RT-A(config-router)# net 192.168.1.0 0.0.0.255 area 0
    RT-A(config-router)# ^Z
    RT-A#
    
  3. RT-B に以下の設定をしなさい。
  4. ホスト名RT-B
    Lo0 のIPアドレス192.168.1.65/27
    f0/0 のIPアドレス192.168.1.2/30
    f0/1 のIPアドレス192.168.1.5/30
    ルーティングプロトコル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 Lo0
    RT-B(config-if)# ip add 192.168.1.65 255.255.255.224
    RT-B(config-if)# ip ospf network point-to-point
    RT-B(config-if)# int f0/0
    RT-B(config-if)# ip add 192.168.1.2 255.255.255.252
    RT-B(config-if)# no shut
    RT-B(config-if)# int f0/1
    RT-B(config-if)# ip add 192.168.1.5 255.255.255.252
    RT-B(config-if)# no shut
    RT-B(config-if)# router ospf 10
    RT-B(config-router)# net 192.168.1.0 0.0.0.255 area 0
    RT-B(config-router)# ^Z
    RT-B#
    
  5. RT-C に以下の設定をしなさい。
  6. ホスト名RT-C
    Lo0 のIPアドレス192.168.1.97/27
    f0/0 のIPアドレス192.168.1.6/30
    ルーティングプロトコルOSPF
    OSPF プロセス ID10
    < RT-C >
    Router# conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)# host RT-C
    RT-C(config)# int Lo0
    RT-C(config-if)# ip add 192.168.1.97 255.255.255.224
    RT-C(config-if)# ip ospf network point-to-point
    RT-C(config-if)# int f0/0
    RT-C(config-if)# ip add 192.168.1.6 255.255.255.252
    RT-C(config-if)# no shut
    RT-C(config-if)# router ospf 10
    RT-C(config-router)# net 192.168.1.0 0.0.0.255 area 0
    RT-C(config-router)# ^Z
    RT-C#
    
  7. 送信元アドレスに 192.168.1.33 を使い、RT-A から RT-B、RT-C それぞれの Lo0 宛てに ping を実行しなさい。
  8. < RT-A >	
    RT-A# ping 192.168.1.65 source 192.168.1.33  ← 192.168.1.33 が送信元IPアドレス
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.65, timeout is 2 seconds:
    Packet sent with a source address of 192.168.1.33
    !!!!!           ← ping 成功
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
    RT-A#
    
    < RT-A >	
    RT-A# ping 192.168.1.97 source 192.168.1.33
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.97, timeout is 2 seconds:
    Packet sent with a source address of 192.168.1.33
    !!!!!           ← ping 成功
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
    RT-A#
    
    ping は成功しました。OSPF も VLSM をサポートしています。
  9. RT-A、RT-B、RT-C のルーティングテーブル (OSPF) を表示させなさい。
  10. < RT-A >
    RRT-A# sh ip route ospf | begin Gateway
    Gateway of last resort is not set
    
          192.168.1.0/24 is variably subnetted, 7 subnets, 3 masks
    O        192.168.1.4/30 [110/2] via 192.168.1.2, 00:00:25, FastEthernet0/1
    O        192.168.1.64/27 [110/2] via 192.168.1.2, 00:00:46, FastEthernet0/1
    O        192.168.1.96/27 [110/3] via 192.168.1.2, 00:00:15, FastEthernet0/1
    RT-A#
    
    < RT-B >
    RT-B# sh ip route ospf | begin Gateway
    Gateway of last resort is not set
    
          192.168.1.0/24 is variably subnetted, 8 subnets, 3 masks
    O        192.168.1.32/27 [110/2] via 192.168.1.1, 00:00:41, FastEthernet0/0
    O        192.168.1.96/27 [110/2] via 192.168.1.6, 00:00:20, FastEthernet0/1
    RT-B#
    
    < RT-C >
    RT-C# sh ip route ospf | begin Gateway
    Gateway of last resort is not set
    
          192.168.1.0/24 is variably subnetted, 7 subnets, 3 masks
    O        192.168.1.0/30 [110/2] via 192.168.1.5, 00:00:14, FastEthernet0/0
    O        192.168.1.32/27 [110/3] via 192.168.1.5, 00:00:14, FastEthernet0/0
    O        192.168.1.64/27 [110/2] via 192.168.1.5, 00:00:14, FastEthernet0/0
    RT-C#
    
  11. RT-A、RT-B、RT-C のネイバー関係データベースを表示させなさい。
  12. < RT-A >
    RT-A# sh ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    192.168.1.65      1   FULL/DR         00:00:32    192.168.1.2     FastEthernet0/1
    RT-A#
    
    < RT-B >
    RT-B# sh ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    192.168.1.97      1   FULL/DR         00:00:39    192.168.1.6     FastEthernet0/1
    192.168.1.33      1   FULL/BDR        00:00:33    192.168.1.1     FastEthernet0/0
    RT-B#
    
    < RT-C >
    RT-C# sh ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    192.168.1.65      1   FULL/BDR        00:00:34    192.168.1.5     FastEthernet0/0
    RT-C#
    
  13. RT-A、RT-B、RT-C のリンクステートデータベースを表示させなさい。
  14. < RT-A >
    RT-A# sh ip ospf database
    
                OSPF Router with ID (192.168.1.33) (Process ID 10)
    
                    Router Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    192.168.1.33    192.168.1.33    270         0x80000002 0x00BB0B 2
    192.168.1.65    192.168.1.65    250         0x80000003 0x00A5CE 3
    192.168.1.97    192.168.1.97    250         0x80000002 0x0015E7 2
    
                    Net Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum
    192.168.1.2     192.168.1.65    271         0x80000001 0x004F9E
    192.168.1.6     192.168.1.97    251         0x80000001 0x006920
    RT-A#
    
    < RT-B >
    RT-B# sh ip ospf database
    
                OSPF Router with ID (192.168.1.65) (Process ID 10)
    
                    Router Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    192.168.1.33    192.168.1.33    275         0x80000002 0x00BB0B 2
    192.168.1.65    192.168.1.65    254         0x80000003 0x00A5CE 3
    192.168.1.97    192.168.1.97    255         0x80000002 0x0015E7 2
    
                    Net Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum
    192.168.1.2     192.168.1.65    274         0x80000001 0x004F9E
    192.168.1.6     192.168.1.97    255         0x80000001 0x006920
    
    < RT-C >
    RT-C# sh ip ospf database
    
                OSPF Router with ID (192.168.1.97) (Process ID 10)
    
                    Router Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    192.168.1.33    192.168.1.33    280         0x80000002 0x00BB0B 2
    192.168.1.65    192.168.1.65    259         0x80000003 0x00A5CE 3
    192.168.1.97    192.168.1.97    258         0x80000002 0x0015E7 2
    
                    Net Link States (Area 0)
    
    Link ID         ADV Router      Age         Seq#       Checksum
    192.168.1.2     192.168.1.65    279         0x80000001 0x004F9E
    192.168.1.6     192.168.1.97    258         0x80000001 0x006920
    RT-C#