User Tools

Site Tools


documentation:examples:multicast_with_pim-sm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
documentation:examples:multicast_with_pim-sm [2019/11/08 10:45] – [Router 3] olivierdocumentation:examples:multicast_with_pim-sm [2019/11/08 18:55] – [Checking NIC drivers and Bhyve compatibility with multicast] olivier
Line 124: Line 124:
  ifconfig_em2="inet 10.0.34.4/24" \  ifconfig_em2="inet 10.0.34.4/24" \
  defaultrouter=10.0.34.254  defaultrouter=10.0.34.254
-hostname VM4+service hostname restart
 service netif restart service netif restart
 service routing restart service routing restart
Line 130: Line 130:
 </code> </code>
  
 +===== Checking NIC drivers and Bhyve compatibility with multicast =====
 +
 +Before to star with advanced routing setup, just start to test simple multicast between 2 relatives host: Some NIC (vtnet) or some hypervisors network setup aren't compliant with very simple multicast.
 +
 +On VM1, start a mcast generator (client emitting mcast):
 +<code>
 +[root@VM1]~# iperf -c 239.1.1.1 -u -T 32 -t 3000 -i 1
 +------------------------------------------------------------
 +Client connecting to 239.1.1.1, UDP port 5001
 +Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
 +Setting multicast TTL to 32
 +UDP buffer size: 9.00 KByte (default)
 +------------------------------------------------------------
 +[  3] local 10.0.12.1 port 46636 connected with 239.1.1.1 port 5001
 +[ ID] Interval       Transfer     Bandwidth
 +[  3]  0.0- 1.0 sec   131 KBytes  1.07 Mbits/sec
 +[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
 +[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec
 +[  3]  0.0- 3.5 sec   446 KBytes  1.05 Mbits/sec
 +[  3] Sent 311 datagrams
 +(...)
 +</code>
 +
 +On the direct connected VM2, start to check if in non-promiscious mode it sees mcast packets comming:
 +<code>
 +[root@VM2]~# tcpdump -pni em0 -c 2
 +tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 +listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
 +15:22:32.517270 IP 10.0.12.1.33482 > 239.1.1.1.5001: UDP, length 1470
 +15:22:32.528668 IP 10.0.12.1.33482 > 239.1.1.1.5001: UDP, length 1470
 +2 packets captured
 +2 packets received by filter
 +0 packets dropped by kernel
 +</code>
 +
 +=> VM2 is receiving mcast packets from 10.0.12.1 to mcast group 239.1.1.1.
 +Now on VM2 start a mcast listener (server receiving), it should receive multicast flow
 +
 +<code>
 +[root@VM2]~# iperf -s -u -B 239.1.1.1%em0 -i 1
 +------------------------------------------------------------
 +Server listening on UDP port 5001
 +Binding to local address 239.1.1.1
 +Joining multicast group  239.1.1.1
 +Receiving 1470 byte datagrams
 +UDP buffer size: 41.1 KByte (default)
 +------------------------------------------------------------
 +[  3] local 239.1.1.1 port 5001 connected with 192.168.100.149 port 35181
 +[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
 +[  3]  0.0- 1.0 sec   129 KBytes  1.06 Mbits/sec   0.038 ms  107/  197 (54%)
 +[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec   0.054 ms    0/   89 (0%)
 +[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec   0.021 ms    0/   89 (0%)
 +[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec   0.025 ms    0/   89 (0%)
 +[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec   0.024 ms    0/   89 (0%)
 +[  3]  5.0- 6.0 sec   129 KBytes  1.06 Mbits/sec   0.024 ms    0/   90 (0%)
 +[  3]  6.0- 7.0 sec   128 KBytes  1.05 Mbits/sec   0.024 ms    0/   89 (0%)
 +(...)
 +</code>
 +=> Notice the mcast receiver is correctly receiving at 1Mb/s.
 +
 +Here is a non working example (here because source interface not given):
 +<code>
 +[root@VM2]~# iperf -s -u -B 239.1.1.1 -i 1
 +------------------------------------------------------------
 +Server listening on UDP port 5001
 +Binding to local address 239.1.1.1
 +Joining multicast group  239.1.1.1
 +Receiving 1470 byte datagrams
 +UDP buffer size: 41.1 KByte (default)
 +------------------------------------------------------------
 +(...)
 +</code>
 +
 +=> Here it doesn't receive traffic and stay in "waiting" mode forever.
 ===== Checking pimd behavior ===== ===== Checking pimd behavior =====
  
Line 138: Line 212:
 <code> <code>
 [root@VM2]~# pimd -r [root@VM2]~# pimd -r
-Virtual Interface Table +Virtual Interface Table ====================================================== 
- Vif  Local address    Subnet                Thresh  Flags          Neighbors +Vif  Local Address    Subnet              Thresh  Flags      Neighbors 
-   0  10.0.12.2        10.0.12/24                  DR NO-NBR +---  ---------------  ------------------  ------  ---------  ----------------- 
-   1  10.0.23.2        10.0.23/24                  PIM            10.0.23.3 +  0  10.0.12.254      10.0.12/24                DR NO-NBR 
-   2  10.0.12.2        register_vif0         1+  1  10.0.23.2        10.0.23/24                PIM        10.0.23.3 
 +  2  10.0.12.254      register_vif0            1
  
-Multicast Routing Table + Vif  SSM Group        Sources 
- Source          Group           RP addr         Flags + 
---------------------------(*,*,RP)--------------------------+Multicast Routing Table ====================================================== 
 +--------------------------------- (*,*,G------------------------------------
 Number of Groups: 0 Number of Groups: 0
 Number of Cache MIRRORs: 0 Number of Cache MIRRORs: 0
 +------------------------------------------------------------------------------
 </code> </code>
  
-=> VM2 sees VM3+=> VM2 sees VM3 as PIM neighbor
  
 <code> <code>
 [root@VM3]~# pimd -r [root@VM3]~# pimd -r
-Virtual Interface Table +Virtual Interface Table ====================================================== 
- Vif  Local address    Subnet                Thresh  Flags          Neighbors +Vif  Local Address    Subnet              Thresh  Flags      Neighbors 
-   0  10.0.23.3        10.0.23/24                  DR PIM         10.0.23.2 +---  ---------------  ------------------  ------  ---------  ----------------- 
-   1  10.0.34.3        10.0.34/24                  DR NO-NBR +  0  10.0.23.3        10.0.23/24                DR PIM     10.0.23.2 
-   2  10.0.23.3        register_vif0         1+  1  10.0.34.254      10.0.34/24                DR NO-NBR 
 +  2  10.0.23.3        register_vif0            1
  
-Multicast Routing Table + Vif  SSM Group        Sources 
- Source          Group           RP addr         Flags + 
---------------------------(*,*,RP)--------------------------+Multicast Routing Table ====================================================== 
 +--------------------------------- (*,*,G------------------------------------
 Number of Groups: 0 Number of Groups: 0
 Number of Cache MIRRORs: 0 Number of Cache MIRRORs: 0
 +------------------------------------------------------------------------------
 </code> </code>
  
-=> VM3 sees VM2.+=> VM3 sees VM2 as PIM Designated Router neighbor.
 ==== Does PIM daemon locally register to PIM mcast group ? ==== ==== Does PIM daemon locally register to PIM mcast group ? ====
  
Line 306: Line 386:
 Vif  Local Address    Subnet              Thresh  Flags      Neighbors Vif  Local Address    Subnet              Thresh  Flags      Neighbors
 ---  ---------------  ------------------  ------  ---------  ----------------- ---  ---------------  ------------------  ------  ---------  -----------------
-  0  10.0.12.2        10.0.12/24                DR NO-NBR+  0  10.0.12.254      10.0.12/24                DR NO-NBR
   1  10.0.23.2        10.0.23/24                PIM        10.0.23.3   1  10.0.23.2        10.0.23/24                PIM        10.0.23.3
-  2  10.0.12.2        register_vif0            1+  2  10.0.12.254      register_vif0            1
  
  Vif  SSM Group        Sources  Vif  SSM Group        Sources
Line 316: Line 396:
 Source           Group            RP Address       Flags Source           Group            RP Address       Flags
 ---------------  ---------------  ---------------  --------------------------- ---------------  ---------------  ---------------  ---------------------------
-10.0.12.1        239.1.1.1        10.0.23.2        CACHE SG +10.0.12.1        239.1.1.1        10.0.23.2        SG 
-Joined   oifs: ..j+Joined   oifs: ...
 Pruned   oifs: ... Pruned   oifs: ...
 Leaves   oifs: ... Leaves   oifs: ...
 Asserted oifs: ... Asserted oifs: ...
-Outgoing oifs: ..o+Outgoing oifs: ...
 Incoming     : I.. Incoming     : I..
  
 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
-           180    35     0              0  0  0+                     0              0  0  0
 --------------------------------- (*,*,G) ------------------------------------ --------------------------------- (*,*,G) ------------------------------------
 Number of Groups: 1 Number of Groups: 1
-Number of Cache MIRRORs: 1+Number of Cache MIRRORs: 0
 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
 </code> </code>
Line 339: Line 419:
 IPv4 Virtual Interface Table IPv4 Virtual Interface Table
  Vif   Thresh   Local-Address   Remote-Address    Pkts-In   Pkts-Out  Vif   Thresh   Local-Address   Remote-Address    Pkts-In   Pkts-Out
-  0           10.0.12.2                            8013          0+  0           10.0.12.254                                      0
   1           10.0.23.2                                        0   1           10.0.23.2                                        0
-  2           10.0.12.2                                     8013+  2           10.0.12.254                                      0
  
 IPv4 Multicast Forwarding Table IPv4 Multicast Forwarding Table
  Origin          Group             Packets In-Vif  Out-Vifs:Ttls  Origin          Group             Packets In-Vif  Out-Vifs:Ttls
- 10.0.12.1       239.1.1.1            8013       2:1+ 10.0.12.1       239.1.1.1                65535
  
  
Line 351: Line 431:
  
 IPv6 Multicast Forwarding Table is empty IPv6 Multicast Forwarding Table is empty
 +
 </code> </code>
  
-VM2 had update its mroute table for adding a source for group 239.1.1.1 comming from vif0 (toward VM1).+VM2 had update its mroute table for adding a source for group 239.1.1.1 comming from '65535'??.
  
 ==== 3. Start a mcast receiver (IPerf server) on VM4 ==== ==== 3. Start a mcast receiver (IPerf server) on VM4 ====
Line 389: Line 470:
  
 <code> <code>
-[root@VM3]~# pimd -r+[root@VM3]~# pimd -r                                                                                                                 [9/367]
 Virtual Interface Table ====================================================== Virtual Interface Table ======================================================
 Vif  Local Address    Subnet              Thresh  Flags      Neighbors Vif  Local Address    Subnet              Thresh  Flags      Neighbors
 ---  ---------------  ------------------  ------  ---------  ----------------- ---  ---------------  ------------------  ------  ---------  -----------------
   0  10.0.23.3        10.0.23/24                DR PIM     10.0.23.2   0  10.0.23.3        10.0.23/24                DR PIM     10.0.23.2
-  1  10.0.34.3        10.0.34/24                DR NO-NBR+  1  10.0.34.254      10.0.34/24                DR NO-NBR
   2  10.0.23.3        register_vif0            1   2  10.0.23.3        register_vif0            1
  
Line 412: Line 493:
  
 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
-                60     0              0  0  0+                50     0              0  0  0
 ----------------------------------- (S,G) ------------------------------------ ----------------------------------- (S,G) ------------------------------------
 Source           Group            RP Address       Flags Source           Group            RP Address       Flags
Line 425: Line 506:
  
 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2 TIMERS:  Entry    JP    RS  Assert VIFS:  0  1  2
-           195    50     0              0  0  0+           200    55     0              0  0  0
 --------------------------------- (*,*,G) ------------------------------------ --------------------------------- (*,*,G) ------------------------------------
 Number of Groups: 1 Number of Groups: 1
Line 439: Line 520:
 IPv4 Virtual Interface Table IPv4 Virtual Interface Table
  Vif   Thresh   Local-Address   Remote-Address    Pkts-In   Pkts-Out  Vif   Thresh   Local-Address   Remote-Address    Pkts-In   Pkts-Out
-  0           10.0.23.3                            7882          0 +  0           10.0.23.3                             157          0 
-  1           10.0.34.3                                     7882+  1           10.0.34.254                                    157
   2           10.0.23.3                                        0   2           10.0.23.3                                        0
  
 IPv4 Multicast Forwarding Table IPv4 Multicast Forwarding Table
  Origin          Group             Packets In-Vif  Out-Vifs:Ttls  Origin          Group             Packets In-Vif  Out-Vifs:Ttls
- 10.0.12.1       239.1.1.1            7882       1:1+ 10.0.12.1       239.1.1.1             157       1:1
  
  
Line 451: Line 532:
  
 IPv6 Multicast Forwarding Table is empty IPv6 Multicast Forwarding Table is empty
- 
 </code> </code>
  
-VM3 correctly learn that there is a subscriber to group 239.1.1.1 on interface vif1 (toward VM4).+VM3 correctly learn that there is a subscriber to group 239.1.1.1 on interface vif1 (toward VM4) and the source is on vif0 (toward VM2).
documentation/examples/multicast_with_pim-sm.txt · Last modified: 2019/11/08 19:22 by olivier

Except where otherwise noted, content on this wiki is licensed under the following license: BSD 2-Clause
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki