Hardware Reference
In-Depth Information
Addressing
Every device on the network must have a unique address. There are two current forms of addressing, IPv4 and IPv6.
IPv4 was the original form of describing addresses by means of a dotted quad, such as 89.16.172.66, and is used by
virtually every machine and home device on the planet. IPv6 was introduced in 1998 by the Internet Engineering Task
Force to overcome the various problems with IPv4, such as address exhaustion. However, its adoption is less than
widespread, and many of the small, home-oriented devices do not use it, so I'll be concentrating on IPv4.
For a machine to have an address, it must be given one, either by a human or by a suitably configured computer.
It cannot randomly generate one in case the address conflicts with another machine on the network or is one of the
reserved addresses, such as 127.0.0.1. All the networked machines in the home should exist within a specific range
of addresses, known as a subnet , and should be assigned to one of the private address ranges provided by the IPv4
specification. This not only stops conflicts with other existing sites on the Internet but also ensures the data within
these networks is secure and invisible to machines outside the network, because all routers, switches, and gateways
do not recommunicate any traffic with a private address range outside the local network. These private address ranges
are 10.x.x.x, 9 172.16-31.x.x, and 192.168.x.x, where x can mean any value between 0 and 255. For the purposes of
demonstration, I will assign my subnet to the 192.168.1.x range, giving me 254 10 possible devices on the network. Most
people use this for private networks because nearly all the routers sold for the home allocate addresses within this
range. Also, most questions found on the various Internet forums will probably have answers detailed using the same
addresses as you have.
Now knowing the address range of your network, you have to consider the individual addresses. The first one to
assign is the router, which usually earns the 192.168.1.1 designation, 11 followed by the Linux server, which I will assign
192.168.1.2.
N
Caution
Configuring properties such as IP addresses requires you to be logged in as root, so tread carefully!
You can provide a Linux machine a static address either by using the tools in your desktop GUI or by configuring
the /etc/network/interfaces file directly:
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.0.0
broadcast 192.168.1.255
network 192.168.1.0
This tells the system to use the network card assigned as eth1 12 for the static IPv4 address 192.168.1.2, with all the
standard parameters.
9OUMIGHTALSOSEETHISLISTEDASWITHTHEINDICATINGTHATTHEFIRSTOFBINARYDIGITSWITHINTHEADDRESSAREFIXED
RESULTINGINARANGEOFOVERMILLIONADDRESSESBETWEENTHROUGH3IMILARLYYOUMIGHTALSOSEETHE
FOLLOWINGINUSEPROVIDINGARANGEOFOVERMILLIONADDRESSESBETWEENTHROUGHAND
PROVIDINGARANGEOFADDRESSESBETWEENTHROUGH
4HEREARETWOADDRESSESRESERVEDFORTHESUBNETANDBROADCASTTHUSREDUCINGTHETOTALNUMBERFROMTO
3OMEROUTERSCANNOTBECONFIGUREDAWAYFROMSOITÈ€SBESTTOAVOIDUSINGTHISNUMBERFORANYTHINGELSE
$ETERMINEWHETHERTHISISETHORETHBYEITHERCHECKINGTHEOUTPUTOF dmesg | grep eth ORADDINGTHEALIAS eth1 mynetcarddevice
TO /etc/modules
 
Search WWH ::




Custom Search