[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Reibl rc files enclosed



On Fri, 25 Jun 1999 19:47:02 +0300 (EEST), Martin-Eric Racine wrote:

> > Regarding routing: you are routing the whole network that is defined by your
> > netmask. If the Class C network you are using (eg. 10.0.0.*) falls in a
> > Class A block or not does not matter - you are using a network using a 24/8
> > bit netmask, and you are routing all of that - no computer uses the
> > knowledge that this used to be a class A block for routing purposes.
> 
> Say again?   I re-read it twice, but I still don't get it.

An IP-Adress consists (as you perhabs know) of 32 Bits. These 32 Bits
are divided into the Network-Adress and the Machine-Adress. With the
Netmask you can set the amount of Bits that are used for identifying
the network (The amount of "1"-Bits without holes from the left).
For e.g. a Netmask of 255.255.255.0 means:

11111111 11111111 11111111 00000000 

(24 bits for the Network, 8 bits for the Machine)

When your TT wants to sent an IP-Package to another Machine he has
to use some rules to deliver this package. These Rules are written
down in the routing table.
Normally your machine is only able to reach Machines which have the
same Network-ID like your own one (this Network-ID is a part of
your IP-Adress, and the Netmask controls which part of your IP-Adress
it is).
For e.g.: You have an Interface with an IP of "10.1.1.1" and an Netmask
of "255.255.255.0". Then you can only reach machines with IP-Adresses
that start with "10.1.1" because the netmask says that the first 24 Bits
(or 3 Bytes) belong to the network.
To reach Machines that do not belong to your own network you have to
use a "gateway", a machine that knows how to reach other networks.
This gateway must be reachable in your network (at least one Network-Interface
has to have an IP of your network).
To tell your machine that it has to use this gateway you use special
routes.
The most common case is that you simply route every unknown IP-Package
to a default-gateway.

You would do this by using the following command:

"route add default <interface-name> gw <ip of gateway>"

If there is more than one gateway the routes are more complicated:

#Reach Subnet 10.1.2 via Gateway 10.1.1.200
route add 10.1.2.0 rle0 gw 10.1.1.200

the 3 class-Blocks A, B and C are used in an administrative manner:
Networks where only one Byte is used for the Network-Adress are called
"Class A" and usually have IPs lower than 127.0.0.0 (I believe).
"Class B" uses 2 Bytes for the Network and goes from 128.0.0.0 (I believe)
          to somewhere around 172.x (I don't know the exakt numbers out
          of my head)
"Class C" (guess what) usually uses 3 Bytes for the Network and goes up to
          the upper limit of the IP-Space.
          
However, as Michael pointed out correctly you are absolutely free to
alter the netmask and divide up your network in as many segments as you
want.

Greetings,
           Bernd