BCS-041 Fundamental of Computer Networks
BCS-041 Fundamental of Computer Networks
Block
2
NETWORKS AND DEVICES
UNIT 1
Network Classifications and Topologies 5
UNIT 2
OSI and TCP/IP Models 22
UNIT 3
Physical and Data Link Layer 42
UNIT 4
Internet Working Devices 58
PROGRAMME DESIGN COMMITTEE
Prof. Manohar Lal, Prof. Arvind Kalia, Dept. of CS Sh. Akshay Kumar, Associate Prof.
SOCIS, IGNOU, New Delhi HP University, Shimla SOCIS, IGNOU, New Delhi
Prof. H.M Gupta Prof. Anju Sehgal Gupta Dr. P.K. Mishra, Associate Prof.
Dept. of Elect. Engg., IIT, Delhi SOCIS, IGNOU, New Delhi Dept. of CS, BHU, Varanasi
Prof. M.N Doja, Dept. of CE Prof. Sujatha Verma Sh. P.V. Suresh, Asst. Prof.
Jamia Millia, New Delhi SOS, IGNOU, New Delhi SOCIS, IGNOU, New Delhi
Prof. C. Pandurangan Prof. V. Sundarapandian Sh. V.V. Subrahmanyam, Asst. Prof.
Dept. of CSE, IIT, Chennai IITMK, Trivendrum SOCIS, IGNOU, New Delhi
Prof. I. Ramesh Babu Prof. Dharamendra Kumar Sh. M.P. Mishra, Asst. Prof.
Dept. of CSE Dept. of CS, GJU, Hissar SOCIS, IGNOU, New Delhi
Acharya Nagarjuna University,
Prof. Vikram Singh Dr. Naveen Kumar, Asst. Prof.
Nagarjuna Nagar (AP)
Dept. of CS, CDLU, Sirsa SOCIS, IGNOU, New Delhi
Prof. N.S. Gill
Sh. Shashi Bhushan, Associate. Prof. Dr. Subodh Kesharwani, Asst. Prof.
Dept. of CS, MDU, Rohtak
SOCIS, IGNOU, New Delhi SOMS, IGNOU, New Delhi
Prof. Sujatha Varma, Profesor, Sh. Akshay Kumar, Associate Prof. Sh. M.P. Mishra, Asst. Prof.
SOS, IGNOU, New Delhi SOCIS, IGNOU, New Delhi SOCIS, IGNOU, New Delhi
Sh. Milind Mahajani Dr. Parvin Chandra, Associate Prof., Dr. Naveen kumar, Asst. Prof.
Sr. IT Consultant, New Delhi IIC, Delhi University, New Delhi SOCIS, IGNOU, New Delhi
Dr. Anil Ahlawat, Assoc. Prof. Dr. Naveen Kumar, Reader Dr. Parmod Kumar, Asst. Prof.,
(Unit-1 Writer), (Unit-1,2,4 Transformation), (Language Editor),
Dept. of Computer Eng. SOCIS, IGNOU, New Delhi SOH, IGNOU, New Delhi
KIET, Ghaziabd,UP
Course Coordinator : Dr. Naveen Kumar, Reader, SOCIS, IGNOU, New Delhi
PRINT PRODUCTION: Sh. Tilak Raj, S.O.(P), CRC Prepared by Smt. Dolly Singh
ISBN:
© Indira Gandhi National Open University, 2013
All rights reserved. No part of this work may be reproduced in any form, by mimeograph or any form, by
mimeograph or any other means, without permission in writing form the Indira Gandhi National Open
University.
Further information on the Indira Gandhi National Open University courses may be obtained from the
University’s office at Maidan Garhi, New Delhi-110068.
Printed and published on behalf of the Indira Gandhi National Open University by the Director, SOCIS.
COURSE INTRODUCTION
Computer networking is the practice of connecting two or more computing devices for
the purpose of communication and sharing data. These networks are designed with a
set of computer hardware and computer software. The various communication
functions and services of networking are grouped into seven layers according to OSI
reference model. These layers are called Physical, Data Link, Network, Transport,
Session, Presentation and Application Layer. This course introduces the basics of data
communication and networking. Students will develop an understanding of the
general principles of data communication and networking as used in networks. It also
includes an activity of setting up a small local area network. The objective of this
course is to enable students in developing an understanding of the structure of
network, its elements and how these elements operate and communicate with each
other. Along with this course material of BCS-041, you must read the book and study
material suggested you in the last of each unit. This course on fundamentals of
computer networks is divided in the following four blocks:
Block 3: Network, Transport & Application Layer covers the details of various
protocols used in the top three layers Network, Transport and Application Layer of the
OSI model.
Block 4: Network Design & Security will give you the fundamental details for
setting up a small local area network including wired and wireless setup. This block
will also cover the foundational details of network security protocols and wireless
networking.
BLOCK 2 INTRODUCTION
This block named Networks and Devices gives an introduction of data
communication architectures, layers, protocol stacks and networking devices /
components. This block is also covering details of networking structures, topologies,
models and techniques. This block is divided into the following four units:
Unit 2: OSI and TCP/IP Models. It covers introduction of OSI and TCP/IP Models,
functions of each layer in both models. Further, this unit also explains comparisons of
OSI with TCP/IP layers.
Unit 3: Physical and Data link Layer . This unit is focused about issues of physical
and data-link layers. Different issues like Error detection and correction, Framing,
Retransmission strategies, Multi-access communication, Addressing, are discussed in
this unit.
TOPOLOGIES
Structure Page No.
1.0 Introduction 5
1.1 Objectives 5
1.2 Network overview 5
1.2.1 Classification of networks
1.2.2 Local area network (LAN)
1.2.3 Metropolitan area network (man)
1.2.4 Wide area network (wan)
1.3 LAN Topologies 7
1.4 LAN /Mac Access Methods 12
1.5 Network Types Based on Size 15
1.6 Functional Classification of Networks 16
1.7 Wan Topologies 18
1.8 Wan Access Methods 18
1.9 Summary 20
1.10 References/Further Reading 20
1.11 Solutions/Answers 20
1.0 INTRODUCTION
As you know that a computer network is a group of computers that are connected with
each other using some media for sharing of data and resources. It may connect other
devices also like printers, scanners, etc. Information travels over the cables or other
media, allowing network users to exchange documents & data with each other, print the
data, and generally share any hardware or software that is connected to the network. In
this unit we will learn about the different types of networks, their classifications based
on topologies, size and functioning. We will also examine the access methods for LAN
and WAN.
1.1 OBJECTIVES
After going through this unit, you should be able to:
• Define and classify network;
• distinguish between different types of networks,
• differentiate between different network (LAN and WAN) topologies
• understand LAN and WAN access methods
5
Networks and Devices Solution to this problem is to connect each device to a communication network.
Computer Networks means interconnected set of autonomous systems that permit
distributed processing of information.
In order to meet the needs of various applications, networks are available with different
interconnection layouts and plans, methods of access, protocols and data carrying
capacities. Networks can be classified on the basis of geographical coverage.
A WAN provides long distance transmission of data, voice, image and video
information over large geographical areas that may comprise a country, a continent or
even the whole world.
In contrast to LANs (which depend on their own hardware for transmission), WANs
may utilise public, leased or private communication devices usually in combination and
span own unlimited number of miles.
6
per second (Mbps). Later, 100 Mbps LANs were introduced. Today, LANs with data Network Classifications
rates of thousands of Mbps are possible. LANs typically can use the star, bus or a ring and Topologies
topology. However, bus topology is popular in the Ethernet LANs and Token Bus LANs
and ring topology is popular in the Token Ring LANs of IBM. A modified version of
Token Ring is Fiber Distributed Data Interface (FDDI). Of these, Ethernet and Token
Ring are the most popular LANs.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
Topology indicates the access methods and governs the rules that are used to design
and implement the communication system. It is important to make a distinction
between a topology and architecture. A topology is concerned with the physical
arrangement of the network components. In contrast, architecture addresses the
components themselves and how a system is structured (cable access methods, lower
level protocols, topology, etc.). An example of architecture is 10baseT Ethernet that
typically uses the star topology. Each topology has its advantages and disadvantages
usually related to cost, complexity, reliability and traffic "bottlenecks". The different
types of topologies are discussed below:
Bus Topology: --In a bus topology, all stations are attached to the same cable. In the
Bus Network, messages are sent in both directions from a single point and are read by
the node (computer or peripheral on the network) identified by the code with the
message. Most Local Area Networks (LANs) are Bus Networks because the network
will continue to function even if one computer is down. The purpose of the
terminators (resistors) at either end of the network is to stop the signal being reflected
back. If a bus network is not terminated, or if the terminator has the wrong level of
resistance, each signal may travel across the bus several times instead of just once.
This problem increases the number of signal collisions, degrading network
performance. The figure 1 given below shows a bus Topology:
7
Networks and Devices
i) Bus topologies are relatively easy to install and don't require much cabling
compared to other topologies.
ii) Easy to connect a computer or peripheral to a linear bus.
iii) Requires less cable length than a star topology, as you only need to chain the
stations together.
iv) There is no central point of failure on a bus because there is no switch. .
v) Simple and easy to implement and extend.
vi) Failure of one station does not affect others.
Star Topology: -- In a Star Network, all the nodes (PCs, printers and other shared
peripherals) are connected to the central server. It has a central connection point - like a
switch. A star topology is designed with each node (file server, workstations, and
peripherals) connected directly to a central network hub or concentrator as shown in
figure2 below.
8
Network Classifications
and Topologies
9
Networks and Devices
Under the ring concept, a chance is given to each node sequentially via a "token" from
one station to the next. When a station wants to transmit data, it "grabs" the token,
attaches data and an address to it, and then sends it around the ring. The token travels
along the ring until it reaches the destination. The receiving computer acknowledges
receipt by stamping incoming message and passes it to the sender. The sender then
releases the token to be used by another computer.
Each station in the ring has equal access but only one station can talk at a time. In
contrast to the 'passive' topology of the bus, the ring employs an 'active' topology. Each
station repeats or 'boosts' the signal before passing it on to the next station. Rings are
normally implemented using twisted pair or fiber-optic cable.
10
Network Classifications
and Topologies
11
Networks and Devices
12
• Priority: In managing access and communications time, the technique should Network Classifications
be able to give priority to some stations over other stations to facilitate different and Topologies
type of services needed.
• Limitations to one station: The techniques should allow transmission by one
station at a time.
• Receipt: The technique should ensure that message packets are actually
received (no lost packets) and delivered only once (no duplicate packets), and
are received in the proper order.
• Error Limitation: The method should be capable of encompassing an
appropriate error detection scheme.
• Recovery: If two packets collide (are present on the network at the same time),
or if notice of a collision appears, the method should be able to recover, i.e. be
able to halt all the transmissions and select one station to retransmit.
• Re-configurability: The technique should enable a network to accommodate
the addition or deletion of a station with no more than a noise transient from
which the network station can recover.
• Compatibility: The technique should accommodate equipment from all
vendors who build to its specification.
• Robustness: The technique should enable a network to confine operating in
spite of a failure of one or several stations.
The MAC (Medium Access Control) techniques can be broadly divided into four
categories; Contention-based, Round-Robin, Reservation-based and. Channelization-
based. Under these four broad categories there are specific techniques, as shown in
Figure 6 below:
13
Networks and Devices traffic. In contention techniques, there is no centralised control and when a node has
data to send, it contends for gaining control of the medium. The principle advantage of
contention techniques is their simplicity. They can be easily implemented in each node.
The techniques work efficiently under light to moderate load, but performance rapidly
falls under heavy load.
In the 1970s, Norman Abramson and his colleagues at the University of Hawaii devised
a new and elegant method to solve the channel allocation problem. Their work has been
extended by many researchers since then (Abramson, 1985). Although Abramson's
work, called the ALOHA system, used ground-based radio broadcasting, the basic idea
is applicable to any system in which uncoordinated users are competing for the use of a
single shared channel.
ALOHA have two versions pure and slotted. They differ with respect to whether time is
divided into discrete slots into which all frames must fit. Pure ALOHA does not require
global time synchronization; slotted ALOHA does. These pure and slotted ALOHA
schemes will be discussed further in this block.
CSMA/CD: CSMA/CD stands for Carrier Sense Multiple Access with Collision
Detection. It refers to the means of media access, or deciding "who gets to talk" in an
Ethernet network. In detailed mechanisms of CSMA/CD will be discussed further in this
block.
Round Robin Techniques: In Round Robin techniques, each and every node is given
the chance to send or transmit by rotation. When a node gets its turn to send, it may
either decline to send, or it may send if it has got data to send. After getting the
opportunity to send, it must relinquish its turn after some maximum period of time. The
right to send then passes to the next node based on a predetermined logical sequence.
The right to send may be controlled in a centralised or distributed manner. Polling is an
example of centralised control and token passing is an example of distributed control.
ii) Token Passing: In token passing scheme, all stations are logically connected in
the form of a ring and control of the access to the medium is performed using a
token. A token is a special bit pattern or a small packet, usually several bits in
length, which circulate from node to node. Token passing can be used with both
broadcast (token bus) and sequentially connected (token ring) type of networks
with some variation.
14
Network Classifications
and Topologies
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
15
Networks and Devices are following. You have already studied the brief about LAN, MAN and WAN in the
beginning of this unit. Now, in this section lets us again discuss them further.
Personal area network (PAN)
1. Local area network (LAN)
2. Metropolitan area network (MAN)
3. Wide area network (WAN)
1. PAN: A personal area network (PAN) is a computer network organized
around an individual person. Personal area networks typically involve
network of a mobile computer, a cell phone and/or a handheld computing
device such as a PDA. You can use these networks to transfer files
including email and calendar appointments, digital photos and music.
Personal area networks can be constructed with cables or wirelessly. USB
and FireWire technologies often link together a wired PAN while wireless
PANs typically use Bluetooth or sometimes infrared connections.
Bluetooth PANs are also called piconets. Personal area networks
generally cover a range of less than 10 meters (about 30 feet).
16
a peer-to-peer network, all computers are considered equal; they all have Network Classifications
the same abilities to use the resources available on the network. Peer-to- and Topologies
peer networks are designed primarily for small to medium local area
networks. AppleShare and Windows for Workgroups are examples of
programs that can function as peer-to-peer network operating systems.
17
Networks and Devices
1.7 WAN TOPOLOGIES
A wide area network (WAN) is a network connecting geographically distinct
locations, which may or may not belong to the same organization. WAN topologies
use both LAN add enterprise-wide topologies as building blocks, but add more
complexity because of the distance they must cover, the larger number of users they
serve, and the heavy traffic they often handle. For example, although a simple ring
topology may suffice for a small office with 10 users, it does not scale well and
therefore cannot serve 1000 users. The particular WAN topology you choose will
depend on the number of sites you must connect, the distance between the sites, and
any existing infrastructure.
WAN Ring Topology: In a ring WAN topology, each site is connected to two other
sites so that the entire WAN forms a ring pattern. This architecture is similar to the
ring LAN topology, except that a ring WAN topology connects locations rather than
local nodes. The advantages of a ring WAN over a peer-to-peer WAN are twofold: a
single cable problem will not affect the entire network, and routers at any site can
redirect data to another route if one route becomes too busy. On the other hand,
expanding a peer-to-peer WAN because it requires at least one additional link. For
those reasons, WANs that use the ring topology are only practical for connecting
fewer than four or five locations.
WAN Star Topology: The star WAN topology mimics the arrangement of a star
LAN. A single site acts as the central connection point for several other points. This
arrangement provides separate routes for data between any two sites. As a result, star
WANs are more reliable than the peer-to-peer or ring WANs. As a general rule,
reliability increases with the number of potential routes data can follow. Another
advantage of a star WAN is that when all of its dedicated circuits are functioning, a
star WAN provides shorter data paths between any two sites.
One drawback to a mesh WAN is the cost; connecting every node on a network to
every other entails leasing a large number of dedicated circuits. With larger WANs,
the expense can become enormous. To reduce costs, you might choose to implement a
partial mesh, in which critical WAN nodes are directly interconnected and secondary
nodes are connected through star or ring topologies. Partial-mesh WANs are more
practical and therefore more common in today's business world, than full-mesh
WANs.
18
For example, a T-1 channel is a type of leased line that provides a maximum Network Classifications
transmission speed of 1.544 Mbps. You can divide the connection into different and Topologies
lines for data and voice communication or use the channel for one high speed
data circuit. Dividing the connection is called multiplexing.
Increasingly, leased lines are being used by companies, and even individuals,
for Internet access because they afford faster data transfer rates and are cost-
effective if the Internet is used heavily.
3. ISDN: Integrated Services Digital Network (ISDN) was developed by ITU- Tin
1976. It is a set of protocols that combines digital telephony and data transport
services. The whole idea is to digitize the telephone network to permit the
transmission of audio, video, and text over existing telephone lines.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
19
Networks and Devices
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
1.9 SUMMARY
A communication system that supports many users is called a network. In a network
many computers are connected to each other by various topologies like star, ring,
complete, interconnected or irregular. Depending on the area of coverage a network
can be classified as LAN, MAN or WAN. A network is required for better utilisation
of expensive resources, sharing information, collaboration among different groups,
multimedia communication and video conferencing.
The two different types of networking models OSI and TCP/IP are existing. The
difference between these models was discussed in detail.
1.11 SOLUTIONS/ANSWERS
20
connection to the switch. If a cable is cut, it only affects the computer that Network Classifications
was attached to it. and Topologies
21
Networks and Devices
UNIT 2 OSI AND TCP/IP MODELS
Structure Page Nos
2.0 Introduction 22
2.1 Objectives 22
2.2 OSI Reference Model 23
2.2.1 Layers in the OSI model
2.2.2 Layer 1: the physical layer
2.2.3 Layer 2: the data-link layer
2.2.4 Layer 3: the network layer
2.2.5 Layer 4: the transport layer
2.2.6 Layer 5: the session layer
2.2.7 Layer 6: the presentation layer
2.2.8 Layer 7: the application layer
2.3 TCP/IP Model 28
2.3.1 Layers in the TCP/IP model
2.3.2 TCP/IP application layer
2.3.3 TCP/IP transport layer
2.3.4 TCP/IP internet layer
2.3.5 TCP/IP network access layer
2.4 Comparison of OSI and TCP/IP Models 31
2.5 TCP/IP Protocols 32
2.5.1 Application layer protocols
2.5.2 Transport layer protocols
2.5.3 Internet layer protocols
2.6 Summary 38
2.7 References/Further Readings 38
2.8 Solutions/Answers 39
2.0 INTRODUCTION
In order for a computer to send information to another computer, and for that
computer to receive and understand the information, there has to exist a set of rules or
standards for this communication process. These standards ensure that varying
devices and products can communicate with each other over any network. This set of
standards is called a network reference model. There are a variety of networked
models currently being implemented. However, in this unit, the focus will be on the
OSI and TCP/IP models.
2.1 OBJECTIVES
After going through this unit, you should be able to know:
• The seven layers of OSI reference model
• Understand each layer of OSI model
• Functions of each layer of OSI model
• Understanding of TCP/IP model and its four Layers
• Detail Description of protocol used in each layer
• Similarities of OSI and TCP/IP
22
communication between two end users in a network. The model is used in developing OSI and TCP/IP Models
products and understanding networks. It is a prescription of characterizing and
standardizing the functions of a communications system in terms of abstraction layers.
Similar communication functions are grouped into logical layers. A layer serves the
layer above it and is served by the layer below it.
The layers of the OSI model are divided into two groups: the upper layers and lower
layers. The upper layers (Host layers) focus on user applications and how files are
represented on the computers prior to transport. The lower layers (Media Layers)
concentrate on how the communication across a network actually occurs. Each layer
has a set of functions that are to be performed by a specific protocol(s). The OSI
reference model has a protocol suit for all of its layers.
23
Networks and Devices • Data encoding: modifies the simple digital signal pattern (1s and 0s) used by
the PC to better accommodate the characteristics of the physical medium, and to
aid in bit and frame synchronization.
• Transmission technique: determines whether the encoded bits will be
transmitted by baseband (digital) or broadband (analog) signaling.
• Physical medium transmission: transmits bits as electrical or optical signals
appropriate for the physical medium, and determines: What physical medium
options can be used? And How many volts/db should be used to represent a
given signal state, using a given physical medium?
• Frame Traffic Control: tells the transmitting node to "stop” when no frame
buffers are available.
• Media access management: determines when the node "has the right" to use
the physical medium.
• Logical Link Control (LLC): The LLC is concerned with managing traffic (flow
and error control) over the physical medium and may also assign sequence
numbers to frames and track acknowledgements. LLC is defined in the IEEE
802.2 specification and supports both connectionless and connection-oriented
services used by higher-layer protocols.
• Media Access Control (MAC): The MAC sub layer controls how a computer on
the network gains access to the data and permission to transmit it.
24
OSI and TCP/IP Models
Routing: It is the process of selecting the best paths in a network along which to
send data on physical traffic as shown in Figure 3.
25
Networks and Devices 2.2.5 Layer 4: The Transport Layer
The transport layer provides transparent transfer of data between end users, providing
reliable data transfer services to the upper layers. The transport layer controls the
reliability of a given link through flow control, segmentation/de-segmentation, and
error control. This layer manages the end-to-end control (for example, determining
whether all packets have arrived). It ensures complete data transfer. The Basic
Transport Layer Services are:
• Resource Utilization (multiplexing): Multiple applications run on the same
machine but use different ports.
• Connection Management (establishing & terminating): The second major
task of Transport Layer is establishing connection between sender & the
receiver before data transmission starts & terminating the connection once the
data transmission is finished
• Flow Control (Buffering / Windowing): Once the connection has occurred
and transfer is in progress, congestion of the data flow can occur at a
destination for a variety of reasons. Possible options include:
o The destination can become overwhelmed if multiple devices are trying to
send it data at the same time.
o The destination can become overwhelmed if the source is sending faster
than it can physically receive.
The Transport Layer is responsible for providing flow control to alleviate the issue of
congestion in the data transfer. Two main methods for flow control include:
Buffering: Buffering is a form of data flow control regulated by the Transport Layer
as depicted in Figure 4. It is responsible for ensuring that sufficient buffers
(Temporary Memory) are available at the destination for the processing of data and
that the data is transmitted at a rate that does not exceed what the buffer can handle.
26
OSI and TCP/IP Models
27
Networks and Devices which data is received from the sending computer to one accepted by the other
layers in the host computer. Data formats include postscript, ASCII, or
BINARY such as EBCDIC (fully Extended Binary Coded Decimal Interchange
Code).
• Data security: Some types of encryption (and decryption) are performed at the
presentation layer. This ensures the security of the data as it travels down the
protocol stack.
• Data compression: Compression (and decompression) may be done at the
presentation layer to improve the throughput of data.
The Application Layer is the highest layer in the protocol stack and the layer
responsible for introducing data into the OSI stack. The functions of Application
Layer are:
• Resource sharing and device redirection
• Remote file access
• Remote printer access
• Network management
• Directory services
• Electronic messaging (such as mail) etc
The various protocols that are used at the Application Layer are:
• Telnet: Terminal Emulation, Telnet is a program that runs on your computer
and connects your PC to a server on the network. You can then enter commands
through the Telnet program and they will be executed as if you were entering
them directly on the server console. Port Number :23
28
• FTP: File Transfer Protocol, the protocol used for exchanging files over the OSI and TCP/IP Models
Internet. FTP is most commonly used to download a file from a server using the
Internet or to upload a file to a server. Port Number : 20(data port) ,21(control
port)
• HTTP: Hyper Text Transfer Protocol is the underlying protocol used by the
World Wide Web. HTTP defines how messages are formatted and transmitted,
and what actions Web servers and browsers should take in response to various
commands. For example, when we enter a URL in the browser, this actually
sends an HTTP command to the Web server directing it to fetch and transmit
the requested Web page. Port Number :80
• NFS: Network File System, a client/server application that allows all network
users to access shared files stored on computers of different types. Users can
manipulate shared files as if they were stored locally on the user's own hard
disk. Port Number :2049
• SMTP: Simple Mail Transfer Protocol, a protocol for sending e-mail messages
between servers. In addition, SMTP is generally used to send messages from a
mail client to a mail server. Port Number :25
• POP3: Post Office Protocol, a protocol used to retrieve e-mail from a mail
server. Most e-mail applications (sometimes called an e-mail client) use the
POP, although some can use the newer IMAP (Internet Message Access
Protocol)as a replacement for POP3 Port Number :110
• TFTP: Trivial File Transfer Protocol, a simple form of the File Transfer
Protocol (FTP). TFTP provides no security features. It is often used by servers
to boot diskless workstations, X-terminals, and routers. Port Number :69
• DNS: Domain Name System (or Service or Server), an Internet service that
translates domain names into IP addresses. Because domain names are
alphabetic, they're easier to remember. The Internet however, is really based on
IP addresses. Every time you use a domain name, a DNS service must translate
the name into the corresponding IP address. For example, the domain name
www.example.com might translate to 198.105.232.4. Port Number :53
• DHCP: Dynamic Host Configuration Protocol, a protocol for assigning
dynamic IP addresses to devices on a network. With dynamic addressing, a
device can have a different IP address every time it connects to the network.
Dynamic addressing simplifies network administration because the software
keeps track of IP addresses rather than requiring an administrator to manage the
task. Port Number : 67(Server),68(Client)
• BOOTP: Bootstrap Protocol (BOOTP) is utilized by diskless workstations to
gather configuration information from a network server. This enables the
workstation to boot without requiring a hard or floppy disk drive. Port Number :
67(Server),68(Client)
• SNMP: Simple Network Management Protocol, a set of protocols for managing
complex networks. SNMP works by sending messages, called protocol data
units (PDUs), to different parts of a network. Port Number :161
29
Networks and Devices • Transmission Control Protocol (TCP): TCP provides reliable, full-duplex
connections and reliable service by ensuring that data is retransmitted when
transmission results in an error (end-to-end error detection and correction).
Also, TCP enables hosts to maintain multiple, simultaneous connections.
• User Datagram Protocol (UDP): When error correction is not required, UDP
provides unreliable datagram service (connectionless) that enhances network
throughput at the host-to-host transport layer. It's used primarily for
broadcasting messages over a network.
The IP addresses are used by the internetwork and higher layers to identify devices
and to perform internetwork routing. IP is used by all protocols in the layers above
and below it to deliver data, which means all TCP/IP data flows through IP when it is
sent and received, regardless of its final destination.
• ARP (Address Resolution Protocol): It is used to map the known I.P. addresses
into Physical address.
• I.C.M.P.( Internet Control Message Protocol): It is used to send error & control
Messages in the network
• They define how to use the network to transmit a frame, which is the data unit
passed across the physical connection.
• They exchange data between the computer and the physical network.
• They deliver data between two devices on the same network using the physical
address.
The network access layer includes a large number of protocols. For instance, the
network access layer includes all the variations of Ethernet protocols and other LAN
standards. This layer also includes the popular WAN standards, such as the Point-to-
Point Protocol (PPP) and Frame Relay.
30
OSI and TCP/IP Models
2.4 COMPARISON OF OSI AND TCP/IP MODELS
As it can be seen from the previous pages, there are a number of comparisons, which
can be drawn between the two models as shown below in the Figure 6. This section
will therefore be focusing on highlighting the similarities and differences between the
OSI and TCP/IP models.
Similarities
The main similarities between the OSI and TCP/IP models include the following:
• They share similar architecture. - Both of the models share a similar
architecture. This can be illustrated by the fact that both of them are
constructed with layers.
• They share a common application layer.- Both of the models share a common
"application layer". However in practice this layer includes different services
depending upon each model.
• Both models have comparable transport and network layers.- This can be
illustrated by the fact that whatever functions are performed between the
presentation and network layer of the OSI model similar functions are
performed at the Transport layer of the TCP/IP model.
• Both models assume that packets are switched.- Basically this means that
individual packets may take differing paths in order to reach the same
destination.
Differences
The main differences between the two models are as follows:
31
Networks and Devices • TCP/IP Protocols are considered to be standards around which the internet has
developed. The OSI model however is a "generic, protocol- independent
standard."
• TCP/IP combines the presentation and Chapter layer issues into its application
layer.
• TCP/IP combines the OSI data link and physical layers into the network access
layer.
• TCP/IP appears to be a simpler model and this is mainly due to the fact that it
has fewer layers.
• TCP/IP is considered to be a more credible model- This is mainly due to the fact
because TCP/IP protocols are the standards around which the internet was
developed therefore it mainly gains creditability due to this reason. Where as in
contrast networks are not usually built around the OSI model as it is merely
used as a guidance tool.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
2. Write the main similarities between the TCP/IP and OSI reference models.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
32
2.5.1 Application Layer Protocols OSI and TCP/IP Models
The Application layer provides applications the ability to access the services of the
other layers and defines the protocols that applications use to exchange data. There
are many Application layer protocols and new protocols are always being developed.
The major functions of Application Layer are:
• Transfer of file that make up of Web pages
• Interactive file transfer(FTP)
• Transfer of mail messages and attachments
• Logging on remotely to networks hosts
• Resolving host name of an IP address
• Exchanging routing information on an IP internetwork.
• Collecting and exchanging network management information.
The Most common Application Layer Protocols are:
• Telnet (Network Terminal Protocol )
• FTP (File Transfer Protocol)
• SMTP(Simple Mail Transfer Protocol)
• DNS(Domain Name Server)
• RIP(Routing Information Protocol)
• SNMP(Simple Network Management Protocol)
Telnet not only allows the user to log in to a remote host, it allows that user to execute
commands on that host. Thus, an individual in Los Angeles can Telnet to a machine in
New York and begin running programs on the New York machine just as though the
user were actually in New York.
An FTP address looks a lot like an HTTP, or Website, address except it uses the
prefix ftp:// instead of http://.
33
Networks and Devices Simple Mail Transfer Protocol
SMTP is a relatively simple, text-based protocol, in which one or more recipients of a
message are specified (and in most cases verified to exist) along with the message text
and possibly other encoded objects. The message is then transferred to a remote
server using a procedure of queries and responses between the client and server.
Either an end-user's email client, a.k.a. MUA (Mail User Agent), or a relaying server's
MTA (Mail Transport Agents) can act as an SMTP client.
An email client knows the outgoing mail SMTP server from its configuration. A
relaying server typically determines which SMTP server to connect to by looking up
the MX (Mail eXchange) DNS record for each recipient's domain name (the part of
the email address to the right of the at (@) sign). Conformant MTAs (not all) fall back
to a simple A record in the case of no MX. (Relaying servers can also be configured
to use a smart host.)
The SMTP client initiates a TCP connection to server's port 25 (unless overridden by
configuration). It is quite easy to test an SMTP server using the telnet program.
SMTP is a "push" protocol that does not allow one to "pull" messages from a remote
server on demand. To do this a mail client must use POP3 or IMAP. Another SMTP
server can trigger a delivery in SMTP using ETRN.
The reason that HTTP uses TCP and not UDP is because much data must be sent for a
webpage, and TCP provides transmission control, presents the data in order, and
provides error correction.
Above all, DNS makes it possible to assign Internet names to organizations (or
concerns they represent) independent of the physical routing hierarchy represented by
the numerical IP address. Because of this, hyperlinks and Internet contact information
34
can remain the same, whatever the current IP routing arrangements may be, and can OSI and TCP/IP Models
take a human-readable form (such as "example.com"), which is easier to remember
than the IP address 208.77.188.166. People take advantage of this when they recite
meaningful URLs and e-mail addresses without caring how the machine will actually
locate them.
The Domain Name System distributes the responsibility for assigning domain names
and mapping them to IP networks by allowing an authoritative name server for each
domain to keep track of its own changes, avoiding the need for a central register to be
continually consulted and updated.
35
Networks and Devices • It multiplexes the connections, allowing multiple applications to simultaneously
send and receive data through port or socket numbers
The Most common Transport Layer Protocols are:
• T.C.P (Transmission Control Protocol)
• U.D.P (User Datagram Protocol)
Internet Protocol
The Internet Protocol is the building block of the Internet. IP is a connectionless
protocol, means it does not exchange control information (handshake) to provide end-
to-end control of communications flow. It relies on other layers to provide this
function if it is required. IP also relies on other layers to provide error detection and
correction. Because of this IP is sometimes referred to as an unreliable protocol
because it contains no error detection and recovery code. IP can be relied upon to
accurately deliver your data to the connected network, but it doesn't check whether
that data was correctly received.
36
adapters are produced with a physical address embedded in the hardware called the OSI and TCP/IP Models
Media Access Control (MAC) address.
Manufacturers take care to ensure these 6-byte (48-bit) addresses are unique, and
Ethernet relies on these unique identifiers for message delivery. When any device
wishes to send data to another target device over Ethernet, it must first determine the
MAC address of that target given its IP address These IP-to-MAC address mappings
are derived from an ARP cache maintained on each device.
If the given IP address does not appear in a device's cache, that device cannot direct
messages to that target until it obtains a new mapping. To do this, the initiating device
first sends an ARP request broadcast message on the local subnet. The host with the
given IP address sends an ARP reply in response to the broadcast, allowing the
initiating device to update its cache and proceed to deliver messages directly to the
target.
To obtain the I.P. address, diskless workstations broadcast their MAC address in the
whole network, when the RARP server receives the request it responds the
workstation with a unique I.P. address.
37
Networks and Devices generating too many Source Quench messages would cause even more network
congestion, so they are used sparingly.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
2.6 SUMMARY
This unit began with an introduction to OSI reference model. It gave detailed
information about various layers and functions of each layer of OSI reference model.
The unit covers on understanding of how does the communication happen in a
network. It also covered TCP/IP model. Comparison was made between OSI and
TCP/IP models along with similarities and differences. Some of useful protocols of
each layer of TCP/IP were described.
38
7. Larry L. Peterson, Computer Networks: A Systems Approach, 3rd Edition (The OSI and TCP/IP Models
Morgan Kaufmann Series in Networking).
2.8 SOLUTIONS/ANSWERS
39
Networks and Devices 2. The main similarities between the OSI and TCP/IP models include the
following:
• They share similar architecture. - Both of the models share a similar
architecture. This can be illustrated by the fact that both of them are
constructed with layers.
• They share a common application layer.- Both of the models share a
common "application layer". However in practice this layer includes
different services depending upon each model.
• Both models have comparable transport and network layers.- This can be
illustrated by the fact that whatever functions are performed between the
presentation and network layer of the OSI model similar functions are
performed at the Transport layer of the TCP/IP model.
• Both models assume that packets are switched.- Basically this means that
individual packets may take differing paths in order to reach the same
destination.
2. The address resolution protocol is a protocol used by the Internet Protocol (IP),
specifically IPv4 (IP version 4), to map IP network addresses to the hardware
addresses used by a data link protocol. It is used when IPv4 is used over
Ethernet. ARP works on Ethernet networks as follows. Ethernet network
adapters are produced with a physical address embedded in the hardware called
the Media Access Control (MAC) address.
Manufacturers take care to ensure these 6-byte (48-bit) addresses are unique,
and Ethernet relies on these unique identifiers for message delivery. When any
device wishes to send data to another target device over Ethernet, it must first
determine the MAC address of that target given its IP address These IP-to-MAC
address mappings are derived from an ARP cache maintained on each device.
40
If the given IP address does not appear in a device's cache, that device cannot OSI and TCP/IP Models
direct messages to that target until it obtains a new mapping. To do this, the
initiating device first sends an ARP request broadcast message on the local
subnet. The host with the given IP address sends an ARP reply in response to
the broadcast, allowing the initiating device to update its cache and proceed to
deliver messages directly to the target.
41
Networks and Devices
UNIT 3 PHYSICAL AND DATA LINK LAYER
Structure Page Nos.
3.0 Introduction 42
3.1 Objectives 42
3.2 Physical and Data Link Layer Services 42
3.3 Error Detection and Correction 44
3.4 Flow and Error Control 48
3.5 Medium Access Control (MAC) Sublayer 51
3.5.1 Contention based media access protocols
3.5.2 Random access protocols
3.5.3 Polling based MAC protocols
3.5.4 IEEE standard 802.3 and Ethernet
3.5.5 IEEE standard 802.4 token bus
3.5.6 IEEE standard 802.5 token ring
3.5.7 Address resolution protocol (ARP)
3.5.8 Reverse address resolution protocol (RARP)
3.6 Summary 55
3.7 References/Further Reading 56
3.7 Solutions/Answers 56
3.0 INTRODUCTION
As you have studied earlier that the physical layer provides an electrical, mechanical,
and functional interface to the transmission medium also the data link layer together
with physical layer provide a data link connection for reliable transfer of data bits over
an imperfect physical connection, between two adjacent nodes. In this unit, we will
study about design of Data Link Layer and its Medium Access Control Sublayer. This
includes various protocols for achieving reliable, efficient communication. It also
covers the study of nature of errors, causes and how they can be detected and corrected.
The MAC sublayer contains protocols which determine what goes next on a multi-
access channel. In the end of this unit you will learn about working of ARP and RARP
protocols.
3.1 OBJECTIVES
After going through this unit, you should be able to:
• Know the services of physical and data link layer
• Understand the concept of framing
• Understand various error handling methods;
• Know the Retransmission Strategies at data link layer
• Understand various flow control methods,
• Understand the working of MAC sub-layer protocols
• Differentiate between CSMA/CD, Polling and Token Passing.
• Understand the working of ARP and RARP
42
`
This is an elementary layer below the logical data structures of the higher level functions Physical and Data Link
in a network. The physical layer deals with transmitting raw bits rather than logical data Layer
packets over a physical network. The bit stream may be grouped into code words or
symbols and converted to an electrical signal that is transmitted over a hardware
transmission medium.
The physical layer provides an electrical, mechanical, and functional interface to the
transmission medium. This layer has certain limitations, for example assume:
• If the electrical signal gets impaired due to the encountered interference with
other signals or electromagnetic waves from external sources, errors may be
introduced in the data bits.
• Errors can also be introduced if the receiving device is not ready for the
incoming signal, hence resulting in the loss of some information.
The data link layer constitutes the second layer of the hierarchical OSI Model. The Data
Link layer together with physical layer provide a data link connection for reliable
transfer of data bits over an imperfect physical connection, between two adjacent nodes.
It accomplishes this task by having the sender break the input data into data frames,
transmit the frames sequentially and process the acknowledgement frames sent back by
the receiver. Remember, like other layers of OSI model this layer also create its own
protocol data unit. Data link layer add some control bits to the protocol data unit
received from network layer and convert into different protocol data unit called frames.
The data link layer creates and recognises frame boundaries too.
Another issue that arises in data link layer is how to keep a fast transmitter from
overflowing a slow receiver in data. The data link layer (Figure 1) incorporates certain
processes, which carry out error control, flow control and the associated link
management functions. The data block along with the control bits is called a frame.
Logical Link Control (LLC) concerned with providing a reliable communication part
between two devices. It is also involved with flow control and sequencing. The LLC
is non-architecture-specific and is the same for all IEEE defined LANs.
Network Layer
Physical Layer
43
Networks and Devices Link layer:
1. Framing: Encapsulation of network layer data packets into frames, and Frame
synchronization
2. Flow Control: Flow control deals with how to keep the fast sender from
overflowing a slow receiver by buffering and acknowledgement procedures.
This flow control at data link layer is provided in addition to the one provided
on the transport layer.
3. Error detection and correction codes: Various methods used for error-
detection and corrections are – Parity bit, cyclic redundancy check, checksum,
Hamming code, etc.
4. Multiple access protocols for channel-access control
5. Physical addressing (MAC addressing)
6. Quality of Service (QoS) control
Error Detection
In the following section parity bit and CRC methods for error detection are discussed.
The parity bit is only suitable for detecting errors; it cannot correct any errors, as
there is no way to determine which particular bit is corrupted. The data must be
discarded entirely, and re-transmitted from scratch. Following are some of the
examples for parity bit methods:
Assume, sender wants to send some bit streams like 001 0101 and 101 0011. If we are
using even parity bit method, we will add “0” with the bit steam having even number
of 1’s otherwise add “1”. So our bit steams will be changed after adding parity bit as
1001 0101and 0101 0011. At the receiver again the number of 1’s are counted in the
original message, if the parity bit is mismatched we can say an error has occurred in
the message. Just like the even parity we may have odd parity bit method. Parity bit
method has many limitations, like it cannot identify the error if more than one bit has
been changed or parity bit itself has been changed during the transmission. Further it
cannot determine which bit position has a problem.
44
`
When n-bits of message M(x) is transmitted from sender to receiver, first the n- bits of
message is converted in such a way that when a selected k-bits divisor code G(k) (so-
called generator polynomial) is divided with the x+k-bits message M(x+k) the
remainder is zero.
Than the modified message M(x+k) is sent along with the k-bits divisor code to the
receiver through channel. The receiver will divide this M(x+k) bits with G(k) bits, if
the remainder is zero receiver can say there is no error in the message. Finally the
original message M(x) is separated from the modified message M(x+k).
Let us take assume an example for simple decimal numbers, if you want to send some
number say 10 and divisor code is 3. First, make all legal messages divisible by 3.
For that you need to multiply by 4 to get 40 and add 2 to make it divisible by 3 = 42.
When the data is received and divided by 3, and if there is no remainder, it means
there is no error. If no error, divide by 4 and separate it by 2 to get sent message. If we
receive 43, 44, 41, 40, we can say there is an error. But if 45 is received, we will not
be able to recognize as an error.
45
Networks and Devices
Now, assume if receiver will receive a message with errors, for example receiver has
received a message 10010110101.
Cyclic codes have favorable properties in that they are well suited for detecting burst
errors. CRCs are particularly easy to implement in hardware, and are therefore
commonly used in digital networks and storage devices such as hard disk drives.
Error correction
Mainly, we have two error correction mechanisms one is Automatic Repeat request
and another approach is of using some error correction codes like hamming code.
46
`
Error-correcting codes can be classified into two type’s convolutional codes which
processed on a bit-by-bit basis and block codes that processed on a block-by-block
basis. Convolutional codes are suitable for implementation in hardware. However,
block codes are error correction in data communication. Hamming code is an example
of block codes. Hamming codes are code words formed by adding redundant check
bits, or parity bits, to a data word. The Hamming distance between two code words is
the number of bits in which two code words differ. For an example 10001001 and
10110001 bytes has a Hamming distance of 3. The minimum Hamming distance for a
code is the smallest Hamming distance between all pairs of words in the code. The
minimum Hamming distance for a code, D(min), determines its error detecting and
error correcting capability. Hamming codes can detect D(min) - 1 errors and correct
(D(min) - 1 )/2 errors.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
3. What is parity bit method? Explain its use with the help of an example.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
47
Networks and Devices
3.4 FLOW AND ERROR CONTROL
Packets can be lost and/or corrupted during transmission due to Bit level errors and loss
due to congestion. We use checksums to detect bit level errors, and to maintain
reliability into the data transmission stage we use acknowledgements and timeouts to
signal lost or corrupt frame. An acknowledgement (ACK) is a packet sent by one host
in response to a packet it has received. A timeout is a signal that an ACK to a packet that
was sent has not yet been received within a specified timeframe. In this section we will
discuss several retransmission strategies, which are also considered as a flow control
and error control mechanism.
Sliding Window
Here data and control frames flow from sender to receiver in a more continuous manner
and several frames can be outstanding at any one time as depicted in figure 3. Allow
multiple outstanding (un-ACKed) frames. Upper bound on un-ACKed frames, called
window. Sender needs to buffer data so that if data is lost, it can be resent.
Receiver needs to buffer data so that if data is received out of order, it can be held until
all packets are received in Flow control Next,
How can we prevent sender overflowing receiver’s buffer?
Receiver tells sender its buffer size during connection setup.
48
`
Go Back N
This is a sliding window technique as shown in figure 4. It allows data and control
messages to be
transmitted continuously without waiting for its acknowledgement from the receiver.
In the event of error detection at the receiving side, the erroneous message is
retransmitted, as well as all other frames that were transmitted after the erroneous
message.
49
Networks and Devices Selective Repeat
This method provides for a more refined approach. In contrast to the Go back N, the
only messages retransmitted are those for which negative acknowledgement is
received. In this the sending process continues to send a number of frames specified
by a window size even after a frame loss. Unlike Go-Back-N, the receiving process
will continue to accept and acknowledge frames sent after an initial error; this is the
general case of the sliding window protocol with both transmit and receive window
sizes greater than 1.
The receiver process keeps track of the sequence number of the earliest frame it has
not received, and sends that number with every acknowledgement (ACK) it sends. If a
frame from the sender does not reach the receiver, the sender continues to send
subsequent frames until it has emptied its window. The receiver continues to fill its
receiving window with the subsequent frames, replying each time with an ACK
containing the sequence number of the earliest missing frame. Once the sender has
sent all the frames in its window, it re-sends the frame number given by the ACKs,
and then continues where it left off.
Now if we compare Selective Repeat behaves in the same way like Go-Back-N , it
accepts when the receiver receives a frame which is out of sequence, it sends a
SREJ(Selective Reject) message. Sender retransmits only the rejected packet and
continues with other packets. Here in Selective Repeat method the both the
Sender’s and Receiver’s buffer size are equal to the window size.
In the following figure 5, you can see that the difference between Go Back N and
Selective Repeat, because of the buffer frame 5 and Frame 6 are stored and selectively
the reject message is sent only for frame 4 (which was lost in transmission) however
in Go back N the reject message is sent for all 4, 5 and 6 frames.
50
`
Studies reveal that the selective repeat mechanism produces greater throughput than Physical and Data Link
the Go Back N. Selective Repeat mechanism requires additional logic to maintain the Layer
sequence of the recent message and merge it into the proper place as the queue at the
receiver end.
1. Explain the importance of Sliding Window protocol. Also, List the types of
sliding window techniques.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
Message to be transmitted are converted to packets and are sent when ready, without
verifying the availability of the channel. When transmission of a station overlaps with
that of another, collision occurs. Colliding packets with their messages are
destroyed.
51
Networks and Devices Pure ALOHA
It is based on simple principles that if you have data to send, send the data
immediately. If the message collides with another transmission, after some random
time wait, we can resend it message. In this, all frames from any station are of fixed
length size and produce frames with equal frame lengths. A station that has data can
transmit at any time, after transmitting a frame, the sender waits for an
acknowledgment for an amount of time. If ACK was not received, sender assumes
that the frame or ACK has been destroyed and resends that frame after it waits for a
random amount of time.
Slotted ALOHA
Slotted ALOHA is an improvement over pure ALOHA, which has discrete timeslots.
A station is allowed to send the message only at the beginning of a timeslot, due to
time the possibility of collisions are reduced. If a station misses the beginning of a
slot, it has to wait until the beginning of the next time slot. A central clock or station
informs all stations about the start of an each slot.
CSMA/CD
Before discussing about CSMA/CD (Carrier Sense Multiple Access with Collision
Detection), let us first discuss about simple CSMA. Carrier Sense Multiple Access
52
`
(CSMA) is a MAC layer protocol in which a node verifies the absence of other traffic Physical and Data Link
before transmitting on a shared transmission medium. Here, the Carrier Sense means Layer
the fact that a transmitter uses feedback from a receiver before trying to send any
message. If a carrier is sensed, the station waits for the transmission in progress to
finish before initiating its own transmission. And the Multiple Access means that
multiple stations are sending and receiving on the same medium. Based on different
situations of medium like medium busy or idle different CSMA protocols has been
designed like non-Persistent CSMA, 1-Persistent CSMA and p-Persistent CSMA. All
these types of CSMA have inefficiency in term of collision detection. Assume that a
collision has occurred, than the channel is unstable until colliding packets have been
fully transmitted. A standards and rules need to be created for stations like when they
could send data and when they could not.
This standard in CSMA is Carrier Sense Multiple Access with Collision Detection,
referred to as CSMA/CD.
Following are two possibilities for the path of a message from some to destination
workstation:
• All messages may be required to pass to the central workstation, which route
them to their destination.
• Messages may be sent directly.
Polling technique can be said to maintain a tight control over the network resources
than do contention based protocols.
Token Passing
The network continuously circulates a special bit pattern known as a token among all the
nodes in the network.
Each token contains network information, comprising of a header, a data field and a
trailer. Any node willing to send a frame has to grab a token first. After a node has
captured a token it transmits its frame. The frame is relayed by all intermediate nodes
till it reaches destination, when it is copied. Now let us talk about some standards.
53
Networks and Devices 3.5.4 IEEE Standard 802.3 and Ethernet
It uses CSMA/CD mechanism Expand (carrier Seen Multiple Access/Collision Detect).
When station wants to transmit, it listens to the cable. If the cable is busy, the station
waits until it goes idle, otherwise it transmits immediately. If two or more stations
simultaneously begin transmitting on an idle cable they will collide. All colliding
stations then terminate their transmissions, wait a random time and repeat the whole
process all over again.
It is a linear cable onto which the stations are attached. When the logical ring is
initialised, the highest numbered station may send the first frame after it is done, it
passes permission to its immediate neighbour by sending the neighbour a special
control frame called a token.
The token propagates around the logical ring with only the token holder being
permitted to transmit frames. Since only one station at a time holds the token,
collisions do not occur.
54
`
ARP assumes that every host knows its IP address and physical address. Any time a host Physical and Data Link
needs to know the physical address of another host on the network, it creates an ARP Layer
packet that includes the IP address X of the destination host asking–Are you the one
whose IP address is X? If yes, please send back your physical address. This packet is
then broadcasted over the local network. The computer, whose IP address matches X,
sends an ARP reply packet, with its physical address. All the other hosts ignore the
broadcast. Next time the host needs to send a datagram to the same destination, it need
not broadcast an ARP query datagram; instead it can look up in its ARP cache. If the
mapping is not found in the cache, then only the broadcast message is sent.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
3.6 SUMMARY
After studying this unit, we are sure that you understood the services and protocol of
data link layer. Essentially it provides the functional means to transfer data between
network entities and might provide the means to detect and possibly correct errors that
may occur in the physical layer. We have briefly discussed various methods used for
error-detection and corrections are – Parity bit, cyclic redundancy check, Hamming
code, etc. In this unit you have studied some flow control and error control
mechanism to ensure the reliability of communication. In this unit you have studied
sliding window mechanisms mainly used for flow control at data link layer. As you
know that the key issue is how to determine who gets to use the channel when there is
55
Networks and Devices competition for it. In this unit, we have studied the protocols used to determine who
goes next on a multi-access channel. In the end of this unit we have studied address
resolution protocols to map between IP addresses and the physical addresses of the
machines.
3.8 SOLUTIONS/ANSWERS
3. Parity bit method is very simple error detection method in the digital
communication. A binary digit called “parity” is used to indicate whether the
number of bits with “1” in a given set of bits is even or odd. The parity bit is then
attached to original bits. Assume sender want to send some bit streams like 001
0101 and 101 0011. If we are using even parity bit method, we will add “0” with
56
`
the bit steam having even number of 1’s otherwise add “1”. So our bit steams will Physical and Data Link
be changed after adding parity bit as 1001 0101and 0101 0011. At the receiver Layer
again the number of 1’s are counted in the original message, if the parity bit is
mismatched we can say an error has occurred in the message. Just like the even
parity we may have odd parity bit method.
4. It is an error control method for data transmission that makes use of error-
detection codes, acknowledgment and/or negative acknowledgment messages, and
timeouts to get reliable data transmission. Generally, when the sender does not
receive the acknowledgment before the timeout occurs, it retransmits the frame
until it is either correctly received or the error persists beyond a predetermined
number of retransmissions. Three types of ARQ protocols are Stop-and-wait
ARQ, Go-Back-N ARQ, and Selective Repeat ARQ, these mechanisms we will
study further in this unit.
2. This method provides for a more refined approach. In contrast to the Go back
N, the only messages retransmitted are those for which negative
acknowledgement is received. In this the sending process continues to send a
number of frames specified by a window size even after a frame loss. Unlike
Go-Back-N, the receiving process will continue to accept and acknowledge
frames sent after an initial error; this is the general case of the sliding window
protocol with both transmit and receive window sizes greater than 1.
The receiver process keeps track of the sequence number of the earliest frame it
has not received, and sends that number with every acknowledgement (ACK) it
sends. If a frame from the sender does not reach the receiver, the sender
continues to send subsequent frames until it has emptied its window. The
receiver continues to fill its receiving window with the subsequent frames,
replying each time with an ACK containing the sequence number of the earliest
missing frame. Once the sender has sent all the frames in its window, it re-sends
the frame number given by the ACKs, and then continues where it left off.
Now if we compare Selective Repeat behaves in the same way like Go-Back-N ,
it except when the receiver receives a frame which is out of sequence, it sends a
SREJ(Selective Reject) message. Sender retransmits only the rejected packet
and continues with other packets. Here in Selective Repeat method the both the
Sender’s and Receiver’s buffer size are equal to the window size.
57
Networks and Devices Check Your Progress 3
1. Throughput is the percentage of the transmitted frames that arrive successfully
(without collisions) or the percentage of the channel bandwidth that will be
used for transmitting frames without collisions. The throughput ( S) for pure
ALOHA is S = G × e −2G . The maximum throughput is Smax = 0.184 when G=
(1/2). Where, G is equal to the traffic load. In case of Slotted ALOHA the
throughput is S = G × e−G and the maximum throughput is Smax = 0.368 when G
= 1.
2. RARP maps a physical address to its IP address. Where is this needed? A node
is supposed to have its IP address stored on its hard-disk. However, there are
situations when the host may not have hard disk at all, for example a diskless
workstation. But also when a host is being connected to the network for the first
time, at all such times, a host does not know its IP address. In that case RARP
find out the IP address.
58
Networks and Devices
UNIT 4 INTERNETWORKING DEVICES
Structure Page Nos
4.0 Introduction 58
4.1 Objectives 58
4.2 Internetworking Devices 58
4.2.1 Network interface card
4.2.2 Modem (modulator/demodulator)
4.2.3 Repeaters
4.2.4 Hubs
4.2.5 Bridges
4.2.6 Switch
4.2.7 Gateway
4.3 Summary 69
4.4 References/Further Readings 69
4.5 Solutions/Answers 70
4.0 INTRODUCTION
In this unit, you will learn on various internetwork devices such as NIC adapters,
routers, hubs, switches, modems, gateway and other related devices. A network is
consists of a larger number of the communication devices. The simplest device that is
used in the communication is the NIC adapter which is attached with the every
computer in a network. If you want to build a LAN, you will need to have computers,
hubs, switches, network adapters, UTP/STP cables, routers, internal/external modems,
connectors, cable testers and clipping tool. This unit explains some of mostly used
network devices.
4.1 OBJECTIVES
After going through this unit, you should be able to know:
• Understand various network devices
• Functions of various network devices
• Merits and limitations of various network devices
• Difference between layer 2 and layer 3 switching, and
• Network gateway and its importance.
58
Internet Working
Devices
The NIC may use one or more of four techniques to transfer data:
• Polling is where the CPU examines the status of the peripheral under program
control.
Figure 2: Modem
59
Networks and Devices CSU / DSU
CSU/DSU (Channel Service Unit/Data Service Unit) is a hardware device about the
size of an external modem that converts digital data frames from the communications
technology used on a local area network (LAN) into frames appropriate to a wide-area
network (WAN) and vice versa. A common type of device is also shown in the Figure
3. For example, if you have a Web business from your own home and have leased a
digital line (perhaps a T-1 or fractional T-1 line) to a phone company or a gateway at
an Internet service provider, you have a CSU/DSU at your end and the phone
company or gateway host has a CSU/DSU at its end.
The Channel Service Unit (CSU) receives and transmits signals from and to the WAN
line and provides a barrier for electrical interference from either side of the unit. The
CSU can also echo loop back signals from the phone company for testing purposes.
The Data Service Unit (DSU) manages line control, and converts input and output
between RS-232C, RS-449, or V.35 frames from the LAN and the time-division
multiplexed (TDM) DSX frames on the T-1 line. The DSU manages timing errors and
signal regeneration. The DSU provides a modem-like interface between the computer
as Data Terminal Equipment (DTE) and the CSU.
4.2.3 Repeaters
A repeater is an electronic device that receives a signal and retransmits it at a higher
level or higher power, or onto the other side of an obstruction, so that the signal can
cover longer distances without degradation, an example is shown in the Figure.4.
Because repeaters work with the actual physical signal, and do not attempt to interpret
the data being transmitted, they operate on the Physical layer, the first layer of the
OSI model.
60
Internet Working
Devices
Figure 4: Repeater
In telecommunication, the term repeater has the following standardized meanings:
An analog device that amplifies an input signal regardless of its nature (analog or
digital).
4.2.4 Hubs
A hub (concentrator) contains multiple ports as shown in Figure 5, which is used to
connect devices in a star topology. When a packet arrives at one port, it is copied to
all the ports of the hub. But when the packets are copied, the destination address in
the frame does not change to a broadcast address. It does this in a rudimentary way; it
simply copies the data to all of the Nodes connected to the hub (broadcast).
Figure 5: Hub
Advantages:
• Improves performance, especially for bursty traffic and large file transfers
• Enables optimum performance of PCI computers
• Offers ease of use: Fast Ethernet hubs require no hardware or software settings;
just plug them in
• Leverages your knowledge of Ethernet and investment in management tools and
applications
Disadvantages:
• Total bandwidth remains fixed; as network traffic grows, performance suffers
61
Networks and Devices • The network manager cannot manage network load—for example, by
segmenting the network into multiple collision domains or restricting certain
types of traffic to certain ports
• Does not reduce collisions
• Requires Category 5 UTP cabling for each 100BaseTX connection
4.2.5 Bridges
The main network device found at the data link layer is a bridge. This device works at
a higher layer than the repeater and therefore is a more complex device. It has some
understanding of the data it receives and can make a decision based on the frames it
receives as to whether it needs to let the information pass, or can remove the
information from the network. This means that the amount of traffic on the medium
can be reduced and therefore, the usable bandwidth can be increased.
Bridges are store and forward devices to provide error detection; a common type of
bridge is shown in the Figure 6. They capture an entire frame before deciding whether to
filter or forward the frame, which provides a high level of error detection because a
frame’s CRC checksum can be calculated by the bridge. Bridges are highly susceptible
to broadcast storms. A broadcast storm occurs when several broadcasts are transmitted
at the same time. It can take up huge bandwidth.
Figure 6: Bridge
Advantages:
• Reliability
• Manageability
• Scalability
Disadvantages:
• A bridge cannot filter out broadcast traffic.
• It introduces 20 to 30 % latency.
• Only 2 networks can be linked with a bridge
……………………………………………………………………………………
……………………………………………………………………………………
62
2. What are the advantages and disadvantages of bridges? Internet Working
Devices
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
4.2.6 Switch
A switch is a data-link layer network device that forwards frames using MAC
addresses in the header of frames. Common types of switches are shown in the Figure
7. It is used to improve network performance by: -
• Segmenting the network and creating separate collision domains.
• Reducing competition for bandwidth.
In a switch frame, forwarding is handled by specialized hardware called "Application
Specific Integrated Circuit" (ASIC). ASIC technology allows a silicon chip to be
programmed to perform specific functions much faster than that of a chip
programmed by software.
Figure 7: Switch
3. Loop Avoidance
Switches and Bridges use Spanning Tree Protocol (STP), specified by IEEE
802.1d, to prevent loops.
Switching Methods
• Store & Forward: in this method the switch receives complete frame. CRC
(Cyclic Redundancy Check), source address and destination address are
checked.
63
Networks and Devices • Cut Through: In this method forwarding starts as soon as destination address
of the frame is received in header. Also known as WIRE SPEED.
• Fragment Free (Modified Cut Through): In this method forwarding starts as
soon as first 64 bytes of the frame are received as fragmentation occurs usually
in first 64 bytes.
Advantages:
• Reduces the number of Broadcast domains
• Supports VLAN's (virtual local area network (VLAN) is a logical grouping of
hosts on one or more LANs that allows communication to occur between hosts
as if they were on the same physical LAN.) that can help in Logical
segmentation of ports [physical ports]. Splitting up the broadcast domain.
• Intelligent device [compared to Hub's] which can make use of CAM table for
Port to MAC mapping
• Compared to Bridges, Switches are more H/w oriented therefore operations are
less CPU intense [Basic operations]
• The cost to number of ports ratio is best i.e. for a cheaper cost you get switches
with more number of ports available than Routers.
Disadvantages:
• Not as good as a router in limiting Broadcasts
• Communication between VLAN's need inter VLAN routing [Router], but these
days there are a number of Multilayer switches available in the market.
• Handling Multicast packets needs quite a bit of configuration and proper
designing.
Layer 2 Switch
Layer 2 switching uses the media access control address (MAC address) from the
host's network interface cards (NICs) to decide where to forward frames. Layer 2
switching is hardware based, which means switches use application-specific
integrated circuit (ASICs) to build and maintain filter tables (also known as MAC
address tables). One way to think of a layer 2 switch is as a multi-port bridge.
• Layer 2 switching provides the following:Hardware-based bridging (MAC)
• Wire speed
• High speed
• Low latency
• Low cost
Layer 2 switching is highly efficient because there is no modification to the data
packet, only to the frame encapsulation of the packet, and only when the data packet
is passing through dissimilar media (such as from Ethernet to FDDI). Layer 2
switching is used for workgroup connectivity and network segmentation (breaking up
collision domains). This allows a flatter network design with more network segments
than traditional 10BaseT shared networks. Layer 2 switching has helped develop new
components in the network infrastructure.
64
• Server farms — Servers are no longer distributed to physical locations because Internet Working
virtual LANs can be created to create broadcast domains in a switched Devices
internetwork. This means that all servers can be placed in a central location, yet
a certain server can still be part of a workgroup in a remote branch.
These new technologies allow more data to flow off from local subnets and onto a
routed network, where a router's performance can become the bottleneck.
Limitations
Layer 2 switches have the same limitations as bridge networks.
Bridged networks break up collision domains, but the network remains one large
broadcast domain. Similarly, layer 2 switches (bridges) cannot break up broadcast
domains, which can cause performance issues and limits the size of your network.
Broadcast and multicasts, along with the slow convergence of spanning tree, can
cause major problems as the network grows. Because of these problems, layer 2
switches cannot completely replace routers in the internetwork.
Layer 3 Switch
A Layer 3 switch is a high-performance device for network routing. Layer 3 switches
actually differ very little from routers. A Layer 3 switch can support the same routing
protocols as network routers do. Both inspect incoming packets and make dynamic
routing decisions based on the source and destination addresses inside. Both types of
boxes share a similar appearance.
Layer 3 switches often cost less than traditional routers. Designed for use within local
networks, a Layer 3 switch will typically not possess the WAN ports and wide area
network features a traditional router will always have.
Layer 3 switches can be placed anywhere in the network because they handle high-
performance LAN traffic and can cost-effectively replace routers. Layer 3 switching
is all hardware-based packet forwarding, and all packet forwarding is handled by
hardware ASICs.
6. Provide Security
65
Networks and Devices The benefits of layer 3 switching include the following
• High-speed scalability
• Low latency
• Flow accounting
• Security
ATM Switch
ATM Switches as shown in Figure 8 provide high-speed transfer between both LANs
and WANs. Asynchronous Transfer Mode (ATM) is a network technology adopted by
the telecommunication sector. It is a high-performance, cell-oriented switching and
multiplexing technology that utilises fixed-length packets to carry different types of
traffic. The data transfer takes place in the form of cells or packets of a fixed size (53
bytes).
The cell used with ATM is relatively small compared to units used with older
technologies. The small constant cell size allows ATM equipment to transmit video,
audio, and computer data over the same network, and assures that no single type of
data hogs the line.
ATM technology is used for both local and wide area networks (LANs and WANs)
that support real-time voice and video as well as data. ATM is widely used as a
backbone technology in carrier networks and large enterprises, but never became
popular as a local network (LAN) topology. ATM is highly scalable and supports
transmission speeds of 1.5, 25, 100, 155, 622, 2488 and 9953 Mbps.
Router
Router is a networking device which forwards data packets along networks by using
headers and forwarding/routing tables to determine the best path to forward the
packets. Common types of modern routers are shown here in Figure 9. Routers work
at the Internet layer of the TCP/IP model or layer 3 of the OSI model. Routers also
provide interconnectivity between like and unlike media. A router is connected to at
least two networks, commonly two LANs or WANs or a LAN and its ISP's network.
Some DSL and cable modems, for home use, have been integrated with routers to
allow multiple home computers to access the Internet.
66
Internet Working
Devices
Introducing Routing
Once we create an internetwork by connecting your WANs and LANs to a router, we
shall need to configure logical network addresses, such as IP addresses, to all hosts on
the internetwork so that they can communicate across that internetwork.
The term routing is used for taking a packet from one device and sending it through
the network to another device on a different network. Routers don’t really care about
hosts—they only care about networks and the best path to each network. The logical
network address of the destination host is used to get packets to a network through a
routed network, and then the hardware address of the host is used to deliver the packet
from a router to the correct destination host.
If your network has no routers, then it should be apparent that you are not routing.
Routers route traffic to all the networks in your internetwork. To be able to route
packets, a router must know, at a minimum, the following:
• Destination address
• Neighbor routers from which it can learn about remote networks
• Possible routes to all remote networks
• The best route to each remote network
• How to maintain and verify routing information
• The router learns about remote networks from neighbor routers or from an
administrator
As it is already discussed that IP routing is basically of three types: static routing,
default routing and dynamic routing.
Static Routing
Static routing is the process in which the system network administrator would
manually configure network routers with all the information necessary for successful
packet forwarding. The administrator constructs the routing table in every router by
putting in the entries for every network that could be a destination.
67
Networks and Devices Default Route
A default route is often called the 'route of last resort'. It is the last route tried by a
router when all other routes fail because it has the fewest number of network bits
matching and is therefore less specific. We use default routing to send packets with a
remote destination network not in the routing table to the next-hop router. You should
only use default routing on stub networks—those with only one exit path out of the
network. To configure a default route, you use wildcards in the network address and
mask locations of a static route. In fact, you can just think of a default route as a static
route that uses wildcards instead of network and mask information.
The syntax for Default routing is : ip route 0.0.0.0 0.0.0.0 <next hop or exit interface
Dynamic Routing
Dynamic routing is when protocols (Routing Protocols) are used to find networks and
update routing tables on routers. This is easier than using static or default routing, but
it’ll cost in terms of router CPU processes and bandwidth on the network links. The
chief advantages of dynamic routing over static routing are scalability and
adaptability. A dynamically routed network can grow more quickly and larger, and is
able to adapt to changes in the network topology brought about by this growth or by
the failure of one or more network components. Chief among the disadvantages is an
increase in complexity.
4.2.7 Gateway
In the network for an enterprise, a computer server acting as a gateway node is often
simultaneously acting as a proxy server and a firewall server. A gateway is often
associated with both a router, which knows where to direct a given packet of data that
arrives at the gateway, and a switch, which furnishes the actual path in and out of the
gateway for a given packet.
68
Most computer operating systems use the terms described above. Microsoft Windows, Internet Working
however, describes this standard networking feature as Internet Connection Sharing, Devices
which acts as a gateway, offering a connection between the Internet and an internal
network. Such a system might also act as a DHCP server. Dynamic Host
Configuration Protocol (DHCP) is a protocol used by networked devices (clients) to
obtain various parameters necessary for the clients to operate in an Internet Protocol
(IP) network. By using this protocol, system administration workload greatly
decreases, and devices can be added to the network with minimal or no manual
configurations.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
4.3 SUMMARY
In this unit, various internetwork components used in a computer network are explained.
Some of the components such as NIC, Modem, Repeater, Hub, Switch and their
functions along with merits and limitations are clearly discussed. After completing this
unit you can understand the importance of various internetworking devices particularly
at the network layer. You have also studied the different switching and routing methods
in this unit. The block of this course has presented the details of transport layer and
application layer.
2) Computer Networking, J.F. Kurose & K.W. Ross, A Top Down Approach
Featuring the Internet, Pearson Edition, 2003.
4) Communications Networks, Leon Garcia, and Widjaja, Tata McGraw Hill, 2000.
69
Networks and Devices
4.5 SOLUTIONS/ANSWERS
70
A gateway may contain devices such as protocol translators, impedance Internet Working
matching devices, rate converters, fault isolators, or signal translators as Devices
necessary to provide system interoperability. It also requires the establishment
of mutually acceptable administrative procedures between both networks. A
protocol translation/mapping gateway interconnects networks with different
network protocol technologies by performing the required protocol conversions.
71