DynagenでCCIEを目指す
20100428 OSPFv3 基本設定
最終更新:
it_certification
-
view
目的
- OSPFv3の基本的な設定方法を確認します。
構成
- 設定概要
- IPv6 addressのみ設定します。
- OSPFv3の設定はまだ投入されていません。
- loopback 0にはipv6 addressのみ定義します。
- 構成図

- netファイル
ghostios = True sparsemem = True model = 3660 [localhost] [[3660]] image = C:\Program Files\Dynamips\images\c3660-ik9o3s-mz.124-6.T.bin ram = 256 [[ROUTER R1]] f1/0 = R2 f1/0 [[ROUTER R2]]
- 初期設定 R1
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ! resource policy ! memory-size iomem 5 ! ! ip cef ! ! ! ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 no ip address ipv6 address 2000::1:1/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:1/112 ipv6 enable no keepalive ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface FastEthernet1/0 no ip address duplex auto speed auto ipv6 address 2000::20:1/112 ipv6 enable ! ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 R2
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ! resource policy ! memory-size iomem 5 ! ! ip cef ! ! ! ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 no ip address ipv6 address 2000::2:2/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::30:2/112 ipv6 enable no keepalive ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface FastEthernet1/0 no ip address duplex auto speed auto ipv6 address 2000::20:2/112 ipv6 enable ! ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 基本設定 R1のみ
- OSPFv3の設定
RIPngと同様にI/Fに対して、OPSFv3の設定を行います。設定が完了すると、router-idが採番できなかった旨のメッセージが出力されます(このメッセージについては後ほど説明します。)
R1(config)#interface FastEthernet 1/0 R1(config-if)#ipv6 ospf 1 area 0 R1(config-if)# *Mar 1 00:08:22.227: %OSPFv3-4-NORTRID: OSPFv3 process 1 could not pick a router-id, please configure manually R1(config-if)#^Z
- 設定の確認
RIPngと同様に、OSPFプロセス1の設定がrunnning-configに自動的に加筆された事が確認できます。また、router-idが定義されていないため、INACTIVEの表記も確認できます。
R1#show running-config | begin router ipv6 router ospf 1 <- 自動的に加筆された OSPF process 1の設定 log-adjacency-changes ! ! R1#show ipv6 protocols IPv6 Routing Protocol is "connected" IPv6 Routing Protocol is "static" IPv6 Routing Protocol is "ospf 1" Interfaces (Area 0): FastEthernet1/0 Redistribution: None R1# R1#show ipv6 ospf %OSPFv3: Router process 1 is INACTIVE, please configure a router-id <- router-idが未定義のため、INACTIVEになります。
- router-idの定義
router-idを定義します。router-idは32bitの数字であるため、ipv4形式で定義します。router-idが自動的に定義されなかったのは、ipv4アドレスを持つI/Fがひとつもなかったためです。
R1(config)#ipv6 router ospf 1 R1(config-rtr)#router-id 1.1.1.1
router-idを定義する事で、OSPFv3 process 1が正常に起動した事が確認できます。
R1#show ipv6 ospf Routing Process "ospfv3 1" with ID 1.1.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) (Inactive) Number of interfaces in this area is 1 SPF algorithm executed 1 times Number of LSA 3. Checksum Sum 0x020306 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 R1#
検証2 基本設定 R2のみ
- ipv4 addressの定義
router-idが自動的に採番されるように、Loopback 0に対してipv4 addressを割り振ります。
R2(config)#interface Loopback 0 R2(config-if)#ip address 2.2.2.2 255.255.255.255
- OSPFv3の定義
OSPFv3の設定を行います。先ほどと異なりrouter-idが自動的に採番されるため、この設定のみでneighborが確立されます。
R2(config)#interface FastEthernet 1/0 R2(config-if)#ipv6 ospf 1 area 0 R2(config-if)# *Mar 1 00:22:25.747: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet1/0 from LOADING to FULL, Loading Done R2(config-if)#
- OSPFv3の設定確認
OSPFv3の設定を確認します。
R2#show running-config | begin router ipv6 router ospf 1 log-adjacency-changes ! R2#show ipv6 protocols IPv6 Routing Protocol is "connected" IPv6 Routing Protocol is "static" IPv6 Routing Protocol is "ospf 1" Interfaces (Area 0): FastEthernet1/0 Redistribution: None R2#show ipv6 ospf Routing Process "ospfv3 1" with ID 2.2.2.2 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 1 SPF algorithm executed 2 times Number of LSA 6. Checksum Sum 0x02ED87 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 R2#
検証3 再配送の設定
- 再配送の設定
R1, R2で再配送を定義します。
R1(config)#ipv6 router ospf 1 R1(config-rtr)#redistribute connected R2(config)#ipv6 router ospf 1 R2(config-rtr)#redistribute connected
- ルーティングテーブルの確認
再配送されたルートが互いに通知されているかを確認します。
R1#show ipv6 route IPv6 Routing Table - 9 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route 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 LC 2000::1:1/128 [0/0] via ::, Loopback0 OE2 2000::2:2/128 [110/20] via FE80::CE01:DFF:FE24:10, FastEthernet1/0 <- 再配送されたR2 Loopback 0宛てのルート C 2000::10:0/112 [0/0] via ::, FastEthernet0/0 L 2000::10:1/128 [0/0] via ::, FastEthernet0/0 C 2000::20:0/112 [0/0] via ::, FastEthernet1/0 L 2000::20:1/128 [0/0] via ::, FastEthernet1/0 OE2 2000::30:0/112 [110/20] via FE80::CE01:DFF:FE24:10, FastEthernet1/0 <- 再配送されたR2 f0/0宛てのルート L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 R1# R2#show ipv6 route IPv6 Routing Table - 9 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route 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 OE2 2000::1:1/128 [110/20] via FE80::CE00:DFF:FE24:10, FastEthernet1/0 <- 再配送されたR1 Loopback 0宛てのルート LC 2000::2:2/128 [0/0] via ::, Loopback0 OE2 2000::10:0/112 [110/20] via FE80::CE00:DFF:FE24:10, FastEthernet1/0 <- 再配送されたR1 f0/0宛てのルート C 2000::20:0/112 [0/0] via ::, FastEthernet1/0 L 2000::20:2/128 [0/0] via ::, FastEthernet1/0 C 2000::30:0/112 [0/0] via ::, FastEthernet0/0 L 2000::30:2/128 [0/0] via ::, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 R2#
補足 失敗例
- IOS 非対応の場合
IOS12.3を用いた場合は、OSPFv3に対応していなかったため検証できませんでした。ルータがどのIPv6ルーティングプロトコルに対応しているかは、I/Fモードで「ipv6 ?」と入力すると手早く確認する事ができます。
R1(config-if)#ipv6 ospf? % Unrecognized command R1(config-if)#ipv6 ? IPv6 interface subcommands: address Configure IPv6 address on interface cef Cisco Express Forwarding for IPv6 enable Enable IPv6 on interface mtu Set IPv6 Maximum Transmission Unit nat Enable IPv6 NAT on interface nd IPv6 interface Neighbor Discovery subcommands redirects Enable sending of ICMP Redirect messages rip Configure RIP routing protocol router IPv6 Router interface commands traffic-filter Access control list for packets unnumbered Preferred interface for source address selection verify Enable per packet validation R1(config-if)#ipv6 R1#show version Cisco Internetwork Operating System Software IOS (tm) 3600 Software (C3620-J1S3-M), Version 12.3(18), RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by cisco Systems, Inc. Compiled Wed 15-Mar-06 22:18 by dchih Image text-base: 0x60008B00, data-base: 0x619E0000 ROM: ROMMON Emulation Microcode ROM: 3600 Software (C3620-J1S3-M), Version 12.3(18), RELEASE SOFTWARE (fc3) R1 uptime is 13 minutes System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19 System image file is "tftp://255.255.255.255/unknown" cisco 3620 (R4700) processor (revision 0xFF) with 258048K/4096K bytes of memory. Processor board ID 00000000 R4700 CPU at 80MHz, Implementation 33, Rev 1.2 Bridging software. X.25 software, Version 3.0.0. TN3270 Emulation software. 4 Ethernet/IEEE 802.3 interface(s) DRAM configuration is 64 bits wide with parity enabled.
- ipv6 enable忘れ
I/Fに対してipv6を有効にするのを忘れると、以下のようなエラーメッセージが出力されます。
R1(config-if)#ipv6 ospf 1 area 0 OSPFv3: No IPV6 enabled on this interface
添付ファイル