You are on page 1of 35

Contents

I Networking Basics 3
1 Introduction 5
1.1 What is a Computer Network . . . . . . . . . . . . . . . . . . 5
1.2 Advantages of a Network . . . . . . . . . . . . . . . . . . . . . 6
1.3 Components of a Network . . . . . . . . . . . . . . . . . . . . 6
2 Basics of Computer Networking 9
2.1 Categories of Networks . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 LAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.2 MAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.3 WAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Network Topology . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.1 Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2 Star . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.3 Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.4 Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.5 Ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.6 Hybrid . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 OSI Reference Model 15
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 Data Link layer . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Network Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Session Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7 Presentation Layer . . . . . . . . . . . . . . . . . . . . . . . . 18
3.8 Application Layer . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.9 Data Transfer in OSI Model . . . . . . . . . . . . . . . . . . . 19
1
2 CONTENTS
4 TCP/IP Networking 21
4.1 TCP/IP Reference Model . . . . . . . . . . . . . . . . . . . . 21
4.1.1 Host to Network Layer . . . . . . . . . . . . . . . . . . 22
4.1.2 Network/Internet Layer . . . . . . . . . . . . . . . . . 22
4.1.3 Transport Layer . . . . . . . . . . . . . . . . . . . . . . 22
4.1.4 Application Layer . . . . . . . . . . . . . . . . . . . . . 22
4.2 Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Access Method . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.3 10/100BaseT . . . . . . . . . . . . . . . . . . . . . . . 24
4.3 IP Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.4 Network Mask and Subnetworking . . . . . . . . . . . . . . . . 25
II Building a LAN 29
5 Building a LAN 31
5.1 Nodes/Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.2 LAN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3 Hub, Switch or Router . . . . . . . . . . . . . . . . . . . . . . 32
5.4 Structured Cabling . . . . . . . . . . . . . . . . . . . . . . . . 33
5.5 Straight & Cross Cable . . . . . . . . . . . . . . . . . . . . . . 34
Part I
Networking Basics
3
Chapter 1
Introduction
At the end of this chapter, you will be able to explain what a computer net-
work is and elaborate its constituents.
Before we delve deep into the subject of networking, let us rst 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, les 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 com-
puter 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 eciency. 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 dened in various ways. One approach is to con-
sider 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 them-
selves, computers and terminals collectively referred to as Data Terminal
5
6 CHAPTER 1. INTRODUCTION
Equipment (DTE), are then considered as attached to, rather than forming
part of, the physical network. Dening a com-
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,
viruses etc. Advantages of a
Network.
Lesser Maintainence When a network has been established, many mainte-
nance can be done through the network by running appropriate services
like DHCP etc on the net.
Cost Eectiveness A network of PCs cost considerably less than a main-
frame 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 it has a lot of responsibilities. Network Compo-
nents.
Clients/Workstations These are the PCs that use the network function-
ality through the server.
1.3. COMPONENTS OF A NETWORK 7
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.
8 CHAPTER 1. INTRODUCTION
Chapter 2
Basics of Computer Networking
At the end of this chapter you will be able to
elaborate and dierentiate the dierent 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
dierent characterestics that are enumerated below.
2.1.1 LAN
Its main chracterestics are Local area net-
work.
spans only a few kilometers.
used to share les, 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
Its main charabterestics are Wide area net-
work.
provides long distance communication.
span is unlimited.
may utilize many dierent types of transmission media.
a WAN owned privately is called an Enterprise network.
1
2.2 Network Topology
Topology of a network signies the method of connecting devices that are to
participate in networking. Some of the topologies are discussed below.
2.2.1 Mesh
The Mesh topol-
ogy.
t
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 trac 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 dicult 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 topol-
ogy.
Hub

t
`
`
``t

t
`
`
``
t
Figure 2.2: The Star Topology
2
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 aected.
Easy to add more devices to the network.
2.2.3 Tree
The Tree Topol-
ogy.

`
`
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
This is a multipoint topology. The bus topology.
3
Almost all the hubs that we get in the market today are active.
2.2. NETWORK TOPOLOGY 13
t t t t
Figure 2.4: The Bus Topology
Advantages
Installation is easy.
Cabling requirement is the least.
Disadvantages
Dicult to recongure.
Dicult to analyse/localise fault.
Not robust. A link failure bring the whole network to a grinding halt.
2.2.5 Ring
The ring topol-
ogy.
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 recongurable.
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 be-
tween two devices and yet no communication between them.
A typical situation is depicted below.
t t
t

`
`
`
`
`
`
`
`

B C
A
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
be conected. The Internet is an example of such a network. The hybrid topol-
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) species a model for designing and un-
derstanding a network architecture that is exible robust and interoperable.
3.1 Introduction
The OSI model species that the networks architecture can be viewed as
consisting of seven layers. These layers dene a specic 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 dened 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
Line Conguration It answers how two devices are linked together? Whether
link is shared or not? Whether line is available or not? Physical layer.
Data Transmission mode It is here that the data transmission mode is
dened. 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
dened. 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 specied here.
Medium Here, the physical medium for the transmission of data is specied.
3.3 Data Link layer
Node-to-Node Delivery The node to node delivery of data is done by this
layer. Data link 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, usu-
ally 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 denes
the logical addressing of communicating devices.
Routing This layer is responsible for routing of packets eciently.
Address Transformation As this layer denes a logical address, the re-
sponsibility of converting the physical address to logical one and vice-
versa 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 message
1
. This layer ensures that the whole mes- The transport
layer. sage arrives intact and in order, overseeing both error control and ow
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 IE
2
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
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 Session Layer
Session Management The main function of this layer is to manage session.
It acts like a network dialog controller establishing, maintaining and The session
layer. synchronizing the interaction between communication devices. It also
validates before establishing a connection.
Graceful Close It is responsible for acquiring network resources for commu-
nication 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 de-
vices. Functions at this layer make it possible for two computers to The presentation
layer. communicate even if their internal representation of data diers. 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 encrypt-
ing data as well as compressing it, if required.
Security This layer is responsible for the famous login and password vali-
dation.
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.
It also provides the user with a network virtual terminal. It provides le The application
layer. access, transfer, and management over a network as well.
3.9. DATA TRANSFER IN OSI MODEL 19
3.9 Data Transfer in OSI Model
The data is generated by the user of the network. it is passed to the Ap-
plication layer. This layer prexes 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 Ap-
plication 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.
Data
AH Data
PH Data
SH Data
TH Data
NH Data
DH Data DT
Bits
Physical Physical
Data Link Data Link
Network Network
Transport Transport
Session Session
Presentation Presentation
Application Application

Sender

Receiver
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 dened 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
The TCP/IP reference model does not speak about this layer. Dierent Host to network
layer. vendors may use dierent 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
travel independently to the destnation. They may even arrive in dierent Internet/network
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 ocially denes a packet format and protocol (IP). This
layer then has the main function of packet routing and congestion control.
4.1.3 Transport Layer
It denes two end to end delivery protocol viz. TCP
1
and UDP.
2
Transport layer.
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 Transmission
control protocol. 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 ow 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 ow control and wish to provide
there own. There is no guarantee about the packet delivery to the User datagram
protocol. destination. It is most analogous to the post oce of today. We drop
a letter and then the postoce does its best to see that it reaches the
destination. Similarly UDP makes the best eort to deliver a packet.
4.1.4 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 Application
layer.
1
Tranmission Control Protocol
2
User Datagram Protocol
4.2. ETHERNET 23
encryption/decryption, user validation etc. In all, it is an embodiment of the
three upper layers
3
of OSI model.
4.2 Ethernet
Ethernet is a LAN standard originally developed by Xerox and later extended
by a joint venture of DEC
4
, Intel and Xerox. It was later adopted by IEEE Ethernet.
with minor modication as the standard No. IEEE802.3.
IEEE802.3 or Ethernet dene two categories of LAN - baseband and
broadband. The word base species a digital signal (in this case, Manchester
Encoding). The word broad sepecies an analog signal(in this case, PSK
5
.
The baseband category has been further divided into the following dier-
ent standards.
Name Cable Max. Seg Nodes/seg. Speed Advantages
10Base5 Thick coax 500m 100 10MBPS Good for backbones
10Base2 Thin coax 200m 30 10MBPS Cheapest system
10Base-T Twisted pair 100m 1024 10MBPS Easy Maintainenace
100Base-T Twisted pair 100m 1024 100MBPS High speed
10Base-F Fible Optic 2000m 1024 10Mbps Between Building
4.2.1 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 ac-
cess 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 trac 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 trac 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
4
Digital Equipment Corporation
5
Phase Shift Keying encoding
24 CHAPTER 4. TCP/IP NETWORKING
wishing to transmit is rst required to listen for existing trac 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 nally, collision detection was added. In CSMA/CD the device wish-
ing to transmit, rst listens to make sure that the link is idle. It then transmit
data and then listens again. If it nds an extermely high voltage that indi-
cates a collision, it waits for a random amount of time and then repeats the
transmission cycle again.
4.2.2 Addressing
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 MAC address.
in the world will have the same address. While purchasing NIC, the Ether-
net standard should be mentioned. We mostly use the 10BaseT or 100BaseT
Ethernet. Nowadays, NICs supporting 10/100BaseT
6
. 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
The 10/100BaseT standard is the most prevalent today. It is a star topology
LAN. It uses UTP
7
cable. It supports a data rate of 10/100MBPS and has a 10/100BaseT.
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 (cat-
egory 5) UTP cable may be used. Today, it is advisable to go for Cat5 cable
only.
6
They support both 10BaseT and 100baseT standards and are autosensing at times.
7
Unshielded twisted pair
4.3. IP ADDRESSING 25
4.3 IP Addressing
The IP address consists of four bytes (32 bits), dening three elds: class-
type, 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

10
00000000

0
00000000

0
00000001

1
To accomodate a vast number of addresses required for global interconnec-
tivity, the class type eld varies in length. There are currently ve dierent
classes.
Class Name description
A The rst bit of the address is zero.
B The rst bit of the address is one and the second bit is zero.
C The rst two bits of the address are one and the third bit is zero.
D The rst three bits of the address are one and the fourth bit is zero.
E The rst four bits of the address are one and the fth 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 dierent
classes of network are shown below.
Class A xxxxxxxx

NETID
xxxxxxxx xxxxxxxx xxxxxxxx

HOSTID
Class B xxxxxxxx xxxxxxxx

NETID
xxxxxxxx xxxxxxxx

HOSTID
Class C xxxxxxxx xxxxxxxx xxxxxxxx

NETID
xxxxxxxx

HOSTID
4.4 Network Mask and Subnetworking
The limitation that the network bits are xed for dierent 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 mask
and subnetting. company to have only that many number of IP addresses alloted to him as
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 rst 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 specied 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

210
11010100

212
11011001

217
10000000

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 3228 = 4
bits. Out of these, the host ID bits with all zeros and all ones are not allowed.
All zeros in the host ID signies the network address and all ones in the host
ID signies 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

NETID
0000

HOSTID
Broadcast Address
NETID

1101001011010100110110011000
HOSTID

1111
11010010

210
11010100

212
11011001

217
10001111

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 specied 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 nota-
tions 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. Af-
ter this topic, you will be condent 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 benets 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
les 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 ts 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 le sharing with security and sharing of printers. The clients
will run one of the Windows family
2
of operating system from Microsoft.
1
Local Area Network
2
Windows 95/98/ME
31
32 CHAPTER 5. BUILDING A LAN
5.1 Nodes/Clients
The rst step in planning a LAN is to understand and analyse the nodes
3
requirements. You must analyse how many nodes/clients will be there on
the LAN. Identication of physical location of these nodes is also important. Nodes/clients
claried. It gives an idea of the cable requirement and also an idea of where to place
the hub/switch/router.
5.2 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. Architecture.
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 dierences and uses of hubs,
switches, and routers. Today, switches are getting cheaper and hence they
are preered over hubs. But, in a low budget scenario , good hubs may be
utilized. The performance is not aected if the number of nodes are about Hub, Switch or
Router. ten
4
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
The word nodes and clients are used interchangeably in this note.
4
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.
Switch Switch Switch
Hub

Figure 5.2: The hub/swith combination scenario.


Hub Hub Hub
Switch

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 preered if we have a large number
of nodes at dierent 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 dierent ballgame. They are to be used only when there
are two dierent networks that need to communicate with each other. Two
networks are dierent if their network addresses are dierent.
5.4 Structured Cabling
Once the architecture and the physical location of the clients have been de-
cided, 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 Ca-
bling. to the node. Here a jack-panel has been utilized to patch all the ports of the
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 exible. 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
straight or cross. The dierence is illustrated in Figure 5.5 and Figure 5.6. Staright and
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 35
1
t t
1
2
t t
2
3
t t
3
4
t t
4
5
t t
5
6
t t
6
7
t t
7
8
t t
8
Figure 5.5: The straight cable connection.
1
t

t
1
2
t

t
2
3
t

t
3
4
t t
4
5
t t
5
6
t
`
`
`
`
`
t
6
7
t t
7
8
t t
8
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