[CVALE] Question about Linux Networking Basics: Adding a Computer

Matt R Hall mhall at mhcomputing.net
Fri Jun 1 01:29:35 PDT 2007


On 5/31/07, Gaijin <gaijin at clearwire.net> wrote:
> Landon Blake wrote:
> >  What changes do I need to
> > make to the Compaq so it can function in its new role?
>
> DNS services.  You'll have to bone up on network addressing of subnets. and
> then you'll be able to properly assign IP numbers to each system in your
> home network.  I'm sure there's a howto on the subject.  Wish I could help
> more with that, even if only to show you where to look.  Samba is

> be it, IIRC.  Knowing how to assign net addresses is the hard part, as the
> numbers you use depends on the size of your network.  Gotta binary
> calculator handy?  I forget the util in Linux that can do the math, but I
> remember there is one.  Maybe someone else here knows?
>
>                 Michael

Hey Michael,

I liked your mail so I am trying to pay it forward and contribute to
the thread-- hope this helps. The canonical document on private IP
addressing is called RFC 1918, Address Allocation for Private
Internets and you can locate it here.

http://www.faqs.org/rfcs/rfc1918.html

The classic home network address range is 192.168.0.1-254 with the
router / gateway on 192.168.0.1. The network mask is 255.255.255.0
which means the network number is the first three numbers (192.168.0)
and the hosts are the last number (0-254 with 0 saved as the network's
number and 255 saved for broadcast). Next most popular is
192.168.1.1-254 with the other stuff the same.

Unless you have a good reason to set it up differently I really
recommend those because... why break convention without a good reason?
Just introduces confusion and complexity, right? :-)

Landon,

I don't really remember how you decided to share your internet
connection (little Linksys-type router box or some IP Forwarding on a
Linux box), but if you went with the router box you can tweak the DHCP
settings to leave room for static IPs for your servers so they don't
change around and/or conflict with other systems.

If you did some kind of Linux-based IP Forwarding deal then I
recommend going with simple static IPs there as well. Why add the
headache of DHCP when you just have a couple of computers doing simple
stuff, right?

On Debian boxes the classic file to edit for setting this stuff up is
/etc/network/interfaces and the manual page is just man interfaces to
figure out what to put in there. Here is some example stuff from my
file, with a DHCP address enabled and a commented-out static address
ready to go when I need it.

auto lo eth0
iface lo inet loopback

iface eth0 inet dhcp
#iface eth0 inet static
#    address 192.168.0.10
#    netmask 255.255.255.0
#    gateway 192.168.0.1

HTH,
Matt



More information about the cvale mailing list