Beruflich Dokumente
Kultur Dokumente
lessons learned
2005
DOSCH & AMAND Research GmbH & Co KG
V1.2
Perhaps one of the most important and well known protocols is Internet Protocol, or IP. IP gives us the ability to
uniquely identify each computer in a network or on the Internet. When a computer is connected to a network or
the Internet, it is assigned a unique IP address. If you're connecting to the Internet, chances are you're given an
IP automatically by your ISP. If you're connecting to a LAN, then you're either given the IP automatically or you
manually configure the workstation with an assigned IP.
If you really want to know how network communications work, it most important to fully understanding IP. DNS,
FTP, SNMP, SMTP, HTTP and a lot of other protocols and services rely heavily on IP in order to function
correctly, so you can immediately see that IP is more than just an address on your workstation.
IP Address
The above example shows an IP address in decimal notation, which we understand more easily. This IP address
(192.168.0.1) is then converted to Binary, which is what the computer understands. You can see how big the
number gets. It's easier for us to remember four different numbers than 32 zeros or ones.
Now we're going to look at how the conversion works between decimal and binary. This is an important step,
because you'll probably find yourself in need of such a conversion when dealing with complex subnets.
The picture below shows an IP address that we are going to convert to Binary. We are now going to convert the
first octet in the IP address 192.168.0.1 to Binary. In other words, we take the "192" and convert it to Binary.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
In our example, we used the 192. We needed bits 8 and 7 and this gave us the Binary number of 11000000,
which is 192 in decimal.
Using this method, you will convert decimal to Binary without the need for complex mathematical calculations.
Here again you can see that we needed to choose bits 8, 6 and 4 in order to get a decimal value of 168. So the
Binary value of 10101000 is equal to the decimal value of 168.
IP = Layer 3
On the other hand, the computer may be generating a packet to send to the network. Then, as the packet travels
down the OSI model and reaches the Network layer, the destination and source IP address of this packet are
added in the IP header.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
The IP header
Now we are going to analyze the Internet protocol header, so you can see the fields it has and where they are
placed. In here you will find the destination and source IP address field which is essential to every packet using
the protocol.
It's worth noting that the 9th field, which is the "Protocol" field, contains some important information that the
computer uses to find out where it must pass the datagram once it strips off the IP header.
TCP and UDP exist on Layer 4 of the OSI Model, which is the transport layer. When data arrives at a computer
and the packet is processed by each layer, it needs to know whereabouts above to pass the data. This protocol
field tells the computer to give the remaining data to either the TCP or UDP protocol, which is directly above it.
The destination IP address is another important field which contains the IP address of the destination machine.
A simple IP address is a lot more than just a number. It tells us the network
of which the workstation is part and the node ID.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
IP address classes and structure
When the IEEE committee sort out the range of numbers that were going to be used by all computers, they came
up with five different ranges or "classes" of IP addresses.
When someone applies for IP addresses they are given a certain range within a specific class depending on the
size of their network.
An IP address consists of 32 Bits, which means it's four Bytes long. The first octet (first eight bits or first byte) of
an IP address is enough for us to determine the class to which it belongs. And, depending on the class to which
the IP address belongs, we can determine which portion of the IP address is the network ID and which is the node
ID.
For example, the first octet of an IP address is "168," then, using the above table, you would notice that it falls
within the 128-191 range, which makes it a class B IP address.
The class A IP addresses were designed for large networks, class B for medium size networks and class C for
smaller networks.
Think of the network ID as the suburb you live in and the node ID as your street in that suburb. You can tell
exactly where someone is if you have their suburb and street name. In the same way, the network ID tells us to
which network a particular computer belongs and the node ID identifies that computer from all the rest that reside
in the same network.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
The picture below gives you a small example to help understanding the concept:
Explanation
The table above might seem
confusing at first but it's actually very
simple.
Therefore when calculating the "valid" hosts in a network we have to subtract "2". Therefore you can have a on
class A network 16.777.214 hosts and not 16.777.216.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Maximum possible hosts
Now, even though we have three classes of IP addresses that we can use, there are some IP addresses that
have been reserved for special use.
This doesn't mean you can't assign them to a workstation but in the case that you did, it would create serious
problems within your network.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
The following table shows the IP addresses that you should avoid using:
IP address Function
Refers to the default route. This route is to simplify routing tables used
Network 0.0.0.0 by IP.
Reserved for Loopback. The Address 127.0.0.1 is often used to refer
Network 127.0.0.0 to the local host. Using this Address, applications can address a local
host as if it were a remote host.
IP Address with all host bits set to "0" (Network Refers to the actual network itself. For example, network 192.168.0.0
Address) can be used to identify network 192.168. This type of notation is often
e.g. 192.168.0.0 used within routing tables.
IP Addresses with all node bits set to "1" are local network broadcast
IP Address with all node bits set to "1" (Subnet / addresses and must NOT be used.
Network Broadcast) Some examples: 125.255.255.255 (Class A), 190.30.255.255 (Class
e.g. 192.168.255.255 B), 203.31.218.255 (Class C). See "Multicasts" & "Broadcasts" for
more info.
IP Address with all bits set to "1" (Network The IP Address with all bits set to "1" is a broadcast address and must
Broadcast) NOT be used. These are destined for all nodes on a network, no
e.g. 255.255.255.255 matter what IP address they might have.
Subnets
Subnetting is one of my favorite subjects. It can be as simple as 1, 2, and 3 or as complex as trying to get free
tech support from Microsoft.
When we subnet a network, we basically split it into smaller networks. For example, when a set of IP addresses is
given to a company, the company might want to "break" (the correct term is "partition") that one network into
smaller ones, one for each department. This way, the technical department and management department can
each have a small network of their own. By subnetting the network, we can partition it to as many smaller
networks as we need.
This also helps reduce traffic and hides the complexity of the network.
By default, all type of classes (A, B and C) have a subnet mask; we call it the default subnet mask. You need to
have one because:
1) All computers need the subnet mask field filled when configuring IP
2) You need to set some logical boundaries in your network
3) You should at least enter the default subnet mask for the class you're using
Compared to IP classes, network IDs and host IDs, the subnet mask is what determines the network ID and host
ID portion of an IP address.
The table below shows clearly the subnet mask that applies for each network class.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
When dealing with subnet masks in the real world, we are free to use any type of subnet mask in order to meet
our needs. If, for example, we require one network which can contain up to 254 computers, then a class C
network with its default subnet mask will do fine. If we need more, then we might consider a class B network with
its default subnet mask.
Note that the default subnet masks have been set by the IEEE committee, the same guys that set and approve
the different standards and protocols.
Partitioning one network into smaller ones by using different subnet masks.
The picture below shows our example network (192.168.0.0). All computers here have been configured with the
default class C subnet mask (255.255.255.0):
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Default subnet masks of each class
Each class has its DEFAULT subnet mask, which we can change to suit our needs.
The picture below shows our three network classes with their respective default subnet masks:
This rule applies for all IP addresses that use the default subnet mask, so we call them classful IP addresses.
We can see in the picture below, where the IP address is analyzed in binary, because this is the way you should
work when dealing with subnet masks:
We are looking at an IP
address with its subnet mask
for the first time. What we have
done is take the decimal
subnet mask and converted it
to binary, along with the IP
address.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
NOTE:
All class C classful IP addresses have a 24 bit subnet mask (255.255.255.0)
All class B classful IP addresses have a 16 bit subnet mask (255.255.0.0)
All class A classful IP addresses have an 8 bit subnet mask (255.0.0.0)
On the other hand, the use of an IP address with a subnet mask other than the default results in the standard host
bits (the Bits used to identify the HOST ID) being divided in to two parts: a subnet ID and Host ID. These types of
IP addresses are called classless IP addresses.
In order to understand what a "classless IP address" is without getting confused, we are going to take the same
IP address as above, and make it a classless IP address by changing the default subnet mask:
Looking at the picture above you will now notice that we have a subnet ID, something that didn't exist before. As
the picture explains, we have borrowed three bits from the host ID and used them to create a subnet ID.
Effectively we partitioned our class C network into smaller networks.
Summary
In this page we saw the default subnet mask of each class and also introduced the classful and classless IP
addresses, which are a result of using various subnet masks.
When we use IP addresses with their default subnet masks, e.g. 192.168.0.10 is a class C IP address so the
default subnet mask would be 255.255.255.0, then these are "classful IP addresses."
On the other hand, classless IP addresses have their subnet mask modified in a way so that there is a "subnet
ID". This subnet ID is created by borrowing bits from the host ID portion.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Analysis of Subnets
We have already covered subnetting in some depth, but there is still much to learn. We are going to explain the
available subnet masks and analyze a class C network using a specific subnet mask. It's all pretty simple, as long
as you understand the logic behind it.
You cannot take any subnet mask you like and apply it to a computer or any other device, because depending on
the random subnet mask you choose, it will either create a lot of routing and communication problems, or it won't
be accepted at all by the device you're trying to configure.
For this reason, we'll look at the various subnet masks so you know exactly what you need to use, and how to use
it. Most important, we are going to make sure we understand why you need to choose specific subnet masks
depending on your needs.
255.0.0.0
0 (default mask) 255.255.0.0 (default_mask) 255.255.255.0 (default_mask)
(default_mask)
1 255.128.0.0 (default +1) 255.255.128.0 (default+1) 255.255.255.128 (default+1)
2 255.192.0.0 (default+2) 255.255.192.0 (default+2) 255.255.255.192 (default+2)
3 255.224.0.0 (default+3) 255.255.224.0 (default+3) 255.255.255.224 (default+3)
4 255.240.0.0 (default+4) 255.255.240.0 (default+4) 255.255.255.240 (default+4)
5 255.248.0.0 (default+5) 255.255.248.0 (default+5) 255.255.255.248 (default+5)
6 255.252.0.0 (default+6) 255.255.252.0 (default+6) 255.255.255.252 (default+6)
255.255.255.254 (default+7) *
7 255.254.0.0 (default+7) 255.255.254.0 (default+7)
Only 1 Host per subnet
255.255.255.255 (default+8) *
8 255.255.0.0 (default+8) 255.255.255.0 (default+8)
Reserved for Broadcasts
The trick to understanding the pattern of the above table is to think of it in the following way:
Each class has its default subnet mask, which I have noted using the green color, and all we are doing is
borrowing a bit at a time (starting from 1, all the way to 8) from the host ID portion of each class.
The various colors show the decimal numbers that we get each time we borrow a bit from the host ID portion
Each time we borrow a bit from the Host ID, we split the network into a different number of networks.
For example, when we borrowed three bits in the class C network, we ended up partitioning the network into eight
smaller networks.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
We are going to do an analysis using the class C network and three bits which we took from the host ID. The
analysis will take place once we convert our decimal numbers to binary, something that's essential for this type of
work. We will see how we get eight networks from such a configuration and their ranges.
Next we take the host ID portion, where the first available host is 0 0001 (1 in Decimal), because the 0 0000 (0 in
Decimal) value is reserved as it is the network address (see IP classes page), and the last value which is 1 1111
(31 in decimal) is used as a broadcast address for each subnet.
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Summing up, these are the ranges for each subnet in our new network:
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Testing between the subnets
NetWare 6 server
to 192.168.0.10 / 255.255.255.224
We need a router which will route packets from one network to the other. Let's have a look at the different ways
we can solve this problem:
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Method 1: Using a server with two network cards
Our first option is to use one of the servers, or a new Server which has at least two network cards installed. By
connecting each network card to one of our networks and configuring the network cards so that each one belongs
to one subnet/network we can route packets between them:
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de
Method 3: Installing a router
© 2005-2006 DOSCH&AMAND Research GmbH & Co.KG all datas subject to change
Moosacherstr. 56a D-80809 Munich GERMANY offer on request
Fax +49.89.3589.8519 Email info@da-research.de