troglobit / pimd

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

PIM router does not forward traffic received from PIM DR router #46

Closed greenpau closed 7 years ago

greenpau commented 9 years ago

@troglobit, there are two routers connected via GRE tunnel: R1 and R2.

R1 is RP.

R2 send multicast packets to the group address of 239.2.2.10:

# mtools_2.2/msend -i 10.254.0.110 -g 239.2.2.10 -p 5001
Now sending to multicast group: 239.2.2.10
Send out msg 1 to 239.2.2.10:5001:
Send out msg 2 to 239.2.2.10:5001:

R1 sees the packets arriving when listening on its tunnel interface:

# ./mreceive -g 239.2.2.10 -p 5001-i 10.254.0.12
Now receiving from multicast group: 239.2.2.10
Receive msg 1 from 10.254.0.110:5001:
Receive msg 2 from 10.254.0.110:5001:

The issue arose when sending traffic to another interface of R1. It does not forward the packet over.

Troubleshooting:

  1. On R2, checked multicast forwarding:
 find  /proc -type f -name "mc_forwarding" -exec awk 'END {print $0 "," FILENAME}' {} \;

1,/proc/sys/net/ipv4/conf/all/mc_forwarding
0,/proc/sys/net/ipv4/conf/default/mc_forwarding
0,/proc/sys/net/ipv4/conf/lo/mc_forwarding
1,/proc/sys/net/ipv4/conf/pimreg/mc_forwarding
1,/proc/sys/net/ipv4/conf/tun1/mc_forwarding

The same on R1:

1,/proc/sys/net/ipv4/conf/all/mc_forwarding
0,/proc/sys/net/ipv4/conf/default/mc_forwarding
0,/proc/sys/net/ipv4/conf/lo/mc_forwarding
1,/proc/sys/net/ipv4/conf/pimreg/mc_forwarding
1,/proc/sys/net/ipv4/conf/tun1/mc_forwarding

Also, checked the following

# expected value is 1
cat /proc/sys/net/ipv4/ip_forward
# expected value is 0
cat /proc/sys/net/ipv4/conf/all/rp_filter
# expects virtual interfaces
cat /proc/net/ip_mr_vif

Other tunnels work fine.

Any ideas?

greenpau commented 9 years ago
R2# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.2.110      192.168.2.0/24       1  DISABLED
  1  192.168.1.110      192.168.1.0/24               1  DISABLED
  2  10.254.0.110     10.254.0.110/32          1  DR NO-NBR
  3  10.254.0.110     register_vif0            1

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

R2#
greenpau commented 9 years ago

R1:

R1# ip mroute
(10.1.1.1, 239.2.2.20)           Iif: unresolved
(10.1.1.1, 239.102.0.1)          Iif: unresolved
(10.1.1.1, 239.102.0.5)          Iif: unresolved
(10.1.1.1, 239.102.128.14)       Iif: unresolved
(10.1.1.1, 239.102.128.2)        Iif: unresolved
(10.1.1.1, 239.102.0.8)          Iif: unresolved
(10.1.1.1, 239.102.0.0)          Iif: unresolved
(10.1.1.1, 239.102.128.8)        Iif: unresolved
(10.1.1.1, 239.102.0.4)          Iif: unresolved
(10.1.1.1, 239.102.0.2)          Iif: unresolved
R1#
R2# ip mroute
R2#
troglobit commented 9 years ago

@greenpau ... silly question, you do have a unicast routing protocol running underneath, right?

greenpau commented 9 years ago

@troglobit, bgp :-)

troglobit commented 9 years ago

OK :smiley:

troglobit commented 9 years ago

If that is the msend I think it is, then its default TTL is set to 1 ... which means no router would forward that data. Try adding -t 255 to the command line of msend, or an appropriate amount representative of the router depth in your setup.