3

network diagram

Does anyone know how could I setup pimd on Linux so that multicast address from 225.0.30.30 could route to 172.24.0.66/30 router on the right?

So this is the lab I just setup today, PoC network diagram host 1 IP config Router A IP config Router B IP config

In the lab environment, I changed IP so that I don't need to run another NAT setup. Router A and B is running pimd without any detail configuration, here is pimd -r detail for both routers: pimd -r detail on router A pimd -r detail on router B

After all parts glued together, I start fire "iperf -c 225.0.100.100 -u -t 1 -i 1" on host 1, and "iperf -s -u -B 225.0.100.100 -i 1" on router B; Router B receive no multicast at all, anyone know what's wrong with this?

EDIT: testing Everton's suggestion, result still nothing

test_igmpv3_join result from Router B:

test_igmpv3_join

PIM debug log from Router A after test_igmpv3_join running:

2016/01/28 13:55:03 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:03 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:03 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:03 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:03 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:03 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:03 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:04 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/01/28 13:55:04 PIM: Recv IP PIM pkt size=30 from 10.101.16.135 to 224.0.0.13 on fd=9 on ifindex=2 (sock_ifindex=2)
2016/01/28 13:55:04 PIM: Recv IP packet from 10.101.16.135 to 224.0.0.13 on eth0: size=30 ip_header_size=20 ip_proto=103
2016/01/28 13:55:04 PIM: Recv PIM packet from 10.101.16.135 to 224.0.0.13 on eth0: ttl=1 pim_version=2 pim_type=0 pim_msg_size=10 checksum=93df
2016/01/28 13:55:04 PIM: pim_hello_recv: from 10.101.16.135 on eth0
2016/01/28 13:55:04 PIM: pim_hello_recv: parse left_size=6: PIM hello TLV type=1 length=2 from 10.101.16.135 on eth0
2016/01/28 13:55:04 PIM: pim_hello_recv: PIM hello option from 10.101.16.135 on interface eth0: holdtime=105
2016/01/28 13:55:04 PIM: neighbor_timer_off: cancelling timer for neighbor 10.101.16.135 on eth0
2016/01/28 13:55:04 PIM: pim_neighbor_timer_reset: starting 105 sec timer for neighbor 10.101.16.135 on eth0
2016/01/28 13:55:04 PIM: dr_election_by_addr: on interface eth0
2016/01/28 13:55:04 PIM: Scheduling READ event on PIM socket fd=9
2016/01/28 13:55:04 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/01/28 13:55:04 PIM: Recv IP PIM pkt size=30 from 10.101.16.135 to 224.0.0.13 on fd=11 on ifindex=2 (sock_ifindex=3)
2016/01/28 13:55:04 PIM: Scheduling READ event on PIM socket fd=11
2016/01/28 13:55:07 PIM: Rescheduling 30 sec hello on interface eth1
2016/01/28 13:55:07 PIM: hello_send: to 224.0.0.13 on eth1: holdt=105 prop_d=500 overr_i=2500 dis_join_supp=0 dr_prio=1 gen_id=2518d352 addrs=2
2016/01/28 13:55:07 PIM: pim_tlv_append_addrlist_ucast: number of encoded secondary unicast IPv4 addresses: 0
2016/01/28 13:55:07 PIM: pim_msg_send: to 224.0.0.13 on eth1: msg_size=34 checksum=3adb
2016/01/28 13:55:07 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.1,2
2016/01/28 13:55:09 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/01/28 13:55:09 PIM: Recv IP PIM pkt size=56 from 10.101.16.135 to 224.0.0.13 on fd=9 on ifindex=2 (sock_ifindex=2)
2016/01/28 13:55:09 PIM: Recv IP packet from 10.101.16.135 to 224.0.0.13 on eth0: size=56 ip_header_size=20 ip_proto=103
2016/01/28 13:55:09 PIM: Recv PIM packet from 10.101.16.135 to 224.0.0.13 on eth0: ttl=1 pim_version=2 pim_type=4 pim_msg_size=36 checksum=b88e
2016/01/28 13:55:09 PIM: pim_pim.c pim_pim_packet: unsupported PIM message type=4 from 10.101.16.135 on eth0
2016/01/28 13:55:09 PIM: pim_sock_read: pim_pim_packet() return=-1
2016/01/28 13:55:09 PIM: Scheduling READ event on PIM socket fd=9
2016/01/28 13:55:09 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/01/28 13:55:09 PIM: Recv IP PIM pkt size=56 from 10.101.16.135 to 224.0.0.13 on fd=11 on ifindex=2 (sock_ifindex=3)
2016/01/28 13:55:09 PIM: Scheduling READ event on PIM socket fd=11
2016/01/28 13:55:12 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:12 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:12 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:12 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:15 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:16 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:16 PIM: pim_zebra.c fib_lookup_if_vif_index: high vif_index=2 > highest_vif_index=-1 nexthop for address 10.101.16.135
2016/01/28 13:55:16 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?
2016/01/28 13:55:16 PIM: pim_zebra.c igmp_source_forward_start: could not find input interface for source 10.101.16.135
2016/01/28 13:55:16 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/28 13:55:21 PIM: Rescheduling 30 sec hello on interface eth0
2016/01/28 13:55:21 PIM: hello_send: to 224.0.0.13 on eth0: holdt=105 prop_d=500 overr_i=2500 dis_join_supp=0 dr_prio=1 gen_id=ca948d20 addrs=2
2016/01/28 13:55:21 PIM: pim_tlv_append_addrlist_ucast: number of encoded secondary unicast IPv4 addresses: 0
2016/01/28 13:55:21 PIM: pim_msg_send: to 224.0.0.13 on eth0: msg_size=34 checksum=f07b

Router A configuration:

routerA# show run

Current configuration:
!
password quagga
log stdout
!
interface eth0
 ip pim ssm
 ip igmp query-interval 125
 ip igmp query-max-response-time-dsec 100
!
interface eth1
 ip pim ssm
 ip igmp
 ip igmp query-interval 125
 ip igmp query-max-response-time-dsec 100
!
interface eth2
!
interface eth3
!
interface lo
!         
!
line vty
!
end

Quagga pimd troubleshoot details

routerA# show ip rib 10.101.16.135
Address         NextHop         Interface Metric Preference
10.101.16.135   0.0.0.0         eth0           0          0
routerA# show ip multicast 
Multicast disabled

Zclient update socket: 7 failures=0
Zclient lookup socket: 8 failures=0

Current highest VifIndex: -1
Maximum highest VifIndex: 31

Upstream Join Timer: 60 secs
Join/Prune Holdtime: 210 secs

RPF Cache Refresh Delay:    10000 msecs
RPF Cache Refresh Timer:    0 msecs
RPF Cache Refresh Requests: 5
RPF Cache Refresh Events:   2
RPF Cache Refresh Last:     00:02:20

Scan OIL - Last: 00:02:20  Events: 2
MFC Add  - Last: --:--:--  Events: 0
MFC Del  - Last: --:--:--  Events: 0

Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut
ioctl(SIOCGETVIFCNT=35296) failure for interface eth0 vif_index=-1: errno=9: Bad file descriptor
ioctl(SIOCGETVIFCNT=35296) failure for interface eth1 vif_index=-1: errno=9: Bad file descriptor
routerA# show ip mroute        
Proto: I=IGMP P=PIM

Source          Group           Proto Input iVifI Output oVifI TTL Uptime  

I saw something funny "Multicast disabled", so on Quagga pimd, I added config line "ip multicast-routing", then I fire up iperf to send out multicast packet and show the details again,

routerA# show ip multicast 
Mroute socket descriptor: 14
Mroute socket uptime: 00:08:12

Zclient update socket: 7 failures=0
Zclient lookup socket: 8 failures=0

Current highest VifIndex: 3
Maximum highest VifIndex: 31

Upstream Join Timer: 60 secs
Join/Prune Holdtime: 210 secs

RPF Cache Refresh Delay:    10000 msecs
RPF Cache Refresh Timer:    0 msecs
RPF Cache Refresh Requests: 5
RPF Cache Refresh Events:   2
RPF Cache Refresh Last:     00:13:14

Scan OIL - Last: 00:13:14  Events: 2
MFC Add  - Last: 00:01:04  Events: 1
MFC Del  - Last: --:--:--  Events: 0

Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut
eth0      10.101.16.134     2   2    5687       0    8519126          0
eth1      172.24.0.65       3   3       0       0          0          0

routerA# show ip pim interface 
Interface Address         ifIndex Socket Uptime   Multi Broad MLoop AllMu Prmsc Del
eth0      10.101.16.134         2      9 00:23:20   yes   yes    no    no    no  no
eth1      172.24.0.65           3     11 00:23:20   yes   yes    no    no    no  no

routerA# show ip igmp sources 
Interface Address         Group           Source          Timer Fwd Uptime  
eth1      172.24.0.65     225.0.100.100   10.101.16.135   02:48   Y 00:02:03

routerA# show ip igmp interface 
Interface Address         ifIndex Socket Uptime   Multi Broad MLoop AllMu Prmsc Del
eth1      172.24.0.65           3     10 00:23:45   yes   yes   yes    no    no  no

but tcpdump on router B still receive no multicast packet.

Redo PIM debug log from Router A after test_igmpv3_join running:

2016/01/29 10:40:05 PIM: Rescheduling 30 sec hello on interface eth1
2016/01/29 10:40:05 PIM: hello_send: to 224.0.0.13 on eth1: holdt=105 prop_d=500 overr_i=2500 dis_join_supp=0 dr_prio=1 gen_id=921c168a addrs=2
2016/01/29 10:40:05 PIM: pim_tlv_append_addrlist_ucast: number of encoded secondary unicast IPv4 addresses: 0
2016/01/29 10:40:05 PIM: pim_msg_send: to 224.0.0.13 on eth1: msg_size=34 checksum=ff2a
2016/01/29 10:40:09 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/29 10:40:09 PIM: pim_rpf.c pim_nexthop_lookup: found nexthop 0.0.0.0 for address 10.101.16.135: interface eth0 ifindex=2 metric=0 pref=0
2016/01/29 10:40:09 PIM: pim_if_find_neighbor: neighbor not found for address 0.0.0.0 on interface eth0
2016/01/29 10:40:09 PIM: pim_rpf.c pim_rpf_update: RPF'(10.101.16.135,225.0.100.100) not found: won't send join upstream
2016/01/29 10:40:09 PIM: pim_rpf.c pim_rpf_update: (S,G)=(10.101.16.135,225.0.100.100) source nexthop now is: interface=eth0 address=0.0.0.0 pref=0 metric=0
2016/01/29 10:40:09 PIM: pim_rpf.c pim_rpf_update: (S,G)=(10.101.16.135,225.0.100.100) RPF_interface(S) changed from <oldif?> to eth0
2016/01/29 10:40:09 PIM: pim_ifassert_winner_set: (S,G)=(10.101.16.135,225.0.100.100) assert state changed from ifassert_bad_state to NOINFO on interface eth1
2016/01/29 10:40:09 PIM: pim_ifassert_winner_set: (S,G)=(10.101.16.135,225.0.100.100) assert winner changed from 64.146.254.46 to 0.0.0.0 on interface eth1
2016/01/29 10:40:09 PIM: ifmembership_set: (S,G)=(10.101.16.135,225.0.100.100) membership now is INCLUDE on interface eth1
2016/01/29 10:40:09 PIM: pim_upstream_switch: PIM_UPSTREAM_JOINED: (S,G)=(10.101.16.135,225.0.100.100)
2016/01/29 10:40:09 PIM: pim_ifchannel_update_assert_tracking_desired: AssertTrackingDesired(10.101.16.135,225.0.100.100,eth1) changed from 0 to 1
2016/01/29 10:40:09 PIM: pim_forward_start: (S,G)=(10.101.16.135,225.0.100.100) oif=eth1
2016/01/29 10:40:09 PIM: send_join: can't send join upstream: RPF'(10.101.16.135,225.0.100.100)=0.0.0.0
2016/01/29 10:40:09 PIM: pim_joinprune_send: sending Join(S,G)=(10.101.16.135,225.0.100.100) to upstream=0.0.0.0 on interface eth0
2016/01/29 10:40:09 PIM: pim_joinprune_send: Join(S,G)=(10.101.16.135,225.0.100.100): upstream=0.0.0.0 is myself on interface eth0
2016/01/29 10:40:09 PIM: join_timer_start: starting 60 sec timer for upstream (S,G)=(10.101.16.135,225.0.100.100)
2016/01/29 10:40:09 PIM: pim_ifchannel_update_could_assert: CouldAssert(10.101.16.135,225.0.100.100,eth1) changed from 0 to 1
2016/01/29 10:40:09 PIM: pim_ifchannel_update_my_assert_metric: my_assert_metric(10.101.16.135,225.0.100.100,eth1) changed from 1,4294967295,4294967295,0.0.0.0 to 0,0,0,172.24.0.65
2016/01/29 10:40:09 PIM: Rescheduling 30 sec hello on interface eth0
2016/01/29 10:40:09 PIM: hello_send: to 224.0.0.13 on eth0: holdt=105 prop_d=500 overr_i=2500 dis_join_supp=0 dr_prio=1 gen_id=661e4198 addrs=2
2016/01/29 10:40:09 PIM: pim_tlv_append_addrlist_ucast: number of encoded secondary unicast IPv4 addresses: 0
2016/01/29 10:40:09 PIM: pim_msg_send: to 224.0.0.13 on eth0: msg_size=34 checksum=ef2b
2016/01/29 10:40:10 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/29 10:40:20 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/29 10:40:20 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.22,2
2016/01/29 10:40:22 PIM: ifmembership_set: (S,G)=(10.101.16.135,225.0.100.100) membership now is NOINFO on interface eth1
2016/01/29 10:40:22 PIM: pim_upstream_switch: PIM_UPSTREAM_NOTJOINED: (S,G)=(10.101.16.135,225.0.100.100)
2016/01/29 10:40:22 PIM: pim_ifchannel_update_assert_tracking_desired: AssertTrackingDesired(10.101.16.135,225.0.100.100,eth1) changed from 1 to 0
2016/01/29 10:40:22 PIM: pim_forward_stop: (S,G)=(10.101.16.135,225.0.100.100) oif=eth1
2016/01/29 10:40:22 PIM: pim_zebra.c del_oif: nonexistent protocol mask 2 removed OIF eth1 (vif_index=3, min_ttl=0) from channel (S,G)=(10.101.16.135,225.0.100.100)
2016/01/29 10:40:22 PIM: pim_joinprune_send: sending Prune(S,G)=(10.101.16.135,225.0.100.100) to upstream=0.0.0.0 on interface eth0
2016/01/29 10:40:22 PIM: pim_joinprune_send: Prune(S,G)=(10.101.16.135,225.0.100.100): upstream=0.0.0.0 is myself on interface eth0
2016/01/29 10:40:22 PIM: pim_ifchannel_update_could_assert: CouldAssert(10.101.16.135,225.0.100.100,eth1) changed from 1 to 0
2016/01/29 10:40:22 PIM: pim_ifchannel_update_my_assert_metric: my_assert_metric(10.101.16.135,225.0.100.100,eth1) changed from 0,0,0,172.24.0.65 to 1,4294967295,4294967295,0.0.0.0
2016/01/29 10:40:22 PIM: pim_mroute_msg: kernel upcall NOCACHE type=1 ip_p=0 from fd=14 for (S,G)=(10.101.16.135,225.0.100.100) on eth0 vifi=2

mroute detail:

routerA# show ip mroute 
Proto: I=IGMP P=PIM

Source          Group           Proto Input iVifI Output oVifI TTL Uptime  
10.101.16.135   225.0.100.100   I     eth0      2 eth1       3   1 02:47:40 
routerA# show ip mroute count

Source          Group           Packets      Bytes WrongIf  
10.101.16.135   225.0.100.100    841231 1260164038       0 

Problem solved by running iperf on host 1 with -T 10 instead of default 1.

6
  • "pimd can define scope zones that are similar to mrouted. This enables you to prevent certain multicast prefixes to be forwarded beyond a certain network boundary. (For example, add phyint eth0 scoped 239.0.0.0 masklen 8 to your pimd.conf file.)" from PIM Operation and Daemons
    – Ron Maupin
    Jan 27, 2016 at 5:10
  • this part I understand, but I don't think I got it working at all, can you try out in your lab as well please? Jan 27, 2016 at 5:11
  • We're not here to do your PoC's. If you have any specific questions, please share configurations, routing information, logs, etc.
    – Teun Vink
    Jan 27, 2016 at 5:16
  • I don't have a Linux setup. Multicast HowTo mentions, "In the HowTo I mention both pimd and mrouted, since they work out-of-the-box w/o any config changes..."
    – Ron Maupin
    Jan 27, 2016 at 5:17
  • Actually, the multicast routing capabilities of linux are completely crap. Hardcoded limits on interfaces due to limited bitfield constructs in the kernel, and forwarding rate is so slow as to be useless for almost any real work. (it'll work fine for ntp, but that's one packet every few minutes.)
    – Ricky
    Jan 27, 2016 at 5:49

1 Answer 1

2

This is a quick recipe using Quagga pimd:

1) Setup Host1 static default route towards RouterA (you could also use an static specific route for the multicast group).

2) Make sure Host1 source is sending multicast stream with proper TTL (high enough to reach the receivers).

3) Make sure unicast routing towards multicast source is correct on RouterA.

4) Run Quagga pimd on RouterA:

ATTENTION: pimd requires the zebra daemon: run zebra daemon before starting pimd.

! RouterA: interface to source
! (pimd is enabled on eth0 just to activate multicast on it)
interface eth0
 ip pim ssm

! RouterA: interface to RouterB
! (for this simple topology, we actually only need IGMP here)
interface eth1
 ip pim ssm
 ip igmp

5) Install Quagga pimd on RouterB, in order to run this IGMPv3 join tool:

RouterB: test_igmpv3_join eth1 225.0.30.30 192.168.18.132

6) Use Quagga pimd commands on RouterA to verify multicast. For instance:

RouterA: show ip mroute

RouterA: show ip mroute count

7) If things aren't working as expected, try pimd troubleshooting commands:

show ip rib 192.168.18.132 (unicast route towards source?)
show ip multicast          (multicast enabled at all?)
show ip mroute             (kernel mcast programming is correct?)
show ip pim interface      (pim enabled on interfaces?)
show ip igmp sources       (receiver joined on interface?)
show ip igmp interface     (igmp enabled on receiver interface?)

From: http://git.savannah.gnu.org/cgit/quagga.git/tree/pimd/TROUBLESHOOTING

11
  • which quagga pimd project are you talking about? This one? Quagga Pimd Jan 28, 2016 at 3:17
  • EDIT: OH, I just realized pimd have been integrated into Quagga on latest version. Jan 28, 2016 at 4:48
  • I just tested, router A show ip mroute: nothing; mroute count, nothing; Did I miss anything on router B configuration? you said I should install Quagga pimd on Router B but no configuration? Jan 28, 2016 at 5:39
  • First, pimd is reporting pim was disabled on eth0: '2016/01/28 13:55:16 PIM: pim_zebra.c fib_lookup_if_vif_index: pim disabled on interface eth0 vif_index=2 ?' Did you configure "ip pim ssm" under "int eth0" ?
    – Everton
    Jan 28, 2016 at 11:49
  • Second, look at pimd troubleshooting commands: git.savannah.gnu.org/cgit/quagga.git/tree/pimd/TROUBLESHOOTING
    – Everton
    Jan 28, 2016 at 11:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.