troglobit / pimd

PIM-SM/SSM multicast routing for UNIX and Linux
http://troglobit.com/projects/pimd/
BSD 3-Clause "New" or "Revised" License
194 stars 86 forks source link

Multicast UDP packets over a GRE tunnel #78

Closed souravcnetcomm closed 5 years ago

souravcnetcomm commented 8 years ago

Hi Troglobit, I have the following situation trying to send multicast UDP packets over a GRE tunnel --

untitled

I run pimd in default configuration on Router1 and Router2 but it seems multicast traffic from Client1 can't flow beyond Router1. I can see multicast traffic using tcpdump on br0 of Router1,but no traffic on the gre7 interface.

I run VLC player on Client1(Windows PC) and stream a video file to 225.1.2.3 port 1234. Client2 is a linux PC. I have adjusted settings on the VLC player to make TTL =224 of the outgoing multicast packets.I have verified the same after capturing such packets on br0 of Router1.

Ping from Client1 to Client2 and vice versa is successful.So no problem should occur in RPF. The unicast and multicast routing tables for R1 and R2 are as follows --

For R1

root:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         123.209.112.185 0.0.0.0         UG    20     0        0 wwan0
10.10.0.0       \*               255.255.255.0   U     0      0        0 gre7
123.209.112.184 \*               255.255.255.248 U     0      0        0 wwan0
192.168.1.0     10.10.0.1       255.255.255.0   UG    0      0        0 gre7
192.168.10.0    \*               255.255.255.0   U     0      0        0 br0
224.0.0.0       \*               240.0.0.0       U     0      0        0 gre7
root:~# 

root:~# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors

---

  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.112.187  123.209.112.184/29       1  DR NO-NBR
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (_,_,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0

For R2

root:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         14-202-178-93.t 0.0.0.0         UG    20     0        0 wwan0
10.10.0.0       \*               255.255.255.0   U     0      0        0 gre7
14.202.178.92   \*               255.255.255.252 U     0      0        0 wwan0
192.168.1.0     \*               255.255.255.0   U     0      0        0 br0
192.168.10.0    10.10.0.2       255.255.255.0   UG    0      0        0 gre7
224.0.0.0       \*               240.0.0.0       U     0      0        0 gre7
root:~#

root:~# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors

---

  0  192.168.1.1      192.168.1                1  DR NO-NBR
  1  192.168.1.1      register_vif0            1

 Vif  SSM Group        Sources

Multicast Routing Table ======================================================
--------------------------------- (_,_,G) ------------------------------------
Number of Groups: 0
## Number of Cache MIRRORs: 0

root:~#

After reading https://github.com/troglobit/pimd/issues/77, I even tried running ./mcjoin -i gre7 -d on R1 and R2 and ./mcjoin -i eth1 on Client2, but that did not make any difference. One thing to note though is that in the multicast routing tables(shown above) I do not see the 10.10.. as neighbours.

Can you please help me figure out the problem in my setup and suggest what I need to do to make it working?

Best Regards, Sourav

troglobit commented 8 years ago

Assuming you're running the latest released version of pimd, I think the main problem is that the routers haven't peered over the GRE tunnel.

Try starting pimd with the -N argument and add the following two lines to pimd.conf for each router:

phyint br0 enable
phyint gre0 enable

Keep the rest of the settings in the pimd.conf file shipped with the project. Then use the mcjoin tool, both as sender and receiver (beware of the TTL!), to verify you can forward multicast before trying with VLC (which may suffer from MTU issues due to the GRE tunnel).

If the routers cannot peer, or forwarding doesn't work:

  1. Check that the two clients can unicast ping each other, the unicast routing protocol needs to be working before pimd can run. PIM is an independent multicast routing protocol that works on top of an already established unicast routing protocol, like OSPF, or a statically setup set of routes.
  2. If basic unicast ping doesn't work, but the routes seem to be set up properly, check the kernel IP forwarding flag.

Good Luck!

souravcnetcomm commented 8 years ago

I am running pimd version 2.3.2. My pimd.conf is thus --

###  generated by  in Mon Jun 20 09:49:33 EST 2016
# See https://github.com/troglobit/pimd for a full config specification
#phyint eth0 dr-priority 1 distance 101 metric 1024
#phyint wwan0 dr-priority 1 distance 101 metric 1024
phyint br0 enable
phyint gre7 enable
# Lowest possible BSR candidate priority
bsr-candidate priority 0

# "Lowest" possible RP candidate priority
rp-candidate time 30 priority 255

As stated before, ping from C1 to C2 and vice versa,works, suggesting that unicast routing works over the established GRE tunnel. Also can see ICMP packets on the gre7 interface using tcpdump.

However there is no packets shown on the gre7 interface of the router when captured using tcpdump.I am copying the logs below.Please take a look and suggest where the problem lies.

Running mcjoin -s -d -t 5 on the Client(192.168.10.160) , logs show --

sourav@sourav ~/Downloads/mcjoin-master $ mcjoin -s -d -t 5
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 1
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 2
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 3
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 4
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 5
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 6
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 7
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 8
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 9
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 10
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 11
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 12
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 13
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 14
Sending packet on signal 14, msg: Sender PID 31505, MC group 225.1.2.3 ... count: 15

and running /usr/local/sbin/pimd -N -c /tmp/cdcs/etc/pimd.conf -d -f on the router, the logs are as follows --

root:/tmp/cdcs/etc# /usr/local/sbin/pimd -N -c /tmp/cdcs/etc/pimd.conf -d -f
debug level 0xffffffff (dvmrp_detail,dvmrp_prunes,dvmrp_routes,dvmrp_neighbors,dvmrp_timers,igmp_proto,igmp_timers,igmp_members,trace,timeout,packets,interfaces,kernel,cache,rsrr,pim_detail,pim_hello,pim_register,pim_join_prune,pim_bootstrap,pim_asserts,pim_cand_rp,pim_routes,pim_timers,pim_rpf)
15:39:23.383 pimd version 2.3.2 starting ...
15:39:23.399 Got 262144 byte send buffer size in 0 iterations
15:39:23.402 Got 262144 byte recv buffer size in 0 iterations
15:39:23.405 Got 262144 byte send buffer size in 0 iterations
15:39:23.408 Got 262144 byte recv buffer size in 0 iterations
15:39:23.410 Getting vifs from kernel
15:39:23.411 Installing br0 (192.168.10.1 on subnet 192.168.10) as vif #0-8 - rate 0
15:39:23.411 Installing wwan0 (120.157.91.71 on subnet 120.157.91.64/28) as vif #1-9 - rate 0
15:39:23.412 Disabling all vifs from kernel
15:39:23.412 Getting vifs from /tmp/cdcs/etc/pimd.conf
15:39:23.413 /tmp/cdcs/etc/pimd.conf:6 - Invalid phyint address 'gre7'
15:39:23.414 Local Cand-BSR address 192.168.10.1, priority 0
15:39:23.415 Local Cand-RP address 192.168.10.1, priority 255, interval 30 sec
15:39:23.416 Local static RP: 169.254.0.1, group 232.0.0.0/8
15:39:23.416 IGMP query interval  : 12 sec
15:39:23.416 IGMP querier timeout : 41 sec
15:39:23.417 Interface br0 comes up; vif #0 now in service
15:39:23.417 query_groups(): Sending IGMP v3 query on br0
15:39:23.418 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:23.420 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
15:39:23.424 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
15:39:23.426 Interface wwan0 is DISABLED; vif #1 out of service
15:39:23.452 Interface register_vif0 comes up; vif #2 now in service
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

15:39:23.455 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:23.456 RECV    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13 
15:39:23.456 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
15:39:23.457 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
15:39:23.457 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
15:39:23.458 Set delete timer for group: 224.0.0.22
15:39:23.458 SM group order from  192.168.10.1 (*,224.0.0.22)
15:39:23.459 Not creating routing entry for LAN scoped group 224.0.0.22
15:39:23.459 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
15:39:23.459 Set delete timer for group: 224.0.0.2
15:39:23.459 SM group order from  192.168.10.1 (*,224.0.0.2)
15:39:23.460 Not creating routing entry for LAN scoped group 224.0.0.2
15:39:23.460 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
15:39:23.460 Set delete timer for group: 224.0.0.13
15:39:23.460 SM group order from  192.168.10.1 (*,224.0.0.13)
15:39:23.461 Not creating routing entry for LAN scoped group 224.0.0.13
15:39:28.179 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
15:39:28.179 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
15:39:28.180 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
15:39:28.180 Set delete timer for group: 224.0.0.22
15:39:28.180 Not creating routing entry for LAN scoped group 224.0.0.22
15:39:28.181 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
15:39:28.181 Set delete timer for group: 224.0.0.2
15:39:28.181 Not creating routing entry for LAN scoped group 224.0.0.2
15:39:28.181 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
15:39:28.182 Set delete timer for group: 224.0.0.13
15:39:28.182 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

15:39:29.185 SENT    34 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:29.185 RECV    34 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13 
15:39:30.389 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
15:39:30.389 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
15:39:30.390 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
15:39:30.390 Set delete timer for group: 224.0.0.22
15:39:30.390 Not creating routing entry for LAN scoped group 224.0.0.22
15:39:30.390 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
15:39:30.391 Set delete timer for group: 224.0.0.2
15:39:30.391 Not creating routing entry for LAN scoped group 224.0.0.2
15:39:30.391 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
15:39:30.391 Set delete timer for group: 224.0.0.13
15:39:30.392 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:39.402 query_groups(): Sending IGMP v3 query on br0
15:39:39.402 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:39.403 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:39.405 NETLINK: vif 1, ifindex=9
15:39:39.405 NETLINK: gateway is 120.157.91.65
15:39:39.405 For src 169.254.0.1, iif is 1, next hop router is 120.157.91.65: NOT A PIM ROUTER
15:39:39.405 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:39.719 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
15:39:39.719 create group entry, group 225.1.2.3
15:39:39.956 Received IGMP v3 Membership Report from 192.168.10.160 to 224.0.0.22
15:39:39.957 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.10.160 to 224.0.0.22 with 1 group records.
15:39:39.957 accept_group_report(): igmp_src 192.168.10.160 ssm_src 0.0.0.0 group 224.0.0.251 report_type 34
15:39:39.957 Set delete timer for group: 224.0.0.251
15:39:39.957 SM group order from  192.168.10.160 (*,224.0.0.251)
15:39:39.958 Not creating routing entry for LAN scoped group 224.0.0.251

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

15:39:43.963 NETLINK: vif 1, ifindex=9
15:39:43.963 NETLINK: gateway is 120.157.91.65
15:39:43.963 For src 169.254.0.1, iif is 1, next hop router is 120.157.91.65: NOT A PIM ROUTER

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:45.389 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
15:39:45.389 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
15:39:45.390 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
15:39:45.390 Set delete timer for group: 224.0.0.22
15:39:45.390 Not creating routing entry for LAN scoped group 224.0.0.22
15:39:45.390 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
15:39:45.391 Set delete timer for group: 224.0.0.2
15:39:45.391 Not creating routing entry for LAN scoped group 224.0.0.2
15:39:45.391 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
15:39:45.391 Set delete timer for group: 224.0.0.13
15:39:45.392 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

15:39:49.397 New RP candidate 192.168.10.1 for group 224.0.0.0/4, priority 255
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     2         224/4               255       75      
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:50.719 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
15:39:50.719 create group entry, group 225.1.2.3
15:39:50.719 create source entry, source 192.168.10.160
15:39:50.720 move_kernel_cache: SG
15:39:53.723 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
15:39:53.724 query_groups(): Sending IGMP v3 query on br0
15:39:53.724 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:53.725 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     2         224/4               255       70      
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:53.726 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
15:39:53.727 RECV    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13 
15:39:56.680 Received IGMP v3 Membership Report from 192.168.10.160 to 224.0.0.22
15:39:56.681 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.10.160 to 224.0.0.22 with 1 group records.
15:39:56.681 accept_group_report(): igmp_src 192.168.10.160 ssm_src 0.0.0.0 group 224.0.0.251 report_type 34
15:39:56.681 Set delete timer for group: 224.0.0.251
15:39:56.681 Not creating routing entry for LAN scoped group 224.0.0.251

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.91.71    120.157.91.64/28         1  DISABLED
  2  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

15:39:58.685 SENT    56 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     2         224/4               255       65      
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

15:39:58.686 RECV    56 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13 
15:39:59.409 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
15:39:59.409 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
15:39:59.410 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
15:39:59.410 Set delete timer for group: 224.0.0.22
15:39:59.410 Not creating routing entry for LAN scoped group 224.0.0.22
15:39:59.410 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
15:39:59.411 Set delete timer for group: 224.0.0.2
15:39:59.411 Not creating routing entry for LAN scoped group 224.0.0.2
15:39:59.411 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
15:39:59.411 Set delete timer for group: 224.0.0.13
15:39:59.412 Not creating routing entry for LAN scoped group 224.0.0.13
15:40:01.719 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
15:40:01.719 create group entry, group 225.1.2.3
15:40:01.719 create source entry, source 192.168.10.160
15:40:01.720 move_kernel_cache: SG
^C15:40:02.396 pimd version 2.3.2 exiting.
15:40:02.398 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
root:/tmp/cdcs/etc#
souravcnetcomm commented 8 years ago

I just noticed the following -- 15:39:23.413 /tmp/cdcs/etc/pimd.conf:6 - Invalid phyint address 'gre7' in the logs above,which is suspicious.

The Kernel IP routing table is --

root:/tmp/cdcs/etc# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         120.157.91.65   0.0.0.0         UG    20     0        0 wwan0
10.10.0.0       *               255.255.255.0   U     0      0        0 gre7
120.157.91.64   *               255.255.255.240 U     0      0        0 wwan0
192.168.1.0     10.10.0.1       255.255.255.0   UG    0      0        0 gre7
192.168.10.0    *               255.255.255.0   U     0      0        0 br0
troglobit commented 8 years ago

First of all, sorry for my late reply, but I'm on vacation.

Anyway, that's odd ... the .conf file parser is trained to handle either the IP address or the interface name to locate the interface. Try using the IP address of the interface in the phyint command.

phyint 10.10.0.1 enable

and

phyint 10.10.0.2 enable

respectively. From these "physical" interfaces pimd creates the kernel "virtual" interfaces, or VIFs. Which in turn are used to send PIM HELLO messages over so the routers can peer.

troglobit commented 8 years ago

Good news, I can now reproduce your problem. I ran in to two problems:

  1. The gre0 prefix len has do be != /32, I set /30 on my gre0
  2. The multicast interface flag is not set by default

    sudo ip link set gre0 multicast on

If these things are not properly set, then the interface will be automatically filtered out by pimd as a non-candidate interface ... and you'll get the unfriendly log message you noticed.

There is also a small tutorial available here, https://github.com/troglobit/pimd/blob/master/README-config.md

Hope this helps!

souravcnetcomm commented 8 years ago

First of all a huge thanks for helping me out on this....really appreciate.....would require a little more help before closing this off.

I set the prefix len of the gre7 interface to 30 , using - ifconfig gre7 netmask 255.255.255.252

and also enabled multicast on that interface.

root:/opt/cdcs/upload# ifconfig gre7
gre7      Link encap:UNSPEC  HWaddr 78-9D-3A-8E-F1-B6-58-29-00-00-00-00-00-00-00-00  
          inet addr:10.10.0.1  P-t-P:10.10.0.1  Mask:255.255.255.252
          inet6 addr: fe80::200:5efe:789d:3a8e/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1334  Metric:1
          RX packets:528 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:28032 (27.3 KiB)  TX bytes:55450 (54.1 KiB)

With that and keeping the pimd.conf as before,l am able to see the neighbours properly in the multicast routing table --

root:/opt/cdcs/upload# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.58.142   120.157.58.140/30        1  DISABLED
  2  10.10.0.1        10.10/30                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

But still I cannot see the multicast UDP packets getting across through the gre7 interface, though I can now see the PIM traffic flowing between the routers(which I could not see before) when I run mcjoin or vlc streaming UDP traffic,on the PC connected to the router(on which pimd runs) Please help me in resolving this --

sourav@sourav ~/Downloads/mcjoin-master $ mcjoin -s -d -t 5
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 1
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 2
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 3
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 4
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 5
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 6
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 7
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 8
Sending packet on signal 14, msg: Sender PID 13642, MC group 225.1.2.3 ... count: 9

The router tcpdump capture is as follows --

:
11:50:51.744036 IP 10.10.0.2 > pim-routers.mcast.net: PIMv2, Hello, length 26
11:50:51.973911 IP 10.10.0.2 > pim-routers.mcast.net: PIMv2, Bootstrap, length 36
11:50:55.063411 IP 10.10.0.2 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:50:56.138786 IP 10.10.0.1 > pim-routers.mcast.net: PIMv2, Bootstrap, length 36
11:51:00.774599 IP 10.10.0.1 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:06.787568 IP 10.10.0.1 > all-systems.mcast.net: igmp query v3
11:51:07.414599 IP 10.10.0.1 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:10.193162 IP 10.10.0.2 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:21.287944 IP 10.10.0.1 > pim-routers.mcast.net: PIMv2, Hello, length 26
11:51:21.289631 IP 10.10.0.1 > all-systems.mcast.net: igmp query v3
11:51:22.485538 IP 10.10.0.2 > pim-routers.mcast.net: PIMv2, Hello, length 26
11:51:22.635413 IP 10.10.0.2 > pim-routers.mcast.net: PIMv2, Bootstrap, length 36
11:51:26.049913 IP 10.10.0.1 > pim-routers.mcast.net: PIMv2, Bootstrap, length 36
11:51:27.334601 IP 10.10.0.1 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:31.963663 IP 10.10.0.2 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:35.992351 IP 10.10.0.1 > all-systems.mcast.net: igmp query v3
11:51:38.324601 IP 10.10.0.1 > igmp.mcast.net: igmp v3 report, 3 group record(s)
11:51:43.325914 IP 10.10.0.2 > igmp.mcast.net: igmp v3 report, 3 group record(s
:

The pimd logs on the router, when mcjoin -s -d -t 127 is running on the PC is as below --

11:58:34.883 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
11:58:34.883 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
11:58:34.883 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
11:58:34.883 Set delete timer for group: 224.0.0.22
11:58:34.884 Not creating routing entry for LAN scoped group 224.0.0.22
11:58:34.893 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
11:58:34.896 Set delete timer for group: 224.0.0.2
11:58:34.898 Not creating routing entry for LAN scoped group 224.0.0.2
11:58:34.901 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
11:58:34.903 Set delete timer for group: 224.0.0.13
11:58:34.904 Not creating routing entry for LAN scoped group 224.0.0.13
11:58:36.927 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
11:58:36.927 create group entry, group 225.1.2.3
11:58:37.275 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
11:58:37.275 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
11:58:37.275 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
11:58:37.276 Set delete timer for group: 224.0.0.22
11:58:37.276 Not creating routing entry for LAN scoped group 224.0.0.22
11:58:37.276 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
11:58:37.276 Set delete timer for group: 224.0.0.2
11:58:37.277 Not creating routing entry for LAN scoped group 224.0.0.2
11:58:37.277 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
11:58:37.277 Set delete timer for group: 224.0.0.13
11:58:37.277 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.58.142   120.157.58.140/30        1  DISABLED
  2  10.10.0.1        10.10/30                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

11:58:38.280 New RP candidate 192.168.10.1 for group 224.0.0.0/4, priority 255
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     3         224/4               255       75      
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

11:58:43.284 query_groups(): Sending IGMP v3 query on br0
11:58:43.285 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
11:58:43.285 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
11:58:43.286 query_groups(): Sending IGMP v3 query on gre7
11:58:43.286 Send IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
11:58:43.287 SENT    36 bytes IGMP Membership Query     from 10.10.0.1       to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.58.142   120.157.58.140/30        1  DISABLED
  2  10.10.0.1        10.10/30                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     3         224/4               255       70      
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

11:58:43.289 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
11:58:43.289 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
11:58:43.505 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
11:58:43.506 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
11:58:43.506 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
11:58:43.506 Set delete timer for group: 224.0.0.22
11:58:43.506 Not creating routing entry for LAN scoped group 224.0.0.22
11:58:43.507 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
11:58:43.507 Set delete timer for group: 224.0.0.2
11:58:43.507 Not creating routing entry for LAN scoped group 224.0.0.2
11:58:43.507 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
11:58:43.508 Set delete timer for group: 224.0.0.13
11:58:43.508 Not creating routing entry for LAN scoped group 224.0.0.13
11:58:46.934 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
11:58:46.935 create group entry, group 225.1.2.3
11:58:46.935 create source entry, source 192.168.10.160
11:58:46.935 move_kernel_cache: SG
11:58:46.936 NETLINK: vif 1, ifindex=9
11:58:46.936 NETLINK: gateway is 120.157.58.141
11:58:46.936 For src 169.254.0.1, iif is 1, next hop router is 120.157.58.141: NOT A PIM ROUTER

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  120.157.58.142   120.157.58.140/30        1  DISABLED
  2  10.10.0.1        10.10/30                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

11:58:48.940 NETLINK: vif 1, ifindex=9
11:58:48.940 NETLINK: gateway is 120.157.58.141
11:58:48.940 For src 169.254.0.1, iif is 1, next hop router is 120.157.58.141: NOT A PIM ROUTER

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.10.1     3         224/4               255       65      
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

11:58:49.855 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
11:58:49.855 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
11:58:49.855 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
11:58:49.855 Set delete timer for group: 224.0.0.22
11:58:49.856 Not creating routing entry for LAN scoped group 224.0.0.22
11:58:49.856 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
11:58:49.856 Set delete timer for group: 224.0.0.2
11:58:49.856 Not creating routing entry for LAN scoped group 224.0.0.2
11:58:49.857 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
11:58:49.857 Set delete timer for group: 224.0.0.13
11:58:49.857 Not creating routing entry for LAN scoped group 224.0.0.13
^C11:58:50.405 pimd version 2.3.2 exiting.
11:58:50.406 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
11:58:50.407 SENT    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13
troglobit commented 8 years ago

Compared to DVMRP (mrouted), which floods out multicast to all routers and then starts pruning, PIM-SM selects one (or more) distribution points for multicast called Rendez-Vous Point (RP).

To actually route multicast from one client to another the receiver must send out an IGMP join on layer-2 for the closest PIM router to hear. This IGMP join is then translated to a PIM join towards the RP.

From what I can gather from your setup, you're streaming from Client2 to Client1. From the logs I can see the selected RP is Router2, so that's where all multicast will remain until Client1 joins in and Router1 politely asks Router2 for the given mc group.

souravcnetcomm commented 8 years ago

You are right, I am running mcjoin -s -d -t 127 on Client2 and have joined the same multicast group using mcjoin -i eth1 on Client1.

Unicast ping works from Client2 to Client1 and vice versa via the GRE tunnel.

But still I cannot see the multicast UDP packets getting across through the gre7 interface on Router2, though I can see the PIM traffic flowing between the routers. Is there any indication in the pimd logs regarding "the IGMP join(happens using mcjoin -i eth1) is then translated to a PIM join towards the RP"? I want to verify the same, as I can see the following pimd logs on Router1 after I run the mcjoin -i eth1 on Client1, but no corresponding PIM join in Router2 pimd logs --

16:58:56.084 Received IGMP v3 Membership Report from 192.168.1.149 to 224.0.0.22
16:58:56.086 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.1.149 to 224.0.0.22 with 1 group records.
16:58:56.089 accept_group_report(): igmp_src 192.168.1.149 ssm_src 0.0.0.0 group 225.1.2.3 report_type 34
16:58:56.091 Set delete timer for group: 225.1.2.3
16:58:56.094 SM group order from  192.168.1.149 (*,225.1.2.3)
16:58:56.096 create group entry, group 225.1.2.3
16:58:56.098 query_groups(): Sending IGMP v3 query on br0
16:58:56.100 Send IGMP Membership Query     from 192.168.1.1 to 224.0.0.1
16:58:56.102 SENT    36 bytes IGMP Membership Query     from 192.168.1.1     to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.1.1      192.168.1                1  DR NO-NBR
  1  14.203.252.214   14.203.252.212/30        1  DISABLED
  2  10.10.0.2        10.10/24                 1  DR PIM     10.10.0.1      
  3  192.168.1.1      register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 0.0.0.0

16:58:56.108 NETLINK: vif 1, ifindex=9
16:58:56.108 NETLINK: gateway is 14.203.252.213
16:58:56.109 For src 169.254.0.1, iif is 1, next hop router is 14.203.252.213: NOT A PIM ROUTER
16:58:56.109 Received IGMP Membership Query     from 192.168.1.1 to 224.0.0.1
16:58:57.182 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
16:58:57.323 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
16:58:57.323 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
16:58:57.323 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
16:58:57.324 Set delete timer for group: 224.0.0.22
16:58:57.324 Not creating routing entry for LAN scoped group 224.0.0.22
16:58:57.324 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
16:58:57.327 Set delete timer for group: 224.0.0.2
16:58:57.330 Not creating routing entry for LAN scoped group 224.0.0.2
16:58:57.332 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
16:58:57.334 Set delete timer for group: 224.0.0.13
16:58:57.337 Not creating routing entry for LAN scoped group 224.0.0.13
^C16:58:59.435 pimd version 2.3.2 exiting.
16:58:59.436 SENT    46 bytes PIM v2 Hello              from 192.168.1.1     to 224.0.0.13
16:58:59.437 SENT    46 bytes PIM v2 Hello              from 10.10.0.2       to 224.0.0.13

Please take a look at the router configs and logs and suggest what is going wrong in my setup

Router2 routing tables

root:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         123.209.231.30  0.0.0.0         UG    20     0        0 wwan0
10.10.0.0       *               255.255.255.0   U     0      0        0 gre7
10.10.0.0       *               255.255.255.0   U     0      0        0 gre7
123.209.231.28  *               255.255.255.252 U     0      0        0 wwan0
192.168.1.0     10.10.0.1       255.255.255.0   UG    0      0        0 gre7
192.168.10.0    *               255.255.255.0   U     0      0        0 br0
root:~# 
root:~# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.231.29   123.209.231.28/30        1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Router1 routing tables

root:/opt/cdcs/upload# route
Kernel IP ro
root:/opt/cdcs/upload# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.1.1      192.168.1                1  DR NO-NBR
  1  14.203.252.214   14.203.252.212/30        1  DISABLED
  2  10.10.0.2        10.10/24                 1  DR PIM     10.10.0.1      
  3  192.168.1.1      register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------
uting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         14-203-252-213. 0.0.0.0         UG    20     0        0 wwan0
10.10.0.0       *               255.255.255.0   U     0      0        0 gre7
10.10.0.0       *               255.255.255.0   U     0      0        0 gre7
14.203.252.212  *               255.255.255.252 U     0      0        0 wwan0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
192.168.10.0    10.10.0.2       255.255.255.0   UG    0      0        0 gre7
root:/opt/cdcs/upload# 

pimd logs on Router2

16:38:39.828 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
16:38:39.829 create group entry, group 225.1.2.3
16:38:40.335 Received IGMP v3 Membership Report from 192.168.10.160 to 224.0.0.22
16:38:40.336 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.10.160 to 224.0.0.22 with 1 group records.
16:38:40.336 accept_group_report(): igmp_src 192.168.10.160 ssm_src 0.0.0.0 group 224.0.0.251 report_type 34
16:38:40.336 Set delete timer for group: 224.0.0.251
16:38:40.337 Not creating routing entry for LAN scoped group 224.0.0.251
16:38:41.129 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
16:38:41.129 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
16:38:41.130 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
16:38:41.130 Set delete timer for group: 224.0.0.22
16:38:41.130 Not creating routing entry for LAN scoped group 224.0.0.22
16:38:41.130 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
16:38:41.131 Set delete timer for group: 224.0.0.2
16:38:41.131 Not creating routing entry for LAN scoped group 224.0.0.2
16:38:41.131 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
16:38:41.131 Set delete timer for group: 224.0.0.13
16:38:41.132 Not creating routing entry for LAN scoped group 224.0.0.13
16:38:44.721 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
16:38:44.721 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
16:38:44.721 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
16:38:44.722 Set delete timer for group: 224.0.0.22
16:38:44.722 Not creating routing entry for LAN scoped group 224.0.0.22
16:38:44.722 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
16:38:44.722 Set delete timer for group: 224.0.0.2
16:38:44.723 Not creating routing entry for LAN scoped group 224.0.0.2
16:38:44.723 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
16:38:44.723 Set delete timer for group: 224.0.0.13
16:38:44.723 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.231.29   123.209.231.28/30        1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

16:38:44.724 NETLINK: vif 1, ifindex=9
16:38:44.725 NETLINK: gateway is 123.209.231.30
16:38:44.725 For src 169.254.0.1, iif is 1, next hop router is 123.209.231.30: NOT A PIM ROUTER

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 0.0.0.0

16:38:49.731 query_groups(): Sending IGMP v3 query on br0
16:38:49.731 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
16:38:49.732 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
16:38:49.732 query_groups(): Sending IGMP v3 query on gre7
16:38:49.732 Send IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
16:38:49.733 SENT    36 bytes IGMP Membership Query     from 10.10.0.1       to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.231.29   123.209.231.28/30        1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 0.0.0.0

16:38:49.735 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
16:38:49.735 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
16:38:50.829 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
16:38:50.829 create group entry, group 225.1.2.3
16:38:51.469 Received IGMP v3 Membership Report from 192.168.10.160 to 224.0.0.22
16:38:51.469 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.10.160 to 224.0.0.22 with 1 group records.
16:38:51.469 accept_group_report(): igmp_src 192.168.10.160 ssm_src 0.0.0.0 group 224.0.0.251 report_type 34
16:38:51.470 Set delete timer for group: 224.0.0.251
16:38:51.470 Not creating routing entry for LAN scoped group 224.0.0.251
16:38:51.781 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
16:38:51.781 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
16:38:51.782 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
16:38:51.782 Set delete timer for group: 224.0.0.22
16:38:51.782 Not creating routing entry for LAN scoped group 224.0.0.22
16:38:51.782 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
16:38:51.783 Set delete timer for group: 224.0.0.2
16:38:51.783 Not creating routing entry for LAN scoped group 224.0.0.2
16:38:51.783 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
16:38:51.783 Set delete timer for group: 224.0.0.13
16:38:51.784 Not creating routing entry for LAN scoped group 224.0.0.13
troglobit commented 8 years ago

Frankly I don't know what's wrong with your setup. Using CORE I did a similar setup: two routers connected over a GRE tunnel, and one client connected to each router. IP addresses below differ from your setup, but should give an idea of what to look for.

ospf-gre-pim

I've simply compiled pimd v2.3.2 and use the default pimd.conf, and I have no problem getting the multicast routing to work. One thing that sticks out, however, is that in my setup a bootstrap router (BSR) has been elected and there are two more RP's elected. Which leads me to think that maybe the rp-candidate or bsr-candidate are missing or invalid in your configuration files. Try using the defaults from the the pimd.conf in the distributed tarball.

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

15:38:15.919 NETLINK: ask path to 10.0.1.1
15:38:15.919 NETLINK: vif 1, ifindex=159
15:38:15.919 NETLINK: gateway is 10.0.0.2
15:38:15.919 For src 10.0.1.1, iif is 1, next hop router is 10.0.0.2

Multicast Routing Table ======================================================
----------------------------------- (*,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
INADDR_ANY       224.225.1.1      10.0.2.1         WC RP
Joined   oifs: .j.                 
Pruned   oifs: ...                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : ..I                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           205    30     0       0        0 205  0
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
10.0.2.20        224.225.1.1      10.0.2.1         SPT CACHE SG
Joined   oifs: .j.                 
Pruned   oifs: ...                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           180    35     0       0        0 180  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 1
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      32        232/8               1         65535   
10.0.2.1         2         224/4               20        55      
10.0.1.1         1         224/4               20        50      
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1
souravcnetcomm commented 8 years ago

Using iperf I generated UDP multicast packets from R1 and successfully received the same on R2 over the GRE interface.

With the following configured static route on both R1 and R2-- 224.0.0.0 * 240.0.0.0 U 0 0 0 gre7

I generated UDP multicast traffic and received the same on the respective routers,using the following iperf commands --

iperf -s -u -B 225.1.2.3 -i 1 iperf -c 225.1.2.3 -u -b 990m -f m -i 5 -t 30

But using a similar setup using a router connected to a PC, I cannot receive the generated UDP multicast packets from the PC, on the router's gre7 interface. Though I receive the UDP multicast packets on eth0. This is clearly an indication that the multicast UDP packets are not getting forwarded from the eth0 to the gre7 interface. In the kernel,following flags are set -- CONFIG_IP_MULTICAST=y CONFIG_IP_MROUTE=y CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y

however on running pimd I can still see -- root:/opt/cdcs/upload# cat /proc/sys/net/ipv4/conf/eth0/mc_forwarding 0

Shouldn't this be 1 for forwarding multicast packets from eth0 to any other interface(gre7 in our case)? I thought pimd would set the flag to 1.

troglobit commented 8 years ago

Well, pimd does set the mc_forwarding flag. It works here, in my setup. Thing is, it doesn't do this immediately when starting up, but after the routers have peered and exchanged the basic set of messages needed to run.

A typical run the log can look something like this. Here we can see both Hello and Bootstrap messages being exchanged, and eventually a PIM Join message is received and the multicast route is set in the kernel.

root@R1:/tmp/pycore.44031/R1.conf# /usr/local/sbin/pimd -dall -f
debug level 0xffffffff (dvmrp_detail,dvmrp_prunes,dvmrp_routes,dvmrp_neighbors,dvmrp_timers,igmp_proto,igmp_timers,igmp_members,trace,timeout,packets,interfaces,kernel,cache,rsrr,pim_detail,pim_hello,pim_register,pim_join_prune,pim_bootstrap,pim_asserts,pim_cand_rp,pim_routes,pim_timers,pim_rpf)
10:44:26.449 pimd version 2.3.2 starting ...
10:44:26.450 Got 262144 byte send buffer size in 0 iterations
10:44:26.450 Got 262144 byte recv buffer size in 0 iterations
10:44:26.450 Got 262144 byte send buffer size in 0 iterations
10:44:26.450 Got 262144 byte recv buffer size in 0 iterations
10:44:26.450 Getting vifs from kernel
10:44:26.450 /etc/pimd.conf:0 - Skipping interface lo, either loopback or does not support multicast.
10:44:26.450 Installing eth1 (10.0.2.1 on subnet 10.0.2/24) as vif #0-22 - rate 0
10:44:26.450 Installing eth0 (10.0.0.1 on subnet 10/24) as vif #1-26 - rate 0
10:44:26.450 Getting vifs from /etc/pimd.conf
10:44:26.451 Local Cand-BSR address 10.0.2.1, priority 5
10:44:26.451 Local Cand-RP address 10.0.2.1, priority 20, interval 30 sec
10:44:26.451 spt-threshold packets 0 interval 100
10:44:26.451 Local static RP: 169.254.0.1, group 232.0.0.0/8
10:44:26.451 IGMP query interval  : 12 sec
10:44:26.451 IGMP querier timeout : 41 sec
10:44:26.451 Interface eth1 comes up; vif #0 now in service
10:44:26.451 query_groups(): Sending IGMP v3 query on eth1
10:44:26.451 Send IGMP Membership Query     from 10.0.2.1 to 224.0.0.1
10:44:26.451 SENT    36 bytes IGMP Membership Query     from 10.0.2.1        to 224.0.0.1
10:44:26.451 SENT    46 bytes PIM v2 Hello              from 10.0.2.1        to 224.0.0.13
10:44:26.451 Interface eth0 comes up; vif #1 now in service
10:44:26.451 query_groups(): Sending IGMP v3 query on eth0
10:44:26.451 Send IGMP Membership Query     from 10.0.0.1 to 224.0.0.1
10:44:26.451 SENT    36 bytes IGMP Membership Query     from 10.0.0.1        to 224.0.0.1
10:44:26.451 SENT    46 bytes PIM v2 Hello              from 10.0.0.1        to 224.0.0.13
10:44:26.452 Interface register_vif0 comes up; vif #2 now in service
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  DR NO-NBR
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

10:44:26.452 Received IGMP Membership Query     from 10.0.2.1 to 224.0.0.1
10:44:26.452 RECV    46 bytes PIM v2 Hello              from 10.0.2.1        to 224.0.0.13 
10:44:26.452 Received IGMP Membership Query     from 10.0.0.1 to 224.0.0.1
10:44:26.452 RECV    46 bytes PIM v2 Hello              from 10.0.0.1        to 224.0.0.13 
10:44:26.453 RECV    46 bytes PIM v2 Hello              from 10.0.0.2        to 224.0.0.13 
10:44:26.453 PIM HELLO holdtime from 10.0.0.2 is 105
10:44:26.453 PIM DR PRIORITY from 10.0.0.2 is 1
10:44:26.453 PIM GenID from 10.0.0.2 is 1056806301
10:44:26.453 Received PIM HELLO from new neighbor 10.0.0.2
10:44:26.453 SENT    46 bytes PIM v2 Hello              from 10.0.0.1        to 224.0.0.13
10:44:26.454 SEND    34 bytes PIM v2 Bootstrap          from 10.0.0.1        to 10.0.0.2 ...
10:44:26.454 Sending unicast: len = 34, frag 0, mtu 1500, to 10.0.0.2
10:44:26.454 000: 45 00 00 22 00 04 00 00 :: FF 67 00 00 0A 00 00 01 
10:44:26.454 010: 0A 00 00 02 24 00 C5 1A :: EB DE 1E 05 01 00 0A 00 
10:44:26.454 020: 02 01 
10:44:26.454 SENT    34 bytes PIM v2 Bootstrap          from 10.0.0.1        to 10.0.0.2
10:44:26.454 All routers in 10.0.0.1 segment support DR Priority based DR election.
10:44:26.454 Using fallback DR election on 10.0.0.1.
10:44:26.454 We lost DR role on 10.0.0.1 in election.
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

10:44:26.454 RECV    56 bytes PIM v2 Bootstrap          from 10.0.0.2        to 10.0.0.1 
10:44:26.454 RECV    46 bytes PIM v2 Hello              from 10.0.0.1        to 224.0.0.13 
10:44:26.459 Received IGMP v3 Membership Report from 10.0.0.1 to 224.0.0.22
10:44:26.459 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.0.0.1 to 224.0.0.22 with 3 group records.
10:44:26.459 Received IGMP v3 Membership Report from 10.0.2.1 to 224.0.0.22
10:44:26.459 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.0.2.1 to 224.0.0.22 with 3 group records.
10:44:26.624 Cache miss, src 10.0.2.20, dst 225.1.2.3, iif 0
10:44:26.624 create group entry, group 225.1.2.3
10:44:26.947 Received IGMP v3 Membership Report from 10.0.2.1 to 224.0.0.22
10:44:26.947 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.0.2.1 to 224.0.0.22 with 3 group records.
10:44:27.415 Received IGMP v3 Membership Report from 10.0.0.1 to 224.0.0.22
10:44:27.415 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.0.0.1 to 224.0.0.22 with 3 group records.
10:44:28.591 Received IGMP v3 Membership Report from 10.0.0.2 to 224.0.0.22
10:44:28.591 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.0.2 to 224.0.0.22 with 5 group records.

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

10:44:31.591 SENT    34 bytes PIM v2 Bootstrap          from 10.0.2.1        to 224.0.0.13
10:44:31.591 SENT    34 bytes PIM v2 Bootstrap          from 10.0.0.1        to 224.0.0.13
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1

10:44:31.591 RECV    34 bytes PIM v2 Bootstrap          from 10.0.2.1        to 224.0.0.13 
10:44:31.591 RECV    34 bytes PIM v2 Bootstrap          from 10.0.0.1        to 224.0.0.13 
10:44:34.223 Received IGMP v3 Membership Report from 10.0.2.1 to 224.0.0.22
10:44:34.223 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.2.1 to 224.0.0.22 with 5 group records.
10:44:34.597 RECV    34 bytes PIM v2 Cand. RP Adv.      from 10.0.1.1        to 10.0.2.1 
10:44:34.597 NETLINK: ask path to 10.0.1.1
10:44:34.597 NETLINK: vif 1, ifindex=26
10:44:34.597 NETLINK: gateway is 10.0.0.2
10:44:34.597 For src 10.0.1.1, iif is 1, next hop router is 10.0.0.2
10:44:34.597 New RP candidate 10.0.1.1 for group 224.0.0.0/4, priority 20
10:44:35.935 Received IGMP v3 Membership Report from 10.0.0.1 to 224.0.0.22
10:44:35.935 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.0.1 to 224.0.0.22 with 5 group records.

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
10.0.1.1         1         224/4               20        70      
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1

10:44:37.624 Cache miss, src 10.0.2.20, dst 225.1.2.3, iif 0
10:44:37.624 create group entry, group 225.1.2.3
10:44:37.624 create source entry, source 10.0.2.20
10:44:37.624 move_kernel_cache: SG
10:44:37.624 move_kernel_cache: SG
10:44:37.624 Added kernel MFC entry src 10.0.2.20 grp 225.1.2.3 from eth1 to register_vif0
10:44:37.624 SEND   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1 ...
10:44:37.624 Sending unicast: len = 156, frag 0, mtu 1500, to 10.0.1.1
10:44:37.624 000: 45 00 00 9C 00 07 00 00 :: FF 67 00 00 0A 00 02 01 
10:44:37.624 010: 0A 00 01 01 21 00 DE FF :: 00 00 00 00 45 00 00 80 
10:44:37.624 020: 87 44 40 00 0A 11 FA 10 :: 0A 00 02 14 E1 01 02 03 
10:44:37.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:37.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:37.624 SENT   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1
10:44:38.624 SEND   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1 ...
10:44:38.624 Sending unicast: len = 156, frag 0, mtu 1500, to 10.0.1.1
10:44:38.624 000: 45 00 00 9C 00 08 00 00 :: FF 67 00 00 0A 00 02 01 
10:44:38.624 010: 0A 00 01 01 21 00 DE FF :: 00 00 00 00 45 00 00 80 
10:44:38.624 020: 87 B8 40 00 0A 11 F9 9C :: 0A 00 02 14 E1 01 02 03 
10:44:38.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:38.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:38.624 SENT   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1
10:44:39.624 SEND   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1 ...
10:44:39.624 Sending unicast: len = 156, frag 0, mtu 1500, to 10.0.1.1
10:44:39.624 000: 45 00 00 9C 00 09 00 00 :: FF 67 00 00 0A 00 02 01 
10:44:39.624 010: 0A 00 01 01 21 00 DE FF :: 00 00 00 00 45 00 00 80 
10:44:39.624 020: 88 AC 40 00 0A 11 F8 A8 :: 0A 00 02 14 E1 01 02 03 
10:44:39.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:39.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:39.624 SENT   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1
10:44:39.626 RECV    54 bytes PIM v2 Join/Prune         from 10.0.0.2        to 224.0.0.13 
10:44:39.626 Received PIM JOIN/PRUNE from 10.0.0.2 on eth0
10:44:39.626 Received PIM JOIN from 10.0.0.2 to group 225.1.2.3 for multicast source 10.0.2.20 on eth0
10:44:39.626 NETLINK: ask path to 10.0.2.20
10:44:39.626 NETLINK: vif 0, ifindex=22
10:44:39.626 Added kernel MFC entry src 10.0.2.20 grp 225.1.2.3 from eth1 to eth0, register_vif0
10:44:39.626 move_kernel_cache: SG
10:44:39.626 Added kernel MFC entry src 10.0.2.20 grp 225.1.2.3 from eth1 to eth0, register_vif0
10:44:40.624 SEND   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1 ...
10:44:40.624 Sending unicast: len = 156, frag 0, mtu 1500, to 10.0.1.1
10:44:40.624 000: 45 00 00 9C 00 0A 00 00 :: FF 67 00 00 0A 00 02 01 
10:44:40.624 010: 0A 00 01 01 21 00 DE FF :: 00 00 00 00 45 00 00 80 
10:44:40.624 020: 88 B1 40 00 0A 11 F8 A3 :: 0A 00 02 14 E1 01 02 03 
10:44:40.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:40.624 030: A8 DD 04 D2 00 6C EF 95 :: 53 65 6E 64 65 72 20 50 
10:44:40.624 SENT   156 bytes PIM v2 Register           from 10.0.2.1        to 10.0.1.1
10:44:40.626 RECV    38 bytes PIM v2 Register_Stop      from 10.0.1.1        to 10.0.2.1 
10:44:40.626 Received PIM_REGISTER_STOP from RP 10.0.1.1 to 10.0.2.1 for src = 10.0.2.20 and group = 225.1.2.3
10:44:40.626 find_route: exact (S,G) entry found
10:44:40.626 Added kernel MFC entry src 10.0.2.20 grp 225.1.2.3 from eth1 to eth0
10:44:41.627 query_groups(): Sending IGMP v3 query on eth1
10:44:41.627 Send IGMP Membership Query     from 10.0.2.1 to 224.0.0.1
10:44:41.627 SENT    36 bytes IGMP Membership Query     from 10.0.2.1        to 224.0.0.1
10:44:41.627 query_groups(): Sending IGMP v3 query on eth0
10:44:41.627 Send IGMP Membership Query     from 10.0.0.1 to 224.0.0.1
10:44:41.627 SENT    36 bytes IGMP Membership Query     from 10.0.0.1        to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
10.0.2.20        225.1.2.3        10.0.1.1         CACHE SG
Joined   oifs: .jj                 
Pruned   oifs: ..p                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           205    60    28       0        0 205  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 1
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
10.0.1.1         1         224/4               20        65      
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1

10:44:41.627 Received IGMP Membership Query     from 10.0.2.1 to 224.0.0.1
10:44:41.627 Received IGMP Membership Query     from 10.0.0.1 to 224.0.0.1
10:44:44.119 RECV    54 bytes PIM v2 Join/Prune         from 10.0.0.2        to 224.0.0.13 
10:44:44.119 Received PIM JOIN/PRUNE from 10.0.0.2 on eth0
10:44:44.119 Received PIM JOIN from 10.0.0.2 to group 225.1.2.3 for multicast source 10.0.2.20 on eth0
10:44:44.119 NETLINK: ask path to 10.0.2.20
10:44:44.119 NETLINK: vif 0, ifindex=22
10:44:44.895 Received IGMP v3 Membership Report from 10.0.0.1 to 224.0.0.22
10:44:44.895 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.0.1 to 224.0.0.22 with 5 group records.
10:44:45.807 Received IGMP v3 Membership Report from 10.0.2.1 to 224.0.0.22
10:44:45.807 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.2.1 to 224.0.0.22 with 5 group records.

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

10:44:46.808 NETLINK: ask path to 10.0.1.1
10:44:46.808 NETLINK: vif 1, ifindex=26
10:44:46.808 NETLINK: gateway is 10.0.0.2
10:44:46.808 For src 10.0.1.1, iif is 1, next hop router is 10.0.0.2

Multicast Routing Table ======================================================
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
10.0.2.20        225.1.2.3        10.0.1.1         CACHE SG
Joined   oifs: .jj                 
Pruned   oifs: ..p                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           205    55    23       0        0 205  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 1
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      32        232/8               1         65535   
10.0.1.1         1         224/4               20        60      
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1

10:44:47.639 Received IGMP v3 Membership Report from 10.0.0.2 to 224.0.0.22
10:44:47.639 accept_membership_report(): IGMP v3 report, 48 bytes, from 10.0.0.2 to 224.0.0.22 with 5 group records.

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  10.0.2.1         10.0.2/24                1  DR NO-NBR
  1  10.0.0.1         10/24                    1  PIM        10.0.0.2       
  2  10.0.2.1         register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
10.0.2.20        225.1.2.3        10.0.1.1         CACHE SG
Joined   oifs: .jj                 
Pruned   oifs: ..p                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           200    50    18       0        0 200  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 1
------------------------------------------------------------------------------

10:44:51.643 New RP candidate 10.0.2.1 for group 224.0.0.0/4, priority 20
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
169.254.0.1      32        232/8               1         65535   
10.0.2.1         2         224/4               20        75      
10.0.1.1         1         224/4               20        55      
------------------------------------------------------------------------------
Current BSR address: 10.0.2.1

^C10:44:52.400 pimd version 2.3.2 exiting.
10:44:52.400 SENT    46 bytes PIM v2 Hello              from 10.0.2.1        to 224.0.0.13
10:44:52.400 SENT    46 bytes PIM v2 Hello              from 10.0.0.1        to 224.0.0.13
root@R1:/tmp/pycore.44031/R1.conf# 
souravcnetcomm commented 8 years ago

I have the following interfaces on the router --

root:/tmp/cdcs/etc# ifconfig
br0       Link encap:Ethernet  HWaddr 00:60:64:CE:80:84  
          inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::260:64ff:fece:8084/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:104036 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114506 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:10624966 (10.1 MiB)  TX bytes:86667773 (82.6 MiB)

eth0      Link encap:Ethernet  HWaddr 00:60:64:CE:80:84  
          inet6 addr: fe80::260:64ff:fece:8084/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:104466 errors:9 dropped:0 overruns:8 frame:9
          TX packets:114517 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12563269 (11.9 MiB)  TX bytes:86668419 (82.6 MiB)

gre7      Link encap:UNSPEC  HWaddr 78-9D-50-5E-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.10.0.1  P-t-P:10.10.0.1  Mask:255.255.255.0
          inet6 addr: fe80::200:5efe:789d:505e/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1334  Metric:1
          RX packets:1482 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1284 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:79269 (77.4 KiB)  TX bytes:64695 (63.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14935 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14935 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:464964 (454.0 KiB)  TX bytes:464964 (454.0 KiB)

pimreg    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:1472  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wwan0     Link encap:Ethernet  HWaddr 3A:4B:06:F7:7A:FD  
          inet addr:120.157.80.94  Bcast:120.157.80.95  Mask:255.255.255.252
          inet6 addr: fe80::384b:6ff:fef7:7afd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1358  Metric:1
          RX packets:80020 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62773 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:68859187 (65.6 MiB)  TX bytes:7494272 (7.1 MiB)

and eth0 is bridged

root:/tmp/cdcs/etc# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.006064ce8084   no      eth0

I also noticed that even when pimd is running in the router, and the sync has happened with the peer router(the peer router IP shown in the multicast routing table), the mc_forwarding flag is not set --

root:/tmp/cdcs/etc# cat /proc/sys/net/ipv4/conf/eth0/mc_forwarding
0

But

root:/tmp/cdcs/etc# cat /proc/sys/net/ipv4/conf/br0/mc_forwarding
1

and

root:/tmp/cdcs/etc# cat /proc/sys/net/ipv4/conf/gre7/mc_forwarding
1

I also noticed the following in pimd logs --

root:/tmp/cdcs/etc# pimd -c pimd.conf -dall -f
debug level 0xffffffff (dvmrp_detail,dvmrp_prunes,dvmrp_routes,dvmrp_neighbors,dvmrp_timers,igmp_proto,igmp_timers,igmp_members,trace,timeout,packets,interfaces,kernel,cache,rsrr,pim_detail,pim_hello,pim_register,pim_join_prune,pim_bootstrap,pim_asserts,pim_cand_rp,pim_routes,pim_timers,pim_rpf)
14:50:40.230 pimd version 2.3.2 starting ...
14:50:40.246 Got 262144 byte send buffer size in 0 iterations
14:50:40.248 Got 262144 byte recv buffer size in 0 iterations
14:50:40.251 Got 262144 byte send buffer size in 0 iterations
14:50:40.253 Got 262144 byte recv buffer size in 0 iterations
14:50:40.257 Getting vifs from kernel
14:50:40.259 Installing br0 (192.168.10.1 on subnet 192.168.10) as vif #0-8 - rate 0
14:50:40.262 Installing wwan0 (120.157.80.94 on subnet 120.157.80.92/30) as vif #1-9 - rate 0
14:50:40.266 Installing gre7 (10.10.0.1 -> 10.10.0.1) as vif #2-12 - rate 0
14:50:40.266 Getting vifs from pimd.conf
14:50:40.267 pimd.conf:3 - Invalid phyint address 'eth0'
14:50:40.269 Setting dr-priority on 120.157.80.94 to 1
14:50:40.269 Config setting default local preference on 120.157.80.94 to 101
14:50:40.270 Setting default local metric on 120.157.80.94 to 1024
14:50:40.270 Local Cand-BSR address 192.168.10.1, priority 5
14:50:40.270 Local Cand-RP address 192.168.10.1, priority 20, interval 30 sec
14:50:40.271 spt-threshold packets 0 interval 100
14:50:40.272 Local static RP: 169.254.0.1, group 232.0.0.0/8
14:50:40.272 IGMP query interval  : 12 sec
14:50:40.273 IGMP querier timeout : 41 sec
14:50:40.273 Interface br0 comes up; vif #0 now in service
14:50:40.274 query_groups(): Sending IGMP v3 query on br0
14:50:40.274 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
14:50:40.281 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
14:50:40.284 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
14:50:40.287 Interface wwan0 comes up; vif #1 now in service
14:50:40.290 query_groups(): Sending IGMP v3 query on wwan0
14:50:40.292 Send IGMP Membership Query     from 120.157.80.94 to 224.0.0.1
14:50:40.295 SENT    36 bytes IGMP Membership Query     from 120.157.80.94   to 224.0.0.1
14:50:40.296 SENT    46 bytes PIM v2 Hello              from 120.157.80.94   to 224.0.0.13
14:50:40.296 Interface gre7 comes up; vif #2 now in service
14:50:40.297 query_groups(): Sending IGMP v3 query on gre7
14:50:40.297 Send IGMP Membership Query     from 10.10.0.1 to 224.0.0.1

Please note the following in the logs above -- 14:50:40.267 pimd.conf:3 - Invalid phyint address 'eth0'

Since the br0 interface is the one that has the IP address assigned and no address is there on eth0, hence I guess that pimd is not recognizing eth0 as a valid vif.....Is this assumption correct? I can also see --

root:/tmp/cdcs/etc# cat /proc/net/ip_mr_vif
Interface      BytesIn  PktsIn  BytesOut PktsOut Flags Local    Remote
 0 br0               0       0         0       0 00000 010AA8C0 00000000
 1 wwan0             0       0         0       0 00000 5E509D78 00000000
 2 gre7              0       0         0       0 00000 01000A0A 01000A0A
 3 pimreg            0       0         0       0 00004 010AA8C0 00000000

That is one area where my logs are different from yours and explains the fact why /proc/sys/net/ipv4/conf/eth0/mc_forwarding is not set to 1 when pimd is running.

With the given config, I cannot see multicast UDP packets getting forwarded from br0(or eth0) to gre7 on the router. Can you prescribe a way to solve this issue? Or you believe I am missing out on something? Please suggest

troglobit commented 8 years ago

Since the eth0 is enslaved in the bridge it cannot be used for layer-3 (routing) operations, only layer-2. Bridging an interface, at least in Linux, means the enslaved interfaces are treated like switch ports. So no, pimd cannot use eth0, that is correct.

From the short log you attached there has not been a RP (for 224.0.0.0/4) or BSR established yet, and not even an IGMP join (on the router facing the receiver). So too little information to go on.

No multicast routing with PIM-SM will start before a Rendez-vous Point (RP) has been established. One means of doing this is with a BootStrap Router (BSR), which should be automatically elected and "bootstrap" a default RP for your network. The RP is the distribution point for all multicast in PIM-SM.

I'm sorry if I cannot be of more help, but setting up dynamic multicast routing with PIM requires a bit of knowledge of the protocol to debug the setup. It is not something that can easily be taught this way ...

souravcnetcomm commented 8 years ago

Using the following in pimd.conf configuring RP statically in both the routers --

# generated by init in Fri Jul  1 17:12:19 EST 2016
# See https://github.com/troglobit/pimd for a full config specification
#phyint eth0 dr-priority 1 distance 101 metric 1024
#phyint wwan0 dr-priority 1 distance 101 metric 1024
phyint br0 enable
phyint gre7 enable
# Bigger value means  "higher" priority
#bsr-candidate priority 4
bsr-candidate 192.168.1.1

# Smaller value means "higher" priority
#rp-candidate time 30 priority 20
#rp-candidate 192.168.1.1

# Candidate for being RP of complete IPv4 multicast range
group-prefix 224.0.0.0 masklen 4

# Static rendez-vous point
rp-address 192.168.1.1 224.0.0.0/4

# Switch to shortest-path tree after first packet, but only after 100 sec.
spt-threshold packets 0 interval 100

I can see the following logs from the sender side router......the logs clearly show the RP selection is happening properly(RP=192.168.1.1)--

17:09:47.907 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
17:09:47.907 RECV    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13 
17:09:47.908 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
17:09:47.949 RECV    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13 
17:09:47.951 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
17:09:47.953 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
17:09:47.956 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:47.988 Set delete timer for group: 224.0.0.22
17:09:47.991 SM group order from  192.168.10.1 (*,224.0.0.22)
17:09:47.993 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:47.995 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:47.998 Set delete timer for group: 224.0.0.2
17:09:47.999 SM group order from  192.168.10.1 (*,224.0.0.2)
17:09:48.000 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:48.000 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:48.000 Set delete timer for group: 224.0.0.13
17:09:48.000 SM group order from  192.168.10.1 (*,224.0.0.13)
17:09:48.001 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:48.001 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
17:09:48.001 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
17:09:48.002 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:48.002 Set delete timer for group: 224.0.0.22
17:09:48.002 SM group order from  10.10.0.1 (*,224.0.0.22)
17:09:48.002 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:48.003 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:48.003 Set delete timer for group: 224.0.0.2
17:09:48.003 SM group order from  10.10.0.1 (*,224.0.0.2)
17:09:48.003 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:48.004 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:48.004 Set delete timer for group: 224.0.0.13
17:09:48.004 SM group order from  10.10.0.1 (*,224.0.0.13)
17:09:48.005 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:48.740 RECV    46 bytes PIM v2 Hello              from 10.10.0.2       to 224.0.0.13 
17:09:48.740 PIM HELLO holdtime from 10.10.0.2 is 105
17:09:48.740 PIM DR PRIORITY from 10.10.0.2 is 1
17:09:48.741 PIM GenID from 10.10.0.2 is 810846292
17:09:48.741 Received PIM HELLO from new neighbor 10.10.0.2
17:09:48.742 SENT    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13
17:09:48.742 SEND    34 bytes PIM v2 Bootstrap          from 10.10.0.1       to 10.10.0.2 ...
17:09:48.742 Sending unicast: len = 34, frag 0, mtu 1334, to 10.10.0.2
17:09:48.743 000: 45 00 00 22 00 04 00 00 :: FF 67 00 00 0A 0A 00 01 
17:09:48.743 010: 0A 0A 00 02 24 00 A1 C3 :: 50 92 1E 00 01 00 C0 A8 
17:09:48.743 020: 0A 01 
17:09:48.744 SENT    34 bytes PIM v2 Bootstrap          from 10.10.0.1       to 10.10.0.2
17:09:48.744 All routers in 10.10.0.1 segment support DR Priority based DR election.
17:09:48.744 Using fallback DR election on 10.10.0.1.
17:09:48.745 We lost DR role on 10.10.0.1 in election.
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

17:09:48.746 RECV    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13 
17:09:48.900 RECV    34 bytes PIM v2 Bootstrap          from 10.10.0.2       to 10.10.0.1 
17:09:50.229 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
17:09:50.229 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
17:09:50.230 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:50.230 Set delete timer for group: 224.0.0.22
17:09:50.230 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:50.230 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:50.231 Set delete timer for group: 224.0.0.2
17:09:50.231 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:50.231 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:50.231 Set delete timer for group: 224.0.0.13
17:09:50.232 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:50.469 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
17:09:50.471 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
17:09:50.473 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:50.476 Set delete timer for group: 224.0.0.22
17:09:50.478 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:50.481 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:50.483 Set delete timer for group: 224.0.0.2
17:09:50.485 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:50.488 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:50.489 Set delete timer for group: 224.0.0.13
17:09:50.489 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

17:09:53.494 SENT    34 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13
17:09:53.495 SENT    34 bytes PIM v2 Bootstrap          from 10.10.0.1       to 224.0.0.13
Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:09:53.496 RECV    34 bytes PIM v2 Bootstrap          from 192.168.10.1    to 224.0.0.13 
17:09:53.496 RECV    34 bytes PIM v2 Bootstrap          from 10.10.0.1       to 224.0.0.13 
17:09:54.289 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
17:09:54.290 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
17:09:54.290 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:54.290 Set delete timer for group: 224.0.0.22
17:09:54.290 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:54.291 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:54.291 Set delete timer for group: 224.0.0.2
17:09:54.291 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:54.291 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:54.292 Set delete timer for group: 224.0.0.13
17:09:54.292 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:55.589 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
17:09:55.590 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
17:09:55.590 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:55.590 Set delete timer for group: 224.0.0.22
17:09:55.590 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:55.591 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:55.591 Set delete timer for group: 224.0.0.2
17:09:55.591 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:55.591 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:55.592 Set delete timer for group: 224.0.0.13
17:09:55.592 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:55.947 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
17:09:55.947 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
17:09:55.947 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:55.948 Set delete timer for group: 224.0.0.22
17:09:55.948 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:55.949 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:55.952 Set delete timer for group: 224.0.0.2
17:09:55.954 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:55.956 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:55.959 Set delete timer for group: 224.0.0.13
17:09:55.961 Not creating routing entry for LAN scoped group 224.0.0.13
17:09:57.352 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
17:09:57.352 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
17:09:57.353 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:09:57.353 Set delete timer for group: 224.0.0.22
17:09:57.353 Not creating routing entry for LAN scoped group 224.0.0.22
17:09:57.353 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:09:57.354 Set delete timer for group: 224.0.0.2
17:09:57.354 Not creating routing entry for LAN scoped group 224.0.0.2
17:09:57.354 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:09:57.354 Set delete timer for group: 224.0.0.13
17:09:57.355 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:09:58.749 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
17:09:58.749 create group entry, group 225.1.2.3
17:10:03.754 query_groups(): Sending IGMP v3 query on br0
17:10:03.755 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
17:10:03.756 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
17:10:03.756 query_groups(): Sending IGMP v3 query on gre7
17:10:03.756 Send IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
17:10:03.757 SENT    36 bytes IGMP Membership Query     from 10.10.0.1       to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:10:03.779 NETLINK: vif 1, ifindex=9
17:10:03.779 NETLINK: gateway is 123.209.196.229
17:10:03.780 For src 169.254.0.1, iif is 1, next hop router is 123.209.196.229: NOT A PIM ROUTER
17:10:03.780 NETLINK: ask path to 192.168.1.1
17:10:03.781 NETLINK: vif 2, ifindex=11
17:10:03.781 For src 192.168.1.1, iif is 2, next hop router is 192.168.1.1: NOT A PIM ROUTER
17:10:03.782 New RP candidate 192.168.1.1 for group 224.0.0.0/4, priority 1
17:10:03.782 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
17:10:03.783 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
17:10:04.125 Received IGMP v3 Membership Report from 10.10.0.2 to 224.0.0.22
17:10:04.126 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.2 to 224.0.0.22 with 3 group records.
17:10:04.126 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:10:04.126 Set delete timer for group: 224.0.0.22
17:10:04.126 Not creating routing entry for LAN scoped group 224.0.0.22
17:10:04.127 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:10:04.127 Set delete timer for group: 224.0.0.2
17:10:04.127 Not creating routing entry for LAN scoped group 224.0.0.2
17:10:04.127 accept_group_report(): igmp_src 10.10.0.2 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:10:04.128 Set delete timer for group: 224.0.0.13
17:10:04.128 Not creating routing entry for LAN scoped group 224.0.0.13
17:10:05.469 Received IGMP v3 Membership Report from 192.168.10.160 to 224.0.0.22
17:10:05.469 accept_membership_report(): IGMP v3 report, 16 bytes, from 192.168.10.160 to 224.0.0.22 with 1 group records.
17:10:05.469 accept_group_report(): igmp_src 192.168.10.160 ssm_src 0.0.0.0 group 224.0.0.251 report_type 34
17:10:05.470 Set delete timer for group: 224.0.0.251
17:10:05.470 SM group order from  192.168.10.160 (*,224.0.0.251)
17:10:05.470 Not creating routing entry for LAN scoped group 224.0.0.251

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

17:10:08.474 NETLINK: ask path to 192.168.1.1
17:10:08.475 NETLINK: vif 2, ifindex=11
17:10:08.475 For src 192.168.1.1, iif is 2, next hop router is 192.168.1.1: NOT A PIM ROUTER
17:10:08.475 NETLINK: vif 1, ifindex=9
17:10:08.476 NETLINK: gateway is 123.209.196.229
17:10:08.476 For src 169.254.0.1, iif is 1, next hop router is 123.209.196.229: NOT A PIM ROUTER

Multicast Routing Table ======================================================
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.1.1      2         224/4               1         65535   
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:10:09.069 Received IGMP v3 Membership Report from 10.10.0.1 to 224.0.0.22
17:10:09.070 accept_membership_report(): IGMP v3 report, 32 bytes, from 10.10.0.1 to 224.0.0.22 with 3 group records.
17:10:09.070 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:10:09.070 Set delete timer for group: 224.0.0.22
17:10:09.070 Not creating routing entry for LAN scoped group 224.0.0.22
17:10:09.071 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:10:09.071 Set delete timer for group: 224.0.0.2
17:10:09.071 Not creating routing entry for LAN scoped group 224.0.0.2
17:10:09.071 accept_group_report(): igmp_src 10.10.0.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:10:09.072 Set delete timer for group: 224.0.0.13
17:10:09.072 Not creating routing entry for LAN scoped group 224.0.0.13
17:10:09.743 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
17:10:09.743 create group entry, group 225.1.2.3
17:10:09.744 create source entry, source 192.168.10.160
17:10:09.744 move_kernel_cache: SG
17:10:09.744 move_kernel_cache: SG
17:10:09.745 Added kernel MFC entry src 192.168.10.160 grp 225.1.2.3 from br0 to register_vif0
17:10:09.745 SEND   156 bytes PIM v2 Register           from 192.168.10.1    to 192.168.1.1 ...
17:10:09.745 Sending unicast: len = 156, frag 0, mtu 1500, to 192.168.1.1
17:10:09.746 000: 45 00 00 9C 00 07 00 00 :: FF 67 00 00 C0 A8 0A 01 
17:10:09.746 010: C0 A8 01 01 21 00 DE FF :: 00 00 00 00 45 00 00 80 
17:10:09.746 020: FB D1 40 00 7F 11 51 4E :: C0 A8 0A A0 E1 01 02 03 
17:10:09.747 030: 8D EE 04 D2 00 6C 02 BA :: 53 65 6E 64 65 72 20 50 
17:10:09.747 030: 8D EE 04 D2 00 6C 02 BA :: 53 65 6E 64 65 72 20 50 
17:10:09.748 SENT   156 bytes PIM v2 Register           from 192.168.10.1    to 192.168.1.1
17:10:10.595 RECV    38 bytes PIM v2 Register_Stop      from 192.168.1.1     to 192.168.10.1 
17:10:10.595 Received PIM_REGISTER_STOP from RP 192.168.1.1 to 192.168.10.1 for src = 192.168.10.160 and group = 225.1.2.3
17:10:10.595 find_route: exact (S,G) entry found
17:10:10.596 delete_mrtentry_all_kernel_cache: SG
17:10:10.596 Removed MFC entry src 192.168.10.160, grp 225.1.2.3
17:10:10.745 Cache miss, src 192.168.10.160, dst 225.1.2.3, iif 0
17:10:12.709 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
17:10:12.709 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
17:10:12.710 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:10:12.710 Set delete timer for group: 224.0.0.22
17:10:12.710 Not creating routing entry for LAN scoped group 224.0.0.22
17:10:12.711 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:10:12.711 Set delete timer for group: 224.0.0.2
17:10:12.711 Not creating routing entry for LAN scoped group 224.0.0.2
17:10:12.711 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:10:12.712 Set delete timer for group: 224.0.0.13
17:10:12.712 Not creating routing entry for LAN scoped group 224.0.0.13

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
192.168.10.160   225.1.2.3        192.168.1.1      SG
Joined   oifs: ...j                
Pruned   oifs: ...p                
Leaves   oifs: ....                
Asserted oifs: ....                
Outgoing oifs: ....                
Incoming     : I...                

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2  3
           205    60    72       0        0  0  0  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.1.1      2         224/4               1         65535   
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:10:16.956 RECV    46 bytes PIM v2 Hello              from 10.10.0.2       to 224.0.0.13 
17:10:16.956 PIM HELLO holdtime from 10.10.0.2 is 105
17:10:16.956 PIM DR PRIORITY from 10.10.0.2 is 1
17:10:16.957 PIM GenID from 10.10.0.2 is 810846292
17:10:17.959 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
17:10:17.961 query_groups(): Sending IGMP v3 query on br0
17:10:17.964 Send IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
17:10:17.967 SENT    36 bytes IGMP Membership Query     from 192.168.10.1    to 224.0.0.1
17:10:17.969 SENT    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13
17:10:17.971 query_groups(): Sending IGMP v3 query on gre7
17:10:17.974 Send IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
17:10:17.977 SENT    36 bytes IGMP Membership Query     from 10.10.0.1       to 224.0.0.1

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.10.1     192.168.10               1  DR NO-NBR
  1  123.209.196.230  123.209.196.228/30       1  DISABLED
  2  10.10.0.1        10.10/24                 1  PIM        10.10.0.2      
  3  192.168.10.1     register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
192.168.10.160   225.1.2.3        192.168.1.1      SG
Joined   oifs: ...j                
Pruned   oifs: ...p                
Leaves   oifs: ....                
Asserted oifs: ....                
Outgoing oifs: ....                
Incoming     : I...                

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2  3
           200    55    67       0        0  0  0  0
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 1
Number of Cache MIRRORs: 0
------------------------------------------------------------------------------

Candidate Rendezvous-Point Set ===============================================
RP address       Incoming  Group Prefix        Priority  Holdtime
---------------  --------  ------------------  --------  ---------------------
192.168.1.1      2         224/4               1         65535   
169.254.0.1      1         232/8               1         65535   
------------------------------------------------------------------------------
Current BSR address: 192.168.10.1

17:10:18.021 Received IGMP Membership Query     from 192.168.10.1 to 224.0.0.1
17:10:18.022 RECV    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13 
17:10:18.022 Received IGMP Membership Query     from 10.10.0.1 to 224.0.0.1
17:10:18.023 RECV    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13 
17:10:19.639 Received IGMP v3 Membership Report from 192.168.10.1 to 224.0.0.22
17:10:19.639 accept_membership_report(): IGMP v3 report, 32 bytes, from 192.168.10.1 to 224.0.0.22 with 3 group records.
17:10:19.640 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.22 report_type 34
17:10:19.640 Set delete timer for group: 224.0.0.22
17:10:19.640 Not creating routing entry for LAN scoped group 224.0.0.22
17:10:19.640 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.2 report_type 34
17:10:19.641 Set delete timer for group: 224.0.0.2
17:10:19.641 Not creating routing entry for LAN scoped group 224.0.0.2
17:10:19.641 accept_group_report(): igmp_src 192.168.10.1 ssm_src 0.0.0.0 group 224.0.0.13 report_type 34
17:10:19.641 Set delete timer for group: 224.0.0.13
17:10:19.642 Not creating routing entry for LAN scoped group 224.0.0.13
^C17:10:20.709 pimd version 2.3.2 exiting.
17:10:20.711 SENT    46 bytes PIM v2 Hello              from 192.168.10.1    to 224.0.0.13
17:10:20.712 SENT    46 bytes PIM v2 Hello              from 10.10.0.1       to 224.0.0.13
root:/tmp/cdcs/etc# 

I can also see multicast UDP packets at the receiver side Router's gre7 interface using tcpdump. But still cannot see any multicast UDP packets on the receiver PC's ethernet interface(using tcpdump),even after running -- ./mcjoin -i eth1 -d(on the receiver PC,where receiver PC is connected to receiver router via eth1 ethernet interface)

Interestingly on running ./mcjoin -i br0 -d on the receiver side router,I can see the multicast UDP packets.

What might be the cause for the multicast UDP packets not getting pushed from the receiver side router to the receiver PC?

troglobit commented 8 years ago

The log is a bit confusing, or maybe I don't understand your setup? It seems Client2 is now where you are running the mcjoin server (producer), but in the initial report you state that Client1 is the producer (VLC)?

Assuming your latest log is from Router2, and you haven't changed anything in the topology or direction c.f. the first image you posted, then I see no IGMP membership reports (join) from Client2 for the group 225.1.2.3 in that log. However, if you've changed the setup and now run the sender (producer) on Client2 and Client1 is the receiving side, I cannot see a membership report because the logfile you've attached is from Router2, not Router1 ...

As I said previously, there are several steps included in multicast routing and forwarding. For the end router to forward traffic to the receiver node it (the router) needs to receive an IGMP membership report (join) for the given group. This is also what usually initiates the forwarding from a neighbor router of the group, but only because the first (the end router) having translated that IGMP membership report into a PIM Join.

So, investigate why the end router does not receive an IGMP membership report for 225.1.2.3. The IGMP report should be clearly visible with tcpdump/wireshark on br0 (in your image) on the end router (the one closest to the intended receiver). If the report does not show in tcpdump/wireshark then it's not a problem with pimd.

troglobit commented 8 years ago

I think I've figured out the root cause of your problems, @souravcnetcomm ... it's the bridge.

Many moons ago I had a similar setup, a completely virtualized testbed with KVM and Linux bridges to connect the virtual machines. That's when I wrote my Multicast HowTo and also found that the bridge's IGMP snooping implenentation did not play well with pimd, or mrouted either for that matter.

As root (sudo doesn't work) you have to disable IGMP snooping on the bridge interfaces on both routers:

echo 0 > /sys/devices/virtual/net/br0/bridge/multicast_snooping

With that disabled the router nearest to the receiver should now start to get IGMP membership reports for 225.1.2.3 and soon thereafter the multicast routing should start.

souravcnetcomm commented 8 years ago

you are absolutely spot on.....after disabling IGMP snooping on the bridge interface on both the routers,now I can receive the multicast UDP packets at the receiver. However the UDP multicast packets did not start coming after I joined the multicast group from the reciver using -- ./mcjoin -i eth1 -d

The packets started coming in only after I joined the multicast group using gre7 on the receiver side router(with the above mentioned IGMP join already in place on the receiver) -- ./mcjoin -i gre7 -d

I am not sure how to explain this.....can you please help?

troglobit commented 8 years ago

I really have no idea why it doesn't work for you ... I've spent the better part of the day trying to figure it out. I even set up a physical testbed with a few laptops and a raspberry pi to see if I could replicate your issue. Wrote a blog post about it here:

http://troglobit.github.io/blog/2016/07/05/multicast-routing-with-pim-sm-over-gre/

Only real issue I had was that both the clients had a link-local (169.254.x.y) address set as primary address, which mcjoin used when both sending the multicast stream and when joining in the other end. When I stopped avahi and manually removed the link-local addresses I started receiving multicast.

souravcnetcomm commented 8 years ago

Finally the end to end UDP multicast works in my setup......After running './mcjoin -i eth1 -d' on an endpoint,I was not waiting enough probably.....I found that it takes a while to setup the routes before the multicast UDP packets actually start getting to the multicast receiver endpoint.

One doubt still remains though,with the working setup, if I swap the sender and the receiver(i.e run ./mcjoin -s -d -t 127on the endpoint which previously ran./mcjoin -i eth1 -dand vice versa), then I do not see multicast UDP packets coming to the receiver,even when I wait long enough.....I can see IGMP join going in and am trying to find the corresponding PIM-JOIN......or am I missing something here which you might be able to explain?

troglobit commented 8 years ago

That might very well be a bug, likely a close cousin to #79.

troglobit commented 5 years ago

Closing due to low activity and since #79 now has been closed.