DynagenでCCIEを目指す
20100430 OPSFv3 複数instance環境
最終更新:
it_certification
-
view
目的
- OSPFv3で、複数instance環境を構築します。
構成
- 設定概要
- OSPFv3によってルーティングします。
- 初期設定時は下記構成図と異なり、全てのルータはArea 0 instance 0に所属します。
- 構成図

- netファイル
#ghostios = True #sparsemem = True model = 3660 [localhost] [[3660]] image = C:\Program Files\Dynamips\images\c3660-ik9o3s-mz.124-6.T.bin ram = 128 [[ROUTER R1]] f0/0 = LAN 1 [[ROUTER R2]] f0/0 = LAN 1 [[ROUTER R3]] f0/0 = LAN 1 [[ROUTER R4]] f0/0 = LAN 1
- 初期設定 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 ip address 1.1.1.1 255.255.255.255 ipv6 address 2000::1:1/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:1/112 ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! ip http server no ip http secure-server ! ! ! ipv6 router ospf 1 log-adjacency-changes redistribute connected ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! 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 ip address 2.2.2.2 255.255.255.255 ipv6 address 2000::2:2/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:2/112 ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! ip http server no ip http secure-server ! ! ! ipv6 router ospf 1 log-adjacency-changes redistribute connected ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- 初期設定 R3
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ! resource policy ! memory-size iomem 5 ! ! ip cef ! ! ! ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ipv6 address 2000::3:3/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:3/112 ipv6 enable ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! ip http server no ip http secure-server ! ! ! ipv6 router ospf 1 log-adjacency-changes redistribute connected ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- 初期設定 R4
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R4 ! boot-start-marker boot-end-marker ! ! no aaa new-model ! resource policy ! memory-size iomem 5 ! ! ip cef ! ! ! ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ipv6 address 2000::4:4/128 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:4/112 ipv6 enable ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! ip http server no ip http secure-server ! ! ! ipv6 router ospf 1 log-adjacency-changes redistribute connected ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 初期設定の確認
- ルーティングテーブルの確認
neighborが確立されている事とルータ間で経路が交換できている事を確認します。
R1#show ipv6 route IPv6 Routing Table - 8 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:FFF:FE94:0, FastEthernet0/0 OE2 2000::3:3/128 [110/20] via FE80::CE02:FFF:FE94:0, FastEthernet0/0 OE2 2000::4:4/128 [110/20] via FE80::CE03:FFF:FE94:0, FastEthernet0/0 C 2000::10:0/112 [0/0] via ::, FastEthernet0/0 L 2000::10:1/128 [0/0] via ::, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 R1# R1# R1#show ipv6 ospf neighbor Neighbor ID Pri State Dead Time Interface ID Interface 4.4.4.4 1 FULL/DROTHER 00:00:33 4 FastEthernet0/0 3.3.3.3 1 FULL/DROTHER 00:00:37 4 FastEthernet0/0 2.2.2.2 1 FULL/DR 00:00:37 4 FastEthernet0/0 R1#
- instanceの確認
OPSFv3ではprocess, areaに加えて、instanceという新しい概念が登場します。instanceが同一であるルータのみ経路を交換する仕様になっています。
まずは、デフォルトでInstance IDが0になっている事を確認します。
まずは、デフォルトでInstance IDが0になっている事を確認します。
R1#show ipv6 ospf interface FastEthernet0/0 is up, line protocol is up Link Local Address FE80::CE00:FFF:FE94:0, Interface ID 4 Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 <- Instance IDが0になっています。 Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 2.2.2.2, local address FE80::CE01:FFF:FE94:0 Backup Designated router (ID) 1.1.1.1, local address FE80::CE00:FFF:FE94:0 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:01 Index 1/1/1, 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 4 msec Neighbor Count is 3, Adjacent neighbor count is 3 Adjacent with neighbor 4.4.4.4 Adjacent with neighbor 3.3.3.3 Adjacent with neighbor 2.2.2.2 (Designated Router) Suppress hello for 0 neighbor(s) R1#
検証2 複数Instance環境の構築
- R1の設定
R1のinstance IDを変更します。設定を投入すると、R2, R3, R4とinstance IDが異なるため、neighborが切れた旨のメッセージを確認できます。
R1(config)#interface FastEthernet 0/0 R1(config-if)#ipv6 ospf 1 area 0 instance 1 R1(config-if)# *Mar 1 00:19:51.263: %OSPFv3-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired *Mar 1 00:19:52.811: %OSPFv3-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired *Mar 1 00:19:53.139: %OSPFv3-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead time expired R1(config-if)#
設定が反映されている事を確認します。
R1#show run | begin FastEthernet0/0 interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:1/112 ipv6 ospf 1 area 0 instance 1 <- Instance IDを確認 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! R1#show ipv6 ospf interface FastEthernet0/0 is up, line protocol is up Link Local Address FE80::CE00:FFF:FE94:0, Interface ID 4 Area 0, Process ID 1, Instance ID 1, Router ID 1.1.1.1 <- Instance IDを確認 Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 1.1.1.1, local address FE80::CE00:FFF:FE94:0 No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:01 Index 1/1/1, 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 4 msec Neighbor Count is 0, Adjacent neighbor count is 0 Suppress hello for 0 neighbor(s) R1#
- R2の設定
R2のInstance IDを変更します。設定を投入すると、R1とneighborを確立し、R3, R4とのneighborを切断する様子が読み取れます。
R2(config)#interface FastEthernet 0/0 R2(config-if)#ipv6 ospf 1 area 0 instance 1 R2# *Mar 1 00:21:32.255: %SYS-5-CONFIG_I: Configured from console by console *Mar 1 00:21:33.263: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done *Mar 1 00:22:00.603: %OSPFv3-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired *Mar 1 00:22:05.619: %OSPFv3-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
設定が反映されている事を確認します。
R2#show running-config | begin FastEthernet0/0 interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::10:2/112 ipv6 ospf 1 area 0 instance 1 <- Instance IDを確認 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! R2# R2#show ipv6 ospf interface FastEthernet0/0 is up, line protocol is up Link Local Address FE80::CE01:FFF:FE94:0, Interface ID 4 Area 0, Process ID 1, Instance ID 1, Router ID 2.2.2.2 <- Instance IDを確認 Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 2.2.2.2, local address FE80::CE01:FFF:FE94:0 Backup Designated router (ID) 1.1.1.1, local address FE80::CE00:FFF:FE94:0 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:02 Index 1/1/1, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 2, maximum is 3 Last flood scan time is 0 msec, maximum is 4 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)
- ルーティングテーブルの確認
R1はR2とのみ経路を交換している事を確認します。
R1#show ipv6 ospf neighbor Neighbor ID Pri State Dead Time Interface ID Interface 2.2.2.2 1 FULL/DR 00:00:33 4 FastEthernet0/0 R1# R1# R1#show ipv6 route IPv6 Routing Table - 6 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:FFF:FE94:0, FastEthernet0/0 <- R2 Loopback 0への経路 C 2000::10:0/112 [0/0] via ::, FastEthernet0/0 L 2000::10:1/128 [0/0] via ::, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 R1#
R3はR4とのみ経路を交換している事を確認します
R3#show ipv6 ospf neighbor Neighbor ID Pri State Dead Time Interface ID Interface 4.4.4.4 1 FULL/DR 00:00:37 4 FastEthernet0/0 R3# R3# R3#show ipv6 route IPv6 Routing Table - 6 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::3:3/128 [0/0] via ::, Loopback0 OE2 2000::4:4/128 [110/20] via FE80::CE03:FFF:FE94:0, FastEthernet0/0 <- R4 Loopback 0への経路 C 2000::10:0/112 [0/0] via ::, FastEthernet0/0 L 2000::10:3/128 [0/0] via ::, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0 R3#
- パケットの確認
OSPFv3のパケットをキャプチャします。OSPF header内に、Instance IDというフィールドが見られます。ルータはこの値を見て、同一Instanceであるかどうかを判断していると思われます。

