Life is a Roller Coaster

September 22, 2008

Multicast PIM-SM

Filed under: Technical section — Tags: — adisubrata @ 4:27 AM

In this post I will share how to configure multicast IPv4 PIM-SM multicast in the Juniper router. There are five router in the simulated network R1, R3, R4, R5, and R6. I used Junos 8.4R4.2 and M7i router. You can download full configuration at the and of this post.

Since I don’t have many routers to play, I will use logical router to simulate the network and also will use real PC to simulate multicast source and receiver. Tunnel PIC (Service PIC) needed on RP and first-hop router. So if you don’t have service PIC installed, you can set the first-hop router as an RP, it should be ok since the register message will send locally. The RP is R4 with lo0 address 10.0.3.4. This network is used IGMPv2.

I use VLC software to generate multicast with address 225.0.0.1. You can set VLC to generates multicast data. Go to File>Wizard>Select your file>multicast address.

As first-hop router, R1 will send register message, we can see this message using debug as shown below:

Sep 22 03:44:06.191576 PIM SENT 10.0.6.1 -> 10.0.3.4 V2 Register Flags: 0×40000000 Border: 0 Null: 1 Source 10.0.5.200 Group 225.0.0.1 sum 0xae35 len 28
Sep 22 03:44:06.193002 PIM ge-0/0/0.3 RECV 10.0.3.4 -> 10.0.6.1 V2 RegisterStop Source 10.0.5.200 Group 225.0.0.1 sum 0xeb15 len 18

Let’s check the IGMP group on R5:
We can see that Receiver join the IGMP with (*,G) as indicated with source 0.0.0.0 and group 225.0.0.1.

enugadi@M7i# run show igmp group 225.0.0.1 logical-router r5
Interface: fe-1/3/1.0
Group: 225.0.0.1
Source: 0.0.0.0
Last reported by: 172.16.30.2
Timeout:     201 Type: Dynamic
enugadi@M7i# run monitor traffic interface fe-1/3/1
---- snipped ------
03:27:05.525416  In IP 172.16.30.2 > 225.0.0.1: igmp v2 report 225.0.0.1
03:27:06.036921  In IP 172.16.30.2 > 225.0.0.1: igmp v2 report 225.0.0.1
03:27:07.036789  In IP 172.16.30.2 > 225.0.0.1: igmp v2 report 225.0.0.1

Let’s verify multicast route on the first-hop router (R1):
As we can see below, First hop router R1 already forwarding the multicast with (S,G).

enugadi@M7i# run show multicast route logical-router r1
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: fe-1/3/0.0
    Downstream interface list:
        ge-0/0/0.1

enugadi@M7i# run show pim join extensive logical-router r1
Instance: PIM.master Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200
    Flags: sparse,spt
    Upstream interface: fe-1/3/0.0
    Upstream neighbor: Direct
    Upstream state: Local Source
    Keepalive timeout: 331
    Downstream neighbors:
        Interface: ge-0/0/0.1
            10.0.4.13 State: Join Flags: S Timeout: 167

Let’s verify on R3, R4 and R5:

enugadi@M7i# run show multicast route logical-router r3
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: ge-0/0/1.1
    Downstream interface list:
        ge-0/0/0.7

Family: INET6

[edit]
enugadi@M7i# run show multicast route logical-router r4
Family: INET

Family: INET6

[edit]
enugadi@M7i# run show multicast route logical-router r5
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: ge-0/0/1.7
    Downstream interface list:
        fe-1/3/1.0

Group: 225.0.0.1
    Source: 172.16.30.2/32
    Upstream interface: fe-1/3/1.0

Family: INET6

We do not see multicast routes on R4, it is rely on reality that multicast doesn’t flow through R4 router. The SPT build follow the shortest path between R5 and R1 which is R5—R3—R1

enugadi@M7i# run traceroute 10.0.5.200 logical-router r5
traceroute to 10.0.5.200 (10.0.5.200), 30 hops max, 40 byte packets
 1  10.0.2.2 (10.0.2.2)  0.739 ms  0.732 ms  0.659 ms <- R3
 2  10.0.4.14 (10.0.4.14)  0.711 ms  0.724 ms  0.709 ms < R1
 3  10.0.5.200 (10.0.5.200)  0.582 ms  0.577 ms  0.536 ms

Let’s see multicast routes on R5:

enugadi@M7i# run show pim join 225.0.0.1 logical-router r5 extensive
Instance: PIM.master Family: INET

Group: 225.0.0.1
    Source: *
    RP: 10.0.3.4
    Flags: sparse,rptree,wildcard
    Upstream interface: ge-0/0/1.8
    Upstream neighbor: 10.0.2.10
    Upstream state: Join to RP
    Downstream neighbors:
        Interface: fe-1/3/1.0
            172.16.30.1 State: Join Flags: SRW  Timeout: Infinity

Group: 225.0.0.1
    Source: 10.0.5.200
    Flags: sparse,spt
    Upstream interface: ge-0/0/1.7
    Upstream neighbor: 10.0.2.2
    Upstream state: Join to Source, Prune to RP
    Keepalive timeout: 310
    Downstream neighbors:
        Interface: fe-1/3/1.0
            172.16.30.1 State: Join Flags: S   Timeout: Infinity

R5 receives multicast data from SPT which is R3 and send a prune for traffic received via the RPT. This is used to eliminate inefficiency of suboptimal routing.

enugadi@M7i# run show multicast rpf logical-router r5 10.0.5.200
Multicast RPF table: inet.0 , 21 entries

10.0.5.0/24
    Protocol: IS-IS
    Interface: ge-0/0/1.7
    Neighbor: 10.0.2.2

enugadi@M7i# run show log r5/debug-multicast
Sep 22 04:13:33 M7i clear-log[7812]: logfile cleared
Sep 22 04:13:39.329118 PIM ge-0/0/1.7 SENT 10.0.2.1 -> 224.0.0.13 V2 JoinPrune to 10.0.2.2 holdtime 210 groups 1 sum 0xd81f len 34
Sep 22 04:13:39.329207 group 225.0.0.1 joins 1 prunes 0
Sep 22 04:13:39.329239   join list:
Sep 22 04:13:39.329279     source 10.0.5.200 flags sparse
Sep 22 04:13:39.332781 PIM ge-0/0/1.8 SENT 10.0.2.9 -> 224.0.0.13 V2 JoinPrune to 10.0.2.10 holdtime 210 groups 1 sum 0xd7db len 34
Sep 22 04:13:39.332873 group 225.0.0.1 joins 1 prunes 0
Sep 22 04:13:39.332903   join list:
Sep 22 04:13:39.332949     source 10.0.3.4 flags sparse,rptree,wildcard
Sep 22 04:13:39.669313 PIM ge-0/0/1.8 SENT 10.0.2.9 -> 224.0.0.13 V2 JoinPrune to 10.0.2.10 holdtime 210 groups 1 sum 0xd717 len 34
Sep 22 04:13:39.669401 group 225.0.0.1 joins 0 prunes 1
Sep 22 04:13:39.669432   prune list:
Sep 22 04:13:39.669473     source 10.0.5.200 flags sparse,rptree

Let’s check the multicast usages on R1, R3, and R5:

enugadi@M7i# run show multicast route logical-router r1 extensive
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: fe-1/3/0.0
    Downstream interface list:
        ge-0/0/0.1
    Session description: MALLOC
    Statistics: 119 kBps, 87 pps, 89997 packets
    Next-hop ID: 262144
    Upstream protocol: PIM
    Route state: Active
    Forwarding state: Forwarding
    Cache lifetime/timeout: 360 seconds
    Wrong incoming interface notifications: 0

[edit logical-routers r5 protocols pim]
enugadi@M7i# run show multicast route logical-router r3 detail
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: ge-0/0/1.1
    Downstream interface list:
        ge-0/0/0.7
    Session description: MALLOC
    Statistics: 134 kBps, 99 pps, 87569 packets
    Next-hop ID: 262146
    Upstream protocol: PIM

Family: INET6

[edit logical-routers r5 protocols pim]
enugadi@M7i# run show multicast route logical-router r5 detail
Family: INET

Group: 225.0.0.1
    Source: 10.0.5.200/32
    Upstream interface: ge-0/0/1.7
    Downstream interface list:
        fe-1/3/1.0
    Session description: MALLOC
    Statistics: 131 kBps, 97 pps, 87821 packets
    Next-hop ID: 262142
    Upstream protocol: PIM

Family: INET6

Multicast routes will put into the table inet.1.

enugadi@M7i# run show route logical-router r1 table inet.1    

inet.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

225.0.0.1,10.0.5.200/32*[PIM/105] 00:33:25
                      Multicast (IPv4)

[edit]
enugadi@M7i# run show route logical-router r3 table inet.1    

inet.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

225.0.0.1,10.0.5.200/32*[PIM/105] 00:33:27
                      Multicast (IPv4)

[edit]
enugadi@M7i# run show route logical-router r5 table inet.1    

inet.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

225.0.0.1,10.0.5.200/32*[PIM/105] 00:33:29
                      Multicast (IPv4)

multicast-pim-sm-config

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.