Date: Thu, 24 Jan 2008 06:44:46 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Anjang Aki <mailman.msc@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Out of range IP address in /var/log/messages Message-ID: <479833DE.9030104@infracaninophile.co.uk> In-Reply-To: <bcd996c30801232010t94f4872t37bf305fe2c4c3b0@mail.gmail.com> References: <bcd996c30801231932w785ff54ds7a48f755e6426798@mail.gmail.com> <20080124033734.GB12442@kobe.laptop> <bcd996c30801232010t94f4872t37bf305fe2c4c3b0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > options=b<RXCSUM,TXCSUM,VLAN_MTU> > 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?479833DE.9030104>