From owner-freebsd-net@FreeBSD.ORG Wed Aug 7 06:37:06 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CF88E873 for ; Wed, 7 Aug 2013 06:37:06 +0000 (UTC) (envelope-from sam.gh1986@gmail.com) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A0402A51 for ; Wed, 7 Aug 2013 06:37:06 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id o10so1202464lbi.26 for ; Tue, 06 Aug 2013 23:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KLFa0nwRqvJjyGZUxLljxNvU+e8zZdrP4kFk9i1PTZo=; b=nv07RrpGkOnmYi+p4hCbs7BWm3f374bb+ZH3aCdiHW3C4tq6A3TJ42Zkd+shH2zzNj QPQjOF5ZoU0dIAtBCYT+A4icdMq2EXP/ryJXX/K/llk/Hs5+rqfJ2o2ZVx86shiqD5gO 0NNb7pQN6Hx7aDS3svB4x9U4G3uEgEnlbg64Wy+i6f1XyhCV9Vz76fcc6x+qVFTVbbke mf/UOXJtQPcsxvu9mw0Y/4k9RnRz9K9Vtq9MQQv1d9QsZER5cKnXfgbve0uFcKd06L8b bP8fEpdhb7GD+092ywgvM2CKZFnEe6vFzceOiV9hqhr79ReJM+iGyZSIbm2SWxAW5EG3 /hPw== MIME-Version: 1.0 X-Received: by 10.152.9.37 with SMTP id w5mr743882laa.23.1375857423993; Tue, 06 Aug 2013 23:37:03 -0700 (PDT) Received: by 10.112.147.230 with HTTP; Tue, 6 Aug 2013 23:37:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Aug 2013 11:07:03 +0430 Message-ID: Subject: Re: how define network with mask 8 for dhcp server? From: s m To: Andreas Nilsson Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Olivier Nicole , FreeBSD Net , Olivier Nicole X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 07 Aug 2013 06:37:06 -0000 yes, i solved my problem. thanks every body for your answers. it help me a lot. SAM On Tue, Aug 6, 2013 at 2:08 PM, Andreas Nilsson wrote: > > > > On Tue, Aug 6, 2013 at 11:29 AM, s m wrote: > >> thanks Andreas, that's it!!! >> you know i have user interface program for dhcp. users don't know how >> dhcp works and just enter desired range in text box. i should handle all >> entered ranges. in order to do that, i should know how dhcp works with all >> different ranges and return errors if some ranges is not equivalent like >> the sample one. >> > > Ok. Someone more versed in debugging should probably determine if the > crash is in libc or just that dhcp does not handle malloc error. > > >> >> so. if i want to have network with mask 8, i should limit my range, >> right? have you any suggestion what is the maximum range for netmask 8? >> thanks for your reply again. it clears my mind:) >> > > Exactly. > > I just tried > 192.0.0.1-192.220.255.255 which works ( takes ~3 minutes to start, using > 4.5gb of ram ) > and then > 192.0.0.1-192.221.255.255 which segfaults. > > The machine I test on does have 16gb of ram and 16gb of swap, so there > should be a lot more mem available. > > Best regards > Andreas > >> >> >> On Tue, Aug 6, 2013 at 1:35 PM, Andreas Nilsson wrote: >> >>> >>> >>> >>> On Tue, Aug 6, 2013 at 10:59 AM, Andreas Nilsson wrote: >>> >>>> >>>> >>>> >>>> On Tue, Aug 6, 2013 at 10:40 AM, Olivier Nicole < >>>> olivier.nicole@cs.ait.ac.th> wrote: >>>> >>>>> Sam, >>>>> >>>>> > my problem is to know how define a network with mask 8 and dhcp >>>>> server >>>>> > works correctly with it! you know if i config my dhcpd.conf like >>>>> below, i >>>>> > have core dump either: >>>>> > subnet 10.0.0.0 netmask 255.0.0.0 >>>>> > { >>>>> > range 10.0.0.1 10.255.255.254; >>>>> > } >>>>> > >>>>> > do you know how should i define my range ?? >>>>> >>>>> The reason may be that 2^24 machines in a subnet is such a non-sense >>>>> that dhcp simply cannot manage it. >>>>> >>>>> Best regards, >>>>> >>>>> Olivier >>>>> >>>>> > >>>>> > On Tue, Aug 6, 2013 at 12:23 PM, Olivier Nicole < >>>>> Olivier.Nicole@cs.ait.ac.th >>>>> >> wrote: >>>>> > >>>>> >> Sam, >>>>> >> >>>>> >> > subnet 192.0.0.0 netmask 255.0.0.0 >>>>> >> >>>>> >> I know it is not the answer to your question, but you are wrong in >>>>> your >>>>> >> guess that 192.0.0.0/8 is all private IPs. Only 192.168.0.0/16 is. >>>>> >> >>>>> >> I know that for certain because my own IP starts with 192. >>>>> >> >>>>> >> If you want a full /8 private, you can only use 10.0.0.0/8 >>>>> >> >>>>> >> Bets regards, >>>>> >> >>>>> >> Olivier >>>>> >> >>>>> >> -- >>>>> >> >>>>> >>>>> >>>> Well, I would guess it may run out of memory... I did a few tests: >>>> 192.0.0.0 - 192.128.255.255 does work ( using ~2.5Gb RAM ). >>>> 192.0.0.0 - 192.192.255.255 does work ( using ~4Gb RAM ). >>>> 192.0.0.0 - 192.200.255.255 does work ( using ~4.2Gb RAM ). >>>> 192.0.0.0 - 192.224.255.255 dumps core >>>> >>>> Why would you want to have such a huge range? >>>> >>>> Best regards >>>> Andreas >>>> >>> >>> Also, a quick look at the core file gives same indications: >>> #0 0x0000000800c67a21 in _malloc_prefork () from /lib/libc.so.7 >>> #1 0x0000000800c6b72a in malloc () from /lib/libc.so.7 >>> #2 0x000000000047b43b in omapi_object_dereference () >>> #3 0x00000000004844db in do_ip4_hash () >>> #4 0x0000000000484571 in do_ip4_hash () >>> #5 0x0000000000438a45 in pool_timer () >>> #6 0x000000000041dcd7 in trace_conf_stop () >>> #7 0x000000000041fc4e in trace_conf_stop () >>> #8 0x0000000000420698 in trace_conf_stop () >>> #9 0x0000000000420ecc in trace_conf_stop () >>> #10 0x0000000000420197 in trace_conf_stop () >>> #11 0x00000000004247f3 in trace_conf_stop () >>> #12 0x000000000041f210 in trace_conf_stop () >>> #13 0x000000000040f3bf in lease_pinged () >>> #14 0x000000000040d451 in ?? () >>> #15 0x00000008007d7000 in ?? () >>> #16 0x0000000000000000 in ?? () >>> >>> Best regards >>> Andreas >>> >>> >> >