Mikan Network Lab.

ネットワーク技術やCisco製品に関して、勉強・検証した内容を発信しています。

Mikan Network Lab.

IOS-XR: スタティックRPの設定

Cisco IOS-XRにおけるスタティックRPの設定方法を記載します。

目次

1. 前提条件

本記事は以下に基づいて作成しています。
・Cisco VIRL 1.6.65
・Cisco IOS XR Software, Version 6.1.3

2. 要件

  • Senderから239.1.1.1宛にマルチキャストパケットを送信すると、Reciverから応答が得られるように設定する。
  • RPの選出はスタティックRPを使用し、XR2をRPとする。

構成図

3. 設定例

3.1. コンフィグ

要件を満たす設定例を以下に示します。

 XR1 

hostname XR1
interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 192.168.12.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 192.168.13.1 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 192.168.1.1 255.255.255.0
!
router ospf 1
 area 0
  interface Loopback0
  !
  interface GigabitEthernet0/0/0/0
  !
  interface GigabitEthernet0/0/0/1
  !
  interface GigabitEthernet0/0/0/2
  !
 !
!
multicast-routing
 address-family ipv4
  interface GigabitEthernet0/0/0/0
   enable
  !
  interface GigabitEthernet0/0/0/1
   enable
  !
  interface GigabitEthernet0/0/0/2
   enable
  !
 !
!
router pim
 address-family ipv4
  rp-address 2.2.2.2
 !
!
end

 XR2 

hostname XR2
interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 192.168.23.2 255.255.255.0
!
router ospf 1
 area 0
  interface Loopback0
  !
  interface GigabitEthernet0/0/0/0
  !
  interface GigabitEthernet0/0/0/1
  !
 !
!
multicast-routing
 address-family ipv4
  interface Loopback0
   enable
  !
  interface GigabitEthernet0/0/0/0
   enable
  !
  interface GigabitEthernet0/0/0/1
   enable
  !
 !
!
router pim
 address-family ipv4
  rp-address 2.2.2.2
 !
!
end

 XR3 

hostname XR3
interface Loopback0
 ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 192.168.13.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 192.168.23.3 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 192.168.3.3 255.255.255.0
!
router ospf 1
 area 0
  interface Loopback0
  !
  interface GigabitEthernet0/0/0/0
  !
  interface GigabitEthernet0/0/0/1
  !
  interface GigabitEthernet0/0/0/2
  !
 !
!
multicast-routing
 address-family ipv4
  interface GigabitEthernet0/0/0/0
   enable
  !
  interface GigabitEthernet0/0/0/1
   enable
  !
  interface GigabitEthernet0/0/0/2
   enable
  !
 !
!
router pim
 address-family ipv4
  rp-address 2.2.2.2
 !
!
end

3.2. 解説

コンフィグの解説を以下に記載します。

 XR1 

multicast-routing
 address-family ipv4
  interface GigabitEthernet0/0/0/0
   enable
  !
  interface GigabitEthernet0/0/0/1
   enable
  !
  interface GigabitEthernet0/0/0/2
   enable
  !
 !
!

  • Gi0/0/0/0、Gi0/0/0/1、Gi0/0/0/2でマルチキャストルーティングを有効化している。
  • IOS-XRではマルチキャストルーティングを有効化すると、PIMとIGMPも自動的に有効化される。


 XR1 

router pim
 address-family ipv4
  rp-address 2.2.2.2
 !
!

  • IPアドレス2.2.2.2(XR2)をRPとして設定している。

4. 動作確認

4.1. show pim neighbor

PIMネイバーが確立していることを確認します。

RP/0/0/CPU0:XR1#show pim neighbor
Tue Aug 18 02:50:33.494 UTC

PIM neighbors in VRF default
Flag: B - Bidir capable, P - Proxy capable, DR - Designated Router,
      E - ECMP Redirect capable
      * indicates the neighbor created for this router

Neighbor Address             Interface              Uptime    Expires  DR pri   Flags

192.168.12.1*                GigabitEthernet0/0/0/0 00:23:09  00:01:28 1      B E
192.168.12.2                 GigabitEthernet0/0/0/0 00:18:40  00:01:26 1 (DR) B
192.168.13.1*                GigabitEthernet0/0/0/1 00:23:09  00:01:34 1      B E
192.168.13.3                 GigabitEthernet0/0/0/1 00:19:22  00:01:34 1 (DR) B
192.168.1.1*                 GigabitEthernet0/0/0/2 00:23:09  00:01:44 1 (DR) B E

  • XR1は192.168.12.2(XR2)、192.168.13.3(XR3)とPIMネイバーを確立している。


RP/0/0/CPU0:XR2#show pim neighbor
Tue Aug 18 02:50:38.984 UTC

PIM neighbors in VRF default
Flag: B - Bidir capable, P - Proxy capable, DR - Designated Router,
      E - ECMP Redirect capable
      * indicates the neighbor created for this router

Neighbor Address             Interface              Uptime    Expires  DR pri   Flags

192.168.12.1                 GigabitEthernet0/0/0/0 00:18:42  00:01:22 1      B
192.168.12.2*                GigabitEthernet0/0/0/0 00:18:50  00:01:20 1 (DR) B E
192.168.23.2*                GigabitEthernet0/0/0/1 00:18:50  00:01:25 1      B E
192.168.23.3                 GigabitEthernet0/0/0/1 00:18:41  00:01:16 1 (DR) B
2.2.2.2*                     Loopback0              00:18:50  00:01:25 1 (DR) B E

  • XR2は192.168.12.1(XR1)、192.168.23.3(XR3)とPIMネイバーを確立している。


RP/0/0/CPU0:XR3#show pim neighbor
Tue Aug 18 02:50:42.584 UTC

PIM neighbors in VRF default
Flag: B - Bidir capable, P - Proxy capable, DR - Designated Router,
      E - ECMP Redirect capable
      * indicates the neighbor created for this router

Neighbor Address             Interface              Uptime    Expires  DR pri   Flags

192.168.13.1                 GigabitEthernet0/0/0/0 00:19:31  00:01:24 1      B
192.168.13.3*                GigabitEthernet0/0/0/0 00:19:34  00:01:24 1 (DR) B E
192.168.23.2                 GigabitEthernet0/0/0/1 00:18:50  00:01:21 1      B
192.168.23.3*                GigabitEthernet0/0/0/1 00:19:34  00:01:42 1 (DR) B E
192.168.3.3*                 GigabitEthernet0/0/0/2 00:19:34  00:01:42 1 (DR) B E

  • XR3は192.168.13.1(XR1)、192.168.23.2(XR2)とPIMネイバーを確立している。

4.2. show mrib route

マルチキャストルーティングテーブルのエントリからルートを確認します。

RP/0/0/CPU0:XR1#show mrib route 239.1.1.1
Tue Aug 18 02:56:25.040 UTC

IP Multicast Routing Information Base
Entry flags: L - Domain-Local Source, E - External Source to the Domain,
    C - Directly-Connected Check, S - Signal, IA - Inherit Accept,
    IF - Inherit From, D - Drop, ME - MDT Encap, EID - Encap ID,
    MD - MDT Decap, MT - MDT Threshold Crossed, MH - MDT interface handle
    CD - Conditional Decap, MPLS - MPLS Decap, EX - Extranet
    MoFE - MoFRR Enabled, MoFS - MoFRR State, MoFP - MoFRR Primary
    MoFB - MoFRR Backup, RPFID - RPF ID Set, X - VXLAN
Interface flags: F - Forward, A - Accept, IC - Internal Copy,
    NS - Negate Signal, DP - Don't Preserve, SP - Signal Present,
    II - Internal Interest, ID - Internal Disinterest, LI - Local Interest,
    LD - Local Disinterest, DI - Decapsulation Interface
    EI - Encapsulation Interface, MI - MDT Interface, LVIF - MPLS Encap,
    EX - Extranet, A2 - Secondary Accept, MT - MDT Threshold Crossed,
    MA - Data MDT Assigned, LMI - mLDP MDT Interface, TMI - P2MP-TE MDT Interface
    IRMI - IR MDT Interface

(192.168.1.10,239.1.1.1) RPF nbr: 192.168.1.10 Flags: RPF
  Up: 00:01:23
  Incoming Interface List
    GigabitEthernet0/0/0/2 Flags: A, Up: 00:01:23
  Outgoing Interface List
    GigabitEthernet0/0/0/1 Flags: F NS, Up: 00:01:01

  • 239.1.1.1宛のマルチキャストパケットをGi0/0/0/2で受信し、Gi0/0/0/1から送信している。


RP/0/0/CPU0:XR2#show mrib route 239.1.1.1
Tue Aug 18 02:56:29.010 UTC

IP Multicast Routing Information Base
Entry flags: L - Domain-Local Source, E - External Source to the Domain,
    C - Directly-Connected Check, S - Signal, IA - Inherit Accept,
    IF - Inherit From, D - Drop, ME - MDT Encap, EID - Encap ID,
    MD - MDT Decap, MT - MDT Threshold Crossed, MH - MDT interface handle
    CD - Conditional Decap, MPLS - MPLS Decap, EX - Extranet
    MoFE - MoFRR Enabled, MoFS - MoFRR State, MoFP - MoFRR Primary
    MoFB - MoFRR Backup, RPFID - RPF ID Set, X - VXLAN
Interface flags: F - Forward, A - Accept, IC - Internal Copy,
    NS - Negate Signal, DP - Don't Preserve, SP - Signal Present,
    II - Internal Interest, ID - Internal Disinterest, LI - Local Interest,
    LD - Local Disinterest, DI - Decapsulation Interface
    EI - Encapsulation Interface, MI - MDT Interface, LVIF - MPLS Encap,
    EX - Extranet, A2 - Secondary Accept, MT - MDT Threshold Crossed,
    MA - Data MDT Assigned, LMI - mLDP MDT Interface, TMI - P2MP-TE MDT Interface
    IRMI - IR MDT Interface

(*,239.1.1.1) RPF nbr: 2.2.2.2 Flags: C RPF
  Up: 00:18:13
  Incoming Interface List
    Decapstunnel0 Flags: A, Up: 00:18:13
  Outgoing Interface List
    GigabitEthernet0/0/0/1 Flags: F NS, Up: 00:18:13

(192.168.1.10,239.1.1.1) RPF nbr: 2.2.2.2 Flags: L RPF
  Up: 00:18:02
  Incoming Interface List
    Decapstunnel0 Flags: A, Up: 00:00:55

  • スイッチオーバー機能により最短経路で通信を行うため、RPを経由していない。


RP/0/0/CPU0:XR3#show mrib route 239.1.1.1
Tue Aug 18 02:56:33.669 UTC

IP Multicast Routing Information Base
Entry flags: L - Domain-Local Source, E - External Source to the Domain,
    C - Directly-Connected Check, S - Signal, IA - Inherit Accept,
    IF - Inherit From, D - Drop, ME - MDT Encap, EID - Encap ID,
    MD - MDT Decap, MT - MDT Threshold Crossed, MH - MDT interface handle
    CD - Conditional Decap, MPLS - MPLS Decap, EX - Extranet
    MoFE - MoFRR Enabled, MoFS - MoFRR State, MoFP - MoFRR Primary
    MoFB - MoFRR Backup, RPFID - RPF ID Set, X - VXLAN
Interface flags: F - Forward, A - Accept, IC - Internal Copy,
    NS - Negate Signal, DP - Don't Preserve, SP - Signal Present,
    II - Internal Interest, ID - Internal Disinterest, LI - Local Interest,
    LD - Local Disinterest, DI - Decapsulation Interface
    EI - Encapsulation Interface, MI - MDT Interface, LVIF - MPLS Encap,
    EX - Extranet, A2 - Secondary Accept, MT - MDT Threshold Crossed,
    MA - Data MDT Assigned, LMI - mLDP MDT Interface, TMI - P2MP-TE MDT Interface
    IRMI - IR MDT Interface

(*,239.1.1.1) RPF nbr: 192.168.23.2 Flags: C RPF
  Up: 00:18:18
  Incoming Interface List
    GigabitEthernet0/0/0/1 Flags: A NS, Up: 00:18:18
  Outgoing Interface List
    GigabitEthernet0/0/0/2 Flags: F NS LI, Up: 00:18:18

(192.168.1.10,239.1.1.1) RPF nbr: 192.168.13.1 Flags: RPF
  Up: 00:01:11
  Incoming Interface List
    GigabitEthernet0/0/0/0 Flags: A, Up: 00:01:11
  Outgoing Interface List
    GigabitEthernet0/0/0/2 Flags: F NS, Up: 00:01:11

  • 239.1.1.1宛のマルチキャストパケットをGi0/0/0/0で受信し、Gi0/0/0/2から送信している。

4.3. ping

Receiverから応答があることを確認します。

Sender#ping 239.1.1.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 192.168.3.10, 7 ms
Reply to request 1 from 192.168.3.10, 7 ms
Reply to request 2 from 192.168.3.10, 10 ms
Reply to request 3 from 192.168.3.10, 13 ms
Reply to request 4 from 192.168.3.10, 5 ms

  • 192.168.3.10(Receiver)から応答が得られている。