Professional Documents
Culture Documents
Detail
Detail
Networking Basics
1 Introduction
1.1 What is a Computer Network . . . . . . . . . . . . . . . . . .
1.2 Advantages of a Network . . . . . . . . . . . . . . . . . . . . .
1.3 Components of a Network . . . . . . . . . . . . . . . . . . . .
5
5
6
6
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9
9
9
10
10
10
10
11
12
12
13
14
3 OSI
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
15
16
16
17
17
18
18
18
19
Reference Model
Introduction . . . . . . . . .
Physical Layer . . . . . . . .
Data Link layer . . . . . . .
Network Layer . . . . . . . .
Transport Layer . . . . . . .
Session Layer . . . . . . . .
Presentation Layer . . . . .
Application Layer . . . . . .
Data Transfer in OSI Model
.
.
.
.
.
.
.
.
.
1
.
.
.
.
.
.
.
.
.
CONTENTS
4 TCP/IP Networking
4.1 TCP/IP Reference Model . . . . .
4.1.1 Host to Network Layer . . .
4.1.2 Network/Internet Layer . .
4.1.3 Transport Layer . . . . . . .
4.1.4 Application Layer . . . . . .
4.2 Ethernet . . . . . . . . . . . . . . .
4.2.1 Access Method . . . . . . .
4.2.2 Addressing . . . . . . . . . .
4.2.3 10/100BaseT . . . . . . . .
4.3 IP Addressing . . . . . . . . . . . .
4.4 Network Mask and Subnetworking .
II
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Building a LAN
5 Building a LAN
5.1 Nodes/Clients . . . . .
5.2 LAN Architecture . . .
5.3 Hub, Switch or Router
5.4 Structured Cabling . .
5.5 Straight & Cross Cable
21
21
22
22
22
22
23
23
24
24
25
25
29
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
31
32
32
32
33
34
Part I
Networking Basics
Chapter 1
Introduction
At the end of this chapter, you will be able to explain what a computer network is and elaborate its constituents.
Before we delve deep into the subject of networking, let us first try to
understand what computer networking is? Why do we need it?
When two or more computers are connected in such a way that they
are able to share their resources, we get a computer network. The most
important aspect is the ability to share resources.These may be hardware or
software resources. Hardware resources include processor, printers, modems,
harddisks etc. Sofware resources include softwares on network, files etc.
Introduction
Do we need a computer network? Well, it is a moot question. But there
is no doubt that the world over is moving more and more towards computer networking. Today everything is done by computers and networking of
computers help people make sense of the volumes of data generated. I feel,
having a computer network and its proper utilisation increases productivity
and brings about transparency in working. We increase our efficiency. In all,
a computer network is an essential part of our day to day working.
1.1
A computer network may be defined in various ways. One approach is to consider the network to be simply the physical network. The physical network
consists of all internal switching nodes, their inteconnecting links and the
links leading to externally connected devices. The external devices themselves, computers and terminals collectively referred to as Data Terminal
5
CHAPTER 1. INTRODUCTION
Equipment (DTE), are then considered as attached to, rather than forming
Defining a com- part of, the physical network.
puter network.
A wider view of the network may be that of the network including the
physical network attached with all DTE along with all the services available
on it, including those available on the attached DTE. At times, these services
are also referred to as networking services.
A common misconception is that a computer network is a network in
which the DTEs are computers. Well, it is half true. A computer network
may consist of DTE that are not computer. But today, almost all the DTEs,
if not a computer,are based on or controlled by a computer. In this sense
the misconception seems to be correct. The network services may be built
into the nodes of the network or may be provided by a DTE attached to the
network.
1.2
Advantages of a Network
1.3
Components of a Network
NICs Network interface cards are the hardware that every computer should
have to enable networking on them.
Shared Resources A network is used to share resources like printers etc.
Hence, these obviously form a part of the network.
CHAPTER 1. INTRODUCTION
Chapter 2
Basics of Computer Networking
At the end of this chapter you will be able to
elaborate and differentiate the different categories of LAN.
list and explain the variour network topologies.
2.1
Categories of Networks
The computer networks are mostly divided into three categories. They have
different characterestics that are enumerated below.
2.1.1
LAN
10
2.1.2
MAN
Metropolitan
area network.
2.1.3
WAN
2.2
Network Topology
2.2.1
Mesh
t
@
@
t
@
@
@
@
@
@t
11
Charaterestics
Every device is connected to every other device with a dedicated link.
n(n 1)/2 physical channels to link n devices are required.
Hence, every device must have (n 1) IO ports.
Advantages
No traffic problems i.e. congestions, as a dedicated link is available for
every communication path.
Robust. Even if one of the link is down, the network is not.
Disadvantages
Large amount of cabling.
Each device must have (n 1) IO ports, making it difficult to expand.
Usually, this topology is implemented in a limited way for the backbone
of a network connecting routers.2
2.2.2
Star
Hub
J
J
Jt
12
Characterestics
Each device is connected to a central controller.
Only n links are required for n devices.
Only one IO port is required in each device.
Advantages
Less expensive as less cable is required.
Robust. If a link fails only that device connected to it is affected.
Easy to add more devices to the network.
2.2.3
Tree
S
S
t t t t t t t t t
Characterestics
This topology makes available the opportunity to span the network for large
distances. The central hub is usually a active hub.3
All the three topologies that were discussed above are point-to-point
topologies.
2.2.4
Bus
Almost all the hubs that we get in the market today are active.
13
t
2.2.5
Ring
t
@
@
@
@
@t
t
@
@
@
@
@t
Chracterestics
It has dedicated point-to-point links with two adjacent devices.
Each device should have two IO ports.
Signal passes in only one direction. Each device thus has a transmit
link and a receive link.
14
Advantages
Easily reconfigurable.
Fault isolation is easy.
Disadvantages
To add a device, the network has to be stopped.
Unidirectional signals mean that their might be a dedicated link between two devices and yet no communication between them.
A typical situation is depicted below.
t
J A
J
B
JC
t
Jt
@
2.2.6
Hybrid
Chapter 3
OSI Reference Model
At the end of this chapter you will be able to
list the seven layers of the OSI reference model.
explain the functionality of these seven layesr.
The OSI (Open System Architecture) specifies a model for designing and understanding a network architecture that is flexible robust and interoperable.
3.1
Introduction
The OSI model specifies that the networks architecture can be viewed as
consisting of seven layers. These layers define a specific type of task and thus
group them. Each layer provides services to the layer above and take services The seven layers.
from the layer below. The layer taking services need not bother about the
way the lower layer functions but can assume that it is taking/communicating
to its equivalent on the destination/remote device.
The seven layers defined by OSI model are
1. Physical layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
15
16
3.2
Physical Layer
Line Configuration It answers how two devices are linked together? Whether
link is shared or not? Whether line is available or not?
Data Transmission mode It is here that the data transmission mode is
defined. Should it be one way, two way or alternate?
Topology In this category, the topology of the network/LAN is decided.
Should it be star, mesh, bus, hybrid etc?
Signals Here, the type of signals to be used for transmitting information is
defined. Digital or analog?
Encoding How are bits encoded for transmission?
Iterface The information that must be shared between two closely linked
devices to enable and facilitate communication is specified here.
Medium Here, the physical medium for the transmission of data is specified.
3.3
Data link layer.
17
Error handling Data Link layer protocols provide for data recovery, usually by having the entire frame retransmitted.
Synchronization The synchronization between the receiver is handeled by
this layer. It adds headers as well as trailers to indicate the start and
end of a frame.
3.4
Network Layer
3.5
Transport Layer
End to End Message Delivery This layer is responsible for end to end
delivery of the whole message1 . This layer ensures that the whole mes- The
sage arrives intact and in order, overseeing both error control and flow layer.
control.
Service Point (port) Addressing It is this layer that guarantees message
delivery to the appropriate application on a computer. We generally
use many windows of IE2 to browse the internet. This layer ensures
that the messages/information goes to the correct window.
1
The network layer does a packet delivery and not a message delivery. A message
consists of many packets.
2
Internet Explorer
transport
18
3.6
The
layer.
Session Layer
3.7
Presentation Layer
3.8
Application Layer
This layer enables the user (computer or human) to use the network. It
provides user interfaces and support for services like EMail, ftp, telnet etc.
The application It also provides the user with a network virtual terminal. It provides file
layer.
access, transfer, and management over a network as well.
3.9
19
The data is generated by the user of the network. it is passed to the Application layer. This layer prefixes the data with its header and passes it to Data transfer.
the next layer i.e. the Presentation layer. For the presenatation layer, the
original data with the application layer header, is the data to be transmitted.
It does not know about the header that the Application layer adds to it. It
adds its own header to the data received and passes it on to the next layer.
The Data Link layer adds headers as well as trailers. The whole think is then
transmitted by the Physical layer.
At the receiving end, the data is passed from the Physical layer to Application layer. All the layers strips their headers before passing the data to
the higher layer. Thus the user at the receiving end gets the original data
that was transmitted.
Sender
Receiver
Data
Application
SH
Session
Transport
Data
Presentation
Data
TH
NH
Network
Physical
Application
PH
Presentation
Data Link
AH Data
DH
Session
Transport
Data
Data
Data
Network
DT
Bits
?
Data Link
Physical
-
20
Chapter 4
TCP/IP Networking
At the end of this chapter you will be able to
list and explain the four layers of TCP/IP reference model.
enymerate and explain the various ethernet categories.
explain ethernet access method viz. (CSMA/CD).
do IP addressing and plan subnetworks.
4.1
The OSI reference model was defined after we already had the Internet. The
Internet uses a protocol suite called TCP/IP. The OSI model draws many
things from it. In fact, there are no implementation that is 100% compliant
with OSI reference model. Internet is the most widely used and accepted
network of networks and it uses TCP/IP. Hence it is worthwhile to see the
networking model that it uses. TCP/IP reference model has only four layers.
1. Host to Network Layer
2. Network/Internet Layer
3. Transport Layer
4. Application Layer
21
22
4.1.1
Host to network The TCP/IP reference model does not speak about this layer. Different
layer.
vendors may use different technologies to achieve the functionality of this
layer.
4.1.2
Network/Internet Layer
This layer permits hosts to inject packets into any network and have them
Internet/network travel independently to the destnation. They may even arrive in different
layer.
order than they were sent, in which case it is the job of higer layers to
rearrange them, if in-order delivery is required.
Internet layer officially defines a packet format and protocol (IP). This
layer then has the main function of packet routing and congestion control.
4.1.3
Transport layer.
Transmission
control protocol.
Transport Layer
It defines two end to end delivery protocol viz. TCP1 and UDP.2
TCP TCP is a reliable connection oriented protocol that allows a byte
stream originating on one machine to be delivered without error on any
other machine in the Internet. It fragments the incoming byte stream
into discrete messages and passes each one to the Internet Layer. At
the destination, the receiving TCP/IP process reassembles the received
messages into the output stream. TCP also handles the flow control
to make sure a fast sender cannot swamp a slow receiver with more
messages than it can handle.
4.1.4
Application
layer.
Application Layer
This layer is on top of Transport layer and takes its services. It contains
all high level protocols as telnet, ftp, Mail services etc. It is responsible for
1
2
4.2. ETHERNET
23
4.2
Ethernet
4.2.1
Cable
Thick coax
Thin coax
Twisted pair
Twisted pair
Fible Optic
Max. Seg
500m
200m
100m
100m
2000m
Nodes/seg.
100
30
1024
1024
1024
Speed
10MBPS
10MBPS
10MBPS
100MBPS
10Mbps
Advantages
Good for backbones
Cheapest system
Easy Maintainenace
High speed
Between Building
Access Method
24
wishing to transmit is first required to listen for existing traffic on the line.
A device listens by checking for voltage on the line. If no voltage is detected,
the line is considered idle and transmission is initiated. This mechnism cuts
down the number of collision but does not eliminate them as it may happen
that two devices initiated a listen at the same time.
And finally, collision detection was added. In CSMA/CD the device wishing to transmit, first listens to make sure that the link is idle. It then transmit
data and then listens again. If it finds an extermely high voltage that indicates a collision, it waits for a random amount of time and then repeats the
transmission cycle again.
4.2.2
MAC address.
Each device on the Ethernet network has its own network interface card(NIC).
The NIC is provided with a six bytes address that is unique to it. No two NIC
in the world will have the same address. While purchasing NIC, the Ethernet standard should be mentioned. We mostly use the 10BaseT or 100BaseT
Ethernet. Nowadays, NICs supporting 10/100BaseT6 . These are avilable in
the market and hence is the right choice. It ensures that no communicaton
disruption occurs because of old NICs, yet delivering maximum performance
of the new hardware.
4.2.3
10/100BaseT.
Addressing
10/100BaseT
They support both 10BaseT and 100baseT standards and are autosensing at times.
Unshielded twisted pair
4.3. IP ADDRESSING
4.3
25
IP Addressing
The IP address consists of four bytes (32 bits), defining three fields: classtype, netid, and hostid. These four bytes are represented by the dotted
decimal representation. Thus an IP address like 00001010 00000000 00000000 IP addressing.
00000001 is represented as 10.0.0.1.
00001010
| {z } 00000000
| {z } 00000000
| {z } 00000001
| {z }
10
To accomodate a vast number of addresses required for global interconnectivity, the class type field varies in length. There are currently five different
classes.
Class Name
A
B
C
D
E
description
The first bit of the address is zero.
The first bit of the address is one and the second bit is zero.
The first two bits of the address are one and the third bit is zero.
The first three bits of the address are one and the fourth bit is zero.
The first four bits of the address are one and the fifth bit is zero.
Currently class A and B are full. Addresses are only available in class C.
Class D is reserved for mutlicast addresses. Multicast allows copies of a
datagram to be passed to a select group of hosts rather that to an individual
host. Class E addresses are reserved for future use.
The distribution for the network ID bits and host ID bits for different
classes of network are shown below.
Class A
Class B
{z
HOST ID
{z
}|
N ET ID
{z
HOST ID
4.4
}|
Class C
{z
N ET ID
{z
N ET ID
}|
{z
HOST ID
The limitation that the network bits are fixed for different classes of network
became a liability when the Internet boom took place in 1996. We faced the
problem of not enough Internet address as compared to the demands.Thus
26
11010010110101001101100110000111
11010010
| {z } 11011001
| {z } 10000000
| {z }
| {z } 11010100
210
212
217
128
1101001011010100110110011000
|
{z
} 0000
| {z }
N ET ID
HOST ID
N ET ID
Broadcast Address
HOST ID
}|
{ z }| {
1101001011010100110110011000 1111
11010010
| {z } 11010100
| {z } 11011001
| {z } 10001111
| {z }
210
212
217
143
The use of subnetting thus specify a network address with the precise number
27
28
Part II
Building a LAN
29
Chapter 5
Building a LAN
At the end of this chapter you will be able to
make aplan for a LAN.
prepare a bill of material for a LAN and thus make an estimate.
31
32
5.1
Nodes/clients
clarified.
The first step in planning a LAN is to understand and analyse the nodes3
requirements. You must analyse how many nodes/clients will be there on
the LAN. Identification of physical location of these nodes is also important.
It gives an idea of the cable requirement and also an idea of where to place
the hub/switch/router.
5.2
Architecture.
Nodes/Clients
LAN Architecture
T
T
T
t t t
5.3
By this time you must be well aware of the differences and uses of hubs,
switches, and routers. Today, switches are getting cheaper and hence they
are preffered over hubs. But, in a low budget scenario , good hubs may be
Hub, Switch or utilized. The performance is not affected if the number of nodes are about
Router.
ten4 or less on a hub network. Switches may be opted for larger networks.
In fact if there are only two nodes connected through a switch/hub then
the performance of the hub network is higher than the switch network. Think
about it.
3
4
The word nodes and clients are used interchangeably in this note.
This is only a thumb rule.
33
At times, a combination of hubs and switches are used. The design should
be thought of clearly. Below we give two scenarios with the combination of
both.
Hub
!aa
aa
a
!!
!!
Switch
Switch
Switch
Switch
!aa
!!
aa
!
!
a
Hub
Hub
Hub
5.4
Structured Cabling
Once the architecture and the physical location of the clients have been decided, cabling considerations are to be made. First, let us see what structured
wiring scheme looks like. The wiring shown in Figure 5.4 is from the hub Structured
to the node. Here a jack-panel has been utilized to patch all the ports of the bling.
Ca-
34
5.5
A UTP cable has 8 cores out of which only 4 cores decide whether a cable is
Staright
and straight or cross. The difference is illustrated in Figure 5.5 and Figure 5.6.
cross cable.
A cross cable is used to connect similar devices. For example, in a two
node LAN, the two clients can be directly connected, without the need of
a hub/switch, through a cross cable. Similarly, the cable that connects two
hubs must be a cross cable. Here, I would like to mention a special feature
t
t
t
t
t
t
t
t
35
t8
t7
t6
t5
t4
t3
t2
t1
t
t8
t
t7
t
t
c
#t 6
t
# t5
t cc
4
#
t
c!t 3
a#
#a!
t
a!ct 2
!! aat
t