OSPF and VRF Lite

TASK

OSPF利用時にVRF有無により差がでる。

DIAGRAM

 

VERIFY

R2のテーブルを確認すると以下のとおり。

R2#sh ip ro os | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
O        10.0.0.1/32 [110/2] via 10.1.2.1, 00:17:22, FastEthernet0/0
O        10.0.0.3/32 [110/3] via 10.1.2.1, 00:17:12, FastEthernet0/0
O        10.0.0.4/32 [110/2] via 10.2.46.4, 00:09:20, FastEthernet0/1
O E2     10.0.0.5/32 [110/20] via 10.1.2.1, 00:13:06, FastEthernet0/0
O        10.0.0.6/32 [110/2] via 10.2.46.6, 00:08:27, FastEthernet0/1
O        10.1.3.0/24 [110/2] via 10.1.2.1, 00:17:22, FastEthernet0/0
O IA     10.3.5.0/24 [110/3] via 10.1.2.1, 00:17:12, FastEthernet0/0
O     192.168.4.0/24 [110/2] via 10.2.46.4, 00:09:20, FastEthernet0/1
O IA  192.168.5.0/24 [110/4] via 10.1.2.1, 00:13:24, FastEthernet0/0

VRF有無によるテーブルの違いをみてみると、どうやらType 3と Type 5がない。

R4#sh ip ro vrf MY-VRF os | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O        10.0.0.6/32 [110/2] via 10.2.46.6, 00:09:44, FastEthernet0/0
R4#

R6#sh ip ro os | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O IA     10.0.0.1/32 [110/3] via 10.2.46.2, 00:06:22, FastEthernet0/0
O IA     10.0.0.2/32 [110/2] via 10.2.46.2, 00:06:22, FastEthernet0/0
O IA     10.0.0.3/32 [110/4] via 10.2.46.2, 00:06:22, FastEthernet0/0
O        10.0.0.4/32 [110/2] via 10.2.46.4, 00:06:22, FastEthernet0/0
O E2     10.0.0.5/32 [110/20] via 10.2.46.2, 00:06:22, FastEthernet0/0
O IA     10.1.2.0/24 [110/2] via 10.2.46.2, 00:06:22, FastEthernet0/0
O IA     10.1.3.0/24 [110/3] via 10.2.46.2, 00:06:22, FastEthernet0/0
O IA     10.3.5.0/24 [110/4] via 10.2.46.2, 00:06:22, FastEthernet0/0
O     192.168.4.0/24 [110/2] via 10.2.46.4, 00:06:22, FastEthernet0/0
O IA  192.168.5.0/24 [110/5] via 10.2.46.2, 00:06:22, FastEthernet0/0
R6#

LSDB上はある。

R4#sh ip os data | b Sum
                Summary Net Link States (Area 246)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.1        10.0.0.2        1236        0x80000001 0x00AA79
10.0.0.2        10.0.0.2        1236        0x80000001 0x00968D
10.0.0.3        10.0.0.2        1226        0x80000001 0x00A080
10.1.2.0        10.0.0.2        1236        0x80000001 0x00889A
10.1.3.0        10.0.0.2        1236        0x80000001 0x008799
10.3.5.0        10.0.0.2        1226        0x80000001 0x0063B8
192.168.5.0     10.0.0.2        998         0x80000001 0x00625C

                Summary ASB Link States (Area 246)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.5        10.0.0.2        986         0x80000001 0x007E9F

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.0.0.5        10.0.0.5        983         0x80000001 0x00BAC7 0
R4#

個々をみてみると「Routing Bit Set~」に差がある

R4#sh ip os data sum 10.0.0.1

            OSPF Router with ID (10.0.0.4) (Process ID 65000)

                Summary Net Link States (Area 246)

  LS age: 1310
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.0.0.1 (summary Network Number)
  Advertising Router: 10.0.0.2
  LS Seq Number: 80000001
  Checksum: 0xAA79
  Length: 28
  Network Mask: /32
        MTID: 0         Metric: 2

R4#

R4#sh ip os data ex 10.0.0.5

            OSPF Router with ID (10.0.0.4) (Process ID 65000)

                Type-5 AS External Link States

  LS age: 1108
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 10.0.0.5 (External Network Number )
  Advertising Router: 10.0.0.5
  LS Seq Number: 80000001
  Checksum: 0xBAC7
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

R4#

R6#sh ip os data sum 10.0.0.1

            OSPF Router with ID (10.0.0.6) (Process ID 65000)

                Summary Net Link States (Area 246)

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1157
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.0.0.1 (summary Network Number)
  Advertising Router: 10.0.0.2
  LS Seq Number: 80000001
  Checksum: 0xAA79
  Length: 28
  Network Mask: /32
        MTID: 0         Metric: 2

R6#

R6#sh ip os data ex 10.0.0.5

            OSPF Router with ID (10.0.0.6) (Process ID 65000)

                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 922
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 10.0.0.5 (External Network Number )
  Advertising Router: 10.0.0.5
  LS Seq Number: 80000001
  Checksum: 0xBAC7
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

R6#

このコマンドの存在をすっかり忘れていた。

R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#do sh run | sec ospf
 ip ospf 65000 area 246
 ip ospf 65000 area 246
 ip ospf 65000 area 246
router ospf 65000 vrf MY-VRF
 router-id 10.0.0.4
R4(config)#capabilit
R4(config)#cap
R4(config)#router ospf 65000 vrf MY-VRF
R4(config-router)#
R4(config-router)#capability vrf-lite
R4(config-router)#
*May  8 22:17:17.707: %OSPF-5-ADJCHG: Process 65000, Nbr 10.0.0.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*May  8 22:17:17.711: %OSPF-5-ADJCHG: Process 65000, Nbr 10.0.0.6 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*May  8 22:17:17.807: %OSPF-5-ADJCHG: Process 65000, Nbr 10.0.0.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
*May  8 22:17:17.807: %OSPF-5-ADJCHG: Process 65000, Nbr 10.0.0.6 on FastEthernet0/0 from LOADING to FULL, Loading Done
R4(config-router)#
R4(config-router)#end
R4#

これでType 3もType 5もでてくれる

R4#sh ip ro vrf MY-VRF os | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O IA     10.0.0.1/32 [110/3] via 10.2.46.2, 00:06:37, FastEthernet0/0
O IA     10.0.0.2/32 [110/2] via 10.2.46.2, 00:06:37, FastEthernet0/0
O IA     10.0.0.3/32 [110/4] via 10.2.46.2, 00:06:37, FastEthernet0/0
O E2     10.0.0.5/32 [110/20] via 10.2.46.2, 00:06:37, FastEthernet0/0
O        10.0.0.6/32 [110/2] via 10.2.46.6, 00:06:37, FastEthernet0/0
O IA     10.1.2.0/24 [110/2] via 10.2.46.2, 00:06:37, FastEthernet0/0
O IA     10.1.3.0/24 [110/3] via 10.2.46.2, 00:06:37, FastEthernet0/0
O IA     10.3.5.0/24 [110/4] via 10.2.46.2, 00:06:37, FastEthernet0/0
O IA  192.168.5.0/24 [110/5] via 10.2.46.2, 00:06:37, FastEthernet0/0
R4#

個々をみてもRouting Bit Setが表示される

R4#sh ip os data sum 10.0.0.1

            OSPF Router with ID (10.0.0.4) (Process ID 65000)

                Summary Net Link States (Area 246)

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1774
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.0.0.1 (summary Network Number)
  Advertising Router: 10.0.0.2
  LS Seq Number: 80000001
  Checksum: 0xAA79
  Length: 28
  Network Mask: /32
        MTID: 0         Metric: 2

R4#
R4#sh ip os data ex 10.0.0.5

            OSPF Router with ID (10.0.0.4) (Process ID 65000)

                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1528
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 10.0.0.5 (External Network Number )
  Advertising Router: 10.0.0.5
  LS Seq Number: 80000001
  Checksum: 0xBAC7
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

R4#

NOTE

Area 246がStubの時もcapability vrf-liteがないとデフォルトルートが表示されない

REFERENCE

MPLS PE-CE Routing with OSPF

コメント