1 |
On Monday 20 December 2010 09:37:48 Dale wrote: |
2 |
|
3 |
> I set it up like this. The modem uses DHCP to get the IP from AT&T. |
4 |
> My local IP from the modem is 192.168.1.2. Then the router has the |
5 |
> IP 192.168.2.1 for my connection to the puter. The IP of my puter |
6 |
> is 192.168.2.5. The next puter will be 192.168.2.6 or something |
7 |
> different anyway. |
8 |
|
9 |
The one thing you didn't mention there is the outer address of your |
10 |
router. It needs to be 192.168.1.x where x is anything other than 2. It |
11 |
needs to be on the same network segment as the inner side of your modem. |
12 |
|
13 |
> I need to read up on the netmask thing some more. It's still murky |
14 |
> for sure. |
15 |
|
16 |
(What follows has grown rather long. I hope it doesn't come over too |
17 |
much as a lecture.) |
18 |
|
19 |
It's fairly straightforward once you get the hang of it. The address of |
20 |
a device is a 64-bit number, expressed as four 16-bit numbers joined |
21 |
with dots. It's just easier to read when split into chunks, but it is |
22 |
really a 64-bit number. As in decimal arithmetic, the right-hand digit |
23 |
is the least significant. |
24 |
|
25 |
An interface address consists of two parts: the leftmost part defines a |
26 |
group of addresses (the network part) and the rightmost part specifies |
27 |
the number of the interface in that group (the host part). The function |
28 |
of the network mask is to specify where the boundary is between the |
29 |
network part and the host part. |
30 |
|
31 |
Two conventions are used for expressing where that boundary is: the |
32 |
older method is to write, say, 255.255.255.0, which indicates that the |
33 |
first 24 bits (three eight-bit numbers - 255 is all-ones in eight bits) |
34 |
belong to the network and anything to the right of those can be |
35 |
allocated to interfaces in that network. That convention dates from the |
36 |
era of plenty of IP addresses in the world and goes along with Class A, |
37 |
B, C or D. A class A network has a mask of 255.0.0.0, class B has |
38 |
255.255.0.0, class C has 255.255.255.0 and a class D (never used in the |
39 |
wild as far as I know) would have 255.255.255.255. |
40 |
|
41 |
Since the meteoric growth of the Internet this class scheme has become a |
42 |
handicap, and a finer division of network scope has become necessary, to |
43 |
allow use of, say, 255.255.255.248 as a net mask. Rather than specifying |
44 |
a plethora of new classes (we'd need anything up to 60), a shorthand |
45 |
notation has been invented in which we just append a number to an |
46 |
address to specify the number of bits that identify the network, with |
47 |
the rest identifying the host on it (strictly speaking, a host's |
48 |
interface on the network, as a host may have more than one interface - |
49 |
sometimes even on the same network). This scheme is known as CIDR |
50 |
notation. Thus your modem's inner address is, I assume, 192.168.1.2/24, |
51 |
which is the same as writing 192.168.1.2 with a mask of 255.255.255.0. |
52 |
|
53 |
That mask 255.255.255.248 I mentioned specifies 29 bits for the network |
54 |
address and three for the hosts on it; that's enough for six computers |
55 |
once the ..0 and ..7 addresses are reserved for network address and |
56 |
broadcast address. A lot of ISPs use such a scheme for allocating |
57 |
address ranges to their customers. |
58 |
|
59 |
> How's it look? Think it will work for a while? |
60 |
|
61 |
Once you've set your router's outer address correctly, yes. |
62 |
|
63 |
Sorry I was asleep overnight and had to leave you to the tender mercies |
64 |
of your compatriots. :-) |
65 |
|
66 |
Again, apologies if I've seemed to want to teach my grandmother to suck |
67 |
eggs. |
68 |
|
69 |
-- |
70 |
Rgds |
71 |
Peter. Linux Counter 5290, 1994-04-23. |