From owner-freebsd-net@FreeBSD.ORG Wed Jul 19 14:22:33 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68E2416A4DA for ; Wed, 19 Jul 2006 14:22:33 +0000 (UTC) (envelope-from baldur@foo.is) Received: from gremlin.foo.is (gremlin.foo.is [194.105.250.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 020C843D4C for ; Wed, 19 Jul 2006 14:22:32 +0000 (GMT) (envelope-from baldur@foo.is) Received: from 127.0.0.1 (localhost.foo.is [127.0.0.1]) by injector.foo.is (Postfix) with SMTP id CDFD5DA848; Wed, 19 Jul 2006 14:22:31 +0000 (GMT) Received: by gremlin.foo.is (Postfix, from userid 1000) id DA768DA842; Wed, 19 Jul 2006 14:22:27 +0000 (GMT) Date: Wed, 19 Jul 2006 14:22:27 +0000 From: Baldur Gislason To: freebsd nettest Message-ID: <20060719142227.GE36671@gremlin.foo.is> References: <20060719133936.23166.qmail@web7814.mail.in.yahoo.com> In-Reply-To: <20060719133936.23166.qmail@web7814.mail.in.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on gremlin.foo.is X-Spam-Level: X-Spam-Status: No, score=-5.9 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Sanitizer: Foo MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Cc: freebsd-net@freebsd.org Subject: Re: Testing of Multicast support on fxp and bge driver. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2006 14:22:33 -0000 try sysctl net.inet.icmp.bmcastecho=1 Baldur On Wed, Jul 19, 2006 at 02:39:36PM +0100, freebsd nettest wrote: > Hi all, > > I was trying to test the Multicast support of bge and fxp driver using the following user level program. > > #include > #include > #include > #include > #include > //#include > #include > //#include > #include > int > main(int argc, char *argv[]) > { > struct ip_mreq mreqn; > int s; > struct in_addr ip; > if (argc != 3) { > fprintf(stderr, "usage: %s \n", argv[0]); > exit(1); > } > if((s = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { > perror("socket"); > exit(1); > } > memset(&mreqn, 0, sizeof(mreqn)); > inet_aton(argv[1], &(mreqn.imr_interface)); > /* mreqn.imr_interface = ip; */ > > if (inet_pton(AF_INET, argv[2], &mreqn.imr_multiaddr) <= 0) { > fprintf(stderr, "%s: \"%s\" invalid group address\n", argv[0],argv[2]); > exit(1); > } > if (setsockopt(s, 0, IP_ADD_MEMBERSHIP,&mreqn,sizeof mreqn) < 0) { > perror("IP_ADD_MEMBERSHIP"); > exit(1); > } > printf("joined group %s on %s (pausing...)\n", argv[2], argv[1]); fflush(stdout); > pause(); > } > > > On test machine: > [root@FBSD6-AMD]# ./a.out bge0 224.1.1.37 > joined group 224.1.1.37 on bge0 (pausing...) > > > On remote machine: > -bash-3.00# ping -i xge2 224.1.1.37 > no answer from 224.1.1.37 > > > The ping is failing. I tried the same test on fxp (intel interface) also. The ping to the multicast IP is not working. am I doing the correct steps? Do I need to check any firewall setting that prevent the multicast packets?? > > Please advice, if I miss something in the testing. > > Thanks, > > > --------------------------------- > Find out what India is talking about on Yahoo! Answers India. > Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW! > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >