Mikan Network Lab.

ネットワーク技術やCisco製品に関して、勉強・検証した内容を発信しています。

Mikan Network Lab.

IOS: OSPF - Fast Hello

OSPFのFast Helloを設定するコンフィグを記載します。

目次

1. 前提条件

本記事は以下に基づいて作成しています。
・Cisco Modeling Labs 2.1.1
・Cisco IOS Software, Version 15.9(3)M2

2. 要件

  • R1とR2のLo0のセグメント間でお互いに通信できるように設定してください。
  • ルーティングプロトコルはOSPFを使用してください。
  • R1とR2のGi0/0でFast Helloを使用し、Helloパケットが毎秒4回送信されるように設定してください。
  • ルータIDはLo0のIPアドレスを明示的に指定してください。

構成図

3. 設定例

要件を満たす設定例を以下に示します。

 R1 

hostname R1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip ospf dead-interval minimal hello-multiplier 4
!
router ospf 1
 router-id 1.1.1.1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
!
end

 R2 

hostname R2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
 ip address 192.168.12.2 255.255.255.0
 ip ospf dead-interval minimal hello-multiplier 4
!
router ospf 1
 router-id 2.2.2.2
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
!
end

4. 動作確認

4.1. show ip ospf interface

  • R1とR2のGi0/0でHelloインターバルが250ミリ秒、Deadインターバルが1秒になっていることを確認します。

R1#show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet Address 192.168.12.1/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 192.168.12.2
  Backup Designated router (ID) 1.1.1.1, Interface address 192.168.12.1
  Timer intervals configured, Hello 250 msec, Dead 1, Wait 1, Retransmit 5
    oob-resync timeout 40
    Hello due in 37 msec
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/2/2, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 2
  Last flood scan time is 0 msec, maximum is 1 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)
R2#show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet Address 192.168.12.2/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 192.168.12.2
  Backup Designated router (ID) 1.1.1.1, Interface address 192.168.12.1
  Timer intervals configured, Hello 250 msec, Dead 1, Wait 1, Retransmit 5
    oob-resync timeout 40
    Hello due in 97 msec
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/2/2, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 2
  Last flood scan time is 0 msec, maximum is 1 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

4.2. show ip ospf neighbor

  • R1とR2でOSPFネイバーが確立されていることを確認します。

R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         838 msec    192.168.12.2    GigabitEthernet0/0
R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        823 msec    192.168.12.1    GigabitEthernet0/0

4.3. show ip route ospf

  • R1で2.2.2.2/32のルートを学習していることを確認します。
  • R2で1.1.1.1/32のルートを学習していることを確認します。

R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/2] via 192.168.12.2, 00:03:43, GigabitEthernet0/0
R2#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/2] via 192.168.12.1, 00:03:38, GigabitEthernet0/0

5. 補足

  • OSPFネイバーを確立させるためには、OSPFネイバー同士でHelloインターバルとDeadインターバルを一致させる必要がありますが、Fast Helloを使用する場合にはHelloインターバルを一致させる必要はありません。以下はR1のHelloインターバルは250ミリ秒、R2のHelloインターバルは100ミリ秒に設定している場合ですが、問題無くネイバーを確立できていることが分かります。

R1#show ip ospf interface GigabitEthernet0/0
  Timer intervals configured, Hello 250 msec, Dead 1, Wait 1, Retransmit 5
R2#show ip ospf interface GigabitEthernet0/0
  Timer intervals configured, Hello 100 msec, Dead 1, Wait 1, Retransmit 5
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         930 msec    192.168.12.2    GigabitEthernet0/0