On Sun 05 Oct 2008 09:42:28 NZDT +1300, David Lowe wrote:

> I've just installed a two-way satellite modem (because I live way out in the
> styx and can't get anything else). It includes a DHCP server which I decided
> to start using;

In my experience, DHCP servers in consumer modems are extremely cr*ppy.
Assigning IP addresses based on MAC address is not a function they
understand - you seem to have an exception. If you're in any way more
serious I'd recommend to still use an appropriate firewall, which is
more secure (trust your consumer grade electronic junk gimmick?) and
also has decent software on it (including a proper DHCP server).

But your problem here is understanding how IP address spaces work. Your
solution is to put the right numbers in.

> My problem is that the DHCP server hands out addresses in the range
> 192.168.5.11/254.

That's nonsense. If it does in fact do that, it's useless, if you put
those numbers in, fix it.

192.168.5.11/254 means 254 significant bits from the left of the number
192.168.5.11. Oops, that number is only 32 bits wide. Because the
smallest and largest number made up from the range not included in the
width after the / is reserved when specifying subnets, the number after
the slash can be at most 30, giving you 2 usable IP addresses. Do
yourself a favour and use at least a /24, you get 254 addresses. With
192.168.x.x you can immediately see that you can't go bigger than /16.

> It's Ethernet interface is 192.168.5.100/255.255.255.0.
> But I want to leave my server with a static address of 192.168.1.201

Whatever the reasons, all interfaces which are in the same subnet must
be in the same subnet, so to speak, or you need a router between the
subnets. You don't have a router, you want 192.168.5.x and 192.168.1.x
to be in the same subnet, therefore you have to make the subnet big
enough to include both those addresses.

The program ipcalc is really nifty for this sort for calculation. (No
your head maths won't be good enough, mine isn't either.) Unfortuantely
it doesn't create a subnet from 2 IPs, but you can make the mask smaller
(= the subnet bigger) until it fits both.

ipcalc 192.168.1.1/23   => not big enough

the on you want:

ipcalc 192.168.1.1/21
Address:   192.168.1.1          11000000.10101000.00000 001.00000001
Netmask:   255.255.248.0 = 21   11111111.11111111.11111 000.00000000
Wildcard:  0.0.7.255            00000000.00000000.00000 111.11111111
=>
Network:   192.168.0.0/21       11000000.10101000.00000 000.00000000
HostMin:   192.168.0.1          11000000.10101000.00000 000.00000001
HostMax:   192.168.7.254        11000000.10101000.00000 111.11111110
Broadcast: 192.168.7.255        11000000.10101000.00000 111.11111111
Hosts/Net: 2046                  Class C, Private Internet

Note that it also tells you the network and broadcast addresses you
have to use.

The IP address range configured for your dynamic DHCP allocation also
has to be within this range, as do all the static DHCP addresses, and
none of the static ones can be inside the dynamic range. With 2046
addresses you should have enough for a home LAN...

Volker

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to