From owner-freebsd-stable@FreeBSD.ORG Tue Feb 1 02:16:12 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB60D106566C for ; Tue, 1 Feb 2011 02:16:11 +0000 (UTC) (envelope-from vanopen@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E75C8FC08 for ; Tue, 1 Feb 2011 02:16:11 +0000 (UTC) Received: by gyf3 with SMTP id 3so2416039gyf.13 for ; Mon, 31 Jan 2011 18:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :organization:x-operating-system:user-agent; bh=e816/AbOjWPOzqhZY5XAbDjzFldt01/BZYayvk4AIhA=; b=X6JFYy7G1MVPPJD16qUuA5gf9ea8Xv30K0Hx6X1eosIiZnOmFeFFrlbK7lnlEdDqTc 5w2PwxU5zBQx397LBoVwtipfnpME360t5MDHcbyMM+cvYhGWGUXin3cDoixS8acFUphQ hpksVybhFDaYOquRTkX7x+QUUv4LwoieA//BQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:organization :x-operating-system:user-agent; b=ueKxXrTNhq8B1RbB/SNtJi92HDOjkE27rj212jlbTYXg6e6XznpzK2Sv5i4XC8OuiT kq1tvdNv8Uue+uEwMtgE0o+7qyq1xnzOcw66ViAfnMrrl1+1s1UI5DOiifjYQmloWdEt x+ZjRBio6Y2sTu4LdxK/0+uxwC1DkvqMN0cYQ= Received: by 10.150.189.17 with SMTP id m17mr1631274ybf.250.1296526570677; Mon, 31 Jan 2011 18:16:10 -0800 (PST) Received: from fbsd.t60.cpu ([180.141.178.90]) by mx.google.com with ESMTPS id q4sm2353883yba.2.2011.01.31.18.16.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Jan 2011 18:16:10 -0800 (PST) Date: Tue, 1 Feb 2011 10:15:58 +0800 From: Yue Wu To: freebsd-stable@freebsd.org Message-ID: <20110201021558.GA33543@fbsd.t60.cpu> References: <20110131125729.GA5163@fbsd.t60.cpu> <201101311450.25738.bschmidt@freebsd.org> <20110201015547.GA17910@fbsd.t60.cpu> <20110201020556.GA92331@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110201020556.GA92331@icarus.home.lan> Organization: China Pharmaceutical University, Nanjing, China X-Operating-System: FreeBSD 8.2-PRERELEASE i386 User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: Error produced by static ip setting: ifconfig: inet: bad value X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 02:16:12 -0000 On Mon, Jan 31, 2011 at 06:05:56PM -0800, Jeremy Chadwick wrote: > On Tue, Feb 01, 2011 at 09:55:47AM +0800, Yue Wu wrote: > > On Mon, Jan 31, 2011 at 02:50:25PM +0100, Bernhard Schmidt wrote: > > > On Monday, January 31, 2011 13:57:29 Yue Wu wrote: > > > > List, > > > > > > > > Hi. > > > > > > > > I use following setting for my wireless networking enviroment: > > > > > > > > ifconfig_wlan0="mode 11g bssid my:bssid wepmode on weptxkey 1 > > > > wepkey 1:0x1111111111 DHCP" > > > > > > > > But I don't like DHCP and want to use static ip, so I tried: > > > > > > > > ifconfig_wlan0="mode 11g bssid my:bssid wepmode on weptxkey 1 > > > > wepkey 1:0x1111111111 inet 192.168.1.144 netmask 255.255.255.0" > > > > > > > > But the setting makes BSD networking not working anymore, and when > > > > the system starts up, there's an error message: > > > > > > > > ifconfig: inet: bad value > > > > > > > > What's wrong? How to use static ip in my wireless networking? > > > > > > Remove the 'inet', it isn't required. > > > > > > > Thanks Schmidt, I haven't tried with your advice because the issue has > > gone after I put the `inet' in front of the value of ifconfig_wlan0, I > > will take a note for your hint and try it next time ;p > > > > p.s., examples in the handbook [1] have the `inet', why? > > > > [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html > > The advice you were given is incorrect; you should absolutely be > specifying the address family (inet). The syntax of the ifconfig(8) > line matters -- meaning, you're hitting an intentional design limitation > of the parser. You cannot put the "inet x.x.x.x" part at the end. > > Please see the ifconfig(8) man page. Here's the specific part: > > ifconfig [-L] [-k] [-m] [-n] interface [create] [address_family] > [address [dest_address]] [parameters] > > address_family = something like "inet", "inet6", etc. > > address = something like 1.2.3.4 or, or a CIDR address like 1.2.3.4/24 > (which would expand to "inet 1.2.3.4 netmask 255.255.255.0") > > parameters = dependent upon the interface you're configuring. Fore > wireless interfaces, you'll need to see the man page section for that. > > Hope this helps. > It helps a lot, thank you for detailed explanation, I get it now :) -- Regards, Yue Wu Key Laboratory of Modern Chinese Medicines Department of Traditional Chinese Medicine China Pharmaceutical University No.24, Tongjia Xiang Street, Nanjing 210009, China