troglobit / pimd

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

Please Help me. I can not run pimd #59

Closed fatihusta closed 9 years ago

fatihusta commented 9 years ago

Hi, I'm newbie

I tested pimd-2.3.0 on debian wheezy.

Kernel : 4.1.8

CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y

Sysctl Config

net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.all.mc_forwarding = 1

net.ipv4.conf.all.force_igmp_version = 3

My topology (all system on vmware)

VLC Server - UDP Stream on Windows Server 2012 (Sender)
Debian1 (R1)
Debian2 (R2)
VLC Client - Windows Seven (Receiver)
Sender <----> R1 <----> R2 <----> Receiver

multicast address = 234.234.234.234

R1 IP address

ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:7d:a9:63 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.11/24 brd 192.168.20.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe7d:a963/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:7d:a9:6d brd ff:ff:ff:ff:ff:ff
    inet 172.16.1.1/30 brd 172.16.1.3 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe7d:a96d/64 scope link 
       valid_lft forever preferred_lft forever
16: pimreg@NONE: <NOARP,UP,LOWER_UP> mtu 1472 qdisc noqueue state UNKNOWN group default 
    link/pimreg 

R2 IP address

ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:bc:2d:a5 brd ff:ff:ff:ff:ff:ff
    inet 172.16.1.2/30 brd 172.16.1.3 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:febc:2da5/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:bc:2d:af brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.1/24 brd 10.0.1.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:febc:2daf/64 scope link 
       valid_lft forever preferred_lft forever
12: pimreg@NONE: <NOARP,UP,LOWER_UP> mtu 1472 qdisc noqueue state UNKNOWN group default 
    link/pimreg 

R1 Routing Table

ip ro
default via 172.16.1.2 dev eth1 
172.16.1.0/30 dev eth1  proto kernel  scope link  src 172.16.1.1 
192.168.20.0/24 dev eth0  proto kernel  scope link  src 192.168.20.11 

R2 Routing Table

ip ro
default via 172.16.1.1 dev eth0 
10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.1 
172.16.1.0/30 dev eth0  proto kernel  scope link  src 172.16.1.2 

All system ping test successful

R1

cat /proc/net/ip_mr_vif
Interface      BytesIn  PktsIn  BytesOut PktsOut Flags Local    Remote
 0 eth0       136547712  101598         0       0 00000 0B14A8C0 00000000
 1 eth1              0       0         0       0 00000 010110AC 00000000
 2 pimreg            0       0         0       0 00004 0B14A8C0 00000000

Packet Not forwarding eth1 interface

R2

cat /proc/net/ip_mr_vif
Interface      BytesIn  PktsIn  BytesOut PktsOut Flags Local    Remote
 0 eth0              0       0         0       0 00000 020110AC 00000000
 1 eth1              0       0         0       0 00000 0101000A 00000000
 2 pimreg            0       0         0       0 00004 020110AC 00000000

R1

ip mr
(192.168.20.254, 234.234.234.234) Iif: eth0       Oifs: eth1(ttl 3) 

R2

# ip mr

-- empty

R1

# pimd -r

Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  192.168.20.11    192.168.20               3  DR NO-NBR
  1  172.16.1.1       172.16.1/30              3  PIM        172.16.1.2     
  2  192.168.20.11    register_vif0            1 

 Vif  SSM Group        Sources             

Multicast Routing Table ======================================================
----------------------------------- (*,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
INADDR_ANY       234.234.234.234  192.168.20.11    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
           170    25     0       0        0 170  0
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
192.168.20.254   234.234.234.234  192.168.20.11    SPT CACHE SG
Joined   oifs: ...                 
Pruned   oifs: ...                 
Leaves   oifs: ...                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
            50    25     0       0        0  0  0
----------------------------------- (*,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
INADDR_ANY       239.255.255.250  192.168.20.11    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
           165    20     0       0        0 165  0
----------------------------------- (S,G) ------------------------------------
--------------------------------- (*,*,G) ------------------------------------
Number of Groups: 2
Number of Cache MIRRORs: 1

R2

# pimd -r
Virtual Interface Table ======================================================
Vif  Local Address    Subnet              Thresh  Flags      Neighbors
---  ---------------  ------------------  ------  ---------  -----------------
  0  172.16.1.2       172.16.1/30              3  DR PIM     172.16.1.1     
  1  10.0.1.1         10.0.1/24                3  DR NO-NBR
  2  172.16.1.2       register_vif0            1 

 Vif  SSM Group        Sources             

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

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
             0    55     0       0        0  0  0
----------------------------------- (S,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
10.0.1.2         234.234.234.234  192.168.20.11    SG
Joined   oifs: ...                 
Pruned   oifs: ...                 
Leaves   oifs: .l.                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : .I.                 

TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
           195    50     0       0        0  0  0
----------------------------------- (*,G) ------------------------------------
Source           Group            RP Address       Flags
---------------  ---------------  ---------------  ---------------------------
INADDR_ANY       239.255.255.250  192.168.20.11    WC RP
Joined   oifs: ...                 
Pruned   oifs: ...                 
Leaves   oifs: .l.                 
Asserted oifs: ...                 
Outgoing oifs: .o.                 
Incoming     : I..                 

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

R1

grep -v "^#" /etc/pimd.conf  | grep -v "^$"
phyint eth0 enable igmpv3 ttl-threshold 3
phyint eth1 enable igmpv3 ttl-threshold 3
bsr-candidate eth0
bsr-candidate eth1
rp-candidate eth0
bsr-candidate priority 5
rp-candidate time 30 priority 20
group-prefix 224.0.0.0 masklen 4
spt-threshold packets 0 interval 100

R2

grep -v "^#" /etc/pimd.conf  | grep -v "^$"
phyint eth0 enable igmpv3 ttl-threshold 3
phyint eth1 enable igmpv3 ttl-threshold 3
bsr-candidate eth1
bsr-candidate eth0
rp-candidate eth0
rp-candidate eth1
bsr-candidate priority 5
rp-candidate time 30 priority 20
spt-threshold packets 0 interval 100

Sory my bad english.

troglobit commented 9 years ago

Little bit difficult to understand what your problem is, the two routers seem to have peered properly and even established the multicast routes? Have you checked the TTL of the multicast (234.234.234.234) you are trying to route? Usually multicast defaults to TTL=1 ... and it needs to be greater than that for a router to be allowed to forward the stream.

fatihusta commented 9 years ago

Thanks @troglobit I tried command line vlc player and i set ttl. it's work.

minimum ttl 5 for my topology

commands

Sender (w2k12)

vlc.exe -vvv video1.mp4 :sout=#udp{dst=234.234.234.234:1234} :sout-keep --ttl 5

Client (win7)

vlc.exe -vvv udp://@234.234.234.234:1234
troglobit commented 9 years ago

Good to hear you got it working! :smiley:

fatihusta commented 9 years ago

Thanks for your support. @troglobit :)