Hardware Reference
In-Depth Information
For Ubuntu Linux, click the System menu, then
Preferences
→
Network Connections. You'll see a list of
network interfaces. Click Edit to see their details.
encoded in its
subnet mask
. You may have encountered a
subnet mask when configuring your personal computer.
A typical subnet mask looks like this:
255.255.255.0
.
Figure 3-4 shows the network connection settings for Mac
OS X and Windows. No matter what platform you're on,
the hardware address and the Internet address will take
these forms:
You can read the number of machines in the subnet
by reading the value of the last octets of the subnet
mask. It's easiest if you think of the subnet in terms of
bits. Four bytes is 32 bits. Each bit you subtract from
the subnet increases the number of machines it can
support. Basically, you “subtract” the subnet mask
from its maximum value of 255.255.255.255 to get the
number of machines. For example, if the subnet were
255.255.255.255, there could be only one machine in the
subnet: the router itself. If the last octet is 0, as it is above,
there can be up to 255 machines in the subnet in addition
to the router. A subnet of 255.255.255.192 would support
63 machines and the router (255 - 192 = 64), and so
forth. There are a few other reserved addresses, so the real
numbers are a bit lower. Table 3-1 shows a few other repre-
sentative values to give you an idea.
• The
hardware address
is made up of six numbers
written in hexadecimal notation, like this:
00:11:24:9b:f3:70
• The
IP address
is made up of four numbers written in
decimal notation, like this:
192.168.1.20
You'll need to know the IP address to send and receive
messages, and you'll need to know the hardware address
in order to get an IP address on some networks. So,
whenever you begin working on a new project, note both
addresses for every device you're using.
Street, City, State, Country: How
IP Addresses Are Structured
Table 3-1.
The relationship between subnet mask and maximum
number of machines on
a network.
Maximum number of machines on
the subnet, including the router
(accounting for reserved addresses)
Geographic addresses can be broken down into layers of
detail, starting with the most specific (the street address)
and moving to the most general (the country). Internet
Protocol (IP) addresses are also multilayered. The most
specific part is the final number, which tells you the
address of the computer itself. The numbers that precede
this tell you the
subnet
that the computer is on. Your
router shares the same subnet as your computer, and its
number is usually identical except for the last number. The
numbers of an IP address are called
octets
, and each octet
is like a section of a geographic address. For example,
imagine a machine with this number:
217.123.152.20
. The
router that this machine is attached to most likely has this
address:
217.123.152.1
.
Subnet mask
255.255.255.255
1 (just the router)
255.255.255.192
62
255.255.255.0
254
255.255.252.0
1022
255.255.0.0
65,534
Knowing the way IP addresses are constructed helps you
to manage the flow of messages you send and receive.
Normally, all of this is handled for you by the software you
use: browsers, email clients, and so forth. But when you're
building your own networked objects, it's necessary to
know at least this much about the IP addressing scheme
so you can find your router and what's beyond it.
Each octet can range from 0-255, and some numbers are
reserved by convention for special purposes. For example,
the router is often the address
xxx.xxx.xxx.1
. The subnet
can be expressed as an address range, for example,
217.123.152.xxx
. Sometimes a router manages a larger
subnet or even a group of subnets, each with its own local
router. The router that this router is connected to might
have the address
217.123.1.1
.
Numbers into Names
You're probably thinking this is ridiculous because you
only know Internet addresses by their names, like
www.
makezine.com
or
www.archive.net
. You never deal with
numerical addresses, nor do you want to. There's a
Each router controls access for a defined number of
machines below it. The number of machines it controls is