On Wednesday 21 July 2010 11:46:07 Dan McGhee wrote:
> On 07/21/2010 09:49 AM, Bruce Dubbs wrote:
> > Dan McGhee wrote:
> >> On 07/19/2010 03:44 PM, Bruce Dubbs wrote:
> >>> This is all discussed at 7.13. Configuring the network Script.
> >>>
> >>> A dhcp server does not interfere with a static ip address unless you
> >>> assign a static ip address *and* the dhcp server assigns the same
> >>> address.  Usually the dhcp server will have a range of addresses it
> >>> manages, say 192.168.1.10 - say 192.168.1.200.  If the netmask os
> >>> 255.255.255.0 (the default for 192.168.x.x), just make sure you *do*
> >>> use an address in the block (192.168.1.x in this case) and *do not* use
> >>> for x the network address 0, broadcast address 255, router address 1,
> >>> or other statically assigned addresses.
> >
> > The numbers you use are critical.  The form will get you up, but you
> > have to use addresses that are right for your ISP or home network.
>
> I dug out my router book and learned that without changing anything the
> first address it assigns to computers on my network is 192.168.1.100 in
> the range 100-253. I can get the other 98, it reserves 1, by using the
> on-line utility. So here is what is in my "ifconfig-wlan0/ipv4" file:
>
> ONBOOT=yes
> SERVICE=ipv4-static
> IP=192.168.1.100
> GATEWAY=192.168.1.1
> PREFIX=28
> BROADCAST=192.168.1.255
>
> I added 192.168.1.1 to /etc/resolv.conf
>
> I've been reading and just made these changes. Haven't tested them yet.
>
> My biggest conceptual error was that I thought all the static stuff got
> used only with an ISP and their stuff is all on the router. I've only a
> fuzzy understanding of terms like GATEWAY, NETMASK, BROADCAST. These are
> the things, and the ranges of numbers they use, I need to read up on.
> For example, I think my setup will work now, but if anything stops me it
> will be BROADCAST. At least that's what my guts are telling me.

If PREFIX is the number of bits in the 'network' part of the address, then it 
probably should be '24', which is how most routers are conig'ed by default. 
Also, if your router starts addressing at .100, you don't want to use that 
address statically; try '.99'.

In a nutshell:

BROADCAST: the highest possible address on the LAN.

NETMASK: the contiguous set of bits, left-to-right, that determine the network 
address of a LAN. The remaining bits, when combined with the network address, 
comprise the host address. Modern CIDR addresses make this a little easier to 
grok.

GATEWAY: a 'door' to a network of unknown topology. You have your LAN and you 
know how to reach everything on it. You have access to the internet, yet you 
don't know how reach any particular node on it. But you don't *need* to know; 
you simply send your packets to the gateway, because it knows how to reach 
the rest of the internet. It would be the same if you had a second router on 
your LAN separating your LAN from three other LANs in your house. That second 
router would be the gateway to those other LANs; it would receive packets 
destined for those other LANs. Your internet router is still the *default* 
gateway: the router that gets all packets your computer doesn't know where to 
send (has no route to the destination).

Say you want to use 192.168.10.0-192.168.10.255 on your LAN. That gives 3 
octets of network address and one octet of node address.
  - You can have up to 254 nodes on the LAN
  - The CIDR address of the LAN is 192.168.10.0/24
  - The netmask is 255.255.255.0
  - The broadcast address is 192.168.10.255 (host part is all ones)
  - Nodes on the LAN can use addresses .1-.254

Now tweak it a bit (literally). Say you want to use 
192.168.10.0-192.168.11.255 on your LAN.
  - You can have up to 510 nodes on the LAN
  - The CIDR address of the LAN is 192.168.10.0/23
  - The netmask is 255.255.254.0
  - The broadcast address is 192.168.11.255 (host part is all ones)
  - Nodes on the LAN can use addresses .10.1-.11.254
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to