カテゴリ:

今回はIPv6での基本的なOSPFの設定を確認していきます。IPアドレスの設定は前回と同じです。

R1(config)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

IPv6でのルーティングをR1とR2で有効にします。

R1(config)#ipv6 unicast-routing

IPv6でもOSPFではプロセスIDを指定して起動します。またルータIDも指定しますが、IPv4アドレスの形式での指定となります。

R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id ?
  A.B.C.D  OSPF router-id in IP address format

R1(config-rtr)#router-id 17.17.1.1

IPv6ではインターフェース単位でOSPFの有効化を指定します。今回はエリア0を利用しました。

R1(config-rtr)#int f0/0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#int lo0
R1(config-if)#ipv6 ospf 1 area 0

インターフェースが有効であることを確認します。

R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "ospf 1"
  Interfaces (Area 0):
    Loopback0
    FastEthernet0/0
  Redistribution:
    None

R1#show ipv6 ospf interface brief
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
Lo0          1     0               13         1     LOOP  0/0
Fa0/0        1     0               4          1     BDR   1/1

R1#debug ipv6 ospf adj
Jul 19 06:41:17.519: OSPFv3: Send LS REQ to 17.17.2.2 length 12 LSA count 1
Jul 19 06:41:17.519: OSPFv3: Send DBD to 17.17.2.2 on FastEthernet0/0 seq 0xDE7 opt 0x0013 flag 0x0 len 28
Jul 19 06:41:17.523: OSPFv3: Rcv LS REQ from 17.17.2.2 on FastEthernet0/0 length 40 LSA count 2
Jul 19 06:41:17.523: OSPFv3: Send UPD to 101.11.13.108 on FastEthernet0/0 length 80 LSA count 2
Jul 19 06:41:17.531: OSPFv3: Rcv LS UPD from 17.17.2.2 on FastEthernet0/0 length 44 LSA count 1
Jul 19 06:41:17.531: OSPFv3: Synchronized with 17.17.2.2 on FastEthernet0/0, state FULL
Jul 19 06:41:17.531: %OSPFv3-5-ADJCHG: Process 1, Nbr 17.17.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done

インターフェースの詳細を表示するとネットワークタイプやコストなど、IPv4と基本的に同じであることがよく分かります。

R1#show ipv6 ospf interface brief f0/0
FastEthernet0/0 is up, line protocol is up
  Link Local Address FE80::1, Interface ID 4
  Area 0, Process ID 1, Instance ID 0, Router ID 17.17.1.1
  Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 17.17.2.2, local address FE80::2
  Backup Designated router (ID) 17.17.1.1, local address FE80::1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:04
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 2, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 17.17.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)

現在設定されいるエリアを確認します。バックボーンであるArea 0の設定が確認できます。

R1#show ipv6 ospf 1
Routing Process "ospfv3 1" with ID 17.17.1.1
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Reference bandwidth unit is 100 mbps
    Area BACKBONE(0)
        Number of interfaces in this area is 2
        SPF algorithm executed 2 times
        Number of LSA 6. Checksum Sum 0x02B316
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

R2との接続状態を確認します。FULLとなっていることが分かります。

R1#show ipv6 ospf neighbor

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
17.17.2.2         1   FULL/DR         00:00:32    4               FastEthernet0/0

IPv6のルーティングテーブルを見ると、R2のLo0が載っていることが分かります。

R1#show ipv6 route ospf
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2001:2::2/128 [110/1]
     via FE80::2, FastEthernet0/0

pingコマンドで疎通を確認しています。

R1#ping 2001:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/12 ms