Study Materials
Study Materials
Institute of Engineering & Management, Salt Lake Campus Institute of Engineering &
Management, New Town CampusUniversity of Engineering & Management, Jaipur
Study Material
Subject Name: Computer Networking
Subject Code: BCAMD301
COURSE OBJECTIVES:
1. To deliver comprehensive view of Computer Network.
2. To enable the students to understand the Network Architecture, Network type and
topologies.
3. To understand the design issues and working of each layer of OSI model.
4. To familiarize with the benefits and issues regarding Network Security.
COURSE OUTCOMES:
CO1: Identify the different components in a Communication System and their respective roles.
CO2 Describe the technical issues related to the Networks.
CO3: Defining the standard model and protocols of networking
CO4: Understand the basics of data communication, networking, internet and their importance.
Lecture
Module Topic Sub-topics
Hours
number
1 Introduction Introduction to communication systems, 5
Data, signal and Transmission: Analog and Digital,
Transmission modes,
components, Transmission Impairments, Performance
criteria of a communication system. Goals of computer
Network, Networks: Classification, Components and
Topology, categories of network
[LAN, MAN,WAN];Internet: brief history, internet today;
Protocols and standards; OSI and TCP/IP model.
2 Physical Layer & Physical Layer: 10
Data link layer Overview of data[analog & digital], signal[analog &
digital],
transmission [analog & digital] & transmission media
[guided
& unguided]; Circuit switching: time division & space
division
switch, TDM bus; Telephone Network
Learning Resource:
Message: The message is the information (data) to be communicated. Popular forms of information include
text, numbers, pictures, audio, and video.
Sender: The sender is the device that sends the data message. It can be a computer, workstation, telephone
handset, video camera, and so on.
Receiver: The receiver is the device that receives the message. It can be a computer, workstation, telephone
handset, television, and so on.
Transmission medium: The transmission medium is the physical path by which a message travels from
sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-
optic cable, and radio waves
Protocol: A protocol is a set of rules that govern data communications. It represents an agreement between
the communicating devices. Without a protocol, two devices may be connected but not communicating, just
as a person speaking French cannot be understood by a person who speaks only Japanese.
File sharing: The major advantage of a computer network is that is allows file sharing and
remote file access.
Resource sharing: All computers in the network can share resources such as printers, fax
machines, modems, and scanners.
Better connectivity and communications: It allows users to connect and communicate with each
other easily.
Flexible access: A user can log on to a computer anywhere on the network and access his files.
Instant and multiple accesses: Computer networks are multiply processed .many of users can
access the same information at the same time.
5. Network Criteria :
Performance:
Performance can be measured in many ways, including transit time and response time. Transit time is the
amount of time required for a message to travel from one device to another. Response time is the elapsed
time between an inquiry and a response. The performance of a network depends on a number of factors,
including the number of users, the type of transmission medium, the capabilities of the connected
hardware, and the efficiency of the software.
Reliability:
In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it
takes a link to recover from a failure, and the network's robustness in a catastrophe.
Security:
Network security issues include protecting data from unauthorized access, protecting data from damage
and development, and implementing policies and procedures for recovery from breaches and data losses.
Half-Duplex: In half-duplex mode, each station can both transmit and receive, but not at the same time.
When one device is sending, the other can only receive, and vice versa the half-duplex mode is like a one-
lane road with traffic allowed in both directions.
Full-Duplex: In full-duplex both stations can transmit and receive simultaneously. The Full-duplex Mode
is like a two-way street with traffic flowing in both directions at the same time. In this mode of
transmission two people are communicating by a telephone line, both can talk and listen at the same time.
7. Type of Network Connection
8. Different types of Network Topology: The topology of a network is the geometric representation of
the relationship of all the links and linking devices (usually called nodes) to one another.
A. Mesh Topology: In a mesh topology, every device has a dedicated point-to-point link to every other
device. The term dedicated means that the link carries traffic only between the two devices it
connects. n other words, we can say that in a mesh topology, we need n(n -1) /2 duplex-mode links.
Advantages:
The use of dedicated links guarantees that each connection can carry its own data load, thus
eliminating the traffic problems that can occur when links must be shared by multiple devices.
A mesh topology is robust. If one link becomes unusable, it does not incapacitate the entire
system.
There is the advantage of privacy or security. When every message travels along a dedicated line,
only the intended recipient sees it.
Disadvantages:
Disadvantage of a mesh are related to the amount of cabling because every device must be
connected to every other device, installation and re connection are difficult.
The sheer bulk of the wiring can be greater than the available space (in walls, ceilings, or floors)
can accommodate.
The hardware required to connect each link (I/O ports and cable) can be prohibitively expensive.
B. Star Topology: In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub. The devices are not directly linked to one another. Unlike a mesh
topology, a star topology does not allow direct traffic between devices.
Advantages:
A star topology is less expensive than a mesh topology. In a star, each device needs only one link
and one I/O port to connect it to any number of others. This factor also makes it easy to install
and reconfigure.
Far less cabling needs to be housed, and additions, moves, and deletions involve only one
connection: between that device and the hub.
Other advantages include robustness. If one link fails, only that link is affected. All other links
remain active.
Disadvantages:
One big disadvantage of a star topology is the dependency of the whole topology on one single
point, the hub. If the hub goes down, the whole system is dead.
Although a star requires far less cable than a mesh, each node must be linked to a central hub.
For this reason, often more cabling is required in a star than in some other topologies (such as
ring or bus).
C. Bus Topology: The preceding examples all describe point-to-point connections. A bus topology, on
the other hand, is multipoint. One long cable acts as a backbone to link all the devices in a network.
Advantages:
Ease of installation.
A bus uses less cabling than mesh or star topologies.
In a star, for example, four network devices in the same room require four lengths of cable
reaching all the way to the hub. In a bus, this redundancy is eliminated.
Disadvantages:
Advantages:
A ring is relatively easy to install and reconfigure. Each device is linked to only its immediate
neighbors.
To add or delete a device requires changing only two connections is very easy.
Less cable used.
Disadvantages:
9. Category of Networks:
A. Local Area Network (LAN): A local area network (LAN) is usually privately used to connect the
devices in a single office, building, or campus. LAN provides a useful way of sharing the resources
between end users. The resources such as printers, file servers, scanners, and internet are easily
sharable among computers.
B. The Metropolitan Area Network (MAN): It generally expands throughout a city such as cable TV
network. It can be in the form of Ethernet, Token-ring, ATM, or Fiber Distributed Data Interface
(FDDI). Backbone of MAN is high-capacity and high-speed fiber optics. MAN works in between
Local Area Network and Wide Area Network.
C. Wide Area Network (WAN): It covers a wide area which may span across provinces and even a
whole country. Generally, telecommunication networks are Wide Area Network. These networks
provide connectivity to MANs and LANs.
10. Transmission Impairment: When signals travel through the medium, the signal can be deteriorate
due to various regions which are known as transmission impairment. There are various regions for
transmission impairment discus given bellow:
a. Attenuation: Here the signal passes through the medium, it tends to get weaker. As it covers
distance, it loses strength.
b. Delay distortion: Here sender and receiver data sending and receiving speed not same.
c. Noise: Any kind of noise can be destroying the band width of original signal.
d. Crosstalk: Due to miss match of two or more different signal.
e. Impulse: This is introduced because of irregular disturbances such as lightening, electricity, short-
circuit etc.
12. Open System Interconnection (OSI) Model: Open System Interconnect is an open standard for all
communication systems. OSI model is established by International Standard Organization (ISO).
This model has seven layers:
I. Physical Layer (Layer 1): The lowest layer of the OSI reference model is the physical layer. It is
responsible for the actual physical connection between the devices. The physical layer contains
information in the form of bits.
Bit synchronization: The physical layer provides the synchronization of the bits by providing a
clock. This clock controls both sender and receiver thus providing synchronization at bit level.
Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent
per second.
Physical topologies: Physical layer specifies the way in which the different, devices/nodes are
arranged in a network i.e. bus, star or mesh topology.
Transmission mode: Physical layer also defines the way in which the data flows between the two
connected devices. The various transmission modes possible are: Simplex, half-duplex and full
duplex.
II. Data Link Layer (DLL) (Layer 2): The data link layer is responsible for the node to node delivery
of the message. It always deals with Data Frame.
Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a
set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit
patterns to the beginning and end of the frame.
Physical addressing: After creating frames, Data link layer adds physical addresses (MAC
address) of sender and/or receiver in the header of each frame.
Error control: Data link layer provides the mechanism of error control in which it detects and
retransmits damaged or lost frames.
Flow Control: The data rate must be constant on both sides else the data may get corrupted thus
, flow control coordinates that amount of data that can be sent before receiving acknowledgement.
Access control: When a single communication channel is shared by multiple devices, MAC sub
layer of data link layer helps to determine which device has control over the channel at a given
time.
III. Network Layer (Layer 3): Network layer works for the transmission of data from one host to the
other located in different networks. It also takes care of packet routing i.e. selection of shortest
path to transmit the packet, from the number of routes available.
The functions of the Network layer are:
Routing: The network layer protocols determine which route is suitable from source to
destination.
Logical Addressing: In order to identify each device on internet uniquely, network layer defines
an addressing scheme. Such an address distinguishes each device uniquely and universally.
IV. Transport Layer: The transport layer is responsible for process-to-process delivery of the entire
message. A process is an application program running on a host. It ensures that the whole
message transmitted in order from sender to receiver. A connection oriented transport layer
makes a connection with the transport layer at the destination machine first before delivering the
packets. After all the data are transferred, the connection is terminated.
V. Session Layer:
Dialog control. The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either half duplex (one way at a time) or
full-duplex (two ways at a time) mode.
Synchronization: The session layer allows a process to add checkpoints, or synchronization points,
to a stream of data.
VI. Presentation Layer: The presentation layer is concerned with the syntax and semantics of the
information exchanged between two systems.
Translation: Different computers use different encoding systems, the presentation layer is
responsible for inter operation between these different encoding methods.
Encryption: To carry sensitive information, a system must be able to ensure privacy. Encryption
means that the sender transforms the original information to another form and sends the
resulting message out over the network. Decryption reverses the original process to transform the
message back to its original form.
Compression: Data compression reduces the number of bits contained in the information. Data
compression becomes particularly important in the transmission of multimedia such as text,
audio, and video.
VII. Application Layer: It provides user interfaces and support for services such as electronic mail,
remote file access and transfer. This application allows a user to retrieve files from a remote
computer. It also responsible e-mail forwarding and storage.
b. Message Switching: It is nothing but sore and forward technique. Here first receives the whole
message and buffers it until there are resources available to transfer it to the next hop. It is not
suitable because here transit path needs enough storage and hence it is very slow.
c. Packet Switching: Here each packet is routed independently through the network. Therefore
packets contain a header with the full information about the destination. The individual packets
which form a data stream may follow different paths between the source and the destination.
SKFGI/CSE
Different Component of Networking
A. Switch: A switch, in the context of networking is a high-speed device that receives incoming data
packets/frames and redirects them to their destination on a local area network (LAN). A LAN
switch operates at the data link layer (Layer 2). Switch is used to node-to-node communication on
the same network.
C. HUB: a hub is the most basic networking device that connects multiple computers or other
network devices together. Unlike a network switch or router, a network hub has no routing tables.
The hub contains multiple ports which work in Physical layer.
D. Bridge: A bridge works at the Data link layer (Layer 2) of the OSI model. It responsible to
transmit frames one host to another into two different LAN.
E.
Internet model contain four layered architecture. OSI Model is general communication model but
Internet Model is what the internet uses for all its communication.
Application Layer: This layer defines the protocol which enables user to interact with the network.
For example, FTP, HTTP etc.
Transport Layer: This layer defines how data should flow between hosts. Major protocol at this
layer is Transmission Control Protocol (TCP). This layer ensures data delivered between hosts is in-
order and is responsible for end-to-end delivery.
Internet Layer: Internet Protocol (IP) works on this layer. This layer facilitates host addressing and
recognition. This layer defines routing.
Link Layer: This layer provides mechanism of sending and receiving actual data. This layer is
based on network architecture and hardware.
I. Uni-polar Encoding:
Unipolar encoding schemes use single voltage level to represent data. In this case, to represent binary 1,
high voltage is transmitted and to represent 0, no voltage is transmitted. It is also called Unipolar-Non-
return-to-zero.
II. Polar Encoding:
Polar encoding scheme uses multiple voltage levels to represent binary values. Polar encodings is
available in four (4) types.
This encoding scheme is a combination of RZ and NRZ-L. Bit time is divided into two halves. It transits
in the middle of the bit and changes phase when a different bit is encountered.
D. Differential Manchester
This encoding scheme is a combination of RZ and NRZ-I. It also transits at the middle of the bit but
changes phase only when 1 is encountered.
III. Bipolar Encoding
Bipolar encoding uses three voltage levels, positive, negative, and zero. Zero voltage represents binary 0
and bit 1 is represented by altering positive and negative voltages.
It is the most common type of telecommunication when compared with Shielded Twisted Pair Cable
which consists of two conductors usually copper, each with its own color plastic insulator. 2 pair uses RJ-
11 connector and 4 pair cable uses RJ-45 connector for UTP. Its limit is 100m ,relatively cheap and low
bandwidth than coaxial cable.
Shielded Twisted Pair Cable
This cable has a metal foil or braided-mesh covering which encases each pair of insulated conductors.
Electromagnetic noise penetration is prevented by metal casing. Use for LAN.
Coaxial Cable
Coaxial is called by this name because it contains two conductors that are parallel to each other. Copper
is used in this as centre conductor which can be a solid wire or a standard one.
Fiber optic cable uses electrical signals to transmit data. It transmits data in the form of light. In the
center of fiber cable is a glass stand or core. The light from the laser moves through this glass to the other
device around the internal core is a reflective material known as cladding.
Unguided Media
Wireless transmission is a form of unguided media. Wireless communication involves no physical link
established between two or more devices, communicating wirelessly. Wireless signals are spread over in
the air and are received and interpreted by appropriate antennas. Antenna converts the digital data into
wireless signals and spread all over within its frequency range.
Radio Transmission
Radio frequency is easier to generate and because of its large wavelength it can penetrate through walls.
Radio waves can have wavelength from 1m – 100 km and have frequency ranging from 3KHz (Extremely
Low Frequency) to 1 GHz (Extremely High Frequency).
Microwave Transmission
Electromagnetic waves having frequencies between 1 GHz to 300 GHz are called micro waves. Micro
waves are unidirectional. Microwaves travels in straight lines and travels in straight lines. So here the
sending and receiving antennas need to be aligned.
Satellite Microwave (Satellite communication)
This is a microwave relay station which is placed in outer space. These are positioned 36000 Km above
the equator with an orbit speed that exactly matches the rotation speed of the earth. This is usually done
to allow ground stations to aim antenna at a fixed point in the sky.
Data Link Layers
Data link Layer responsible to transmit the frame. A frame is nothing but some set of bit stream.
6. Error Detection
The bit stream transmitted by the physical layer is not guaranteed to be error free. The data link layer is
responsible for error detection and correction. I n this method some extra bit (s) added to the original
data word which are transmitted over the network.
I. Parity checks
II. Check sum methods
III. Cyclic redundancy checks
I. Even parity checking scheme
In Even parity checking scheme if the number of 1’s in the data word is odd number then an extra
redundant bit 1 add with the data word to make code word otherwise add 0 as a redundant bit.
II. Cyclic Redundancy Check (CRC)
CRC is a different approach to detect if the received frame contains valid data. This technique involves
binary division of the data bits being sent. The divisor is generated using polynomials. The sender
performs a division operation on the bits being sent and calculates the remainder. If there is n bits in
divisor the redundant bit will be n-1. Before sending the actual bits, the sender adds the remainder at the
end of the actual bits. Actual data bits plus the remainder is called a codeword. The sender transmits data
bits as codeword.
Sender Side
Receiver Side
Check sum method: Here K= No. of frame and N= No. of bits in each
Data word =
Add r1=
Add r2 =
Add r4 =
Flow control occur when a data frame (Layer-2 data) is sent from one host to another over a single medium, it is
required that the sender and receiver should work at the same speed. That is, sender sends at a speed on which the
receiver can process and accept the data.
ii. Stop and Wait ARQ (Automatic Repeat Requests) for Noise channel: Lost ACK
Lost Frame
Delay ACK
iii. Go-Back-N ARQ
TDM
1 2 3 4 1 2 3 4 1 2 3 4
CSMA
In CSMA When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that
moment, If the channel is busy, the station waits until it become free. If the station detects an idle channel, it
transmits a frame. If a collision occurs, the station waits a random amount of time. Here 1-persistent protocol
which monitor the channel and transmit the frame to check the idle condition of the channel. However, if it finds
the channel is busy, it continuously senses the channel until it become free. The performance of this protocol is
affected by propagation delay.
CSMA/CD
The basic idea behind CSMA/CD is that a station needs to be able to receive while transmitting to detect a
collision. When there is no collision, the station receives one signal: its own signal. When there is a collision, the
station receives two signals: its own signal and the signal transmitted by a second station.
CSMA/CA
Here the station uses any of the persistent method to sense the channel. If the channel is busy , it again sense
the channel. The station continues to do so until it finds the station idle. After the station has found the
channel idle it does not send the frame immediately rather it waits for random amount of time which known
as Inter Frame Space (IFS). The station is required to wait for IFS time because it may happen that some
station has already started the transmission of the frame.
Sample Questions(Module-2)
Network Layer
The network layer is responsible for the delivery of individual packets from the source to the
destination host. The network layer adds a header that includes the logical addresses of the sender and
receiver to the packet coming from the upper layer. If a packet travels through the Internet, we need
this addressing system to help identify the source and destination.
Logical Address:
The packet transmitted by the sending computer may pass through several LANs or WANs before
reaching the destination computer. In this situation we need a global addressing scheme called logical
addressing.
The Internet addresses are 32 bits in length; this gives us a maximum of 232 addresses.
These addresses are referred to as IPv4 (IP version 4) addresses or simply IP addresses.
The new generation of IP or IPv6 (IP version 6) can accommodate more addresses. In this
version, the Internet uses 128-bit addresses that give much greater flexibility in address
allocation.
IPV4 Addressing
An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device to
the Internet. IPv4 addresses are unique. They are unique, which means two devices on the Internet can
never have the same address at the same time. The IPv4 addresses are universal in the sense that the
addressing system must be accepted by any host that wants to be connected to the Internet.
IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4
billion).
Notation: In binary notation, the IPv4 address is displayed as 32 bits or a 4-byte address.
Here each byte (octet) is 8 bits, each number in dotted-decimal notation is a value ranging from 0 to
255.
Classful Addressing
In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each class
occupies some part of the address space. We can find the class of an IP address of a given binary
notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can tell
us the class of the address. If the address is given in decimal-dotted notation, the first byte (First 8
bits) defines the class.
In classful addressing, an IP address in class A, B, or C is divided into netid and hostid. These parts
are of varying lengths, depending on the class of the address.
Class-A: Class A addresses were designed for large organizations with a large number of attached
hosts or routers. Class A block is too large for any organization. Net ID 8 bits and host ID 24 bits.
Class-B: Class B addresses was designed for midsize organizations with tens of thousands of attached
hosts or routers. Net ID 16 bits and host ID 16 Bits.
Class-C: Class C addresses were designed for small organizations with a small number of attached
hosts or routers. A block in class C is probably too small for many organizations. Net ID 24 bits and
Host ID 8 Bits.
Class-D: Class D addresses were designed for multicasting. Each address in this class is used to
define one group of hosts on the Internet. The Internet authorities wrongly predicted a need for
268,435,456 groups.
Class-E: Class E addresses were reserved for future use. It is basically use for Broadcast.
Sub-netting
If an organization was granted a large block in class A or B, it could divide the addresses into several
contiguous groups and assign each group to smaller networks called sub-nets.
Super-netting
The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of
most organizations. Even a midsize organization needed more addresses. One solution was super-
netting. In super-netting, an organization can combine several class C blocks to create a larger range
of addresses. In other words, several networks are combined to create a super network or a super net.
For example, an organization that needs 1000 addresses can be granted four contiguous class C
blocks.
IPV6 Addressing:
An IPv6 address consists of 16 bytes (octets); it is 128 bits long. To make addresses more readable,
lPv6 specifies hexadecimal colon notation. In this notation, 128 bits is divided into eight sections,
each 2 bytes in length. Two bytes in hexadecimal notation requires four hexadecimal digits.
Therefore, the address consists of 32 hexadecimal digits, with every four digits separated by a
colon.
Network Routing
When a device has multiple paths to reach a destination, it always selects one path by preferring it
over others. This selection process is termed as Routing. Routing is done by special network
devices called routers. Router is responsible to forward a packet to proper destination with the help
of proper routing algorithm by maintaining the information into a routing table.
1. Unicast routing
Routing unicast data over the internet is called unicast routing. It is the simplest form of routing
because the destination is already known. Hence the router just has to look up the routing table and
forward the packet to next hop.
2. Broadcast routing
A router creates a data packet and then sends it to each host one by one. In this case, the router
creates multiple copies of single data packet with different destination addresses. This method
consumes lots of bandwidth as here the entire router in the network system receives a packet that is
to be broad casted, it simply floods those packets out of all interfaces.
3. Multicast Routing
Multicast routing is special case of broadcast routing. But in Multicast routing, the data is sent to
only nodes which wants to receive the packets. Here a group of receiver receives packets from one
specific sender.
Packet forward: Packet forwarding means to place the packet in its route to its destination. In this
technique when a router has received a packet to be forwarded, it looks at this table to find the
route to the final destination. Several technique use to manage the size of routing table and also
provide the security.
Next-Hop Method: In this technique, the routing table holds only the address of the next hop
instead of information about the complete route (route method). The entries of a routing table must
be consistent with one another.
Routing Table
A host or a router has a routing table with an entry for each destination, or a combination of
destinations, to route IP packets. The routing table can be either static or dynamic.
There are two type of routing table.
is similar to that of distance vector routing. In path vector routing one node in each autonomous
system acts as a communicating node on behalf of the entire autonomous system (AS). Let us call it
the speaker node. The speaker node in an AS creates a routing table and advertises it to speaker nodes
in the neighboring ASs. The idea is the same as for distance vector routing except that only speaker
nodes in each AS can communicate with each other. A speaker node advertises the path, not the
metric of the nodes, in its autonomous system or other autonomous systems.
The Open Shortest Path First or OSPF protocol is an intra-domain routing protocol based on link state
routing.
The Internet is made up of a large number of Autonomous Systems (AS). A routing algorithm within an
AS is called an interior gateway protocol and an algorithm for routing between AS is called an exterior
gateway protocol. OSPF allows them to be divided some areas, where an area is a network. An area is a
generalization of a subnet. Every AS has a backbone area. All areas are connected to the backbone, so it is
possible to go from any area in the AS to any other area in the AS via the backbone. Each router contains
a database. Its main job is to calculate the shortest path from itself to every other router in the area,
including the router that is connected to the backbone.
Path Vector Routing
Distance vector and link state routing are both intra-domain routing protocols. They can be used inside an
autonomous system, but not between autonomous systems. These two protocols are not suitable for inter-
domain routing mostly because of scalability. Both the routing algorithms are not suitable when the
domain of operation becomes large. Distance vector routing is subject to instability if there are more than
a few hope in the domain of operation. Link state routing needs a huge amount of resources to calculate
routing tables. It also creates heavy traffic because of flooding. There is a need for a third routing protocol
which we call path vector routing. Path vector routing proved to be useful for inter-domain routing. The
principle of path vector routing is similar to that of distance vector routing, In path vector routing, we
assume that there is one node in each autonomous system that acts on behalf of the entire autonomous
system. Let us call it the speaker node. The speaker node in an AS creates a routing table and advertises it
to speaker nodes in the neighboring ASs. The idea is the same as for distance vector routing except that
only speaker nodes in each AS can communicate with each other. However, what is advertised is
different. A speaker node advertises the path, not the metric of the nodes, in its autonomous system or
other autonomous systems.
The Transport layer is the fourth layer in the OSI model, which provides communication services
between the computers connected in the network. The transport layer provides an error checking service
during the transmission of data packets from source computer to destination computer. The transport layer
helps to carry out the process-to-process delivery i.e. the delivery of a packet or part of message from one
process to another process.
The Three - Way Handshaking protocol is used to establish connection between two TCPs. The steps are
A client sends a initialize the communication (SYN) data packet to server. The purpose of this
step is to see if the server is open for new connection.
The server needs to keep all ports open to establish a new connection. When the server receives
the SYN packet from the client, the client replies and returns the conformation SYN/ approval
(ACK) packet.
The client receives the SYN/ACK packet and replies with ACK packet to establish the
connection.
Traffic Descriptor
Traffic descriptors are qualitative values that represent a data flow.
The average data rate is a very useful characteristic of traffic because it indicates the average bandwidth
needed by the traffic.
Bursty
In the bursty data category, the data rate changes suddenly in a very short time. It may jump from zero to
high or vice verse.
Leaky Bucket Algorithm:
If a bucket has a small hole at the bottom, the water leaks from the bucket at a constant rate as long as
there is water in the bucket. The rate at which the water leaks does not depend on the rate at which the
water is input to the bucket unless the bucket is empty. The input rate can vary, but the output rate
remains constant. Similarly, in networking, a technique called leaky bucket can smooth out bursty traffic.
The leaky bucket is very restrictive. It does not credit an idle host. For example, if a host is not
sending for a while, its bucket becomes empty. Now if the host has bursty data, the leaky bucket
allows only an average rate. On the other hand, the token bucket algorithm allows idle hosts to
accumulate credit for the future in the form of tokens. For each tick of the clock, the system sends n
tokens to the bucket. The system removes one token for every cell (or byte) of data sent. For
example, if n is 100 and the host is idle for 100 ticks, the bucket collects 10,000 tokens. Now the host
can consume all these tokens in one tick with 10,000 cells, or the host takes 1000 ticks with 10 cells
per tick. In other words, the host can send bursty data as long as the bucket is not empty. The token
bucket can easily be implemented with a counter. The token is initialized to zero. Each time a token
is added, the counter is incremented by 1. Each time a unit of data is sent, the counter is decremented
by 1. When the counter is zero, the host cannot send data.
QUALITY OF SERVICE (QoS)
Quality of service (QoS) is the overall performance of a telephony or computer network, particularly the
performance seen by the users of the network.
Reliability
Reliability is a characteristic that a flow needs. Lack of reliability means losing a packet or
acknowledgment. For example, it is more important that electronic mail, file transfer, and Internet
access have reliable transmissions than telephony or audio conferencing.
Delay
Source-to-destination delay is another flow characteristic. Again applications can tolerate delay in
different degrees. In this case, telephony, audio conferencing, video conferencing, and remote log-in
need minimum delay, while delay in file transfer or e-mail is less important.
Jitter
Jitter is the variation in delay for packets belonging to the same flow. For example, if four
packets depart at times 0, 1, 2, 3 and arrive at 20, 21, 22, 23, all have the same delay, 20 units
of time. On the other hand, if the above four packets arrive at 21, 23, 21, and 28, they will
have different delays: 21,22, 19, and 24.
Bandwidth
Different applications need different bandwidths. In video conferencing we need to send
millions of bits per second to refresh a color screen while the total number of bits in an e-mail
may not reach even a million.
1. One of the IP Address of a network is192.168.5.85. The Subnet Mask is255.255.255.0. Design 4
subnets of equal sizes. (CO4, BL-4).
2. Show the address space of Class B is2^30 using dotted decimal format of representation. (CO4, BL-
4).
3. In which situation UDP is used instead of TCP? (CO3, BL-5).
4. Mac address changes from hop to hop but Port address remains constant. Justify the
statement and the scenario. (CO3, BL-4).
Module-4: Application Layer
The application layer is built on the transport layer and provides network services to user applications.
The application layer defines and performs such applications as electronic mail (e-mail), remote access to
computers, file transfers, the Web, as well as real-time video conferencing.
The application layer has its own software dependencies. When a new application is developed, its
software must be able to run on In client/server architecture for example, a client end host requests
services from a server host.
A client/server model provides specific computational services. Reliable communication protocols, such
as TCP, allow interactive use of remote servers. For example, we can build a server that provides remote
query processing services to clients. Implementing such a communication service requires a server loaded
with the application protocol to accept requests and a client to make such requests. To invoke remote
query processing, a user first executes a client program establishing a TCP connection to a server. Then,
the client begins transmitting the query to the server. The server processes the received instruction and
sends the results back.
Fig-Application-layer communication
1. Domain Name Space
One of the most important components of the application layer is the Domain Name System (DNS)
server. DNS is a distributed hierarchical and global directory that translates machine or domain names to
numerical IP addresses.
Any entity in the TCP/IP environment is identified by an IP address, which thereby identifies the
connection of the corresponding host to the Internet. An IP address can also be assigned a domain name.
Unique domain names assigned to hosts must be selected from a name space and are generally organized
in a hierarchical fashion.
Domain names are defined in a tree-based structure with the root at the top. A tree is structured with a
maximum of 128 levels, starting at level 0 (root). Each level consists of nodes. A node on a tree is
identified by a label, with a string of up to 63 characters, except for the root label, which has empty string.
A domain name is a sequence of labels separated by dots and is read from the node up to the root. For
example, moving from right to left, we can parse as follows: domain name news.company1.com, a
commercial organization (.com) and the “news” section of "company1" (news.company1).
2. Domain-Name Servers
The domain name space is divided into sub domains, and each domain or sub domain is assigned a
domain name server. A domain name server has a database consisting of all the
information for every node under that domain.
Requirement
Every host is identified by the IP address but remembering numbers is very difficult for the
people and also the IP addresses are not static therefore a mapping is required to change the
domain name to IP address. So DNS is used to convert the domain name of the websites to
their numerical IP address.
Domain:
There are various kinds of DOMAIN :
Generic domain:
.com (commercial) .edu (educational) .mil (military)
.org (non-profit organization) .net (similar to commercial) all these are generic domain.
The earliest and the most common application of the Internet is electronic mail or email. Email is
a store-and-forward application. This means a message can be sent to someone not currently
connected to the Internet. The message can remain in the system until the recipient retrieves it.
Email supports:
Sending a single message to one or more recipients.
Sending messages that include text, voice, video, or graphics.
Organization of message-based criteria such as priority.
Components of E-Mail
The sending of electronic mail in the Internet requires these components: user agents (UAs), mail
transfer agents (MTAs), and the protocol that controls mail delivery— Simple Mail Transfer
Protocol (SMTP).
User Agent (UA): The user agent is software installed on the user computer that reads, replies,
forwards, saves, and composes messages. For example Microsoft’s Outlook provides the users
with a menu or window environment and allow the sending of text and multimedia.
Mail Transfer Agent (MTA): The actual mail transfer requires a mail transfer agent (MTA).
The client MTA is installed on the user’s computer. The client and the server MTA are installed
on a computer that is used as the mail server.
Simple Mail Transfer Protocol: Simple mail transfer protocol (SMTP) is the protocol that defines the
relationship between the UAs and MTAs, defines the format of the message to be transferred.
Step-1: In the first stage, the email goes from the user agent to the local server. The mail is stored here
until the remote server is available.
Step-2: In the second stage, the email is relayed by the local server. SMTP messages must be received by
a server that is always running since mail can arrive at any time. However, people often turn off their
computers at the end of the day, and those with laptops or mobile computers do not normally have them
on all the time. So usually an organization (or an ISP) assigns a computer to be the email server and runs
the SMTP server program.
Step-3: In the third stage, the remote user agent uses a mail access protocol such as POP3 or IMAP4 to
access the mailbox and retrieve the mail.
4. File Transfer and FTP
File transfer is another computer networking application. It is always essential that files and information
geographically distributed over different locations be shared among the members of a working group. In a
certain application, files are typically saved in a server. A user then uses a file transfer protocol to access
the server and transfer the desired file.
5. TELNET:
The World Wide Web has been so successful and has made the Internet accessible. Any web browser has
a function that allows the users to open a URL. URLs (Uniform Resource Locators) provide
information about the location of objects on the Web; they look like the following:
http://www.cs.princeton.edu/index.html
If you opened that particular URL, your Web browser would open a TCP connection to the Web server at a
machine called www.cs.princeton.edu and immediately retrieve and display the file called index.html.
Most files on the Web contain images and text, and some have audio and video clips. These embedded
URLs are called hypertext links.
The Hyper Text Transfer Protocol (HTTP) is the foundation of World Wide Web. Hypertext is well
organized documentation system which uses hyperlinks to link the pages in the text documents. HTTP
works on client server model. When a user wants to access any HTTP page on the internet, the client
machine at user end initiates a TCP connection to server. When the server accepts the client request, the
client is authorized to access web pages.
Questions(Module-4)
Cryptography is associated with the process of converting ordinary plain text into unintelligible text
and vice-versa. It is a method of storing and transmitting data in a particular form so that only those
for whom it is intended can read and process it.
ff
sd
fd
RSA Cryptosystem
This cryptosystem is one the initial system. It remains most employed cryptosystem
even today. The system was invented by three scholars Ron Rivest, Adi
Shamir, and Len Adleman and hence, it is termed as RSA cryptosystem.
We will see two aspects of the RSA cryptosystem, firstly generation of key pair and
secondly encryption-decryption algorithms.
Sample Questions(Module-5)
1. What are the various security goals? (CO3, BL-4).
2. “Network security is not cryptography “Justify your answer (CO4, BL-4).
3. Evaluate RSA algorithm with an example (CO4, BL5).
4. Create a private key and public key with an example. (CO4, BL-6).
Page | 22