Segment Routing OSPF – LAN Adjacency SID

今回はOSPFのBroadcastネットワーク上でのAdjacency SIDを見ていきます。

 

概要

OSPFのBroadcastネットワークにおけるAdjacency SID

Broadcastネットワークでは、ネイバー毎にAdjacency SIDが生成されます。DRに対するAdjacency SIDはAdj SID Sub-TLV、BDRやDROtherに対するAdjacency SIDはLAN Adj SID Sub-TLVに格納されます。

 

補足として、以下がOSPFのLAN Adj SID Sub-TLVのフォーマットになります。

 

検証内容と設定

基本設定の内容

R1-R2-R3-R4-R5-R6間でOSPF Area 0を構成します。
OSPFでSR-TEを有効にします。
10.3.3.0/24のネットワークタイプのみBroadcast、他のセグメントのネットワークタイプにはP2Pを使用します。
10.3.3.0/24ではR3をDR、R4とR5をDROtherとします。

R1でLoopback Interfaceの1.1.1.1/32にPrefix SIDとして20101を割り当てます。
R2でLoopback Interfaceの2.2.2.2/32にPrefix SIDとして20201を割り当てます。
R3でLoopback Interfaceの3.3.3.3/32にPrefix SIDとして20301を割り当てます。
R4でLoopback Interfaceの4.4.4.4/32にPrefix SIDとして20401を割り当てます。
R5でLoopback Interfaceの5.5.5.5/32にPrefix SIDとして20501を割り当てます。
R6でLoopback Interfaceの6.6.6.6/32にPrefix SIDとして20601を割り当てます。

 

初期設定


interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.1.1 255.255.255.0
!
router ospf 1
 distribute link-state
 router-id 1.1.1.1
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20101
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.1.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.2.2.2 255.255.255.0
!
router ospf 1
 router-id 2.2.2.2
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20201
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.2.2.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.3.3.3 255.255.255.0
!
router ospf 1
 router-id 3.3.3.3
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20301
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.3.3.4 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.4.4.4 255.255.255.0
!
router ospf 1
 router-id 4.4.4.4
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20401
  !
  interface GigabitEthernet0/0/0/0
   priority 0
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.3.3.5 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.5.5.5 255.255.255.0
!
router ospf 1
 router-id 5.5.5.5
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20501
  !
  interface GigabitEthernet0/0/0/0
   priority 0
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 6.6.6.6 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.4.4.6 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.5.5.6 255.255.255.0
!
router ospf 1
 router-id 6.6.6.6
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20601
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            

 

設定と状態の確認

OSPFインタフェースの状態確認

R3の10.3.3.0/24のインタフェースの状態を見ると、R3がDR、R4とR5がDROtherであることが確認できます。

R3

RP/0/RP0/CPU0:R3#show ospf interface GigabitEthernet0/0/0/1

GigabitEthernet0/0/0/1 is up, line protocol is up
  Internet Address 10.3.3.3/24, Area 0, SID 0, Strict-SPF SID 0
  Label stack Primary label 1 Backup label 3 SRTE label 10
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1, MTU 1500, MaxPktSz 1500
  Forward reference No, Unnumbered no,  Bandwidth 1000000
  Designated Router (ID) 3.3.3.3, Interface address 10.3.3.3
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06:050
  Index 3/3, flood queue length 0
  Next 0(0)/0(0)
  Last flood scan length is 7, maximum is 7
  Last flood scan time is 0 msec, maximum is 0 msec
  LS Ack List: current length 0, high water mark 6
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 4.4.4.4
    Adjacent with neighbor 5.5.5.5
  Suppress hello for 0 neighbor(s)
  Multi-area interface Count is 0
            

 

OSPFネイバーの状態確認

R3の10.3.3.0/24のOSPFネイバーの状態を見ると、R4にはAdjacency SID 24001、R5にはAdjacency SID 24002が割り当てられていることが確認できます。

R3

RP/0/RP0/CPU0:R3#show ospf neighbor GigabitEthernet0/0/0/1 detail

* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up

Neighbors for OSPF 1

 Neighbor 4.4.4.4, interface address 10.3.3.4
    In the area 0 via interface GigabitEthernet0/0/0/1
    Neighbor priority is 0, State is FULL, 6 state changes
    DR is 10.3.3.3 BDR is 0.0.0.0
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:38
    Neighbor is up for 02:07:43
    Number of DBD retrans during last exchange 0
    Index 2/2, retransmission queue length 0, number of retransmission 2
    First 0(0)/0(0) Next 0(0)/0(0)
    Last retransmission scan length is 2, maximum is 2
    Last retransmission scan time is 0 msec, maximum is 0 msec
    LS Ack list: NSR-sync pending 0, high water mark 0
    Adjacency SIDs:
        Label: 24001,    Dynamic, Unprotected
    Neighbor Interface ID: 7

 Neighbor 5.5.5.5, interface address 10.3.3.5
    In the area 0 via interface GigabitEthernet0/0/0/1
    Neighbor priority is 0, State is FULL, 6 state changes
    DR is 10.3.3.3 BDR is 0.0.0.0
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:35
    Neighbor is up for 02:06:34
    Number of DBD retrans during last exchange 0
    Index 3/3, retransmission queue length 0, number of retransmission 1
    First 0(0)/0(0) Next 0(0)/0(0)
    Last retransmission scan length is 2, maximum is 2
    Last retransmission scan time is 0 msec, maximum is 0 msec
    LS Ack list: NSR-sync pending 0, high water mark 0
    Adjacency SIDs:
        Label: 24002,    Dynamic, Unprotected

Total neighbor count: 2

            

 

LSAの状態確認

R3が生成した10.3.3.0/24のOSPFv2 Extended Prefix Opaque LSAを見ると、DROtherのRouter IDとAdjacency SIDを格納したLAN Adj SID Sub-TLVが存在することが確認できます。

R3

RP/0/RP0/CPU0:R3#show ospf database opaque-area 8.0.0.8 adv-router 3.3.3.3


            OSPF Router with ID (3.3.3.3) (Process ID 1)

                Type-10 Opaque Link Area Link States (Area 0)

  LS age: 1260
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 8.0.0.8
  Opaque Type: 8
  Opaque ID: 8
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000004
  Checksum: 0xbae3
  Length: 104

    Extended Link TLV: Length: 80
      Link-type : 2
      Link ID   : 10.3.3.3
      Link Data : 10.3.3.3

     LAN Adj sub-TLV: Length: 11
       Flags      : 0x60
       MTID       : 0
       Weight     : 0
       Neighbor ID: 4.4.4.4
       Label     : 24001

     LAN Adj sub-TLV: Length: 11
       Flags      : 0x60
       MTID       : 0
       Weight     : 0
       Neighbor ID: 5.5.5.5
       Label     : 24002

     Link MSD sub-TLV: Length: 2
        Type: 1, Value 10

     Link MAX BW sub-TLV: Length: 4
         Maximum bandwidth : 125000000

     ASLA sub-TLV: Length: 16
         SABM Len:    4
         UDABM Len:   0
         SABM Val:    0x40000000
          TE Metric : 1
            

 

以下はR3が生成した10.3.3.0/24のOSPFv2 Extended Prefix Opaque LSAのキャプチャになります。DROtherのRouter IDとAdjacency SIDを格納したLAN Adj SID Sub-TLVが存在することが確認できます。

 

R4が生成した10.3.3.0/24のOSPFv2 Extended Prefix Opaque LSAを見ると、DRのRouter IDとAdjacency SIDはAdj SID Sub-TLV、DROtherのRouter IDとAdjacency SIDはLAN Adj SID Sub-TLVに格納されていることが確認できます。

R4

RP/0/RP0/CPU0:R4#show ospf database opaque-area 8.0.0.7 adv-router 4.4.4.4


            OSPF Router with ID (3.3.3.3) (Process ID 1)

                Type-10 Opaque Link Area Link States (Area 0)

  LS age: 1308
  Options: (No TOS-capability, DC)
  LS Type: Opaque Area Link
  Link State ID: 8.0.0.7
  Opaque Type: 8
  Opaque ID: 7
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000004
  Checksum: 0x3f7a
  Length: 100

    Extended Link TLV: Length: 76
      Link-type : 2
      Link ID   : 10.3.3.3
      Link Data : 10.3.3.4

     Adj sub-TLV: Length: 7
        Flags     : 0x60
        MTID      : 0
        Weight    : 0
        Label     : 24000

     LAN Adj sub-TLV: Length: 11
       Flags      : 0x60
       MTID       : 0
       Weight     : 0
       Neighbor ID: 5.5.5.5
       Label     : 24001

     Link MSD sub-TLV: Length: 2
        Type: 1, Value 10

     Link MAX BW sub-TLV: Length: 4
         Maximum bandwidth : 125000000

     ASLA sub-TLV: Length: 16
         SABM Len:    4
         UDABM Len:   0
         SABM Val:    0x40000000
          TE Metric : 1
            

 

以下はR4が生成した10.3.3.0/24のOSPFv2 Extended Prefix Opaque LSAのキャプチャになります。DRのRouter IDとAdjacency SIDはAdj SID Sub-TLV、DROtherのRouter IDとAdjacency SIDはLAN Adj SID Sub-TLVに格納されていることが確認できます。

 

R4を経由させるSR-TE Policyを設定

SR-TE Policyの設定確認

R1にEnd-pointに6.6.6.6を指定したSR-TE Policyを設定します。R3のR4に対するAdjacency SID(24001)を使用して、R4経由でパケットを転送させます。

R1

segment-routing
 traffic-eng
  segment-list SID_LIST
   index 10 mpls label 20301
   index 20 mpls label 24001
   index 30 mpls label 20601
  !
  policy SR-TE_POLICY
   color 1 end-point ipv4 6.6.6.6
   autoroute
    include all
   !
   candidate-paths
    preference 10
     explicit segment-list SID_LIST
            

 

SR-TE Policyの状態確認

R1のSR-TE Policyを見ると、Prefix SID 20301を使用してR3にパケットを転送し、その後、Adjacency SID 24001を使用してR3からR4にパケットを転送することが確認できます。

R1

RP/0/RP0/CPU0:R1#show segment-routing traffic-eng policy

SR-TE policy database
---------------------

Color: 1, End-point: 6.6.6.6
  Name: srte_c_1_ep_6.6.6.6
  Status:
    Admin: up  Operational: up for 00:03:29 (since Jul 12 18:51:04.393)
  Candidate-paths:
    Preference: 10 (configuration) (active)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST (valid)
        Weight: 1, Metric Type: TE
          20301 [Prefix-SID, 3.3.3.3]
          24001
          20601
  Attributes:
    Binding SID: 24002
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
            

 

疎通確認

R1の1.1.1.1からR6の6.6.6.6へTracerouteを実施します。

 

Adjacency SID 24001によって、R3はパケットをR4に転送していることが確認できます。

R1

RP/0/RP0/CPU0:R1#traceroute 6.6.6.6 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.1.2 [MPLS: Labels 20301/24001/20601 Exp 0] 81 msec  45 msec  47 msec
 2  10.2.2.3 [MPLS: Labels 24001/20601 Exp 0] 70 msec  26 msec  44 msec
 3  10.3.3.4 [MPLS: Label 20601 Exp 0] 96 msec  36 msec  34 msec
 4  10.4.4.6 186 msec  *  54 msec
            

 

R5を経由させるSR-TE Policyを設定

SR-TE Policyの設定確認

R1にEnd-pointに6.6.6.6を指定したSR-TE Policyを設定します。R3のR5に対するAdjacency SID(24002)を使用して、R5経由でパケットを転送させます。

R1

segment-routing
 traffic-eng
  segment-list SID_LIST
   index 10 mpls label 20301
   index 20 mpls label 24002
   index 30 mpls label 20601
  !
  policy SR-TE_POLICY
   color 1 end-point ipv4 6.6.6.6
   autoroute
    include all
   !
   candidate-paths
    preference 10
     explicit segment-list SID_LIST
            

 

SR-TE Policyの状態確認

R1のSR-TE Policyを見ると、Prefix SID 20301を使用してR3にパケットを転送し、その後、Adjacency SID 24002を使用してR3からR5にパケットを転送することが確認できます。

R1

RP/0/RP0/CPU0:R1#show segment-routing traffic-eng policy

SR-TE policy database
---------------------

Color: 1, End-point: 6.6.6.6
  Name: srte_c_1_ep_6.6.6.6
  Status:
    Admin: up  Operational: up for 00:16:41 (since Jul 12 18:51:04.393)
  Candidate-paths:
    Preference: 10 (configuration) (active)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST (valid)
        Weight: 1, Metric Type: TE
          20301 [Prefix-SID, 3.3.3.3]
          24002
          20601
  Attributes:
    Binding SID: 24002
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
            

 

疎通確認

R1の1.1.1.1からR6の6.6.6.6へTracerouteを実施します。

 

Adjacency SID 24002によって、R3はパケットをR5に転送していることが確認できます。

R1

RP/0/RP0/CPU0:R1#traceroute 6.6.6.6 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.1.2 [MPLS: Labels 20301/24002/20601 Exp 0] 42 msec  46 msec  36 msec
 2  10.2.2.3 [MPLS: Labels 24002/20601 Exp 0] 41 msec  18 msec  54 msec
 3  10.3.3.5 [MPLS: Label 20601 Exp 0] 77 msec  49 msec  31 msec
 4  10.5.5.6 44 msec  *  41 msec

            

コメント

タイトルとURLをコピーしました