From owner-freebsd-net Sun Aug 13 4:55:40 2000 Delivered-To: freebsd-net@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id 54C4637B710 for ; Sun, 13 Aug 2000 04:55:38 -0700 (PDT) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id HAA41608; Sun, 13 Aug 2000 07:55:14 -0400 (EDT) Date: Sun, 13 Aug 2000 07:55:14 -0400 (EDT) From: "Matthew N. Dodd" To: Ian Smith Cc: "Andrew C. Hornback" , freebsd-net@FreeBSD.ORG Subject: RE: Solved: Intel 'Pro 4041' card? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 13 Aug 2000, Ian Smith wrote: > Any specific problems? Was the ex driver at 2.2.6 and 3.3 any worse? > The new segment's been put off for a few days anyway, so there's still > time to whack in a spare ne2000 clone if it's not such a great idea .. > fwiw there's a couple more Pro/10 cards in the 'dozeboxen it's > feeding. Mostly stuff I've not gotten around to doing yet like multicast support and correct ifmedia support. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sun Aug 13 9:56:27 2000 Delivered-To: freebsd-net@freebsd.org Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by hub.freebsd.org (Postfix) with ESMTP id 9955D37B643 for ; Sun, 13 Aug 2000 09:56:22 -0700 (PDT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.0) with SMTP id CAA17624; Mon, 14 Aug 2000 02:56:03 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 14 Aug 2000 02:56:02 +1000 (EST) From: Ian Smith To: "Matthew N. Dodd" Cc: "Andrew C. Hornback" , freebsd-net@FreeBSD.ORG Subject: RE: Solved: Intel 'Pro 4041' card? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 13 Aug 2000, Matthew N. Dodd wrote: > On Sun, 13 Aug 2000, Ian Smith wrote: > > Any specific problems? Was the ex driver at 2.2.6 and 3.3 any worse? [.. blah ..] > Mostly stuff I've not gotten around to doing yet like multicast support > and correct ifmedia support. Ah, thanks Matthew. just found ex(4) .. are you its maintainer? That 'yet' sounds promising :-) I'll give it a go; our multicast experiments are still dreams anyway .. Cheers, Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sun Aug 13 19:13:39 2000 Delivered-To: freebsd-net@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id 2175937B8AD for ; Sun, 13 Aug 2000 19:13:33 -0700 (PDT) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id WAA49965; Sun, 13 Aug 2000 22:13:20 -0400 (EDT) Date: Sun, 13 Aug 2000 22:13:20 -0400 (EDT) From: "Matthew N. Dodd" To: Ian Smith Cc: "Andrew C. Hornback" , freebsd-net@FreeBSD.ORG Subject: RE: Solved: Intel 'Pro 4041' card? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 14 Aug 2000, Ian Smith wrote: > I'll give it a go; our multicast experiments are still dreams anyway .. Well, multicast is kind of required for IPv6 IIRC... -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sun Aug 13 20: 1:28 2000 Delivered-To: freebsd-net@freebsd.org Received: from mailserv.waikato.ac.nz (mailserv.waikato.ac.nz [130.217.66.61]) by hub.freebsd.org (Postfix) with ESMTP id 6FE4D37B991 for ; Sun, 13 Aug 2000 20:01:24 -0700 (PDT) (envelope-from mjl12@waikato.ac.nz) Received: from stu_ex2.waikato.ac.nz (stu-ex2.waikato.ac.nz [130.217.70.20]) by mailserv.waikato.ac.nz (8.9.3/8.9.0) with ESMTP id PAA39652 for ; Mon, 14 Aug 2000 15:05:31 +1200 Received: by stu-ex2.waikato.ac.nz with Internet Mail Service (5.5.2650.21) id <23A4WV36>; Mon, 14 Aug 2000 14:56:40 +1200 Message-ID: <45E87454FFC2D211AD9800508B65009420F8E8@stu-ex1.waikato.ac.nz> From: "MATTHEW JOHN,LUCKIE" To: freebsd-net@freebsd.org Subject: determing ip->ip_src Date: Mon, 14 Aug 2000 15:01:06 +1200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi there I am writing some code that records the source address of the packet in the data segment of the ip packet. This code is part of a kernel module loaded via syscall How do i deduce what source address to record in the data area of the packet as i want to before it is sent to ip_output? I realise that ip_output will sort ip_src out for me, but i want to know this value ahead of calling ip_output() I have tried the following code, based on what happens in ip_output when a packet with no source address is passed to it and the destination address is not a multicast address, but it does not get me any further as the second test for ro.ro_rt fails. Even if it didnt fail, i dont think the following fragment would be any good, given that i do not take any account of the destination address. What should I be doing? Is there a higher level function available for me to all that will return the value? Thanks Matthew ------------- u_int32_t getoutif() { struct in_addr in_addr; struct in_ifaddr *ia; struct route ro; bzero(&ro, sizeof ro); if(ro.ro_rt == 0) { rtalloc_ign(&ro, RTF_PRCLONING); } if(ro.ro_rt == 0) { printf("INADDR_ANY"); return INADDR_ANY; } ia = ifatoia(ro.ro_rt->rt_ifa); ro.ro_rt->rt_use++; in_addr = IA_SIN(ia)->sin_addr; RTFREE(ro.ro_rt); print_ip(in_addr); return in_addr.s_addr; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 15:49:17 2000 Delivered-To: freebsd-net@freebsd.org Received: from sigterm.aventail.com (sigterm.aventail.com [206.253.217.145]) by hub.freebsd.org (Postfix) with ESMTP id D3D7837B79B for ; Mon, 14 Aug 2000 15:49:11 -0700 (PDT) (envelope-from kmills@aventail.com) Received: from leo.in.aventail.com (leo.in.aventail.com [192.168.1.136]) by sigterm.aventail.com (8.10.2/8.10.2) with ESMTP id e7EMnAj10766 for ; Mon, 14 Aug 2000 15:49:10 -0700 (PDT) Received: from voyager (exit.dmz.aventail.com [192.168.25.132]) by leo.in.aventail.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id QDL670GG; Mon, 14 Aug 2000 15:47:40 -0700 From: "Kevin Mills" To: "FreeBSD Net" Subject: LRP? Date: Mon, 14 Aug 2000 15:48:05 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Importance: Normal Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I ran across Druschel's Lazy Receiver Processing stuff (www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for FreeBSD-2.2. Does anyone know if this has been ported to 4.x-stable or -current? Or is this stuff already in today's FreeBSD? Thanks for any info! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 17: 0:16 2000 Delivered-To: freebsd-net@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id C036337B709 for ; Mon, 14 Aug 2000 17:00:13 -0700 (PDT) (envelope-from fanf@dotat.at) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13OU9A-0004rK-00; Tue, 15 Aug 2000 00:00:00 +0000 Date: Tue, 15 Aug 2000 00:00:00 +0000 From: Tony Finch To: Kevin Mills Cc: FreeBSD Net Subject: Re: LRP? Message-ID: <20000815000000.X4553@hand.dotat.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: Organization: Covalent Technologies, Inc Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Kevin Mills wrote: > >I ran across Druschel's Lazy Receiver Processing stuff >(www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for FreeBSD-2.2. >Does anyone know if this has been ported to 4.x-stable or -current? Or is >this stuff already in today's FreeBSD? man kevent Tony. -- en oeccget g mtcaa f.a.n.finch v spdlkishrhtewe y dot@dotat.at eatp o v eiti i d. fanf@covalent.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 17: 4: 3 2000 Delivered-To: freebsd-net@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id C891737B7F8 for ; Mon, 14 Aug 2000 17:03:59 -0700 (PDT) (envelope-from fanf@dotat.at) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13OUCz-0004sh-00; Tue, 15 Aug 2000 00:03:57 +0000 Date: Tue, 15 Aug 2000 00:03:57 +0000 From: Tony Finch To: Kevin Mills Cc: FreeBSD Net Subject: Re: LRP? Message-ID: <20000815000357.Y4553@hand.dotat.at> References: <20000815000000.X4553@hand.dotat.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000815000000.X4553@hand.dotat.at> Organization: Covalent Technologies, Inc Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Tony Finch wrote: >Kevin Mills wrote: >> >>I ran across Druschel's Lazy Receiver Processing stuff >>(www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for FreeBSD-2.2. >>Does anyone know if this has been ported to 4.x-stable or -current? Or is >>this stuff already in today's FreeBSD? > >man kevent Ooops, no, ignore that -- I was thinking of a different paper by the Rice guys. Tony (sheepish). -- en oeccget g mtcaa f.a.n.finch v spdlkishrhtewe y dot@dotat.at eatp o v eiti i d. fanf@covalent.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 17:13:29 2000 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id E8F3137B6A9 for ; Mon, 14 Aug 2000 17:13:26 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7F0DP608841; Mon, 14 Aug 2000 17:13:25 -0700 (PDT) Date: Mon, 14 Aug 2000 17:13:25 -0700 From: Alfred Perlstein To: Kevin Mills Cc: FreeBSD Net Subject: Re: LRP? Message-ID: <20000814171325.U4854@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from kmills@aventail.com on Mon, Aug 14, 2000 at 03:48:05PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Kevin Mills [000814 16:05] wrote: > > I ran across Druschel's Lazy Receiver Processing stuff > (www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for FreeBSD-2.2. > Does anyone know if this has been ported to 4.x-stable or -current? Or is > this stuff already in today's FreeBSD? AFAIK I haven't heard of this since I've started using FreeBSD. It may be possible to use dummynet and per-uid rules to accomplish this, let us know. :) -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 17:17:43 2000 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 63B8437B626 for ; Mon, 14 Aug 2000 17:17:39 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id CAA67239; Tue, 15 Aug 2000 02:17:29 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200008150017.CAA67239@info.iet.unipi.it> Subject: Re: LRP? In-Reply-To: <20000814171325.U4854@fw.wintelcom.net> from Alfred Perlstein at "Aug 14, 2000 05:13:25 pm" To: Alfred Perlstein Date: Tue, 15 Aug 2000 02:17:29 +0200 (CEST) Cc: Kevin Mills , FreeBSD Net X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > * Kevin Mills [000814 16:05] wrote: > > > > I ran across Druschel's Lazy Receiver Processing stuff > > (www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for FreeBSD-2.2. > > Does anyone know if this has been ported to 4.x-stable or -current? Or is > > this stuff already in today's FreeBSD? > > AFAIK I haven't heard of this since I've started using FreeBSD. > > It may be possible to use dummynet and per-uid rules to accomplish > this, let us know. :) reading the above web page, i doubt it is possible. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 20:58:52 2000 Delivered-To: freebsd-net@freebsd.org Received: from sigterm.aventail.com (sigterm.aventail.com [206.253.217.145]) by hub.freebsd.org (Postfix) with ESMTP id 9DD7837B887 for ; Mon, 14 Aug 2000 20:58:45 -0700 (PDT) (envelope-from kmills@aventail.com) Received: from leo.in.aventail.com (leo.in.aventail.com [192.168.1.136]) by sigterm.aventail.com (8.10.2/8.10.2) with ESMTP id e7F3nRj16463; Mon, 14 Aug 2000 20:49:27 -0700 (PDT) Received: from voyager (exit.dmz.aventail.com [192.168.25.132]) by leo.in.aventail.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id QDL68A45; Mon, 14 Aug 2000 20:47:57 -0700 From: "Kevin Mills" To: "Luigi Rizzo" , "Alfred Perlstein" Cc: "FreeBSD Net" Subject: RE: LRP? Date: Mon, 14 Aug 2000 20:48:25 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 In-Reply-To: <200008150017.CAA67239@info.iet.unipi.it> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > > > > I ran across Druschel's Lazy Receiver Processing stuff > > > (www.cs.rice.edu/CS/Systems/LRP) and saw he had patches for > FreeBSD-2.2. > > > Does anyone know if this has been ported to 4.x-stable or > -current? Or is > > > this stuff already in today's FreeBSD? > > > > AFAIK I haven't heard of this since I've started using FreeBSD. > > > > It may be possible to use dummynet and per-uid rules to accomplish > > this, let us know. :) > > reading the above web page, i doubt it is possible. OK, let me ask this: Is the LRP stuff (or something like it) even necessary in today's 4.x-stable and/or -current FreeBSD? Thanks! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Aug 14 21:35:28 2000 Delivered-To: freebsd-net@freebsd.org Received: from mx4.mail.ru (mx4.mail.ru [194.67.23.39]) by hub.freebsd.org (Postfix) with ESMTP id 503CE37B7D4 for ; Mon, 14 Aug 2000 21:35:23 -0700 (PDT) (envelope-from eugene_m@mail.ru) Received: from mx8.port.ru (mx8.int [10.0.0.45]) by mx4.mail.ru (8.9.3/8.9.3) with ESMTP id IAA26956 for ; Tue, 15 Aug 2000 08:07:23 +0400 (MSD) (envelope-from eugene_m@mail.ru) Received: from f10.int ([10.0.0.78] helo=f10.mail.ru) by mx8.port.ru with esmtp (Exim 3.14 #2) id 13OXww-0000om-00 for freebsd-net@freebsd.org; Tue, 15 Aug 2000 08:03:38 +0400 Received: from mail by f10.mail.ru with local (Exim 3.14 #4) id 13OXww-0008DB-00 for freebsd-net@freebsd.org; Tue, 15 Aug 2000 08:03:38 +0400 Received: from [193.125.6.18] by win.mail.port.ru with HTTP; Tue, 15 Aug 2000 04:03:38 +0000 (GMT) From: "Eugene Mogutov" To: freebsd-net@freebsd.org Subject: Broadcast address and multihomed host Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [193.125.6.18] Reply-To: "Eugene Mogutov" Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: Date: Tue, 15 Aug 2000 08:03:38 +0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Recently a friend of mine noticed that his FreeBSD router treats broadcast addresses of local subnets as local (i.e. as if they were addresses of router interfaces). A brief example: a multihomed host has a pair of interfaces, their addresses are aa.aa.aa.1/24 and bb.bb.bb.1/24, where /24 stands for netmask corresponding to Class C. It is possible to establish tcp connection to our host using destination address bb.bb.bb.255 (broadcast address for local subnet connected to interface bb.bb.bb.1), it is required, however, that those tcp packets pass via interface aa.aa.aa.1. The same story is about connecting to aa.aa.aa.255 from the host reachable via interface bb.bb.bb.1. Only 'all ones' broadcast address does the trick, 'all zeroes' doesn't. If I'm not mistaken at least 2.2.6, 3.3 and 3.4 behave so. It seems that packet filter rulesets (e.g. those of ipfw) using specific addresses of multihomed host's interfaces to restrict access to services running on that host can be easily overriden by using broadcast addresses. Is it a feature of BSD stack (I haven't seen it neither on linux 2.2.x, nor on 2.0.x) ? If it is, is there a way to disable it? Thanks, eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Aug 15 10:51:29 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id BF6C037BE3B for ; Tue, 15 Aug 2000 10:51:24 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id NAA54480; Tue, 15 Aug 2000 13:51:18 -0400 (EDT) (envelope-from wollman) Date: Tue, 15 Aug 2000 13:51:18 -0400 (EDT) From: Garrett Wollman Message-Id: <200008151751.NAA54480@khavrinen.lcs.mit.edu> To: "Eugene Mogutov" Cc: freebsd-net@FreeBSD.ORG Subject: Broadcast address and multihomed host In-Reply-To: References: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Recently a friend of mine noticed that his FreeBSD router treats > broadcast addresses of local subnets as local (i.e. as if they were > addresses of router interfaces). [Reformatted. It would help if you pressed ``return'' at the end of a line.] The behavior is arguable. The current behavior is relatively easy to explain: 1) The remote host sends its SYN segment as a unicast, since it does not have the information to determine that x.y.z.255 is a broadcast -- indeed, it might not be if x.y.z.255 is on a /23 or larger network. 2) A packet arrives on a.b.c.1/24 with destination address x.y.z.255. ip_input() looks to see if x.y.z.255 is configured on any interface. It is -- it's configured on the x.y.z.1/24 interface -- so it accepts the packet. 3) The code in tcp_input() which checks for broadcasts and multicasts looks only at the delivery flags (M_MCAST and M_BCAST); it doesn't re-examine the addresses. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Aug 15 10:53:41 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 4170537BE5A for ; Tue, 15 Aug 2000 10:53:37 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id NAA54493; Tue, 15 Aug 2000 13:53:31 -0400 (EDT) (envelope-from wollman) Date: Tue, 15 Aug 2000 13:53:31 -0400 (EDT) From: Garrett Wollman Message-Id: <200008151753.NAA54493@khavrinen.lcs.mit.edu> To: "MATTHEW JOHN,LUCKIE" Cc: freebsd-net@FreeBSD.ORG Subject: determing ip->ip_src In-Reply-To: <45E87454FFC2D211AD9800508B65009420F8E8@stu-ex1.waikato.ac.nz> References: <45E87454FFC2D211AD9800508B65009420F8E8@stu-ex1.waikato.ac.nz> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > bzero(&ro, sizeof ro); /* * In between these two fragments, it is necessary to actually specify * the destination for which you are looking up the route. HTH, HAND. */ > if(ro.ro_rt == 0) > { > rtalloc_ign(&ro, RTF_PRCLONING); > } -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 2:51:31 2000 Delivered-To: freebsd-net@freebsd.org Received: from web3003.mail.yahoo.com (web3003.mail.yahoo.com [204.71.202.166]) by hub.freebsd.org (Postfix) with SMTP id B485A37B9D3 for ; Wed, 16 Aug 2000 02:51:24 -0700 (PDT) (envelope-from deepika_77@yahoo.com) Received: (qmail 291 invoked by uid 60001); 16 Aug 2000 09:51:23 -0000 Message-ID: <20000816095123.290.qmail@web3003.mail.yahoo.com> Received: from [164.164.56.2] by web3003.mail.yahoo.com; Wed, 16 Aug 2000 02:51:23 PDT Date: Wed, 16 Aug 2000 02:51:23 -0700 (PDT) From: deepika kakrania Subject: Sending multicast packets To: freebsd-net@FreeBSD.ORG Cc: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org hi We are running freebsd 3.3 release. i am having the scenario where two daemons running on two routers which are on the same LAN have to exchange multicast packets. To test the multicasting capability, i have taken 2 sample programs. Both of them are joining same multicast group and therefrom i have considered two cases. 1)One program will send multicast packets to multicast group and other will be receiving. I ran tcpdump on both the machines to see the flow of packets. The applications are sending and receiving packets but tcpdump doesn't show any packet flow between these two. It only shows igmp report and leave packets. We could see the proper flow of packets only once using tcpdump. After that tcpdump is not showing any packet flow. 2)both programs will be sending and receiving packets.In this, both applications first join multicast group and then one application sends packet to this multicast group and other will read these packets and then will write back same packet which should be read by first application. But here, second application doesn't receive the first packet itself. Here also, tcpdump doesn't show any packets flowing between these two routers. Could someone explain to me why there is no packet flow in second case(in both directions simultaneously)? Thanks in advance. regards, deepika __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 5:36:59 2000 Delivered-To: freebsd-net@freebsd.org Received: from sasi.com (samar.sasi.com.56.164.164.in-addr.arpa [164.164.56.2]) by hub.freebsd.org (Postfix) with ESMTP id 4210A37C0F3 for ; Wed, 16 Aug 2000 05:36:53 -0700 (PDT) (envelope-from gbnaidu@sasi.com) Received: from samar (sasi.com [164.164.56.2]) by sasi.com (8.9.3/8.9.3) with SMTP id SAA19113 for ; Wed, 16 Aug 2000 18:06:32 +0530 (IST) Received: from pcd75.sasi.com ([10.0.16.75]) by sasi.com; Wed, 16 Aug 2000 18:06:27 +0000 (IST) Received: from localhost (gbnaidu@localhost) by pcd75.sasi.com (8.9.3/8.9.3) with ESMTP id SAA00903 for ; Wed, 16 Aug 2000 18:03:10 +0530 Date: Wed, 16 Aug 2000 18:03:09 +0530 (IST) From: "G.B.Naidu" To: freebsd-net@FreeBSD.org Subject: multicast packets & tcpdump... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org HI, I am running FreeBSD 3.3-RELEASE. I was looking at the tcpdump output while multicast packets are flowing between two routers, tcpdump shows the source and destination address as "224.0.0.2". It should show the source address of the multicast packet rather than the multicast group address. I found that, when the receiver does the recvfrom(), the address returned shows the multicast group address. Is this a bug or feature? On linux this shows the source address. thanks --gb -- Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 7: 4:25 2000 Delivered-To: freebsd-net@freebsd.org Received: from darren2.lnk.telstra.net (darren2.lnk.telstra.net [139.130.53.33]) by hub.freebsd.org (Postfix) with ESMTP id A763F37C024 for ; Wed, 16 Aug 2000 07:04:20 -0700 (PDT) (envelope-from darrenr@reed.wattle.id.au) Received: (from root@localhost) by darren2.lnk.telstra.net (8.9.1/8.8.7) id OAA17912 for ; Wed, 16 Aug 2000 14:04:13 GMT From: Darren Reed Message-Id: <200008161404.AAA01735@avalon.reed.wattle.id.au> Subject: inetsw, struct protosw and struct ipprotosw To: freebsd-net@freebsd.org Date: Thu, 17 Aug 2000 00:04:04 +1000 (EST) X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Just looking in /sys/netinet and I see this: (freefall:~/src/sys/netinet) grep 'inetsw' *.c | grep protosw in_proto.c:struct ipprotosw inetsw[] = { in_proto.c: (struct protosw *)inetsw, in_proto.c: (struct protosw *)&inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0, ip_fil.c:extern struct protosw inetsw[]; ip_icmp.c:extern struct protosw inetsw[]; ip_input.c:extern struct ipprotosw inetsw[]; ip_mroute.c: extern struct protosw inetsw[]; ip_output.c:extern struct protosw inetsw[]; To me this looks like a recipe for disaster. Why is there "struct ipprotosw inetsw" and "struct protosw inetsw" ? Does this really mean that someone wanted to change "struct protosw" and instead made up "struct ipprotosw" and are trying to squeeze that somehow into "protosw" ? Ideally I should be able to put inetsw into a header file and extern it, but with this, I don't see how that would make sense... Darren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 8:26:59 2000 Delivered-To: freebsd-net@freebsd.org Received: from mail.uni-bielefeld.de (mail2.uni-bielefeld.de [129.70.4.90]) by hub.freebsd.org (Postfix) with ESMTP id A442F37C87C for ; Wed, 16 Aug 2000 08:26:37 -0700 (PDT) (envelope-from bfischer@Techfak.uni-bielefeld.de) Received: from frolic.no-support.loc (ppp36-82.hrz.uni-bielefeld.de [129.70.36.82]) by mail.uni-bielefeld.de (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6) with ESMTP id <0FZE00H705JASV@mail.uni-bielefeld.de> for freebsd-net@FreeBSD.ORG; Wed, 16 Aug 2000 17:26:30 +0200 (MET DST) Received: (from bjoern@localhost) by frolic.no-support.loc (8.9.3/8.9.3) id RAA00993; Wed, 16 Aug 2000 17:23:16 +0200 (CEST envelope-from bjoern) Date: Wed, 16 Aug 2000 17:23:15 +0200 From: Bjoern Fischer Subject: Re: Sending multicast packets In-reply-to: <20000816095123.290.qmail@web3003.mail.yahoo.com>; from deepika_77@yahoo.com on Wed, Aug 16, 2000 at 02:51:23AM -0700 To: deepika kakrania Cc: freebsd-net@FreeBSD.ORG Message-id: <20000816172315.A490@frolic.no-support.loc> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-disposition: inline Content-transfer-encoding: quoted-printable User-Agent: Mutt/1.2.4i References: <20000816095123.290.qmail@web3003.mail.yahoo.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Aug 16, 2000 at 02:51:23AM -0700, deepika kakrania wrote: > 2)both programs will be sending and receiving > packets.In this, both applications first join > multicast group and then one application sends packet > to this multicast group and other will read these > packets and then will write back same packet which > should be read by first application. But here, second > application doesn't receive the first packet itself. > Here also, tcpdump doesn't show any packets flowing > between these two routers. Do the processes join with INADDR_ANY? Do proper multicast routes exist on the hosts (or default routes)? Remember that not a host joins a group but an interface. Bj=F6rn --=20 -----BEGIN GEEK CODE BLOCK----- GCS d--(+) s++: a- C+++(-) UB++++OSI++++$ P+++(-) L---(++) !E W- N+ o>+ K- !w !O !M !V PS++ PE- PGP++ t+++ !5 X++ tv- b+++ D++ G e+ h-- y+=20 ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 10:49:13 2000 Delivered-To: freebsd-net@freebsd.org Received: from hetnet.nl (net090s.hetnet.nl [194.151.104.183]) by hub.freebsd.org (Postfix) with ESMTP id 07D5637C391 for ; Wed, 16 Aug 2000 10:48:59 -0700 (PDT) (envelope-from wilbertdg@hetnet.nl) Received: from hetnet.nl ([192.150.187.12]) by hetnet.nl with Microsoft SMTPSVC(5.5.1877.387.38); Wed, 16 Aug 2000 19:48:51 +0200 Message-ID: <399AD405.2C17E9CC@hetnet.nl> Date: Wed, 16 Aug 2000 10:48:53 -0700 From: Wilbert de Graaf Reply-To: wilbertdg@hetnet.nl X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: deepika kakrania Cc: freebsd-net@FreeBSD.ORG Subject: Re: Sending multicast packets References: <20000816095123.290.qmail@web3003.mail.yahoo.com> Content-Type: multipart/mixed; boundary="------------F9656FEC92FDF0E485BDC321" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------F9656FEC92FDF0E485BDC321 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi deepika, > two routers which are on the same LAN have to exchange > multicast packets. To test the multicasting > capability, i have taken 2 sample programs. Both of > them are joining same multicast group and therefrom i > have considered two cases. First of all, try to connect both host on the same LAN. This has to work otherwise your application fails (or routing is not right on the sending host). If you don't join correctly, tcpdump won't show you the packet you expected since the ethernet adapter will not accept the packet (if it can handle multicast right). If it doesn't work, you can try these applications: mshow.c ; attached UDPSend.java ; from my IGMPv3 for FreeBSD website at http://home.hetnet.nl/~wilbertdg/igmpv3.html One on of them run: mshow 224.5.5.5 5010 And on the other: java UDPSend 224.5.5.5 5010 "hi there" > 1)One program will send multicast packets to multicast > group and other will be receiving. I ran tcpdump on > both the machines to see the flow of packets. The > applications are sending and receiving packets but > tcpdump doesn't show any packet flow between these > two. > It only shows igmp report and leave packets. We could > see the proper flow of packets only once using > tcpdump. > After that tcpdump is not showing any packet flow. On the system that sends you should really see the packets, unless your default route is not right. > 2)both programs will be sending and receiving > packets.In this, both applications first join > multicast group and then one application sends packet > to this multicast group and other will read these > packets and then will write back same packet which > should be read by first application. But here, second > application doesn't receive the first packet itself. > Here also, tcpdump doesn't show any packets flowing > between these two routers. > > Could someone explain to me why there is no packet > flow in second case(in both directions > simultaneously)? First focuss on the hosts themselves. If that works start to debug routing. - Wilbert --------------F9656FEC92FDF0E485BDC321 Content-Type: text/plain; charset=us-ascii; name="mshow.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mshow.c" /** * * mshow - Show some multicast traffic, using a multicast filter * * Usage: mshow * **/ #include #include #include #include #include #include #include #include #include #define MAX_MSG 1024 #define MAX_SOURCES 100 /* * int main() */ int main(int argc, char *argv[]) { struct sockaddr_in sa; struct hostent *addr; struct ip_mreq mreq; /* struct ip_msfilter *imsfp; char buffer[IP_MSFILTER_SIZE(MAX_SOURCES)]; */ struct in_addr ia; u_short port; int s, i, nsources, on = 1; char *group, msg[MAX_MSG]; int len, sz, err; /* Determine options */ /* if (argc < 4) { */ if (argc < 2) { printf("Usage: mshow [ ]\n"); exit(0); } /* imsfp = (struct ip_msfilter*) &buffer; */ group = argv[1]; printf("group = %s\n", group); port = (u_short) atoi(argv[2]); printf("port = %u\n", port); if (port == 0) { printf("Usage: mshow \n"); exit(0); } /* if (argv[3][0] == 'e') imsfp->imsf_fmode = MCAST_EXCLUDE; else imsfp->imsf_fmode = MCAST_INCLUDE; printf("fmode = %s\n", (imsfp->imsf_fmode == MCAST_INCLUDE) ? "include" : "exclude"); nsources = 0; for (i=4; iimsf_slist[nsources].s_addr = inet_addr(argv[i]); if (imsfp->imsf_slist[nsources].s_addr == INADDR_NONE) { printf("Invalid sources\n"); exit(0); } nsources++; } imsfp->imsf_numsrc = nsources; */ /* create socket */ if (-1 == (s = socket(AF_INET, SOCK_DGRAM, 0))) { perror("failed to create a socket\n"); } /* determine remote */ if (-1 == (ia.s_addr = inet_addr(group))) { if (NULL == (addr = gethostbyname(group))) { perror("failed to resolve"); return(-1); } memcpy(&ia.s_addr, addr->h_addr_list[0], addr->h_length); } printf("joining group: %s\n", inet_ntoa(ia)); /* join the group and set sourcefilter */ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void*) &on, sizeof(on)); memcpy(&mreq.imr_multiaddr, &ia.s_addr, sizeof(struct in_addr)); ia.s_addr = htonl(INADDR_ANY); memcpy(&mreq.imr_interface, &ia.s_addr, sizeof(struct in_addr)); if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void*) &mreq, sizeof(mreq))) { perror("failed to join"); } /* imsfp->imsf_multiaddr.s_addr = mreq.imr_multiaddr.s_addr; imsfp->imsf_interface.s_addr = mreq.imr_interface.s_addr; if (ioctl(s, SIO_SET_MULTICAST_FILTER, imsfp) != 0) { perror("failed to set sourcefilter\n"); exit(0); } */ /* receive and print response */ sa.sin_family = AF_INET; sa.sin_port = htons(port); sa.sin_addr.s_addr = ia.s_addr; bind(s, (struct sockaddr*) &sa, sizeof(sa)); while (1) { len = recvfrom(s, msg, sizeof(msg), 0, (struct sockaddr*) &sa, &sz); if (len > 0) { msg[len] = '\0'; printf("from %s (%d bytes):\n%s\n", inet_ntoa(sa.sin_addr), len, msg); } else { printf("failed\n"); break; } } /* bye */ close(s); return(0); } --------------F9656FEC92FDF0E485BDC321-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 18:31:56 2000 Delivered-To: freebsd-net@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AB43D37B50E; Wed, 16 Aug 2000 18:31:54 -0700 (PDT) (envelope-from kris@FreeBSD.org) Received: from localhost (kris@localhost) by freefall.freebsd.org (8.9.3/8.9.2) with ESMTP id SAA44654; Wed, 16 Aug 2000 18:31:54 -0700 (PDT) (envelope-from kris@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: kris owned process doing -bs Date: Wed, 16 Aug 2000 18:31:53 -0700 (PDT) From: Kris Kennaway To: "G.B.Naidu" Cc: freebsd-net@FreeBSD.org Subject: Re: multicast packets & tcpdump... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 16 Aug 2000, G.B.Naidu wrote: > I am running FreeBSD 3.3-RELEASE. FreeBSD 3.3 had an old version of tcpdump. Try a newer one from www.tcpdump.org, or a more recent version of FreeBSD (I'm not sure if it was ever merged back to the 3.x branch) Kris -- In God we Trust -- all others must submit an X.509 certificate. -- Charles Forsythe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 21:23:50 2000 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id 6D85737B8F6 for ; Wed, 16 Aug 2000 21:23:47 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from localhost ([3ffe:501:100f:13ff::a]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id NAA03972; Thu, 17 Aug 2000 13:09:48 +0900 (JST) Date: Thu, 17 Aug 2000 12:55:16 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: gbnaidu@sasi.com Cc: freebsd-net@FreeBSD.ORG Subject: Re: multicast packets & tcpdump... In-Reply-To: In your message of "Wed, 16 Aug 2000 18:03:09 +0530 (IST)" References: User-Agent: Wanderlust/2.3.0 (Roam) Emacs/20.6 Mule/4.0 (HANANOEN) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 43 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> On Wed, 16 Aug 2000 18:03:09 +0530 (IST), >>>>> "G.B.Naidu" said: > I was looking at the tcpdump output while multicast packets are flowing > between two routers, tcpdump shows the source and destination address as > "224.0.0.2". It should show the source address of the multicast packet > rather than the multicast group address. > I found that, when the receiver does the recvfrom(), the address returned > shows the multicast group address. Is this a bug or feature? On linux this > shows the source address. I suspect those two facts means that the source address of the multicast packet was really a multicast address. If you bind a socket to an IPv4 multicast address on a BSD system (including FreeBSD) and try to send a (unicast or multicast) packet via the socket, the source address of the packet is the bound multicast address. For example, if you have the following PCB Proto Recv-Q Send-Q Local Address Foreign Address udp 0 0 224.0.0.2.6666 *.* and send a packet to 224.0.0.5 through the socket, the packet will be as follows: 12:49:49.914187 224.0.0.2.6666 > 224.0.0.5.6666: udp 0 [ttl 1] 4500 001c 2ecb 0000 0111 cafe e000 0002 e000 0005 1a0a 1a0a 0008 0bc2 In this case, of course, the recvfrom() call on the receiver side will retrun the multicast address (224.0.0.5) as the packet's source address. Note that the same thing does not happen for BSD's IPv6 implementation. The IPv6 network layer rejects packets with multicast source addresses to be sent on the wire. I think a similar fix should be implemented for IPv4, too. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 21:27:44 2000 Delivered-To: freebsd-net@freebsd.org Received: from proxy.outblaze.com (proxy.outblaze.com [202.77.223.120]) by hub.freebsd.org (Postfix) with SMTP id 6B83337BB68 for ; Wed, 16 Aug 2000 21:27:40 -0700 (PDT) (envelope-from yusufg@outblaze.com) Received: (qmail 69558 invoked from network); 17 Aug 2000 04:27:37 -0000 Received: from unknown (HELO yusufg.portal2.com) (202.77.181.217) by proxy.outblaze.com with SMTP; 17 Aug 2000 04:27:37 -0000 Received: (qmail 9207 invoked by uid 500); 17 Aug 2000 04:27:36 -0000 Date: Thu, 17 Aug 2000 12:27:36 +0800 From: Yusuf Goolamabbas To: freebsd-net@freebsd.org Subject: [avalon@COOMBS.ANU.EDU.AU: Ip packet filtering with bridging on freebsd] Message-ID: <20000817122736.A9181@outblaze.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline User-Agent: Mutt/1.2i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Any comments to Darren's assertion ? -- Yusuf Goolamabbas yusufg@outblaze.com --AqsLC8rIMeq19msA Content-Type: message/rfc822 Content-Disposition: inline Return-Path: Delivered-To: yusufg@yusufg.portal2.com Received: (qmail 24787 invoked from network); 1 Aug 2000 19:38:32 -0000 Received: from unknown (HELO proxy.outblaze.com) (202.77.223.120) by yusufg.portal2.com with SMTP; 1 Aug 2000 19:38:32 -0000 Received: (qmail 21660 invoked by uid 1010); 1 Aug 2000 19:38:32 -0000 Delivered-To: outblaze-yusufg@OUTBLAZE.COM Received: (qmail 21648 invoked from network); 1 Aug 2000 19:38:32 -0000 Received: from unknown (HELO lists.securityfocus.com) (207.126.127.68) by proxy.outblaze.com with SMTP; 1 Aug 2000 19:38:32 -0000 Received: from lists.securityfocus.com (lists.securityfocus.com [207.126.127.68]) by lists.securityfocus.com (Postfix) with ESMTP id 9F12E1F883; Tue, 1 Aug 2000 12:27:06 -0700 (PDT) Received: from LISTS.SECURITYFOCUS.COM by LISTS.SECURITYFOCUS.COM (LISTSERV-TCP/IP release 1.8d) with spool id 11050907 for BUGTRAQ@LISTS.SECURITYFOCUS.COM; Tue, 1 Aug 2000 12:26:40 -0700 Approved-By: aleph1@SECURITYFOCUS.COM Delivered-To: bugtraq@lists.securityfocus.com Received: from securityfocus.com (mail.securityfocus.com [207.126.127.78]) by lists.securityfocus.com (Postfix) with SMTP id 8712B1EF20 for ; Mon, 31 Jul 2000 14:14:59 -0700 (PDT) Received: (qmail 7626 invoked by alias); 31 Jul 2000 21:15:41 -0000 Delivered-To: bugtraq@securityfocus.com Received: (qmail 7623 invoked from network); 31 Jul 2000 21:15:39 -0000 Received: from cairo.anu.edu.au (150.203.224.11) by mail.securityfocus.com with SMTP; 31 Jul 2000 21:15:39 -0000 Received: (from avalon@localhost) by cairo.anu.edu.au (8.9.3/8.9.3) id HAA29256 for bugtraq@securityfocus.com; Tue, 1 Aug 2000 07:14:50 +1000 (EST) X-Mailer: ELM [version 2.4ME+ PL39 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <200007312114.HAA29256@cairo.anu.edu.au> Date: Tue, 1 Aug 2000 07:14:50 +1000 Reply-To: Darren Reed Sender: Bugtraq List From: Darren Reed Subject: Ip packet filtering with bridging on freebsd To: BUGTRAQ@SECURITYFOCUS.COM If someone is doing packet filtering using ipfw to do packet filtering with a FreeBSD box configured to do bridging, it is relatively easy to make the box go "boom" as none of the standard header sanity checks are done prior to the filter routine being called (check /sys/net/bridge.c) It is a feature "copied" from OpenBSD but somehow large amounts of code were not copied and bugs resulted. --AqsLC8rIMeq19msA-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Aug 16 23:35:23 2000 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 8E02C37B550 for ; Wed, 16 Aug 2000 23:35:19 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id IAA03423; Thu, 17 Aug 2000 08:37:07 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200008170637.IAA03423@info.iet.unipi.it> Subject: Re: [avalon@COOMBS.ANU.EDU.AU: Ip packet filtering with bridging on freebsd] In-Reply-To: <20000817122736.A9181@outblaze.com> from Yusuf Goolamabbas at "Aug 17, 2000 12:27:36 pm" To: Yusuf Goolamabbas Date: Thu, 17 Aug 2000 08:37:07 +0200 (CEST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Any comments to Darren's assertion ? i would appreciate if he was giving more details on the allegedly missing sanity checks. Furthermore, and just for the records, the feature was not copied in any way from openbsd -- the entire bridging code and the ipfw integration was written from scratch, i did not even know openbsd had that. so no wonder "large amounts of code were not copied" -- no code was copied! cheers luigi > -- > Yusuf Goolamabbas > yusufg@outblaze.com -- Start of included mail From: Darren Reed > Return-path: > Delivered-To: yusufg@yusufg.portal2.com > Delivered-To: outblaze-yusufg@OUTBLAZE.COM > Approved-By: aleph1@SECURITYFOCUS.COM > Delivered-To: bugtraq@lists.securityfocus.com > Delivered-To: bugtraq@securityfocus.com > Date: Tue, 1 Aug 2000 07:14:50 +1000 > Reply-To: Darren Reed > Sender: Bugtraq List > Subject: Ip packet filtering with bridging on freebsd > To: BUGTRAQ@SECURITYFOCUS.COM > If someone is doing packet filtering using ipfw to do packet filtering > with a FreeBSD box configured to do bridging, it is relatively easy to > make the box go "boom" as none of the standard header sanity checks > are done prior to the filter routine being called (check /sys/net/bridge.c) > It is a feature "copied" from OpenBSD but somehow large amounts of code > were not copied and bugs resulted. -- End of included mail. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 0: 5:49 2000 Delivered-To: freebsd-net@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id 1C43937B5FE for ; Thu, 17 Aug 2000 00:05:45 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 15812 invoked by uid 1000); 17 Aug 2000 07:05:42 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Aug 2000 07:05:42 -0000 Date: Thu, 17 Aug 2000 02:05:42 -0500 (CDT) From: Mike Silbersack To: Luigi Rizzo Cc: Yusuf Goolamabbas , freebsd-net@FreeBSD.ORG Subject: Re: [avalon@COOMBS.ANU.EDU.AU: Ip packet filtering with bridging on freebsd] In-Reply-To: <200008170637.IAA03423@info.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 17 Aug 2000, Luigi Rizzo wrote: > > Any comments to Darren's assertion ? > > i would appreciate if he was giving more details on the > allegedly missing sanity checks. He did, a few days ago. Check -security, I believe. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 3:51:27 2000 Delivered-To: freebsd-net@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6032537B7F0; Thu, 17 Aug 2000 03:51:12 -0700 (PDT) Received: (from sheldonh@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id DAA21546; Thu, 17 Aug 2000 03:11:19 -0700 (PDT) (envelope-from sheldonh@FreeBSD.org) Date: Thu, 17 Aug 2000 03:11:19 -0700 (PDT) From: Message-Id: <200008171011.DAA21546@freefall.freebsd.org> To: sheldonh@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org Subject: Re: bin/20600: getpeereid obtains credentials from connect() Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Synopsis: getpeereid obtains credentials from connect() Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: sheldonh Responsible-Changed-When: Thu Aug 17 03:09:58 PDT 2000 Responsible-Changed-Why: This is something of an experiment. I'd like to see whether the assignment of network-related PR's to the freebsd-net list can be a productive exercise. http://www.freebsd.org/cgi/query-pr.cgi?pr=20600 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 7:41:10 2000 Delivered-To: freebsd-net@freebsd.org Received: from cordelia.lcs.mit.edu (cordelia.lcs.mit.edu [18.26.0.55]) by hub.freebsd.org (Postfix) with ESMTP id CFFAA37B635 for ; Thu, 17 Aug 2000 07:41:06 -0700 (PDT) Received: from cordelia.lcs.mit.edu (localhost [127.0.0.1]) by cordelia.lcs.mit.edu (8.9.3/8.9.3) with ESMTP id KAA17967 for ; Thu, 17 Aug 2000 10:40:53 -0400 (EDT) (envelope-from yxw@cordelia.lcs.mit.edu) Message-Id: <200008171440.KAA17967@cordelia.lcs.mit.edu> From: Xiaowei Yang To: freebsd-net@freebsd.org Subject: how to set nmbufs Date: Thu, 17 Aug 2000 10:40:53 -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Greetings, everyone, I am doing some simulation that needs to allocate as many nmbufs as possible. I could not figure out how to set nmbufs to be the maximum value allowd by my physical memory. I tired to mannual set it to be a huge number, for example, 128MB/128B=1M (I have 196M memory) and used netstat -m to monitor the real allocated nmbufs. However, when it reached some value lower that a 1M, a kernel page fault happened. It seems to me I also need to increase the maximum kernel memory size seperately. Can someone tell me how to do it right? Is there a simple formula to estimate the number? Thanks, Xiaowei To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 10:19:59 2000 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 999EF37B66B; Thu, 17 Aug 2000 10:19:51 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7HHJnC08759; Thu, 17 Aug 2000 10:19:49 -0700 (PDT) Date: Thu, 17 Aug 2000 10:19:49 -0700 From: Alfred Perlstein To: sheldonh@FreeBSD.ORG Cc: freebsd-bugs@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: bin/20600: getpeereid obtains credentials from connect() Message-ID: <20000817101949.C4854@fw.wintelcom.net> References: <200008171011.DAA21546@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200008171011.DAA21546@freefall.freebsd.org>; from sheldonh@FreeBSD.ORG on Thu, Aug 17, 2000 at 03:11:19AM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * sheldonh@FreeBSD.ORG [000817 04:32] wrote: > Synopsis: getpeereid obtains credentials from connect() > > Responsible-Changed-From-To: freebsd-bugs->freebsd-net > Responsible-Changed-By: sheldonh > Responsible-Changed-When: Thu Aug 17 03:09:58 PDT 2000 > Responsible-Changed-Why: > This is something of an experiment. I'd like to see whether the > assignment of network-related PR's to the freebsd-net list can be > a productive exercise. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=20600 This was a poor test case, I really don't like getpeerid() IMO it's redundant and not useful over what I hopes to replace which is credential passing over sendmsg(). -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 10:59: 6 2000 Delivered-To: freebsd-net@freebsd.org Received: from mail.targetnet.com (mail.targetnet.com [207.245.246.3]) by hub.freebsd.org (Postfix) with ESMTP id DD64637B72E for ; Thu, 17 Aug 2000 10:58:50 -0700 (PDT) Received: from james by mail.targetnet.com with local (Exim 3.02 #1) id 13PTwE-0000FS-00 for freebsd-net@freebsd.org; Thu, 17 Aug 2000 13:58:46 -0400 Date: Thu, 17 Aug 2000 13:58:46 -0400 From: James FitzGibbon To: freebsd-net@freebsd.org Subject: Overhead of VLAN tagging ? Message-ID: <20000817135846.B70291@targetnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i Organization: Targetnet.com Inc. Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Has anyone done any performance tests to determine if VLAN tagging adds any overhead to network applications ? I presume that the extra bytes are added at the same time at the ethernet header, so overhead should be minimal if any. Still, if this has been properly tested and figures are available, I'd appreciate a pointer. Thanks. -- j. James FitzGibbon james@targetnet.com Targetnet.com Inc. Voice/Fax +1 416 306-0466/0452 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 11:40:50 2000 Delivered-To: freebsd-net@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id 10C6937B669 for ; Thu, 17 Aug 2000 11:40:48 -0700 (PDT) Received: (qmail 17436 invoked by uid 1000); 17 Aug 2000 18:40:44 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Aug 2000 18:40:44 -0000 Date: Thu, 17 Aug 2000 13:40:44 -0500 (CDT) From: Mike Silbersack To: Xiaowei Yang Cc: freebsd-net@freebsd.org Subject: Re: how to set nmbufs In-Reply-To: <200008171440.KAA17967@cordelia.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 17 Aug 2000, Xiaowei Yang wrote: > Greetings, everyone, > > I am doing some simulation that needs to allocate as many nmbufs as > possible. I could not figure out how to set nmbufs to be the maximum > value allowd by my physical memory. I tired to mannual set it to be a > huge number, for example, 128MB/128B=1M (I have 196M memory) and used > netstat -m to monitor the real allocated nmbufs. However, when it > reached some value lower that a 1M, a kernel page fault happened. Use options NMBCLUSTERS in your kernel config file to set it. See LINT/NOTES for usage examples. The number of nmbufs will be 4x what you set this value to. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 18:55:31 2000 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.129.65]) by hub.freebsd.org (Postfix) with ESMTP id 3111B37BDE3 for ; Thu, 17 Aug 2000 18:51:26 -0700 (PDT) Received: from field.videotron.net (field.videotron.net [205.151.222.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 358676E3A46 for ; Thu, 17 Aug 2000 13:46:20 -0700 (PDT) Received: from modemcable136.203-201-24.mtl.mc.videotron.net ([24.201.203.136]) by field.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0FZG004QYELCJ1@field.videotron.net> for freebsd-net@FreeBSD.ORG; Thu, 17 Aug 2000 16:36:48 -0400 (EDT) Date: Thu, 17 Aug 2000 16:39:44 -0400 (EDT) From: Bosko Milekic Subject: Re: how to set nmbufs In-reply-to: <200008171440.KAA17967@cordelia.lcs.mit.edu> X-Sender: bmilekic@jehovah.technokratis.com To: Xiaowei Yang Cc: freebsd-net@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I'm afraid you'll need to provide much more information concerning the page fault, if you expect someone to be able to help you. In particular, the following is the necessary minimum: * FreeBSD version you're doing this with. * Is this reproducable? If so, what is the exact procedure? * Stack trace, as well as other available debugging information following the page fault. With the information you have presently provided, it may not even be the relevant code that is causing this fault. It could just be triggering a problem that occurs only when kmem_map is mostly occupied by the mb_map submap, and the size of the kmem_map (or its parent, kernel_map), may need to be increased. Bosko bmilekic@dsuper.net On Thu, 17 Aug 2000, Xiaowei Yang wrote: > Greetings, everyone, > > I am doing some simulation that needs to allocate as many nmbufs as > possible. I could not figure out how to set nmbufs to be the maximum > value allowd by my physical memory. I tired to mannual set it to be a > huge number, for example, 128MB/128B=1M (I have 196M memory) and used > netstat -m to monitor the real allocated nmbufs. However, when it > reached some value lower that a 1M, a kernel page fault happened. > > It seems to me I also need to increase the maximum kernel memory size > seperately. Can someone tell me how to do it right? Is there a simple > formula to estimate the number? > > > Thanks, > > Xiaowei > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 18:55:42 2000 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.129.65]) by hub.freebsd.org (Postfix) with ESMTP id 2162037BEAE for ; Thu, 17 Aug 2000 18:51:34 -0700 (PDT) Received: from cordelia.lcs.mit.edu (cordelia.lcs.mit.edu [18.26.0.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 818B26E426B for ; Thu, 17 Aug 2000 18:35:11 -0700 (PDT) Received: from cordelia.lcs.mit.edu (localhost [127.0.0.1]) by cordelia.lcs.mit.edu (8.9.3/8.9.3) with ESMTP id VAA21308; Thu, 17 Aug 2000 21:34:46 -0400 (EDT) (envelope-from yxw@cordelia.lcs.mit.edu) Message-Id: <200008180134.VAA21308@cordelia.lcs.mit.edu> To: Bosko Milekic Cc: Xiaowei Yang , freebsd-net@FreeBSD.ORG Subject: Re: how to set nmbufs In-Reply-To: Message from Bosko Milekic of "Thu, 17 Aug 2000 16:39:44 EDT." Date: Thu, 17 Aug 2000 21:34:46 -0400 From: Xiaowei Yang Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, Thanks a lot for the reply. I guess I sould phrase my question like this: I am doing some network simulation which requires a lot mbufs (for packet headers) but not mclusters. I want to allocate as much memory as possible. For example, I need about 1M mbufs. I am using right way to do this? I am using FreeBSD 4.0-release. I set NMBCLUSTER to be 64000. Here is 'netstat -m' output before the page fault happened: 5948/256000/256000 mbufs in use (current/peak/max): 5942 mbufs allocated to data 6 mbufs allocated to packet headers 178/302/64000 mbuf clusters in use (current/peak/max) 32604 Kbytes allocated to network (3% in use) 102535 requests for memory denied 0 requests for memory delayed 0 calls to protocol drain routines Here is the trace: ether_output+0x30b ip_output+0x5cb ip_stripoptions+0x1e8 ip_input+0x46a ip_input+0x69f doreti_popl_fs_fault+0x95 Xintr11+0x65 I tried a larger value for NMBCLUSTER , which is 262144, but the kernel stopped booting with page fault. (I heard that the size of mbuf is 256 in 4.x. But I still see MSIZE is set to 128 in sys/i386/include/param.h, which I donot understand.) Thanks, > > Hi, > > I'm afraid you'll need to provide much more information concerning > the page fault, if you expect someone to be able to help you. > In particular, the following is the necessary minimum: > > * FreeBSD version you're doing this with. > * Is this reproducable? If so, what is the exact procedure? > * Stack trace, as well as other available debugging information > following the page fault. > > With the information you have presently provided, it may not even be > the relevant code that is causing this fault. It could just be triggering > a problem that occurs only when kmem_map is mostly occupied by the mb_map > submap, and the size of the kmem_map (or its parent, kernel_map), may > need to be increased. > > Bosko > bmilekic@dsuper.net > > On Thu, 17 Aug 2000, Xiaowei Yang wrote: > > > Greetings, everyone, > > > > I am doing some simulation that needs to allocate as many nmbufs as > > possible. I could not figure out how to set nmbufs to be the maximum > > value allowd by my physical memory. I tired to mannual set it to be a > > huge number, for example, 128MB/128B=1M (I have 196M memory) and used > > netstat -m to monitor the real allocated nmbufs. However, when it > > reached some value lower that a 1M, a kernel page fault happened. > > > > It seems to me I also need to increase the maximum kernel memory size > > seperately. Can someone tell me how to do it right? Is there a simple > > formula to estimate the number? > > > > > > Thanks, > > > > Xiaowei > > > Cheers, --Xiaowei To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Aug 17 22:39:27 2000 Delivered-To: freebsd-net@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 8885A37B424 for ; Thu, 17 Aug 2000 22:39:23 -0700 (PDT) Received: from modemcable136.203-201-24.mtl.mc.videotron.net ([24.201.203.136]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0FZH004Y93PBS2@falla.videotron.net> for freebsd-net@FreeBSD.ORG; Fri, 18 Aug 2000 01:39:12 -0400 (EDT) Date: Fri, 18 Aug 2000 01:42:09 -0400 (EDT) From: Bosko Milekic Subject: Re: how to set nmbufs In-reply-to: <200008180134.VAA21308@cordelia.lcs.mit.edu> X-Sender: bmilekic@jehovah.technokratis.com To: Xiaowei Yang Cc: Xiaowei Yang , freebsd-net@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, Can you send me a `disassemble ether_output' from the debugger? I don't know what's at ether_ouput+0x30b. This would at least help locate the problem. This seems fairly wierd because you have many denied requests but zero calls to drain routines. Kind of odd, unless _all_ the denied requests are coming from interrupts (which is possible, but which needs to be tracked). Send me the disassemble output. ;-) Cheers, Bosko. On Thu, 17 Aug 2000, Xiaowei Yang wrote: > Hi, > > Thanks a lot for the reply. I guess I sould phrase my question like > this: I am doing some network simulation which requires a lot mbufs > (for packet headers) but not mclusters. I want to allocate as much > memory as possible. For example, I need about 1M mbufs. I am using > right way to do this? I am using FreeBSD 4.0-release. I set > NMBCLUSTER to be 64000. > > Here is 'netstat -m' output before the page fault happened: > > 5948/256000/256000 mbufs in use (current/peak/max): > 5942 mbufs allocated to data > 6 mbufs allocated to packet headers > 178/302/64000 mbuf clusters in use (current/peak/max) > 32604 Kbytes allocated to network (3% in use) > 102535 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > Here is the trace: > > ether_output+0x30b > ip_output+0x5cb > ip_stripoptions+0x1e8 > ip_input+0x46a > ip_input+0x69f > doreti_popl_fs_fault+0x95 > Xintr11+0x65 > > > I tried a larger value for NMBCLUSTER , which is 262144, but the > kernel stopped booting with page fault. (I heard that the size of mbuf > is 256 in 4.x. But I still see MSIZE is set to 128 in > sys/i386/include/param.h, which I donot understand.) > > Thanks, > > > > > > Hi, > > > > I'm afraid you'll need to provide much more information concerning > > the page fault, if you expect someone to be able to help you. > > In particular, the following is the necessary minimum: > > > > * FreeBSD version you're doing this with. > > * Is this reproducable? If so, what is the exact procedure? > > * Stack trace, as well as other available debugging information > > following the page fault. > > > > With the information you have presently provided, it may not even be > > the relevant code that is causing this fault. It could just be triggering > > a problem that occurs only when kmem_map is mostly occupied by the mb_map > > submap, and the size of the kmem_map (or its parent, kernel_map), may > > need to be increased. > > > > Bosko > > bmilekic@dsuper.net > > > > On Thu, 17 Aug 2000, Xiaowei Yang wrote: > > > > > Greetings, everyone, > > > > > > I am doing some simulation that needs to allocate as many nmbufs as > > > possible. I could not figure out how to set nmbufs to be the maximum > > > value allowd by my physical memory. I tired to mannual set it to be a > > > huge number, for example, 128MB/128B=1M (I have 196M memory) and used > > > netstat -m to monitor the real allocated nmbufs. However, when it > > > reached some value lower that a 1M, a kernel page fault happened. > > > > > > It seems to me I also need to increase the maximum kernel memory size > > > seperately. Can someone tell me how to do it right? Is there a simple > > > formula to estimate the number? > > > > > > > > > Thanks, > > > > > > Xiaowei > > > > > > > > Cheers, > --Xiaowei > > -- Bosko Milekic * Voice/Mobile: 514.865.7738 * Pager: 514.921.0237 bmilekic@technokratis.com * http://www.technokratis.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Aug 18 9: 6: 5 2000 Delivered-To: freebsd-net@freebsd.org Received: from daemon.sofiaonline.com (daemon.sofiaonline.com [212.5.144.1]) by hub.freebsd.org (Postfix) with SMTP id 83C7E37B424 for ; Fri, 18 Aug 2000 09:05:49 -0700 (PDT) Received: (qmail 42712 invoked from network); 18 Aug 2000 16:04:53 -0000 Received: from carnivoro.sofiaonline.com (HELO sofiaonline.com) (212.5.144.5) by daemon.sofiaonline.com with SMTP; 18 Aug 2000 16:04:53 -0000 Message-ID: <399D3E08.66C26670@sofiaonline.com> Date: Fri, 18 Aug 2000 16:45:44 +0300 From: Andrew Rousseff X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-ZETHIX i386) X-Accept-Language: en, bg MIME-Version: 1.0 To: freebsd-arch@freebsd.org, freebsd-net@freebsd.org Subject: SIOCGHIWAT & co. ioctl's Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello there, While writing some code here, I noticed that ioct(SIOCGHIWAT) returns EOPNOTSUPP. Digging the kernel sources shows no code to handle these ioctl's. I would like to ask if there is any particular reason for this? Cheers, zethix To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Aug 18 22: 1:37 2000 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id 1250437B423 for ; Fri, 18 Aug 2000 22:01:34 -0700 (PDT) Received: from localhost (shuttle.sixyards.wide.toshiba.co.jp [3ffe:501:100f:0:200:f8ff:fe01:61cf]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id NAA16270; Sat, 19 Aug 2000 13:47:16 +0900 (JST) Date: Sat, 19 Aug 2000 13:56:42 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: gbnaidu@sasi.com Cc: freebsd-net@FreeBSD.ORG Subject: Re: multicast packets & tcpdump... In-Reply-To: In your message of "Thu, 17 Aug 2000 16:11:34 +0530 (IST)" References: User-Agent: Wanderlust/2.3.0 (Roam) Emacs/20.6 Mule/4.0 (HANANOEN) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 19 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> On Thu, 17 Aug 2000 16:11:34 +0530 (IST), >>>>> "G.B.Naidu" said: > Thanks to all who responded. The source socket was bound to multicast > group address rather than to the INADDR_ANY address. Surprisingly linux > works even with the multicast group address. I don't think it's so surprising. Binding a socket to a multicast address is not fully documented, and thus the semantics just varies over implementations. (however, I admit the current BSD's behavior is *worse* than one of linux. It simply allows normal user to send invalid packets to the wire.) JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Aug 18 23:15:36 2000 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id A9F2B37B423 for ; Fri, 18 Aug 2000 23:15:30 -0700 (PDT) Received: from localhost (shuttle.sixyards.wide.toshiba.co.jp [3ffe:501:100f:0:200:f8ff:fe01:61cf]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id PAA16549; Sat, 19 Aug 2000 15:01:43 +0900 (JST) Date: Sat, 19 Aug 2000 15:11:09 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: gbnaidu@sasi.com Cc: freebsd-net@FreeBSD.ORG Subject: Re: multicast packets & tcpdump... In-Reply-To: In your message of "Sat, 19 Aug 2000 11:36:22 +0530 (IST)" References: User-Agent: Wanderlust/2.3.0 (Roam) Emacs/20.6 Mule/4.0 (HANANOEN) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 19 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> On Sat, 19 Aug 2000 11:36:22 +0530 (IST), >>>>> "G.B.Naidu" said: >> (however, I admit the current BSD's behavior is *worse* than one of >> linux. It simply allows normal user to send invalid packets to the >> wire.) > Any patches for this or is it just over looked? I think the latter is the case. It is easy to just prevent packets with multicast source addresses from being sent, but it is a bit harder to implement the same behavior as linux (i.e. choose another valid address). I'm not even sure if such a behavior is really "correct". JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sat Aug 19 16:37:53 2000 Delivered-To: freebsd-net@freebsd.org Received: from alpha.simphost.com (alpha.simphost.com [216.84.199.194]) by hub.freebsd.org (Postfix) with ESMTP id EDD3637B423; Sat, 19 Aug 2000 16:37:48 -0700 (PDT) Received: by alpha.simphost.com (Postfix, from userid 1000) id EED963071D; Sat, 19 Aug 2000 17:37:57 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by alpha.simphost.com (Postfix) with ESMTP id E56442C90F; Sat, 19 Aug 2000 17:37:57 -0600 (MDT) Date: Sat, 19 Aug 2000 17:37:57 -0600 (MDT) From: "Jason L. Schwab" To: freebsd-net@freebsd.org, freebsd-questions@freebsd.org Cc: "Roger T. Harvey" , "Rick M. Aseltine" , "Jonathan M. Slivko" , Steve Krujelskis Subject: Networking Error Question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Heya People, I have three machines, up on a colocated network, One machine handles almost everything, it has 216.84.199.164 thro 216.84.199.154, and 216.253.163.2 thro 216.253.163.254 binded to it using (ifconfig device inet IP netmask NETMASK alias) I get this error alot in my messages: Aug 19 17:33:20 alpha /kernel: arplookup 216.253.163.1 failed: host is not on local network Aug 19 17:33:20 alpha last message repeated 4 times Any ideas or suggestions would be greatful! Thanks in advance. - Jason L. Schwab CEO / Unix System Administrator Simple Hosting Solutions www.simphost.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sat Aug 19 23:35:10 2000 Delivered-To: freebsd-net@freebsd.org Received: from security1.noc.flyingcroc.net (security1.noc.flyingcroc.net [207.246.128.54]) by hub.freebsd.org (Postfix) with ESMTP id 5438D37B422 for ; Sat, 19 Aug 2000 23:35:07 -0700 (PDT) Received: from localhost (todd@localhost) by security1.noc.flyingcroc.net (8.9.3/8.9.3) with ESMTP id XAA27805; Sat, 19 Aug 2000 23:34:58 -0700 (PDT) (envelope-from todd@flyingcroc.net) X-Authentication-Warning: security1.noc.flyingcroc.net: todd owned process doing -bs Date: Sat, 19 Aug 2000 23:34:58 -0700 (PDT) From: Todd Backman X-Sender: todd@security1.noc.flyingcroc.net To: Dan Debertin Cc: freebsd-net@freebsd.org Subject: Re: Routing firewall w/ipfw questions In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 19 Aug 2000, Dan Debertin wrote: > First, as this is not exactly security-related, a better forum for this is > -net (or -questions, but that list tends to have more questions than > answers ;). My bad. Moving to -net...thanks for the tap. > > Now, on to your question: > > > > > Question: > > Is my reasoning flawed in regards to the routing portion of this setup? > > Your subnetting plan looks fine to me. One thing that strikes me, though, > is that you need to have a router on the external side who knows that your > FreeBSD box is the next-hop router for the post-firewall /24. Is there > such a router in your setup? For example, let's say that your firewall's > external interface is 1.1.1.6/29, and the internal is 1.1.2.1/24. There > should be a router with an interface on the 1.1.1.0/29 subnet that "knows" > that 1.1.2.0/24 is reached via 1.1.1.6. In cisco syntax this would be > > ip route 1.1.1.0 255.255.255.0 1.1.1.6 > > or via the UNIX "route" command: > route add -net 1.1.2.0 -netmask 255.255.255.0 1.1.1.6 Yes, that was done and verified. > > Also, make sure you have a default gateway on your firewall pointing to > that external router. I am also assuming you've done the basic lower-layer > checks for link lights, cable integrity, etc. Yes. > > > Thanks for any help you might provide. Upon successful completion of this > > project I will document all *correct* procedures and post as I have not > > found any documentation on setting ipfw up for protecting an internal /24 > > with a different subnet on the outside interface. > > We've been doing this successfully for quite some time, so I assure you > it's fairly standard ;). ;^) I could not find any documentation regarding this type of setup other than the "simple" section of rc.firewall. I will ditch my rules tomorrow, leave everything open then try the routing again. The main thing that I wanted to find out was: is the routing plan correct? (just had to rule it out as I am not the route man I would like to be...if they would only issue me another 24hrs in a day I would be fine ;^) It had me baffled as when working with the guy on the inside net during testing; he could gain access to and from the outside (due to his first established connection) but no access from the outside could be established even after adding as the last rulesets: allow ip from any to any Something to be said about "starting over" ;^) Thanks for your help Dan. - Todd > > > ~Dan D. > -- > > ++ Dan Debertin > ++ Senior Systems Administrator > ++ Bitstream Underground, LLC > ++ airboss@bitstream.net > ++ (612)321-9290 > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-security" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message