Skip to main content

mVPN Profile 14 | NCS55xx

·1659 words·8 mins
Mvpn Ncs55 Xr
Rory
Author
Rory
Step by step the ladder is ascended

最近测试了下 NCS55 上面的 MVPN,整理一下防止自己忘记了.

  • NCS55 在 MVPN profile 上的支持不如 ASR9K 的种类多,具体哪些 profile 支持需要参考下 NCS55 的配置文档
  • NCS55 由于芯片的特殊性,有些计数器并不是默认打开的,需要一些特殊的配置,如本文的组播流量的统计上。

Profile 14,据说是 NCS55 上最受欢迎的 profile;这里使用如下的拓扑进行测试。

拓扑
#

参考文章
#

mVPN Profile 14 on NCS55xx - How to configure + verify control plane and data plane

Multicast Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.4.x

Configuration
#

Header(NCS55A2-2 PE)
#

!!!!!  Basic config, setup the mpls core.
interface Bundle-Ether12001
 mtu 9198
 ipv4 address 12.0.0.2 255.255.255.0
 load-interval 30
!
interface HundredGigE0/0/2/2
 bundle id 12001 mode active
 load-interval 30
!
interface HundredGigE0/0/2/3
 bundle id 12001 mode active
 load-interval 30
!
interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255
!
router isis core
 is-type level-2-only
 net 49.1234.2222.2222.00
 log adjacency changes
 address-family ipv4 unicast
  metric-style wide
 !
 interface Bundle-Ether12001
  point-to-point
  address-family ipv4 unicast
  !
 !
 interface Loopback0
  passive
  address-family ipv4 unicast
  !
 !
!

!!!!!! Conifg mvpn vrf
vrf mvpn200
 address-family ipv4 unicast
  import route-target
   200:1
  !
  export route-target
   200:1
  !
 !
!

!!!! enable mvpn address family between PE, enable ipv4 mvpn for vrf
router bgp 100
 nsr
 bgp router-id 2.2.2.2
 bgp graceful-restart
 address-family vpnv4 unicast
 !
 address-family ipv4 mvpn
 !
 neighbor 1.1.1.1
  remote-as 100
  update-source Loopback0
  address-family vpnv4 unicast
  !
  address-family ipv4 mvpn
  !
 !
 vrf mvpn200
  rd 200:20
  address-family ipv4 unicast
   label mode per-prefix
   redistribute connected
  !
  address-family ipv4 mvpn
  !
 !
!
!!!!! create route-policy for rpf check purposes then apply under pim.
route-policy mldp-partitioned-p2mp
  set core-tree mldp-partitioned-p2mp
end-policy
!

router pim
 vrf mvpn200
  address-family ipv4
   rpf topology route-policy mldp-partitioned-p2mp
   mdt c-multicast-routing bgp
   !
   interface TenGigE0/0/0/0.200
    enable
   !
  !
 !
!
!!!!!! enable partitioned mdt for the vrf and use bgp auto-discovery to discover the PE's participating in the tree
multicast-routing
 address-family ipv4
  interface Loopback0
   enable
  !
 !
 vrf mvpn200
  address-family ipv4
   mdt source Loopback0
   multipath
   rate-per-route
   interface all enable
   accounting per-prefix
   bgp auto-discovery mldp
   !
   mdt partitioned mldp ipv4 p2mp
  !
 !
!

!!!!!! enable mLDP for core tree signalling
mpls ldp
 discovery
  targeted-hello interval 10
 !
 mldp
  address-family ipv4
  !
 !
 router-id 2.2.2.2
 address-family ipv4
  discovery targeted-hello accept
 !
 interface Bundle-Ether12001
 !
!

!!!!! configure source connection.
interface TenGigE0/0/0/0.200
 description to R200 (MPVN)
 vrf mvpn200
 ipv4 address 200.2.2.1 255.255.255.0
 encapsulation dot1q 200
!

End (NCS55A2-1 PE)
#

!!!!!  Basic config, setup the mpls core.
interface Bundle-Ether12002
 mtu 9198
 ipv4 address 12.0.0.1 255.255.255.0
 load-interval 30
!
interface HundredGigE0/0/2/2
 bundle id 12002 mode active
 load-interval 30
!
interface HundredGigE0/0/2/3
 bundle id 12002 mode active
 load-interval 30
!
!
interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!
router isis core
 is-type level-2-only
 net 49.1234.1111.1111.00
 log adjacency changes
 address-family ipv4 unicast
  metric-style wide
 !
 interface Bundle-Ether12002
  point-to-point
  address-family ipv4 unicast
  !
 !
 interface Loopback0
  passive
  address-family ipv4 unicast
 !
!

!!!!!! Conifg mvpn vrf
vrf mvpn200
 address-family ipv4 unicast
  import route-target
   200:1
  !
  export route-target
   200:1
  !
 !
!

!!!! enable mvpn address family between PE, enable ipv4 mvpn for vrf
router bgp 100
 nsr
 bgp router-id 1.1.1.1
 bgp graceful-restart
 address-family vpnv4 unicast
 !
 address-family ipv4 mvpn
 !
 neighbor 2.2.2.2
  remote-as 100
  update-source Loopback0
  address-family vpnv4 unicast
  !
  address-family ipv4 mvpn
  !
 !
 vrf mvpn200
  rd 200:10
  address-family ipv4 unicast
   label mode per-prefix
   redistribute connected
  !
  address-family ipv4 mvpn
  !
 !
!
!!!!! create route-policy for rpf check purposes then apply under pim.
route-policy mldp-partitioned-p2mp
  set core-tree mldp-partitioned-p2mp
end-policy
!

router pim
 vrf mvpn200
  address-family ipv4
   rpf topology route-policy mldp-partitioned-p2mp
   mdt c-multicast-routing bgp
   !
   interface TenGigE0/0/0/0.200
    enable
   !
  !
 !
!
!!!!!! enable partitioned mdt for the vrf and use bgp auto-discovery to discover the PE's participating in the tree
multicast-routing
 address-family ipv4
  interface Loopback0
   enable
  !
  mdt source Loopback0
 !
 vrf mvpn200
  address-family ipv4
   mdt source Loopback0
   multipath
   ssm range ssm-range
   rate-per-route
   interface all enable
   accounting per-prefix
   bgp auto-discovery mldp
   !
   mdt partitioned mldp ipv4 p2mp
  !
 !
!

!!!!!! enable mLDP for core tree signalling
mpls ldp
 discovery
  targeted-hello interval 10
 !
 mldp
  address-family ipv4
  !
 !
 router-id 1.1.1.1
 address-family ipv4
  discovery targeted-hello accept
 !
 interface Bundle-Ether12002
 !
!

!!!!! configure receiver connection.
interface TenGigE0/0/0/0.200
 description to R200 (MPVN)
 vrf mvpn200
 ipv4 address 200.1.1.1 255.255.255.0
 load-interval 30
 encapsulation dot1q 200
!

Receiver
#

router igmp
  interface TenGigE0/0/0/6.200
   join-group 232.0.0.3 200.2.2.2
  !
 !
!

BGP Signalling
#

  • route type 1 (Intra-AS I-PMSI AD)
  • route type 3 (S-PMSI AD)
  • route type 7 (Source Tree Join)

三类路由, 下面的输出是在连接接收者的 PE 采集的,其中 Type 7 的路由只有在收到下游的<S*G> Join 才会产生

RP/0/RP0/CPU0:NC55A2-01#show bgp ipv4 mvpn
Tue Aug 16 12:07:56.080 UTC
BGP router identifier 1.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0   RD version: 0
BGP main routing table version 10
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stalet, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 200:10 (default for vrf mvpn200)
*> [1][1.1.1.1]/40    0.0.0.0                                0 i
*>i[1][2.2.2.2]/40    2.2.2.2                       100      0 i
*> [3][0][0.0.0.0][0][0.0.0.0][1.1.1.1]/120
                      0.0.0.0                                0 i
*>i[3][0][0.0.0.0][0][0.0.0.0][2.2.2.2]/120
                      2.2.2.2                       100      0 i
*> [7][200:20][100][32][200.2.2.2][32][232.0.0.3]/184
                      0.0.0.0                                0 i
Route Distinguisher: 200:20
*>i[1][2.2.2.2]/40    2.2.2.2                       100      0 i
*>i[3][0][0.0.0.0][0][0.0.0.0][2.2.2.2]/120
                      2.2.2.2                       100      0 i

Processed 7 prefixes, 7 paths

mLDP Signalling
#

RP/0/RP0/CPU0:NC55A2-02#show mpls mldp bindings
Tue Aug 16 11:35:22.304 UTC
mLDP MPLS Bindings database

LSP-ID: 0x00001 Paths: 2 Flags: Pk
 0x00001 P2MP   2.2.2.2  [global-id 1]
   Local Label: 24000 Remote: 1048577 Inft: Lmdtmvpn200 RPF-ID: 0 TIDv4/v6: 0xE0000002/0xE0800002
   Remote Label: 24007 NH: 12.0.0.1 Inft: Bundle-Ether12001


RP/0/RP0/CPU0:NC55A2-01#show mpls mldp bindings
Tue Aug 16 12:15:10.292 UTC
mLDP MPLS Bindings database

LSP-ID: 0x00001 Paths: 1 Flags: Pk
 0x00001 P2MP   1.1.1.1 [global-id 1]
   Local Label: 24000 Remote: 1048577 Inft: Lmdtmvpn200 RPF-ID: 0 TIDv4/v6: 0xE0000002/0xE0800002

LSP-ID: 0x00002 Paths: 2 Flags: Pk
 0x00002 P2MP   2.2.2.2 [global-id 1]
   Local Label: 24007 Active
   Remote Label: 1048577 Inft: Lmdtmvpn200 RPF-ID: 3 TIDv4/v6: 0xE0000002/0xE0800002

mrib verify
#

RP/0/RP0/CPU0:NC55A2-02#show mrib vrf  mvpn200 route
Tue Aug 16 11:38:52.980 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, TRMI - TREE SID MDT Interface, MH - Multihome Interface

(*,224.0.0.0/4) RPF nbr: 200.2.2.1 Flags: L C RPF P
  Up: 3d09h
  Outgoing Interface List
    Decapstunnel0 Flags: NS DI, Up: 3d09h

(*,224.0.0.0/24) Flags: D P
  Up: 3d09h

(*,224.0.1.39) Flags: S P
  Up: 3d09h

(*,224.0.1.40) Flags: S P
  Up: 3d09h
  Outgoing Interface List
    TenGigE0/0/0/0.200 Flags: II LI, Up: 3d09h

(*,232.0.0.0/8) Flags: D P
  Up: 3d09h

(200.2.2.2,232.0.0.3) RPF nbr: 200.2.2.2 Flags: RPF
  Up: 3d09h
  Incoming Interface List
    TenGigE0/0/0/0.200 Flags: A, Up: 3d09h
  Outgoing Interface List
    Lmdtmvpn200 Flags: F LMI TR, Up: 3d09h



RP/0/RP0/CPU0:NC55A2-01#show mrib vrf  mvpn200 route
Tue Aug 16 12:17:52.769 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, TRMI - TREE SID MDT Interface, MH - Multihome Interface

(*,224.0.0.0/24) Flags: D P
  Up: 3d09h

(*,224.0.1.39) Flags: S P
  Up: 3d09h

(*,224.0.1.40) Flags: S P
  Up: 3d09h
  Outgoing Interface List
    TenGigE0/0/0/0.200 Flags: II LI, Up: 3d09h

(*,230.0.0.0/24) Flags: D P
  Up: 3d09h

(*,232.0.0.0/24) Flags: D P
  Up: 3d09h

(200.2.2.2,232.0.0.3) RPF nbr: 2.2.2.2 Flags: RPF
  Up: 3d09h
  Incoming Interface List
    Lmdtmvpn200 Flags: A LMI, Up: 3d09h
  Outgoing Interface List
    TenGigE0/0/0/0.200 Flags: F NS LI, Up: 3d09h

enable multicast route statistic
#

Config
#

ipv4 access-list mcast-counter
10 permit ipv4 host 200.2.2.2 232.0.0.0/24
!
hw-module route-stats l3mcast vrf mvpn200 ipv4 ingress mcast-counter
end

Verify
#

RP/0/RP0/CPU0:NC55A2-02#show mfib vrf mvpn200 route rate
Tue Aug  9 02:11:52.553 UTC

IP Multicast Forwarding Rates
(Source Address, Group Address)
  Incoming rate:
    Node: (Incoming node) : pps/bps
  Outgoing rate:
    Node: (Outgoing node) : pps/bps

(200.2.2.2,232.0.0.3)
  Incoming rate :
    Node : 0/0/CPU0 : 1 / 20862     <<<<<<<
  Outgoing rate : MDT

RP/0/RP0/CPU0:NC55A2-01#show mfib vrf mvpn200 route rate
Tue Aug  9 02:49:02.700 UTC

IP Multicast Forwarding Rates
(Source Address, Group Address)
  Incoming rate:
    Node: (Incoming node) : pps/bps
  Outgoing rate:
   Node: (Outgoing node) : pps/bps

(200.2.2.2,230.0.0.3)
  Incoming rate : MDT
  Outgoing rate :

(200.2.2.2,232.0.0.3)
  Incoming rate : MDT
    Node : 0/0/CPU0 : 1 / 20862  <<<<<
  Outgoing rate :

Limitation
#

来源