From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 06:44:53 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DB1816A418 for ; Thu, 24 Jan 2008 06:44:53 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id D8E2B13C448 for ; Thu, 24 Jan 2008 06:44:52 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.14.2/8.14.2) with ESMTP id m0O6ikSp081040; Thu, 24 Jan 2008 06:44:47 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.4.3 smtp.infracaninophile.co.uk m0O6ikSp081040 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1201157087; bh=9t93NlA8lP36H+ sjkrhAqBp7Zj2RLqg3xVaX2BHrj2U=; h=Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To: X-Enigmail-Version:Content-Type:Content-Transfer-Encoding:Cc: Content-Type:Date:From:In-Reply-To:Message-ID:Mime-Version: References:To; z=Message-ID:=20<479833DE.9030104@infracaninophile. co.uk>|Date:=20Thu,=2024=20Jan=202008=2006:44:46=20+0000|From:=20Ma tthew=20Seaman=20|Organization:=20 Infracaninophile|User-Agent:=20Thunderbird=202.0.0.9=20(X11/2008012 2)|MIME-Version:=201.0|To:=20Anjang=20Aki=20 |CC:=20freebsd-questions@freebsd.org|Subject:=20Re:=20Out=20of=20ra nge=20IP=20address=20in=20/var/log/messages|References:=20=09<20080124033 734.GB12442@kobe.laptop>=20|In-Reply-To:=20|X-Enigmail-Version:=200.95.0|Content- Type:=20text/plain=3B=20charset=3DISO-8859-1|Content-Transfer-Encod ing:=207bit; b=pUXCu+iPXg/R6AiuAzwt9ypM+rMnEGNOXMlAtecbXTsX/1p1DlD1 P6oyI4grmkJzNXA2yhdp9udwdQQerEl7lrcJNErhskEs3tZKlXWuAI2KEbr1KMFpOVV ii+GeBdn7NF1zE+Pg47IS/EvO1EUpklAFBkG4qxQbI3zdknsmjBY= Message-ID: <479833DE.9030104@infracaninophile.co.uk> Date: Thu, 24 Jan 2008 06:44:46 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.9 (X11/20080122) MIME-Version: 1.0 To: Anjang Aki References: <20080124033734.GB12442@kobe.laptop> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Thu, 24 Jan 2008 06:44:47 +0000 (GMT) X-Virus-Scanned: ClamAV 0.92/5535/Thu Jan 24 04:39:26 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Out of range IP address in /var/log/messages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 06:44:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Anjang Aki wrote: > Thank you for your reply. > Here is ifconfig -a output: > > [root@freebsdsrv] ~ $ ifconfig -a > fxp0: flags=8843 mtu 1500 > options=b > inet 213.112.195.98 netmask 0xffffffe0 broadcast 213.112.195.127 > inet 213.112.194.34 netmask 0xffffffff broadcast 213.112.194.255 ^^^^^^^^^^ Here's the problem > inet 213.112.194.35 netmask 0xffffffff broadcast 213.112.194.255 > inet 213.112.194.36 netmask 0xffffffff broadcast 213.112.194.255 [...] > Usable IP range: 213.112.195.98 - 213.112.195.126 and 213.112.194.34 - > 213.112.194.62 You've actually got two disjoint network ranges here: % ipcalc 213.112.194.34/27 Address: 213.112.194.34 11010101.01110000.11000010.001 00010 Netmask: 255.255.255.224 = 27 11111111.11111111.11111111.111 00000 Wildcard: 0.0.0.31 00000000.00000000.00000000.000 11111 => Network: 213.112.194.32/27 11010101.01110000.11000010.001 00000 HostMin: 213.112.194.33 11010101.01110000.11000010.001 00001 HostMax: 213.112.194.62 11010101.01110000.11000010.001 11110 Broadcast: 213.112.194.63 11010101.01110000.11000010.001 11111 Hosts/Net: 30 Class C % ipcalc 213.112.195.98/27 Address: 213.112.195.98 11010101.01110000.11000011.011 00010 Netmask: 255.255.255.224 = 27 11111111.11111111.11111111.111 00000 Wildcard: 0.0.0.31 00000000.00000000.00000000.000 11111 => Network: 213.112.195.96/27 11010101.01110000.11000011.011 00000 HostMin: 213.112.195.97 11010101.01110000.11000011.011 00001 HostMax: 213.112.195.126 11010101.01110000.11000011.011 11110 Broadcast: 213.112.195.127 11010101.01110000.11000011.011 11111 Hosts/Net: 30 Class C The rule with setting up aliases on FreeBSD is that the first address used from any netblock must have the correct netmask for the whole block. Subsequent alias IPs from the same block typically use 0xffffffff as the netmask -- this certainly used to be mandatory but I think that requirement was actually dropped fairly recently. Anyhow, in order to fix your problem, change the netmask for the 194.34 address in your /etc/rc.conf: ifconfig_fxp0_alias0="inet 213.112.194.34 netmask 0xffffffe0" Note: you don't actually need to supply both netmask and broadcast -- broadcast will be calculated for you automatically. You can also give the netmask in 'slash notation' like so: ifconfig fxp0 inet 213.112.194.34/27 alias If this is configured correctly, then you should see routes for both 213.112.194.34/27 and 213.112.195.98/27 in the output of 'netstat -rn' Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHmDPe8Mjk52CukIwRCMe4AJsH64LMk3H3HCXCi4xXbo7gUIBuCACbBGbm I+qdHOSXJcNVHtq4OAbfg0M= =NiOh -----END PGP SIGNATURE-----