DynagenでCCIEを目指す
capability transit
最終更新:
it_certification
-
view
1. 目的
- OSPF Area Transit Capabilityについて確認します。
- 本機能はデフォルトで有効であり、これによって到達性が保証されたりより良い経路選択がなされたりする事が多いです。
- 本検証では、OSPF Area Transit Capabilityを無効にする事によって生じる問題について考察します。
- 本機能の説明をCiscoから引用すると以下の通りです。
The OSPF Area Transit Capability feature provides an OSPF Area Border Router (ABR) with the ability to discover shorter paths through the transit area for forwarding traffic that would normally need to travel through the virtual-link path. This functionality allows Cisco IOS software to be compliant with RFC 2328.
2. 構成
2.1. 設定概要
- OSPFによってルーティングします。
- R3からR1へのコストを構成図の通り定義します。
- 破線はvirtual-linkを表しますが、初期設定時には投入しません。
2.2. 構成図

2.3. netファイル
model = 3660 [localhost] [[3660]] image = C:\Program Files\Dynamips\images\c3660-ik9o3s-mz.124-6.T.bin ram = 128 [[ROUTER R1]] f0/1 = R2 f0/1 f0/0 = R4 f0/0 [[ROUTER R2]] f0/0 = R3 f0/0 [[ROUTER R3]] f1/0 = R4 f1/0 [[ROUTER R4]]
2.4. 初期設定
- 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 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.14.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 0.0.0.0 255.255.255.255 area 0 ! 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 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.23.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.12.2 255.255.255.0 ip ospf cost 1 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 network 192.168.23.2 0.0.0.0 area 1 ! ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! 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 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.23.3 255.255.255.0 ip ospf cost 10 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.3.3 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.34.3 255.255.255.0 ip ospf cost 1 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 1 network 192.168.3.3 0.0.0.0 area 3 network 192.168.23.3 0.0.0.0 area 1 network 192.168.34.3 0.0.0.0 area 1 ! ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! 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 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.14.4 255.255.255.0 ip ospf cost 1 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.4.4 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.34.4 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 4.4.4.4 0.0.0.0 area 0 network 192.168.4.4 0.0.0.0 area 4 network 192.168.14.4 0.0.0.0 area 0 network 192.168.34.4 0.0.0.0 area 1 ! ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
3. [検証] transit areaによる経路選択
3.1. virtual-linkの設定
R2, R3間でvirtual-linkを定義します。
R2(config)#router ospf 1 R2(config-router)#area 1 virtual-link 3.3.3.3 R3(config)#router ospf 1 R3(config-router)#area 1 virtual-link 2.2.2.2 R3(config-router)#^Z R3# *Mar 1 00:20:20.879: %SYS-5-CONFIG_I: Configured from console by console *Mar 1 00:20:30.887: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL1 from LOADING to FULL, Loading Done R3#
3.2. 経路確認
R3からR1への経路を確認します。経路は以下が存在します。
area | cost | |
---|---|---|
R2経由 | area 0 | 12 |
R4経由 | area 1 | 3 |
area 0のみで到達できる経路が存在する場合は、コストに関わらずarea 0が優先されます。したがって、この原則に従えば、R3からR1へのルートはR2経由になります。
しかし、以下のように実際に経路を確認すると、R4経由になっています。これは、OSPF Area Transit Capabilityによるものです。この機能が有効になっていると、コストに応じて、backbone areaの代わりにtransit area (恐らく非backbone areaの事を指していると思われます)を使用した経路がルーティングテーブルに載ります。
しかし、以下のように実際に経路を確認すると、R4経由になっています。これは、OSPF Area Transit Capabilityによるものです。この機能が有効になっていると、コストに応じて、backbone areaの代わりにtransit area (恐らく非backbone areaの事を指していると思われます)を使用した経路がルーティングテーブルに載ります。
R3#show ip route | i 1\. 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/3] via 192.168.34.4, 00:01:20, FastEthernet1/0 R3#
3.3. OSPF Area Transit Capability無効化
OSPF Area Transit Capabilityを無効化します。
R3(config)#router ospf 1 R3(config-router)#no capability transit
3.4. 経路変化の確認
R3からR1への経路を確認します。OSPF Area Transit Capabilityを無効化する事によって、コストの大きいbackbone area経由(R2経由)が優先された事を確認します。
R3#clear ip ospf process Reset ALL OSPF processes? [no]: yes R3# *Mar 1 00:23:00.319: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL1 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:23:00.363: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet1/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:23:00.363: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:23:07.071: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet1/0 from LOADING to FULL, Loading Done *Mar 1 00:23:09.247: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done *Mar 1 00:23:26.063: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL1 from LOADING to FULL, Loading Done R3# R3#show ip route | i 1\. 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/12] via 192.168.23.2, 00:00:06, FastEthernet0/0 R3#
3.5. 設定確認
OSPF Area Transit Capabilityが有効かどうかはshow ip ospfで確認できます。
R3#show ip ospf Routing Process "ospf 1" with ID 3.3.3.3 Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Does not support area transit capability <- 無効になった事を確認 Initial SPF schedule delay 5000 msecs
4. [検証] transit areaによるルーティングループ
4.1. virtual-linkの設定
OSPF Area Transit Capabilityを無効にする事によって、ルーティングループが発生してしまう事もあります。
R1, R4間を切断し、R2, R4間でvirtual-linkを作成します。
R1, R4間を切断し、R2, R4間でvirtual-linkを作成します。
R4(config)#interface FastEthernet 0/0 R4(config-if)#shutdown R4(config-if)# *Mar 1 00:25:55.275: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:25:57.263: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down *Mar 1 00:25:58.263: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down R4(config-if)#exit R4(config)# R4(config)#router ospf 1 R4(config-router)#no network 4.4.4.4 0.0.0.0 area 0 R4(config-router)#network 4.4.4.4 0.0.0.0 area 1 R4(config-router)#area 1 virtual-link 2.2.2.2 R2(config)#router ospf 1 R2(config-router)#area 1 virtual-link 4.4.4.4 R2(config-router)# *Mar 1 00:27:04.119: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on OSPF_VL4 from LOADING to FULL, Loading Done R2(config-router)#
4.2. ルーティングループの確認
R2からR4 f0/1へ疎通不能になった事を確認します。
R2#ping 192.168.4.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.4.4, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) R2# R2# R2#traceroute 192.168.4.4 Type escape sequence to abort. Tracing the route to 192.168.4.4 1 192.168.23.3 40 msec 36 msec 24 msec 2 192.168.23.2 20 msec 80 msec 32 msec 3 * * R2#
R2, R3のルーティングテーブルを確認すると、R2, R3間でルーティングループが発生している事が分かります。
R3はOSPF Area Transit Capabilityが無効化されているので、backbone areaが優先されR4へのNexthopがR2になってしまいます。
R3はOSPF Area Transit Capabilityが無効化されているので、backbone areaが優先されR4へのNexthopがR2になってしまいます。
R2#show ip route | i 192\.168\.4\. O IA 192.168.4.0/24 [110/3] via 192.168.23.3, 00:03:58, FastEthernet0/0 R2# R3#show ip route | i 192\.168\.4\. O IA 192.168.4.0/24 [110/13] via 192.168.23.2, 00:03:19, FastEthernet0/0 R3#
4.3. OSPF Area Transit Capability有効化
OSPF Area Transit Capabilityを有効にします。
R3(config)#router ospf 1 R3(config-router)#capability transit R3(config-router)#^Z R3# *Mar 1 00:31:43.467: %SYS-5-CONFIG_I: Configured from console by console R3# R3#clear ip ospf process Reset ALL OSPF processes? [no]: yes R3# *Mar 1 00:31:51.563: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL1 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:31:51.603: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet1/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:31:51.603: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:31:57.007: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet1/0 from LOADING to FULL, Loading Done *Mar 1 00:31:59.235: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done *Mar 1 00:32:17.275: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on OSPF_VL1 from LOADING to FULL, Loading Done R3#
ルーティングループが解消された事を確認します。
R3#show ip route | i 192\.168\.4\. O IA 192.168.4.0/24 [110/2] via 192.168.34.4, 00:00:11, FastEthernet1/0 R3#
4.4. 疎通確認
R2からR4への疎通が可能になった事を確認します。
R2#ping 192.168.4.4 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.4.4, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/73/156 ms R2#
添付ファイル