You are on page 1of 35

Contents

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

2 Basics of Computer Networking


2.1 Categories of Networks . . . . .
2.1.1 LAN . . . . . . . . . . .
2.1.2 MAN . . . . . . . . . . .
2.1.3 WAN . . . . . . . . . . .
2.2 Network Topology . . . . . . .
2.2.1 Mesh . . . . . . . . . . .
2.2.2 Star . . . . . . . . . . .
2.2.3 Tree . . . . . . . . . . .
2.2.4 Bus . . . . . . . . . . . .
2.2.5 Ring . . . . . . . . . . .
2.2.6 Hybrid . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

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

What is a Computer Network

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

when we connect computers in a network we have the advantage of


High Reliability When many computers use a server of the network, the
reliability of works go up. All will be able to store their data on the
server and a backup of only the server make data secure from crashes,
Advantages of a
viruses etc.
Network.
Lesser Maintainence When a network has been established, many maintenance can be done through the network by running appropriate services
like DHCP etc on the net.
Cost Effectiveness A network of PCs cost considerably less than a mainframe and has equivalent performance.
Alternate Communication Media A network gives us an alternate means
of communication via emails, chats etc.

1.3

Components of a Network

A network consists of the following hardware components.


Servers A server is one of the main constituent of the network. In a small
Network Componetwork it has a lot of responsibilities.
nents.
Clients/Workstations These are the PCs that use the network functionality through the server.

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

Its main chracterestics are

Local area network.

spans only a few kilometers.


used to share files, printers etc.
normally have only one type of transmission media.
bus, ring and star are the most preferred topologies.
9

10

CHAPTER 2. BASICS OF COMPUTER NETWORKING

2.1.2

MAN

Its main charabterestics are

Metropolitan
area network.

normally spans a city.


normally is privately owned by a company.
it connects LANs.

2.1.3

WAN

Wide area net- Its main charabterestics are


work.
provides long distance communication.
span is unlimited.
may utilize many different types of transmission media.
a WAN owned privately is called an Enterprise network.1

2.2

Network Topology

Topology of a network signifies the method of connecting devices that are to


participate in networking. Some of the topologies are discussed below.

The Mesh topology.

2.2.1

Mesh
t
@
@

t
@
@
@
@

@
@t

Figure 2.1: The Mesh Topology


1

Railnet is an Enterprise network of Indian Railways.

2.2. NETWORK TOPOLOGY

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

The Star topology.


t
J
J
J

Hub

J
J
Jt

Figure 2.2: The Star Topology

Railnet used this topology for connecting its zonal servers.

12

CHAPTER 2. BASICS OF COMPUTER NETWORKING

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.

The Tree Topology.

2.2.3

Tree




S
S

t t t t t t t t t

Figure 2.3: The Tree Topology

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

The bus topology. This is a multipoint topology.


3

Almost all the hubs that we get in the market today are active.

2.2. NETWORK TOPOLOGY


t

13
t

Figure 2.4: The Bus Topology


Advantages
Installation is easy.
Cabling requirement is the least.
Disadvantages
Difficult to reconfigure.
Difficult to analyse/localise fault.
Not robust. A link failure bring the whole network to a grinding halt.

2.2.5

Ring

The ring topology.

t
@
@
@
@
@t

t
@
@
@
@
@t

Figure 2.5: The Ring Topology

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

CHAPTER 2. BASICS OF COMPUTER NETWORKING

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
@

Figure 2.6: Disadvantage of Rink Topology


A break between B and C means A cant communicate with C even
though a dedicated link is available between A and C.

2.2.6

Hybrid

It is also possible to have a hybrid network in which various topologies may


The hybrid topol- be conected. The Internet is an example of such a network.
ogy.

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

CHAPTER 3. OSI REFERENCE MODEL


6. Presentation Layer
7. Application Layer

3.2

Physical Layer

This layer looks after the following


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.

Data Link layer

Node-to-Node Delivery The node to node delivery of data is done by this


layer.
Addressing Headers and trailers are added to the information data here to
include the address of the most recent and the next node.
Access Control When two or more devices are connected to the same link,
the data link layer protocols determine which device has control over
the line at any given time.
Flow Control To avoid overwhelming the receiver, this layer regulates the
amount of data that can be transmitted at one time. It adds identifying
number to enable the receiving node to control the ordering of the data
frame.

3.4. NETWORK 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

Source to Destination Delivery This layer is responsible for source to


destination delivery of a packet across multiple network links. It uses
the data link layers functionality for node-to-node delivery for having
a source-to-destination delivery possible.
Network layer.
Logical Addressing To achieve source to destination delivery, it defines
the logical addressing of communicating devices.
Routing This layer is responsible for routing of packets efficiently.
Address Transformation As this layer defines a logical address, the responsibility of converting the physical address to logical one and viceversa lies on its shoulder.
Multiplexing It is also responsible for using a single link to carry data of
many devices.

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

CHAPTER 3. OSI REFERENCE MODEL

Segmentation and Reassembly This layer, in its task to ensure end to


end message delivery, uses the functionality provided by the network
layer. But the network layer works with only a packet. And hence,
it segments the message into packets to use the network layer. It is
also responsible for reassembly of these packets into messages at the
destination..
Connection Control It also decides whether or not to send all the packets
by a single route.

3.6
The
layer.

Session Layer

Session Management The main function of this layer is to manage session.


session
It acts like a network dialog controller establishing, maintaining and
synchronizing the interaction between communication devices. It also
validates before establishing a connection.
Graceful Close It is responsible for acquiring network resources for communication and then gracefully releasing control of the network resources,
called closing network conection in the jargons.

3.7

Presentation Layer

Translation This layer ensures interoperability among communicating deThe presentation


vices. Functions at this layer make it possible for two computers to
layer.
communicate even if their internal representation of data differs. It
changes the format of a message from that used by the sender into one
mutually acceptable for transmission.
Encryption and Compression This layer is also responsible for encrypting data as well as compressing it, if required.
Security This layer is responsible for the famous login and password validation.

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. DATA TRANSFER IN OSI MODEL

3.9

19

Data Transfer in OSI Model

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
- 

Figure 3.1: The data transmission process.

20

CHAPTER 3. OSI REFERENCE MODEL

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

TCP/IP Reference Model

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

CHAPTER 4. TCP/IP NETWORKING

4.1.1

Host to Network Layer

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.

UDP UPD is an unreliable connection less protocol for application that


do not want TCPs sequencing or flow control and wish to provide
User datagram
there own. There is no guarantee about the packet delivery to the
protocol.
destination. It is most analogous to the post office of today. We drop
a letter and then the postoffice does its best to see that it reaches the
destination. Similarly UDP makes the best effort to deliver a packet.

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

Tranmission Control Protocol


User Datagram Protocol

4.2. ETHERNET

23

encryption/decryption, user validation etc. In all, it is an embodiment of the


three upper layers3 of OSI model.

4.2

Ethernet

Ethernet is a LAN standard originally developed by Xerox and later extended


by a joint venture of DEC4 , Intel and Xerox. It was later adopted by IEEE Ethernet.
with minor modification as the standard No. IEEE802.3.
IEEE802.3 or Ethernet define two categories of LAN - baseband and
broadband. The word base specifies a digital signal (in this case, Manchester
Encoding). The word broad sepecifies an analog signal(in this case, PSK5 .
The baseband category has been further divided into the following different standards.
Name
10Base5
10Base2
10Base-T
100Base-T
10Base-F

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

Whenever multiple users have unregulated access to a single line, there is


a danger of signals overlapping and destroying each other. Such overlaps, CSMA/CD.
which turns the signal into unusable noise, are called collisions. The access mechanism used by Ethernet is called carrier sense multiple access with
collision detection (CSMA/CD).
The original design was a multiple access method in which every device
has equal access to the link. There was no provision for traffic coordination
and each device was allowed to transmit at any time. It was assumed that
the chances for two device competing for access at the same time were small
enough. So, a device used to transmit data as and when needed and relied
upon an acknowledegment to verify that the transmitted frame was received
and not destroyed by other traffic on the line.
The size of LAN was increasing and this mechanism very soon choked
with lots of collision. So, CSMA was devised. In a CSMA system a device
3

i.e. Application, Presentation and Session


Digital Equipment Corporation
5
Phase Shift Keying encoding
4

24

CHAPTER 4. TCP/IP NETWORKING

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

The 10/100BaseT standard is the most prevalent today. It is a star topology


LAN. It uses UTP7 cable. It supports a data rate of 10/100MBPS and has a
maximum cable length (hub to device) of 100m. Devices are linked into the
hub by four pair RJ45 cable terminating at each end in male type connector.
The hub fans out any transmitted frame to all of its connected devices. Logic
in the NIC assures that the only station to open and read a given frame is
the device to which that frame is addressed.
For 10BaseT Ethernet CAT3 (category 3) and for 100BaseT CAT5 (category 5) UTP cable may be used. Today, it is advisable to go for Cat5 cable
only.
6
7

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

xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx


|

Class B

{z

HOST ID

{z

}|

N ET ID

{z

HOST ID

xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx


|

4.4

}|

xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx


|

Class C

{z

N ET ID

{z

N ET ID

}|

{z

HOST ID

Network Mask and Subnetworking

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

CHAPTER 4. TCP/IP NETWORKING

Subnetworking was devised. It is a technique that make it convenient for a Network


ma
company to have only that many number of IP addresses alloted to him as and subnetting.
required and not the whole of the class C address.
The network mask is a 32 bits bit-pattern that tells how many bits are
used for the purpose of identifying the network address. Any number of bits
may be used to identify the network address. Let us take an example. Let
me say that we will want to have a network ID of 28 bits. Then the network
mask is 11111111111111111111111111110000. This contains the first 28 bits
of the 32 bits bit-pattern to be one. The network mask is also denoted by the
dotted decimal notation. Thus the above network mask will be represented
by 255.255.255.240.
A Internet address of a device is now specified by its IP address as well as
the network mask. When a bit-by-bit anding of the IP address is done with
the network mask, the network address is achieved. Let us take an example.
Say, the Internet address of a computer on Internet is 210.212.217.135 and
the network mask is 255.255.255.240.
IP Address

11010010110101001101100110000111

Network Mask 11111111111111111111111111110000


Anded

11010010
| {z } 11011001
| {z } 10000000
| {z }
| {z } 11010100
210

212

217

128

Thus, the network address of the above computer is 210.212.217.128.


The number of bits left after the network ID bits are used for the host ID.
Thus, if the network ID consists of 28 bits, the hostID consists of 32 28 = 4
bits. Out of these, the host ID bits with all zeros and all ones are not allowed.
All zeros in the host ID signifies the network address and all ones in the host
ID signifies the broadcast address. The rest of the permutations may be used
to allot to a device.
Taking the above example, the network mask of 210.212.217.128 leads to
a broadcast address of 210.212.217.143.
Network Mask

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

4.4. NETWORK MASK AND SUBNETWORKING

27

of addresses that may be alloted.


The address is usually specified nowadays by showing the network mask
after the IP address seperated by a slash(/). For example, 210.212.217.135/255.255.255.240.
This is a lot of typing. As the network mask just tells us the number of bits
used for identifying the network ID, we may just use this number. So, the
above address may also be written as 210.212.217.135/28. Both these notations are in use.
The total number of distinct IP adresses in a network is thus calculated
by 2(32n) 2 where n is the number of bits used for network ID. Thus in the
above case the number of distinct addresses are 2(3228) 2 = 14.

28

CHAPTER 4. TCP/IP NETWORKING

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.

This topic covers the details and the intricacies of designing/planning a


LAN.1 It exposes to you the various choices, standards and thumbrules. After this topic, you will be confident of designing a LAN, drawing a bill of Objectives.
material for a LAN as well as have a practical understanding of a LAN.
LAN is slowly becoming quintessential in our day-to-day working. The
demand to reap in the benefits of networking/LAN is increasing from all
quarters. In such a scenario, it becomes essential to plan and design a LAN
with careful consideration and deliberation.
The most common demand of a LAN is to share resources. Sharing of
files with proper security is one of the major demands. At times, sharing
of printers is also sought after. Looking into all these, the best bill fits a
Windows NT/2000 network having one server and many clients.
Here we will see how we proceed to make a Windows NT/2000 network,
incorporating file sharing with security and sharing of printers. The clients
will run one of the Windows family2 of operating system from Microsoft.
1
2

Local Area Network


Windows 95/98/ME

31

32

CHAPTER 5. BUILDING A LAN

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

Depending upon the number of nodes, a LAN architecture should be chosen.


If there are only two nodes, then they may be directly connected using a
cross cable. If there are more clients then a tree structure is advisable.





T
T
T

t t t

Figure 5.1: The advisable tree topology.

5.3

Hub, Switch or Router

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.

5.4. STRUCTURED CABLING

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

Figure 5.2: The hub/swith combination scenario.

Switch
!aa
!!
aa
!
!
a

Hub

Hub

Hub

Figure 5.3: The switch/hub combination scenario.


Other combinations are possible. The two schemes shown here are two
extremes. The artictecture of Figure 5.3 may be chosen in such networks
where small number of nodes at diverse locations are to be brought under
one LAN.
The architecture of Figure 5.2 is to be preffered if we have a large number
of nodes at different locations.
An all switch network will be the best. Other mix and matches are
possible. A judicious choice of such matches must be made.
Routers are a different ballgame. They are to be used only when there
are two different networks that need to communicate with each other. Two
networks are different if their network addresses are different.

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

CHAPTER 5. BUILDING A LAN

Figure 5.4: The Structured cabling scheme


hub to itself via a 3 ft patch cord. The patch cords are mutliple stranded
and hence are flexible. A Cat 5 single stranded cable is used to connect the
jack panel to the info-outlet box. We again use a 7 ft patch cord to connect
the client to the information outlet box.
For best results, it is advisable that none of the Cat 5 cable be more than
90m in length and between two computers in a LAN there may not be more
that two hub/switch.
So, the main things that you will have to plan during the LAN wiring
stage are
The location of the hubs.
The locations of the info-outlet boxes.
This planning should consider the total length of the cable that will be
used and optimization can be done at this stage. The limits of about 100m
of the Cat 5 cable should also be kept in mind.

5.5

Straight & Cross Cable

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

5.5. STRAIGHT & CROSS CABLE


8
7
6
5
4
3
2
1

t
t
t
t
t
t
t
t

35
t8
t7
t6
t5
t4
t3
t2
t1

Figure 5.5: The straight cable connection.


8
7
6
5
4
3
2
1

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

Figure 5.6: The cross cable connection.


in most of the hubs in the market today. Almost all these hubs come with
a special switch controlling one of the port, mostly port No. 1. The switch
is capable of converting the controlled port to an uplink port. This simply
means that the switch is capable of internally crossing the connection. Hence,
if an uplink port is used for connecting similar hubs, a straight cable should
be used.
Mostly, the similar devices that we need to connect are hubs. And they
come with an uplink port. One end of the cable goes in the uplink port of
the device, the other end can be any normal port of the other device. Hence,
a cross cable is normally not required. But, it is important that one knows
about it.

You might also like