CN 01
CN 01
CN 01
Fig. 1.1.
Fig. 1.1. Computer
Computer network
network
According to
According to the
the size,
size,computer
computernetworks
networkscan
canbebedivided
dividedinto:
into:
x Local Area Network – LAN;
• Local Area Network – LAN;
x Metropolitian Area Network – MAN, or regional;
• Metropolitian Area Network – MAN, or regional;
x Wide Area Network – WAN.
• Wide Area Network – WAN.
5
Local Area Network topologies
Bus topology is shown in Figure 1.2. Until the year 2000 it was
a widely applied local network topology type.
BusBus topology
topology advantages:
advantages:
low-cost
•Bus
x low-cost topology
cable cable system;
advantages:
system;
• hosts
x low-cost
x hosts can
cancable communi-
system;
communicate
x cate
hosts without
can
without additional switching additional
communicate de-
switching devices.
without additional switching de-
vices.
BusBus
vices. topology
topology disadvantag-
disadvantages:
es:x inBuscasetopology
of cable disadvantages:
failure, the Fig.
Fig. 1.2. Bus topology
1.2. Bus topology
•x in
in case
case of
of cable
cable
whole network is out of service; failure, the
failure, Fig. 1.2. Bus topology
whole the
x lownetwork whole
performance is network
out –ofonly is out
one of
service; service;
host at a time can send informa-
tion; •x low
low performance
performance –– only
only one
one host
host at
at aatime
timecancansend
sendinforma-
informa-
tion; tion;
x when connecting a new host to a network, it is necessary to
•x when
stop operationwhenof connecting
connecting
the network. aa new
new hosthost toto aa network,
network,ititisisnecessary
necessarytoto
stop stop
In operation operation
a networkofwith of
the network. the network.
a Star topology switch equipment (hub or
switch) is in the centre ofaathe
In
In a
a network
network with
with Star
Star topology
topology
network switch1.3).equipment
switch
(Fig. equipment (hub
The purpose oforor
(hub
switch) is
switch) devices
switching in the centre
is in theiscentre of
to transmit the network
of theinformation (Fig.
network (Fig. 1.3). The purpose
1.3).(switch)
to one or allofof
The purpose
switching
networkdevices
switching
(hub) hosts. is
devices is toto transmit
transmit information
informationtotoone one(switch)
(switch)ororallall
(hub)
(hub) network
Star network hosts.
topologyhosts. advantages:
Star topology advantages:
x in case of cableadvantages:
Star topology failure only one
•
host is xout in case
in case of cable
of cable
of service failure
andfailure
it does only
only one
notone
hostthe
affect host
is others;
out of is out of service
service and itand doesit does
not
affect
x host not affect
theconnection
others; the others;
to a network is
•x host
host connection
connection
simple, because the connection to toa network
aisnetwork
per- is
simple,
formed is simple,
because
only with the because
the connection the
switching isde-connec-
per-
formed
vice; tion
only is performed
with the only
switching with the Fig. 1.3. Star topology
de- Fig. 1.3. Star topology
vice;
x more switching
advanceddevice; switching devices can filter out the transmitted
•x more
data packets. moreadvanced
advancedswitching switching de- can filter out the transmitted
devices
data vices
Starpackets. can filter
topology disadvantages: out the transmitted data packets.
x theStarnetwork
Star topology
topology disadvantages:
disadvantages:
price is higher than the bus topology, because the
switching• the
x the network
network
device mustpriceprice
be isishigher
used; higherthanthanthe thebus
bustopology,
topology,because
becausethe
switching
x if the theswitching
switching
device must device
be used;
device must
is notbe used;
geographically in the centre of
x if the
the network, switching
a host device
connection canisbe
notexpensive
geographically in the centre of
and difficult;
the network, a host connection can be expensive and difficult;
x network performance and scalability depend on the switching
x network performance
device performance andport
and switching scalability
numbers;depend on the switching
device performance and switching port numbers;
• if the switching device is not geographically in the centre
of the network, a host connection can be expensive and dif-
ficult;
x in
• case
network of the switching and
performance device failure the
scalability network
depend on the becomes
switch-
unavailable. ing device performance and switching port numbers;
Existing
• in case networks
of the switching are device failure the network becomes
usually designed
unavailable. by the star
topology, the
Existing networks hierarchical
are usually designed by the star topology, the
connected hubs or switches,
hierarchical connected hubs or switches, located in network centres.
located inincasenetwork
Thex combination of the centres.
of severalThe
switching stardevice
topologyfailure the network
networks to one becomes
makes a
combination
unavailable. of
tree-like network topology. several star
topology networks
Existing
Network to oneinmakes
networks
topology whichare
ausually
tree-like network
designed topology.
by
the central switching unit (upper the star
Network
topology,
level of thetopology
the
hierarchy) in is which
hierarchical con- Fig. 1.4. Tree topology
the central
connected switching
hubs
nected to one or more second- orunit (upper
switches,
level
located
levelof switching
the hierarchy)
in network is and
centres.
devices connected
The
the to one or more second-level
switching
combination
latter with devices of and thedevices
several
a third-level latter
starwith a third-level devices etc. is
called
topologya Tree
etc. is called topology
networks (Fig.
to one
a Tree makes Advantages and disadvantages of
1.4).
topology
the tree 1.4).
a (Fig.
tree-liketopology
network aretopology.
Advantages adequate and dis-to the star topology’s advantages and
disadvantages.
Network oftopology
advantages the tree in which
topology
Fig. 1.4. Tree topology
the When
central all the hosts
switching
are adequate to the star topolo- on
unit the network are connected to the ring, the
(upper
network
level
gy’s of topology
the hierarchy)
advantages is called
and the Ring topology
is connected
disadvantages. to one or(Fig.more1.5). Data is
second-level
transmitted
switching sequentially
Whendevices all the andhosts from one
theonlatter host
withtoaanother,
the network usually
third-level
are connected tointhe
devices one di-is
etc.
ring,
rection.
called If the host
a Tree topology
the network detects
topology (Fig. its data,
is called it
1.4).the copies them
Advantages
Ring topology into its buffer.
and disadvantages
(Fig. 1.5). Data of
the Ring
tree topology
topology advantages:
are adequate
is transmitted sequentially from one to the star topology’s advantages and
x high
disadvantages.
host data transfer
to another, usually reliability – the
in one direc-
sender
tion. can
If thecontrol
When all
host the data
thedetects
hosts on acquisition
the
its data, network
it cop- are connected to the ring, the
because
network the
ies themtopology data must come
is called the Ring
into its buffer. back to topology (Fig. 1.5). Data is
him;
transmitted sequentially
Ring topology from one host to another, usually in one di-
advantages:
x not
rection. restrictions
• Ifhigh
the data for
host transfer the
detects its size
data,ofitthe
reliability – copies them into its buffer.
ring, there
Ringthe aresender
just the
topology distance
advantages:
can control the data restric-
tions between
x high thetransfer
data
acquisition hosts;becausereliability – the
the data
x greater
sender can reliability
control the
must come back to him; in
data comparison
acquisition
Fig. 1.5. Ring topology
with the star
because the and databus musttopology,
come in caseto
back
ofhim;
ring disruption in one place the connection remains.
Ring topology disadvantages:
x not restrictions for the size of the
ring, there are just the distance restric-
x data transfer time increases in proportion to the number of sta-
tions;• not restrictions for the size of the ring, there are just the dis-
x special
tance measures
restrictions arebetween
necessary the to ensure that the ring works in
hosts;
case of• the cablereliability
greater or host failure or whenwith
in comparison connecting a new
the star and bushost to the
topology,
ring. in case of ring disruption in one place the connection remains.
When all the host
Ring topology on the network are connected with each other
disadvantages:
in separate communication
• data transfer time increases lines, theinnetwork topology
proportion to theisnumber
called the
of
Mesh topology
stations; (Fig. 1.6). In practice, usually only partial mesh net-
work •topology
special is applied,are
measures where not alltobut
necessary a few
ensure thatparticularly rele-
the ring works
vant to the network
in case hosts
of the cableareorconnected
host failure byorseparate lines.
when connecting a new
Mesh topology
host to the ring.advantage:
ensures
xWhen all athereliable
host onand the fast data
network
transfer – upon failure
are connected with each other in sepa- of one
communication
rate communication line lines,
the data can be
the network
transmitted through others
topology is called the Mesh topology com-
munication
(Fig. 1.6). In lines.
practice, usually only par-
Mesh topology
tial mesh network topology disadvantages:
is applied,
x it is not cost-effective,
where not all but a few particularly because it
requires a large amount of
relevant to the network hosts are con- connections
on each by
nected host;
separate lines. Fig. 1.6. Mesh topology
applied
xMesh only toadvantage:
topology a small networks.
• ensures a reliable and fast data transfer – upon failure of one
Cables used at Local Area
communication line Networks
the data can be transmitted through oth-
Cables that are used for
ers communication lines. computer networks are standardized.
Standards describe and evaluate
Mesh topology disadvantages: a number of parameters, such as
signal• suppression, active resistance,
it is not cost-effective, becauseimpedances,
it requires the capacity
a large of the
amount of
electromagnetic field surrounding
connections on each host; the wire strength and so on.
The following
• applied cable
only to a standards are presently used:
small networks.
x American EIA/TIA-568A;
x International
Cables used at LocalISO/EIC11801;
Area Networks
European
xCables EN50173.
that are used for computer networks are standardized.
There are
Standards three main
describe groups ofacables:
and evaluate number of parameters, such as
a) Coaxial cable:
signal suppression, active resistance, impedances, the capacity of
x thin;
the electromagnetic field surrounding the wire strength and so on.
9
The following cable standards are presently used:
• American EIA/TIA-568A;
• International ISO/EIC11801;
• European EN50173.
There are three main groups of cables:
a) Coaxial cable:
• thin;
• thick.
b) Twisted pair cable:
• Unshielded Twisted Pair – UTP;
• Shielded Twisted Pair – STP;
x • thick.
Foiled Twisted Pair – FTP.
b)c) twisted
Fiber pair
opticcable:
cable:
x • Unshielded
Single Mode Twisted
FiberPair – UTP;
– SMF;
x • Shielded Twisted Pair
Multi Mode Fiber – MMF. – STP;
x Foiled
Coaxial cable. Twisted Pair –the
The thicker FTP.
cable and the better the shield-
c) Fiber optic cable:
ing, the less attenuated the signal. Cables with reduced attenuation
are more Single for
x suitable Mode Fiber
large – SMF; speeds with low class equip-
transmission
x Multi Mode Fiber
ment, and under the same conditions – MMF. can transmit a signal over a
Coaxial
greater cable. The thicker the cable and the better the shielding,
distance.
the less attenuated
Base of the cable the signal. Cableswire
is a copper with
in reduced
the centerattenuation are
of the cable,
more
and suitable
a metal formesh large transmission
separated speeds with
by a dielectric low class
insulator – the equip-
shield
ment, and
(Fig. 1.7). under the same
conditions canpair
Twisted transmit
cables.a sig-
The
nalsimplest
over a greater distance.
twisted pair is two
Base wires
copper of thetwisted
cable is witha
copper wire in the
each other and separated center of
thewith
cable, and a metal
a dielectric. mesh
This allows
separated by a dielectric
reducing electromagnetic insu-
in- Fig. 1.7. Coaxial cable
Fig. 1.7. Coaxial cable
lator – the shield
teraction (Fig. twisted
of several 1.7). nearby pairs. Twisted pair can be used
forTwisted
both analogpair andcables. The
digital simplest
data twisted pair is two copper
transmission.
wires twisted
Unshielded withtwisted
each other
pair and separated
cable consistswith a dielectric.
of pairs This
of insulated
allows reducing electromagnetic interaction of several
conductors twisted together. One conductor of the pair is called a twisted nearby
pairs. Twisted pair can be used for both analog and digital data
transmission. 10
Unshielded twisted pair cable consists of pairs of insulated con-
ductors twisted together. One conductor of the pair is called a Ring
(in coloured marking – one-coloured), the other a Tip (two-
Ring (in coloured marking – one-coloured), the other a Tip (two-
coloured). All pairs are also numbered Ring1, Tip1, Ring2, Tip2,
etc. Pairs have their numbers in accordance with colour marking:
Blue/White – 1 pair, Orange/White – 2 pair, Green/White – 3 pair,
Brown/White – 4 pair.
In the environment with very strong electromagnetic fields it is
recommended to use a shielded twisted-pair cable.
This type of cable can have two types of shields: foil and metal
mesh. Foil is used more frequently due to smaller weight and price.
Shield of this cable must be grounded.
Shielded twisted pair (STP) cable each twisted pair is shield-
ed (Fig. 1.8), while in Foiled Twisted Pair (FTP) type of cable the
shield is the same to all twisted pairs (Fig. 1.9).
For laying the cable outside a twisted pair cable with special
double insulation is used. If the cable is installed between two build-
ings (runs above the ground), it is convenient to use a special cable
with steel messenger (Fig. 1.10).
11
For final connection (e.g. between the wall socket and the
computer) more flexible patch cable with stranded wires is used
(Fig. 1.11).
Dielectric
Outer jacket strengthening
material Fiber core
Coating
Cladding
12
Signal, which travels via a cable, is reflected from the cladding.
According to the refractive index and the core width, the cables are
divided into:
13
Twisted pair cable categories
Twisted pair cables are divided into the following categories:
• Category 1 – a telephone cable, which transmits voice, not
suitable for data transmission. Maximum transmitted signal
frequency 1 MHz;
• Category 2 – a cable that can transmit data up to 4 Mbps rate
and is composed of four twisted pairs;
• Category 3 – a cable capable of transmitting a signal up to
10 Mbps. Used in networks, operating in accordance with an
Ethernet 10Base-T technology standard. Maximum transmit-
ted signal frequency – 16 MHz;
• Category 4 – a cable that can transmit data up to 16 Mbps
and consists of four twisted pairs. Used in Token Ring net-
works. Maximum transmitted signal frequency – 20 MHz;
• Category 5 – a cable that can transmit data up to 100 Mbps
and consists of four twisted pairs. Used in networks, oper-
ating in Ethernet 100Base-TX standard technology, as well
as other network technologies such as ATM, Token Ring,
100Base-T, 10Base-T. Maximum transmitted signal frequen-
cy – 100 MHz. Cables in this category are: UTP, FTP, STP
types;
• Category 5e (the letter “e” means ‘enhanced’) – this cable is
suitable for 1000Base-T. Can be shielded or unshielded.
The twisting degree of twisted pairs varies depending on the
category. The higher the category, the higher twisting degree.
Twisted pair cable categories are defined in EIA/TIA 568 A and
EIA/TIA 568 B standards.
Category 5e, UTP cable. Its cross-section is shown in
Figure 1.13.
14
2
Fig. 1.13. Category 5e, UTP cable and its cross-section: 1 – jacket,
2 – solid twisted pair
Fig. 1.14. Category 5e, FTP cable and its cross-section: 1 – jacket,
2 – shield foil, 3 – solid twisted pair, 4 – drain wire, 5 – rip-cord
Fig. 1.15. Category 5e, S/FTP cable and its cross-section: 1 – jacket,
2 – shield-braid, 3 – drain wire, 4 – shield foil, 5 – stranded twisted pair
15
• Category 6 – a cable that can transmit data up to 600 Mbps.
Used in networks, operating in Ethernet 1000Base-T standard
technology, as well as other network technologies such as
10BaseT Ethernet, 100BaseTX Fast Ethernet, 1000BaseTX,
155 MBit ATM, 622 MBit ATM, 1.2 GBit ATM. Category 6,
UTP cable and its cross-section is shown in Figure 1.16.
Fig. 1.16. Category 6, UTP cable and its cross-section: 1 – jacket, 2 – sol-
id twisted pair, 3 – spacer
16
Twisted-pair cables are connected to network devices using
various types of connectors. Modular connectors Modular Jacks
(sockets) and Modular Plugs are the most common in connections
of 1, 2, 3 and 4 pairs of category 3–6 cables. Plugs are better known
as RJ-11 (4 wires) or RJ-45 (8 wires). The correct name of this type
of network sockets is Jack Modular 8P8C, of plugs – Modular Plug
8P8C, here 8P indicates a link connector (8 positions) and 8C the
number of contacts used (in this case 8). For telephone cables it
is used in 6P4C (6 positions, 4-pin) configuration. Other markings,
e.g., P-6-4 – six-positions 4-pin plug, PS-8-8 – eight positions 8-pin
shielded plug are also known. 6-position plugs can be plugged into
sockets of 8 positions but not vice versa.
Structure of sockets of the fifth and higher categories and meth-
od of wiring connection differ from the sockets of category 3. Here
the socket is mounted on a printed board on which S110 or Krone
type contacts are attached. In addition, reactive elements are printed
on the board combining reactive impedances. These elements help to
reduce signal reflections from contacts in high-speed (100 Mbps or
more) networks. Various types of sockets are shown in Figure 1.18.
a) b)
c) d)
a) b)
18
Switches can not be connected in a ring topology. That means
there can be no more than one route, unless the switch supports STP
(Spanning Tree Protocol), which selects the best routes and uses
them, and if their termination occurs, it selects other paths thus in-
creasing the reliability of the network.
Some of the switches are able to process packets header infor-
mation transmitted by the network layer. Those types of switches are
called third level. They add flexibility in managing network traffic
and have full or partial routing capabilities.
Switches, according to their use in a network, can be divided
into access (end users are connected to them, they have a lot of ports,
user filtering capabilities), transport (they are involved in transmit-
ting large data streams and should be very fast) and core (used in
Internet supplier network core and data centers, must be very fast
and reliable).
A Router is a device that connects computer networks and per-
forms data routing function, i.e. formation of network route maps
and tables. A router is a device that connects networks or subnets to
a local area network. So if the network is continuous and there are
no subnets, the router is a device after which the network adminis-
trator’s control and responsibility ends. In this case, the router is a
gateway through which all local network computers indicated by the
default route reach other networks (mostly internet). Router routes,
indicating how to access other networks may be set by the adminis-
trator (static routing table entries) or by a dynamic router protocol
(then the routing table entries are formed automatically according to
the routing protocol algorithm). The router is usually implemented
as a separate unit, although a personal computer with two network
cards can also do its functions. The router shows its functionality
when used in global networks.
The router is an OSI model network (3rd) layer device that di-
rects IP packets to a designated route according to the IP address.
Network firewall functions can be realized inside a router. In home
28
networks routers with integrated switches (Small Office/Home
Office – SOHO) are widely used.
Converter allows connecting two different transmission media.
Recently optical transmitters became widespread and popular, which
allow attaching an optical fiber to a copper twisted pair. Converters
can be autonomous, realized in a separate enclosure (Fig. 2.1a) or
modular, realized as, for example, a Gigabit Interface Converter –
GBIC (Fig. 2.1b).
a) b)
29
depends on the type of interface (for example, 100 Mbps). Simple
network cards use CPU resources, while more advanced may have
additional features (for example, hardware encryption).
Network card has an assigned manufacturer’s hardware MAC
address, which can be changed by the card driver.
30
OSI seven layer model describes general principles of data trans-
mission in a network. Protocols and interfaces are used to describe
the interconnection of software and hardware elements. Protocol – a
set of rules of interconnection between objects of a single layer, de-
scribing formats of data transferred between objects.
The most frequently used protocol stack in computer networks
is TCP/IP.
The TCP/IP model is based on the TCP/IP stack. The compari-
son of this model and OSI model is presented in Figure 3.3. The
main difference – number of layers. The TCP/IP model has 4 layers.
The application layer corresponds to the 3 upper layers of the OSI
model, and the data link – two lower layers of the OSI model, other
layers are the same. Note: different number of TCP/IP stack layers
is given in various sources: 4 or 5 layers. The literature which indi-
cates that the TCP/IP stack has 4 layers, the data link and the physi-
cal layers of the OSI model are usually merged into one, and in case
of 5 layers, the data link and the physical layer are separated.
ARP (Address Resolution Protocol) is designed to link the ad-
dress of the network adapter (Media Access Control – MAC) with
the IP address.
TCP/IP Stack
main protocols TCP/IP model OSI model
Application layer
HTTP, FTP,
Application layer Presentation layer
SMTP, POP
Session layer
39
IP (Internet Protocol) is designed for sending packets and rout-
ing them between networks.
ICMP (Internet Control Message Protocol) is designed to send
packet transmission error reports.
TCP (Transmission Control Protocol) is connection oriented.
This protocol is used by applications which need acknowledgement
of data reception.
UDP (User Datagram Protocol) does not guarantee transmis-
sion of packets. This protocol is widely applied for multimedia pro-
cesses, such as IP telephony, real time video conferencing, etc.
HTTP, FTP, SMTP, POP protocols ensure user access to net-
work resources.
IP addressing
Computers and routers on the network are identified by IP ad-
dresses. An IP address consists of two logical parts – network number
and a host number. The first is the same for all host of the network.
The second is unique (inside a given network) and is designated to
a specific network host.
IP protocol version 4 (IPv4) IP address consists of 32 bits,
therefore a total of 232 = 4 294 967 296 IP addresses is possible. As
the popularity of the Internet has grown it turned out that 32 bit ad-
dresses are not sufficient, thus the new internet protocol version 6
(IPv6) assigns 128 bits to an IP address, that is 2128 = 3.403·1038 ad-
dresses. Since IPv6 protocol version is not yet widely implemented
we will examine the IPv4 version protocol. In this protocol the 32
bit IP address is separated into four 8-bit long fields – octets (1 byte),
where each of them can have a decimal number from 0 to 255. IP
addresses can be written in several ways:
40
The first method was chosen for simplicity – the bytes of the IP
address are written by four decimal numbers, separated by the dots.
IP address classes
All IP addresses are divided into several categories called the ad-
dress classes. An IP address class indicates which part of the address
is designated to the network number, and which – to the hostnumber.
Five IP address classes are distinguished: A, B, C, D, E. IP address
class is indicated by the leading bits of the first byte (Fig. 3.4).
32 bits
byte
3 24 23 6 5 8 7 0
Class E Reserved
41
Class B addresses are assigned to large and medium size net-
works. Binary number 10 is written in the two leading bits of the IP
address. The following 14 bits indicate the network number, while
the remaining 16 bits (2 bytes) indicate the host number. This permits
214 = 16 384 networks each consisting of 216 – 2 = 65 534 hosts.
Class C addresses are used in small networks. Binary number
110 is written in the three leading bits of the IP address. The follow-
ing 21 bits indicate the network number, while the remaining 8 bits
(1 byte) indicate the host number. This way more than 2 million
(221 = 2 097 152) networks can exist, each with 254 (28 – 2 = 254)
hosts.
Class D addresses are used for group addressing. Binary number
1110 is written in the four leading bits of the IP address. D class ad-
dresses are from 224.0.0.0 to 239.255.255.255. Such IP addresses
make up logical groups of computers, their nodes can belong to
separate networks. D class has several special purpose addresses:
224.0.0.1 means all systems in a given subnet, 225.0.0.2 means all
routers in a given subnet. Group addresses are usually used when
simultaneously sending audio or video data for many users.
Class E addresses are reserved and used for experimental needs.
In this case four leading bits of the IP address equal 11112.
Internet users are assigned A, B and C class IP addresses.
42
The address of the web server of a Vilnius Gediminas Technical
The address of the web server of a Vilnius Gediminas Technical
University website is this: 158.129.192.20. This address belongs to
University website is this: 158.129.192.20. This address belongs to
Class B, it is the 49 172 computer on the network 7809:
Class B, it is the 49 172 computer on the network 7809:
Class Network number Host number
Some
SomeIPIPaddresses
addresseshave
havespecial
specialpurpose
purpose and
and cannot be assigned
cannot be assigned
totoa aspecific
specific network host. These addresses are listed in Table3.2.
network host. These addresses are listed in Table 3.2.
Table
Table3.2.
3.2.Special
Specialpurpose
purposeIPIPaddresses
addresses
IP address
IP address Description
Description
255.255.255.255
255.255.255.255 Broadcast address
Broadcast addressonon a given network
a given network
<network>.0.0.0
<network>.0.0.0 Class A network
Class A network IP IP
address
address
<network>.255.255.255 Broadcast
<network>.255.255.255 Broadcast address
address on on a class
a class A network
A network
<network>.0.0
<network>.0.0 Class B network IP
Class B network IP address address
<network>.255.255
<network>.255.255 Broadcast
Broadcast address
address onon a class
a class B network
B network
<network>.0
<network>.0 Class C network IP
Class C network IP address address
<network>.255 Broadcast address on a class C network
<network>.255 Broadcast address on a class C network
127.<any>/8 Internal host loopback address
127.<any>/8 Internal host loopback address
0.0.0.0 Refers to the default network
0.0.0.0 Refers to the default network
The number of computers, service stations, routers and other
The number
network devices of computers,increasing
is constantly service stations, routersit and
and currently other
is signifi-
network devices is constantly increasing and currently it
cantly larger than the number of possible IP addresses. Thus a ques- is signifi-
cantly larger how
tion arises: than can
the all
number
these of possible
devices IP addresses.
be connected Thus
to the a ques-
Internet if
tion
the number of IP addresses is limited? For this purpose each of theif
arises: how can all these devices be connected to the Internet
the
IPnumber
addressof IP addresses
classes allocateisa limited? For this
certain range purpose
of IP each assigned
addresses, of the IP
address
for private networks (Table 3.3). These addresses can be assignedfor
classes allocate a certain range of IP addresses, assigned at
private networks own
administrator’s (Table 3.3). These
discretion. addresses
The same canIPbe
private assignedcan
addresses at
administrator’s own discretion. The same private IP addresses
be used on different private networks. Thus it becomes possible to can be
used on different private networks. Thus it becomes possible to cre-
42
43
create a large number of private networks that are connected into a
single network using IP addresses allocated to public networks.
44
mined according to the values of the leading bits. However, when
using the A, B and C classes according to their description, the al-
location of IP addresses is ineffective, because there are no real net-
works which would require A (more than 16 million node addresses)
or B (over 65 thousand) class addresses. Therefore another method
is used, which permits identification of which part of the IP address
is used for network identification, and which – for host identifica-
tion. A subnet mask is used for this purpose.
A subnet mask is a 32 bit number, used in pair with an IP ad-
dress and is necessary to identify the network and host numbers.
In binary form bits which designate the network number will equal
1, and bits which designate the host number will equal 0. Typical
masks corresponding to A, B and C class networks are presented in
Table 3.4.
46
sending a packet the IP addresses of the recipient and the sender are
logically multiplied by the subnet mask. If the result corresponds,
then the sender and the recipient are on the same network. Otherwise
the packet is sent to the router of the network on which the sender
is located.
Benefits of using masks:
• restructuring of the local network without changing the out-
er network configuration. The network can be divided into
smaller parts using the same external IP address;
• minimisation of network load. Usage of masks allows mini-
misation of network load by limiting sending of broadcast
packets;
• simpler administration. A network divided into smaller parts
is easier to maintain;
• better security. Usage of masks allows the organisation to
separate local networks to which connection from external
networks could be forbidden.
47
Subnet 1
92.68.0.0 Subnet
Host number on the 92.68.0.
subnet Host addresses
Subnet number
...
...
on the subnet
C class network 92.68.0.26
92.68.0.27 Broadcast address for subnet
92.68.0.0 000000 00000 000000 00000000
255.255.255.28 10000000 Subnet 2
92.68.0.28 Subnet 2
Subnet mask bit borrowed (2 = 2
possible subnets)
92.68.0.29
Host addresses
...
...
on the subnet 2
92.68.0.254
92.68.0.255 Broadcast address for subnet 2
Fig.
Fig.3.7.
3.7.CCclass
classnetwork
network192.168.10.0
192.168.10.0division
divisioninto
intotwo
twosubnets
subnets
Before dividing
Before dividing a network into into subnets
subnets ititisisnecessary
necessarytotodeter-
deter-
mine:
mine:
thenumber
x• the numberofofplanned
plannednetwork
networksegments;
segments;
thenumber
x• the numberof of hosthost addresses
addresses in of
in each eachthe of the segments.
segments. Consid-
Considering the possibilities for network
ering the possibilities for network expansion it is recommended expansion it is rec-to
ommended
leave unused to leave
addresses unused
in each addresses
of the in each of the segments.
segments.
When
When the the number of networks
networks and hosts that
and hosts thatthey
theycontain
containisis
known aa subnet mask is determined,
known determined, as as well
wellasasnumbers
numbersofofeach
eachofof
the subnets and the subnet host address
the subnets and the subnet host address range. range.
The subnet
The subnet mask can be be found
foundaccording
accordingtotothe thealgorithm
algorithmbelow:
below:
1. 1.
TheThe number of necessary segments N is subtracted
number of necessary segments N is subtracted by by one (N –
one
(N – 1) and the received value is changed into binary format.
2. 2.
TheThe number
number of bits of this
of bits binary
of this binaryvalue
valueis calculated.
is calculated.
3. 3.
TheseThese bitsbits
areare
replaced
replaced byby 1’s1’s
and
andthethevalue
valueisissupplemented
supplemented
by 0’s to the right side to receive 1 byte. The resulting binary binary
by 0’s to the right side to receive 1 byte. The resulting number
number
is changed is changed
into a decimalinto a decimal value.
value.
Example for
Example for Class
Class C:
C:
Numberofofnecessary
Number necessary subnets
subnets N
N 77
N–1 6
N–1 6
Binary value 110 (3 bits)
Binary value 110 (3 bits)
Change into 1’s and additions
Change 11100000
to forminto 1’s and additions
a byte 11100000
toMask
formexpression
a byte 111111111 11111111 11111111 11100000
Mask expression
Decimal value 111111111
255 . 11111111
255 . 11111111
255 . 11100000
224
Decimal value 255 . 255 . 255 . 224
48
47
Irrelevant of whether the network will have to be divided
into 5, 6, 7 or 8 subnets, a network mask dividing a network into
8 subnets will have to be used anyway, because the number of
possible subnets equals 2n (21 = 2, 22 = 4, 23 = 8, 24 = 16, …, where
n is the number of bits allocated for a subnet). When dividing a
network into 10 subnets a network mask dividing a network into
16 subnets will have to be used.
Below is a change table for dividing class A, B and C networks
into subnets when the network mask uses 1 to 8 bits. More than
8 bits can be used for the subnet mask of classes A and B.
49
Class C
Number of Number of hosts
Borrowed bits Subnet Mask
subnets per subnet
2 1 255.255.255.128 126
4 2 255.255.255.192 62
8 3 255.255.255.224 30
16 4 255.255.255.240 14
32 5 255.255.255.248 6
64 6 255.255.255.252 2
128 7 255.255.255.254 2*
– 8 – –
* may be used only for point-to-point link between two hosts.
P = 28–z, (3.1)
50
1. We use formula (3.1) to find the network increment P: P = 28–2 =
26 = 64;
2. Beginning with the first subnet number and by adding the subnet
increment, possible subnet numbers are sequentially written:
0 192.168.1.0
+64
=64 192.168.1.64
+64
=128 192.168.1.128
+64
=192 192.168.1.192
192.168.1.0 Subnet 1
192.168.1.1 First host address in subnet 1
…
192.168.1.62 Last host address in subnet 1
192.168.1.63 Broadcast address for subnet 1
192.168.1.64 Subnet 2
192.168.1.65 First host address in subnet 2
…
192.168.1.126 Last host address in subnet 2
192.168.1.127 Broadcast address for subnet 2
192.168.1.128 Subnet 3
192.168.1.129 First host address in subnet 3
…
192.168.1.190 Last host address in subnet 3
192.168.1.191 Broadcast address for subnet 3
51
192.168.1.192 Subnet 4
192.168.1.193 First host address in subnet 4
…
192.168.1.254 Last host address in subnet 4
192.168.1.255 Broadcast address for subnet 4
52