Re: Virtual Addresses on new server
On Sat, Aug 19, 2000 at 01:45:35AM -0500, R. W. Rodolico wrote:
> I have five IP's with my DSL (very, very small ISP). On my current server,
> I have all five working. However, when setting up a new server, two of the
> five are not visible.
> My range is 18.104.22.168 - 125, with 126 being the gateway. This is
> defined as the last three bits of the range, ie 0111 1xxx. I have set up a
> netmask of .248 (1111 1000), and a broadcast of various values ranging from
> .7 ( 0000 0111), .127 (0111 1111), .135 (1000 0111).
> The addresses that work are 121-123 (0111 1001 - 0111 1011), ie I only get
> in trouble when the third bit is set (goes to 1).
> Any ideas? Obviously, I do not understand broadcast values as I have been
> playing around with them a lot (I also used .255 once). From what I've seen
> and read, I really don't think that is the problem, though.
> All these addresses work just fine on the old box ( 2.0.38 kernel ). I am
> having problems with potato ( 2.2.17 kernel) I have set ipchains to accept
> I am attaching /etc/network/interfaces from the new box, and
> /etc/init.d/setvirtual from the old one. Note that the latter is something
> I kludged together.
> Any help would be appreciated.
iface eth1 inet static
Your 'network' is wrong. It should be 22.214.171.124.
Now, the way these numbers work:
IP number: 216. 62. 82.121
Netmask: 255.255.255.248 (binary 'and')
Network: 216. 62. 82.120
That means that only the 'leftmost' bits are considered. Draw it out in
binary (at least the last octet) and you'll see the magic.
The broadcast (at least on modern systems -- there was a period of
confusion in the olden days where broadcast was sometimes the "all 0's"
host instead of the "all 1's") is the network with the "host" portion of
the address set to 1's.
To see the broadcast, invert the netmask to: 0.0.0.7 in this case (ie,
the 0's become 1's) and do a binary 'or' with either the network
(computed above) or a the host... ie, set the proper number of 'low'
bits to 1.
Yes, thinking in binary helps. :)