Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Oct 07, 2022 3:48 pm


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - FreeBSD + IPERF sending IGMP v2 multicast group join / leave via specific interface
Author Message
Post subject: FreeBSD + IPERF sending IGMP v2 multicast group join / leave via specific interface  |  Post Posted: Mon Jul 22, 2013 10:41 am
FreeBSD + IPERF sending IGMP v2 multicast group join / leave via specific interface

Before I start. The route for the multicast group is obvious default route:
Code:
# route get 239.1.1.1
   route to: 239.1.1.1
destination: default
       mask: default
    gateway: apollo-vl10.ivorde.ro
  interface: vlan10
      flags: <UP,GATEWAY,DONE,STATIC>
recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

Let's say I need to send igmp group report/join out the "vlan120" interface:
Code:
# ifconfig vlan120
vlan120: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:07:e9:a5:9b:fa
        inet 10.1.120.2 netmask 0xffffff00 broadcast 10.1.120.255
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
        vlan: 120 parent interface: em0


1. First add a /32 route for the multicast group via a gateway on the subnet for the specific outgoing interfaces (my case: vlan120 on FreeBSD)
Code:
# route add 239.1.1.1/32 10.1.120.1
add net 239.1.1.1: gateway 10.1.120.1


2. Use Iperf to join a multicast group:
Code:
# iperf -s -B 239.1.1.1 -u         
------------------------------------------------------------
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: 40.6 KByte (default)
------------------------------------------------------------

Quote:
-s, --server
run in server mode
-B, --bind <host>
bind to <host>, an interface or multicast address
-u, --udp
use UDP rather than TCP


And the result via tcpdump:
Code:
16:32:53.808311 IP (tos 0x0, ttl 1, id 51941, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    10.1.120.2 > 239.1.1.1: igmp v2 report 239.1.1.1
16:32:55.360766 IP (tos 0x0, ttl 1, id 5334, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    10.1.120.2 > 224.0.0.2: igmp leave 239.1.1.1


First packet in above tcpdump is the igmp group report (join) for 239.1.1.1 and the second is the leave packet (when iperf command is interrupted). It is noticeable that multicast packets have a source of the "vlan120" intended outgoing interface.
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO