hostname="machine1.mydomain.com"
defaultrouter="some ip here"
ifconfig_em0="inet 1.1.1.2 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 1.1.1.3 netmask 255.255.255.255"
ifconfig_em0_alias1="inet 1.1.1.4 netmask 255.255.255.255"
...
ifconfig_em0_alias2="inet 2.2.2.3 netmask 255.255.255.0"
ifconfig_em0_alias3="inet 2.2.2.4 netmask 255.255.255.255"
ifconfig_em0_alias4="inet 2.2.2.5 netmask 255.255.255.255"
...
ifconfig_em0_alias5="inet 3.3.3.4 netmask 255.255.255.0"
ifconfig_em0_alias6="inet 3.3.3.5 netmask 255.255.255.255"
ifconfig_em0_alias7="inet 3.3.3.6 netmask 255.255.255.255"
...
Sever 2:
hostname="machine2.mydomain.com"
defaultrouter="some ip here"
ifconfig_em0="inet 1.1.1.5 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 1.1.1.6 netmask 255.255.255.255"
ifconfig_em0_alias1="inet 1.1.1.7 netmask 255.255.255.255"
...
ifconfig_em0_alias2="inet 2.2.2.6 netmask 255.255.255.0"
ifconfig_em0_alias3="inet 2.2.2.7 netmask 255.255.255.255"
ifconfig_em0_alias4="inet 2.2.2.8 netmask 255.255.255.255"
...
ifconfig_em0_alias5="inet 3.3.3.7 netmask 255.255.255.0"
ifconfig_em0_alias6="inet 3.3.3.8 netmask 255.255.255.255"
ifconfig_em0_alias7="inet 3.3.3.9 netmask 255.255.255.255"
...
Sever 2:
hostname="machine3.mydomain.com"
defaultrouter="some ip here"
ifconfig_em0="inet 1.1.1.8 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 1.1.1.9 netmask 255.255.255.255"
ifconfig_em0_alias1="inet 1.1.1.10 netmask 255.255.255.255"
...
ifconfig_em0_alias2="inet 2.2.2.9 netmask 255.255.255.0"
ifconfig_em0_alias3="inet 2.2.2.10 netmask 255.255.255.255"
ifconfig_em0_alias4="inet 2.2.2.11 netmask 255.255.255.255"
...
ifconfig_em0_alias5="inet 3.3.3.10 netmask 255.255.255.0"
ifconfig_em0_alias6="inet 3.3.3.11 netmask 255.255.255.255"
ifconfig_em0_alias7="inet 3.3.3.12 netmask 255.255.255.255"
...
Server 3, 4 and 5 similar with repeating patterns.
So the original question was: When setting up an IP from any given
block,
do, or should I, need to use the real netmask that my ISP has
assinged me
(for the first), then, the single host (255) netmask for each of the
rest
(Again, from a specific IP block?
I hope it is because I have hundreds of IPs set up that way.
The reason I ask this question (again) is because I have one IP that
does
not want to work using the above paradigm. That is to say, that it IS
the
only IP from a specific block, on a particular machine, and it won't
take
using the real netmask, it will only work using the 255 netmask.
Sincerly,
-Confused
(Grant).
----- Original Message ----- From: "John Oxley" <[EMAIL PROTECTED]>
To: "Grant Peel" <[EMAIL PROTECTED]>
Cc: <freebsd-questions@freebsd.org>
Sent: Thursday, September 15, 2005 7:55 AM
Subject: Re: IPs , Netmasks and Broadcast.
> On Wed, Sep 14, 2005 at 12:00:12PM -0400, Grant Peel wrote:
>> Now I am really confused.
> First of all install ipcalc NOW.
>
>> Up until this morning I thought I had a good handle on when I need
to >> use
>> the real Netmask and Broadcast.
>>
>> For example, If I have 3 servers, and my upline asigns me a block
of >> 128
>> addresses, for the first ip used (from this block) on each server, I
>> would
>> need to specify the IP, true netmask and a broadcase. Then, when
using
>> more
>> IPs from that block, I would use a 255.255.255.255 netmask and a
>> broadcast
>> equal to the IP.
>
> No, a 255.255.255.255 netmask specifies a single host. If your ISP has
> given you 128 IPs, that is a /25 or netmask 255.255.255.128 as shown :
> [EMAIL PROTECTED]:~$ ipcalc 192.168.254.0/25
> Address: 192.168.254.0 11000000.10101000.11111110.0 0000000
> Netmask: 255.255.255.128 = 25 11111111.11111111.11111111.1 0000000
> Wildcard: 0.0.0.127 00000000.00000000.00000000.0 1111111
> =>
> Network: 192.168.254.0/25 11000000.10101000.11111110.0 0000000
> HostMin: 192.168.254.1 11000000.10101000.11111110.0 0000001
> HostMax: 192.168.254.126 11000000.10101000.11111110.0 1111110
> Broadcast: 192.168.254.127 11000000.10101000.11111110.0 1111111
> Hosts/Net: 126 Class C, Private Internet
>
> So all your machines would have the same network and broadcast, and
you
> would make them all use your gateway box as the default route.
>
> As you can see, a 255.255.255.255 netmask (/32) is only one host:
> [EMAIL PROTECTED]:~$ ipcalc 192.168.254.34/32
> Address: 192.168.254.34 11000000.10101000.11111110.00100010
> Netmask: 255.255.255.255 = 32 11111111.11111111.11111111.11111111
> Wildcard: 0.0.0.0 00000000.00000000.00000000.00000000
> =>
> Hostroute: 192.168.254.34 11000000.10101000.11111110.00100010
> Hosts/Net: 1 Class C, Private Internet
>
>
> What you need to do is use IP calc to see what the network and >
broadcast
> are and set those, although on FreeBSD 4.X (I think anyway, someone
> correct me if I am wrong) you can just put in your /etc/rc.conf
> ifconfig_bge0="inet 192.168.254.32/25"
> or
> ifconfig_bge0="inet 192.168.254.32 netmask 255.255.255.128"
>
> And FreeBSD will work out the network and broadcast for you.
>
>> Today, I was in this exact position where I was tring to add an (the
>> first
>> one one THAT machine, from that block) IP from a block that is almost
>> completely used up on another server, and the one I was adding it to
>> would
>> not take it. When I tried adding it with a 255.255.255.255
netmask, >> and a
>> broadcast eaqual to the amount of IPs from that block - it worked.
>
> Like I said before, there is only 1 IP in a /32 block, and the >
broadcast
> will be either a.b.c.127 or a.b.c.255 depending whether you have the
> first or second subnet inside that class C.
>
> Hope this helps
>
> -John
>
>
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"[EMAIL PROTECTED]"