Download as pdf or txt
Download as pdf or txt
You are on page 1of 109

Department of Applied Computational Science and Engineering

Course Code: KCS 603


Course Name: COMPUTER NETWORKS
Department of Applied Computational Science and Engineering

Vision
To build strong teaching environment that responds to the needs of industry and challenges of the society

Mission
• M1 : Developing strong mathematical & computing skill set among the students.
• M2 : Extending the role of computer science and engineering in diverse areas like Internet of Things (IoT),
Artificial Intelligence & Machine Learning and Data Analytics.
• M3 : Imbibing the students with a deep understanding of professional ethics and high integrity to serve the
Nation.
• M4 : Providing an environment to the students for their growth both as individuals and as globally competent
Computer Science professional wit encouragement for innovation & start-up culture.

Subject: Computer Networks


Course Outcome

CO’S TITLE

CO1 Explain basic concepts, OSI reference model, services and role of each layer of OSI model and
TCP/IP, networks devices and transmission media, Analog and digital data transmission

CO2 Apply channel allocation, framing, error and flow control techniques.

CO3 Describe the functions of Network Layer i.e. Logical addressing, subnetting& Routing
Mechanism.

CO4 Explain the different Transport Layer function i.e. Port addressing, Connection Management,
Error control and Flow control mechanism.

CO5 Explain the functions offered by session and presentation layer and their Implementation.

CO6 Explain the different protocols used at application layer i.e. HTTP, SNMP, SMTP, FTP,
TELNET and VPN.

Subject: Computer Networks


Syllabus
UNIT I
Introductory Concepts: Goals and applications of networks, Categories of networks, Organization of the Internet, ISP,
Network structure and architecture (layering principles, services, protocols, and standards), The OSI reference model, TCP/IP
protocol suite, Network devices, and components.
Physical Layer: Network topology design, Types of connections, Transmission media, Signal transmission and encoding,
Network performance and transmission impairments, Switching techniques, and multiplexing.

UNIT II
Link layer: Framing, Error Detection, and Correction, Flow control (Elementary Data Link Protocols, Sliding Window
protocols).
Medium Access Control and Local Area Networks: Channel allocation, Multiple access protocols, LAN standards, Link layer
switches & bridges (learning bridge and spanning tree algorithms).

UNIT III
Network Layer: Point-to-point networks, Logical addressing, Basic internetworking (IP, CIDR, ARP, RARP, DHCP, ICMP),
Routing, forwarding and delivery, Static and dynamic routing, Routing algorithms and protocols, Congestion control
algorithms, IPv6.

Subject: Computer Networks


Syllabus

UNIT IV:
Transport Layer: Process-to-process delivery, Transport layer protocols (UDP and TCP), Multiplexing, Connection
management, Flow control and retransmission, Window management, TCP Congestion control, and Quality of service.

UNIT V:
Application Layer: Domain Name System, World Wide Web and Hyper Text Transfer Protocol, Electronic mail, File
Transfer Protocol, Remote login, Network Management, Data compression, Cryptography – basic concepts.

Textbooks and References:


1. Behrouz Forouzan, “Data Communication and Networking”, McGraw Hill
2. Andrew Tanenbaum “Computer Networks”, Prentice Hall.
3. William Stallings, “Data and Computer Communication”, Pearson.
4. Kurose and Ross, “Computer Networking- A Top-Down Approach”, Pearson.
5. Peterson and Davie, “Computer Networks: A Systems Approach”, Morgan Kaufmann
6. W. A. Shay, “Understanding Communications and Networks”, Cengage Learning.
7. D. Comer, “Computer Networks and Internets”, Pearson.
8. Behrouz Forouzan, “TCP/IP Protocol Suite”, McGraw Hill.

Subject: Computer Networks


Topics to be Covered

 Topic 1: Introductory Concepts

 Topic 2: Categories of networks

 Topic 3: The OSI reference model, TCP/IP protocol suite

 Topic 4: Network topology design

 Topic 5: Transmission media, Signal transmission, and encoding.

 Topic 6: Network performance and transmission impairments, Switching techniques, and multiplexing.

Subject: Computer Networks


INTRODUCTION
1.1. What is a network?
A network is a set of devices (often referred to as nodes) connected by communication links. A node can be a
computer, printer, or any other device capable of sending and/or receiving data generated by other nodes on the
network. Ex: two individuals sharing information.

Fig 1. Simple network

Subject: Computer Networks


INTRODUCTION(Cont..)
1.2. What is a computer network?
• A collection of computing devices connected in order to communicate and share resources (Hardware or software).
Connections between computing devices can be physical using wires or cables or wireless using radio waves.
• The generic term node or host refers to any device on a network.

 Types of communication links:


Wired link: the physical medium is cable.
Wireless link: air becomes the medium to carry
the data.

Fig 2. Computer Network Diagram

Subject: Computer Networks


1.3. Basic Characteristics of a computer network:
1. Fault Tolerance: 2. Scalability:
The ability to : The ability to :
- Continue working despite failures. - Grow based on the needs.
- Ensure no loss of service. - Have good performance after growth. Best example: INTERNET

Fig 3: showing fault tolerance

Subject: Computer Networks


3. Quality of service (QOS):
The ability to :
- Set priorities.
- Manage data traffic to reduce data loss and delay.

4. Security:
The ability to prevent:
- unauthorized access, misuse, and forgery.
The ability to prevent:
- confidentiality, integrity, and availability.

Subject: Computer Networks


Data communication
2. Data communication
A data communications system has five components:
1. Message: Information (data) to be communicated like text, numbers, pictures, audio, and video.
2. Sender: The device that sends the data message. It can be a computer, workstation, telephone handset,
video camera, and so on.
3. Receiver: The device that receives the message. It can be a computer, workstation, telephone handset,
television, and so on.

Subject: Computer Networks


Data communication

A data communications system has five components:


4. Transmission medium: The physical path by which a message travels from sender to receiver. Examples:
twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves.
5. Protocol: 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.

Subject: Computer Networks


Protocols
3. PROTOCOLS:
• Protocols = Rules
• Protocol determines :
 What is communicated? How it is communicated? When it is communicated?
• When two machines are communicating then it is effective when these protocols are followed:
 Message encoding
 Message formatting and encapsulation
 Message timing
 Message size
 Message delivery options
• These are called the elements of a protocol.
Message Encoder(si Transmitte Transmissi Decoder Message
Receiver
source gnal) r on medium (Signal) destination
Fig: Message encoding

Subject: Computer Networks


Transmission Mode
4. Transmission mode in Data communication:

 The transmission of data from one device to another is known as transmission mode.
 The transmission mode is also known as the communication mode.
 Each communication channel has a direction associated with it, and transmission media provide the direction.
Therefore, the transmission mode is also known as a directional mode.
 The transmission mode is defined in the physical layer.

Transmission
Mode

Half Full
Simplex
Duplex duplex

Subject: Computer Networks


4.1 Simplex mode
 Communication is unidirectional, i.e., the data flow in one direction.
 A device can only send the data but cannot receive it or it can receive the data but cannot send the data.
 The full capacity of the communication channel can be utilized during transmission.
Advantages of Simplex mode:
 The station can utilize the entire bandwidth of the communication channel to transmit more data at a time.
The disadvantage of Simplex mode:
 Communication is unidirectional, so it has no inter-communication between devices.

Subject: Computer Networks


4.2 Half-Duplex mode
 The direction can be reversed, i.e., the station can transmit and receive the data as well.
 Messages flow in both directions, but not at the same time.
 The entire bandwidth of the communication channel is utilized in one direction at a time.
 Example: Walkie-talkie
Advantages of Half-duplex mode:
 Both devices can send and receive the data and utilize the entire bandwidth of the communication channel during data
transmission.
The disadvantage of Half-Duplex mode:
 When one device is sending the data, then another has to wait, this causes a delay in sending the data at the right time.

Subject: Computer Networks


4.3 Full-duplex mode
 The communication is bi-directional, i.e., the data flow in both directions.
 Both stations can send and receive messages simultaneously.
 fastest mode of communication between devices.
 EX: telephone network.
Advantages of Full-duplex mode:
 Both stations can send and receive the data at the same time.
The disadvantage of Full-duplex mode:
 If there is no dedicated path exists between the devices, then the capacity of the communication channel is divided into two
parts.

Subject: Computer Networks


Data communication

4.4 Effectiveness of data communication:


The effectiveness of a data communications system depends on four fundamental characteristics:
1. Delivery: Must deliver data to the correct destination.
2. Accuracy: Must deliver the data accurately.
3. Timeliness: Must deliver data in a timely manner. Data delivered late are useless. In the case of video and
audio, timely delivery means delivering data as they are produced, in the same order that they
are produced, and without significant delay. This kind of delivery is called real-time
transmission.
4. Jitter: Jitter refers to the variation in the packet arrival time. It is the uneven delay in the delivery of audio
or video packets.

Subject: Computer Networks


Goal and applications of networks
5. Goal and applications of networks
Why people are interested in Computer Networks and what they can be used for?

1. Business Applications:
(a) Resource sharing: Sharing physical resources such as printers, and tape backup systems.
(b) Information Sharing: records, financial statements, tax information.
(c) End “tyranny of geography”: VPNs(Virtual Private Network) are used to join from other places.
(d) High Reliability: File replication
(e) Flexible access, Centralized management and allocation of resources, good network performance, scalability, Saving
money, distribution of processing functions.
2. Home Applications
3. Mobile Users
4. Social uses

Subject: Computer Networks


Categories of Networks
6. Categories of Networks
Type based on behaviour:
1. Client Server Network
2. Peer-to-Peer

Subject: Computer Networks


Categories of Networks
Types of Computer Networks on the basis of Architecture:
1. Point to point
2. Multi-point

Subject: Computer Networks


Physical Topology

7. Physical Topology
 The term physical topology refers to the way in which a network is laid out physically.
 Two or more devices connect to a link; two or more links form a 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. There are four basic topologies possible: mesh, star, bus, and ring.

Subject: Computer Networks


7.1 Bus Topology
 All devices share a single communication line or cable
 Problems while multiple hosts send data at the same time.
 A failure of a device does not affect the other devices.
 But the failure of the shared communication line can make all other devices stop functioning.

Figure A bus topology connecting three stations

Subject: Computer Networks


7.2 Star Topology
 All hosts in Star topology are connected to a central device, known as a hub device, using a point-to-point connection.
 The hub device can be any of the following: hub or repeater, switch or bridge, router or gateway.
 Not expensive to connect.
 Can add one more host, only one cable is required.
 Configuration is simple.

Figure A Star topology

Subject: Computer Networks


7.3 Ring Topology (Token Ring topology)
 Each host machine connects to exactly two other machines, creating a circular network structure.
 When one host tries to communicate or send a message to a host which is not adjacent to it, the data travels through all
intermediate hosts.
 To connect one more host in the existing structure, the administrator may need only one more extra cable.
 Failure of any host results in failure of the whole ring. Thus, every connection in the ring is a point of failure.

Subject: Computer Networks


7.4 Mesh Topology
 Host is connected to one or multiple hosts.
 Host having a point-to-point connection with every other host.
 Hosts in Mesh topology also work as relays for other hosts which do not have direct point-to-point links.
 Mesh technology comes in two types:
 Full Mesh: All hosts have a point-to-point connection to every other host in the network.
Thus for every new host n(n-1)/2 connections are required.
 Partially Mesh: Not all hosts have a point-to-point connection to every other host.
Hosts connect to each other in some arbitrary fashion. This topology exists where
we need to provide reliability to some hosts out of all.

Subject: Computer Networks


7.5 Tree Topology
 Also known as Hierarchical Topology, Divides the network into multiple levels/layers of the network.
 Devices are organized in the form of a tree.
 More expensive because it is densely wired.
 All neighboring hosts have a point-to-point connection between them.
 Similar to the Bus topology, if the root goes down, then the entire network suffers even.

Subject: Computer Networks


7.7 Hybrid Topology
 Contains more than one topology is said to be a hybrid topology.
 Hybrid topology inherits the merits and demerits of all the incorporating topologies.
 Most WANs are connected by means of Dual-Ring topology and networks connected to them are mostly Star topology
networks. Internet is the best example of the largest Hybrid topology.

Subject: Computer Networks


Important points on topologies:

Mesh Star Bus Ring


No. of cables n*(n-1)/2 n n+1 n+1
No. of ports n-1 1*n=n 1*n=n 1*n=n
Reliability
cost High Less as cheap cheap
compare to
mesh
security yes less less less

Subject: Computer Networks


8. Types of area networks
 PAN, LAN, MAN, and WAN are the three major types of networks designed to operate over the area they cover.
 One of the major differences is the geographical area they cover, i.e. PAN covers single users devices, LAN covers
the smallest area, MAN covers an area larger than LAN and WAN comprises the largest of all.

1. Personal Area Network (PAN)


 Smallest network that is very personal to a user.
 Connectivity range of up to 10 meters.
 PAN may include a wireless computer keyboard and mouse, Bluetooth-enabled headphones, wireless printers,
and TV remotes.

Subject: Computer Networks


2. Local Area Network (LAN)
 Connects network devices in such a way that personal computers and workstations can share data, tools, and programs.
The group of computers and devices are connected together by a switch, or stack of switches, using a private addressing
scheme as defined by the TCP/IP protocol.
 Data transmits at a very fast rate as the number of computers linked is limited.
 LANs cover a smaller geographical area and are privately owned.
 One can use it for an office building, home, hospital, school, etc. LAN is easy to design and maintain.
 A Communication medium used for LAN has twisted-pair cables and coaxial cables.
 It covers a short distance, and so the error and noise are minimized.
 LAN has a range of up to 2km.

Subject: Computer Networks


3. Metropolitan Area Network (MAN)
 Covers a larger area than that covered by a LAN and a smaller area as compared to WAN.
 MAN has a range of 5-50km. It connects two or more computers that are apart but reside in the same or different cities.
It covers a large geographical area and may serve as an ISP (Internet Service Provider).
 The fault tolerance of a MAN is less and also there is more congestion in the network.
 It is costly and may or may not be owned by a single organization.
 The data transfer rate and the propagation delay of MAN are moderate.
 Devices used for transmission of data through MAN are Modem and Wire/Cable.

Subject: Computer Networks


4. Wide Area Network (WAN)
 Extends over a large geographical area, although it might be confined within the bounds of a country.
 Range of above 50 km.
 A WAN could be a connection of LAN connecting to other LANs via telephone lines and radio waves and may be limited
to an enterprise (a corporation or an organization) or accessible to the public.
 The technology is high-speed and relatively expensive. the fault tolerance of a WAN is less and there is more congestion in
the network.
 Due to long-distance transmission, the noise and error tend to be more in WAN.
 Devices used for the transmission of data through WAN are Optic wires, Microwaves, and Satellites.

Subject: Computer Networks


Figure showing the network summary
on the basis of distance

Network summary on the basis of geography

Subject: Computer Networks


Internetwork
 Defined as two or more computer network LANs or WAN or computer network segments are connected using
devices, and they are configured by a local addressing scheme. This process is known as internetworking.
 An interconnection between public, private, commercial, industrial, or government computer networks can also be
defined as internetworking.
 Internetworking uses the internet protocol.
 The reference model used for internetworking is Open System Interconnection(OSI).

Subject: Computer Networks


Intranet vs. Extranet: The key differences
 Purpose:
Intranet – Enable the sharing of sensitive and confidential information within the organization.
Extranet – Communication of information between the employees of the organization and the external
business associates.
 Regulation:
Intranet – Regulated by the specific organization and its organizational policies.
Extranet – It is regulated by 2 or more organizations that are sharing information and data. It is regulated by
the contractual agreements made between the organizations.
 Accessibility:
Intranet – The content is accessible only by the members or employees of the organization.
Extranet – The content is accessible by the employees of the organization and external members who have
been given access to the network.
 Security:
Intranet – The network is secured by a firewall.
Extranet – The network is secured through a firewall that separates the internet and the extranet.

Subject: Computer Networks


Scenario Of internet and Extranet

Subject: Computer Networks


9. Internet and World Wide Web
1. Internet
 A global network of networks and computers.
 The network infrastructure.
 Information travels via network protocols.
 Can access through a variety of ways.
2. World Wide Web
 A collection of information accessed through the internet.
 Information travels primarily through HTTP.
 Uses browsers to access documents and web pages.
 Navigation to other pages occurs through hyperlinks.

Subject: Computer Networks


10. Message Delivery Options
1) Unicast = A one-to-one delivery option. Only a single destination for the message.
2) Multicast = A one-to-many delivery option. The delivery of the same message to a group of host destinations simultaneously.
3) Broadcast = A one-to-all delivery option. If all hosts on the network need to receive the message at the same time.

Subject: Computer Networks


11. Internet Standards
Standards organizations are generally vendor-neutral and not-for-profit.
Organizations include:
1) Internet Society (ISOC) = Responsible for promoting open development and evolution of internet users throughout the
world.
2) Internet Architecture Board (IAB) = Responsible for the overall management and development of internet standards.
3) Internet Engineering Task Force (IETF) = Develops, updates, and maintains TCP/IP technologies.
4) Internet Research Task Force (IRTF) = Focused on long-term research related to the internet and TCP/IP protocols.
5) Institute of Electrical and Electronics Engineers (IEEE) = Dedicated to advancing technological innovation in a variety
of fields such as power and healthcare.
6) Internet Assigned Numbers Authority (IANA) = Responsible for overseeing and managing IP address allocation, domain
name management, and protocol identifiers for ICANN.

Subject: Computer Networks


12. Classification Of Transmission Media:

Media

Wired Wireless
(Guided) (Unguided)

Co-axial
ethernet Fiber optic USB Cable Infrared Radio Microwaves
Cable

Subject: Computer Networks


Figure 12.1 Transmission medium and physical layer

Subject: Computer Networks


12-1 GUIDED MEDIA

Guided media, which are those that provide a channel from one device to another, include
twisted-pair cable, coaxial cable, and fiber-optic cable.
• Twisted-pair and coaxial cable use metallic (copper) conductors that accept and
transport signals in the form of electric current.
• Optical fiber is a cable that accepts and transports signals in the form of light.

Subject: Computer Networks


Twisted-Pair Cable
• A twisted pair consists of two conductors (normally copper), each with its own plastic insulation, twisted
together, as shown in Figure 12.2.
• One of the wires is used to carry signals to the receiver, and the other is used only as a ground reference.
The receiver uses the difference between the two.
• If the two wires are parallel, the effect of these unwanted signals is not the same in both wires because
they are at different locations relative to the noise or crosstalk sources (e,g., one is closer and the other is
farther).
• Twisting makes it probable that both wires are equally affected by external influences (noise or crosstalk).
• This means that the receiver, which calculates the difference between the two, receives no unwanted
signals.
• The unwanted signals are mostly canceled out.

Figure 12.2 Twisted-pair cable


Subject: Computer Networks
Unshielded Versus Shielded Twisted-Pair Cable

Figure 12.3 UTP and STP cables

Subject: Computer Networks


Unshielded Versus Shielded Twisted-Pair Cable

• The most common twisted-pair cable used in communications is referred to as unshielded twisted-pair
(UTP).
• IBM has also produced a version of twisted-pair cable for its use called shielded twisted-pair (STP).
• STP cable has a metal foil or braided-mesh covering that encases each pair of insulated conductors.
• Although metal casing improves the quality of cable by preventing the penetration of noise or crosstalk,
it is bulkier and more expensive.
• The most common UTP connector is RJ45 (RJ stands for registered jack), as shown in Figure 7.5. The
RJ45 is a keyed connector, meaning the connector can be inserted in only one way.

Figure 12.4 UTP connector

Subject: Computer Networks


APPLICATIONS

• Used in telephone lines to provide voice and data channels.


• The local loop - the line that connects subscribers to the central telephone office---commonly
consists of unshielded twisted-pair cables.
• The DSL lines that are used by the telephone companies to provide high-data-rate connections also
use the high-bandwidth capability of unshielded twisted-pair cables.
• Local-area networks, such as lOBase-T and lOOBase-T, also use twisted-pair cables.

Subject: Computer Networks


Coaxial Cable
• Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair cable, in part
because the two media are constructed quite differently.
• Instead of having two wires, coax has a central core conductor of solid or stranded wire (usually copper)
enclosed in an insulating sheath, which is, in turn, encased in an outer conductor of metal foil, braid, or a
combination of the two.
• The outer metallic wrapping serves both as a shield against noise and as the second conductor, which
completes the circuit.
• This outer conductor is also enclosed in an insulating sheath, and the whole cable is protected by a plastic
cover.

Subject: Computer Networks


APPLICATIONS

 Coaxial cable was widely used in analog telephone networks where a single coaxial network could carry
10,000 voice signals.
 Later it was used in digital telephone networks where a single coaxial cable could carry digital data up to
600 Mbps.
 Cable TV networks also use coaxial cables.
 In the traditional cable TV network, the entire network used coaxial cable. Later, however, cable TV
providers replaced most of the media with fiber-optic cable; hybrid networks use coaxial cable only at the
network boundaries, near the consumer premises.
 Cable TV uses RG-59 coaxial cable.
 Another common application of coaxial cable is in traditional Ethernet LANs.

Subject: Computer Networks


Fiber-Optic Cable
•A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.
•Light travels in a straight line as long as it is moving through a single uniform substance.
•Optical fibers use reflection to guide light through a channel.
•A glass or plastic core is surrounded by a cladding of less dense glass or plastic.
•The difference in density of the two materials must be such that a beam of light moving through the core is
reflected off the cladding instead of being refracted into it.

Subject: Computer Networks


Applications
 Fiber-optic cable is often found in backbone networks because its wide bandwidth is cost-effective.
 Today, with wavelength-division multiplexing (WDM), we can transfer data at a rate of 1600 Gbps. The
SONET network provides such a backbone.
 Some cable TV companies use a combination of optical fiber and coaxial cable, thus creating a hybrid
network.
 Optical fiber provides the backbone structure while coaxial cable provides the connection to the user
premises.
 This is a cost-effective configuration since the narrow bandwidth requirement at the user end does not justify
the use of optical fiber.
 Local-area networks such as 100Base-FX network (Fast Ethernet) and 1000Base-X also use fiber-optic cable.

Subject: Computer Networks


12-2 UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves without using a physical conductor. This type of
communication is often referred to as wireless communication.

Figure 12.2 Electromagnetic spectrum for wireless communication

Subject: Computer Networks


Unguided signals can travel from the source to the destination in several ways: ground propagation, sky
propagation, and line-of-sight propagation, as shown in Figure 12.3.

Figure 12.3 Propagation methods

Subject: Computer Networks


 In ground propagation, radio waves travel through the lowest portion of the atmosphere, hugging the earth.
 These low-frequency signals emanate in all directions from the transmitting antenna and follow the curvature of the
planet.
 Distance depends on the amount of power in the signal: The greater the power, the greater the distance.
 In sky propagation, higher-frequency radio waves radiate upward into the ionosphere (the layer of the atmosphere where
particles exist as ions) where they are reflected back to earth.
 This type of transmission allows for greater distances with lower output power.
 In line-or-sight propagation, very high-frequency signals are transmitted in straight lines directly from antenna to
antenna.
 Antennas must be directional, facing each other, and either tall enough or close enough together not to be affected by the
curvature of the earth.
 Line-of-sight propagation is tricky because radio transmissions cannot be completely focused.

Subject: Computer Networks


Table 12.1 Bands

Subject: Computer Networks


Figure 12.4 Wireless transmission waves

Subject: Computer Networks


Radio Waves
 Electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called radio waves.
 Radio waves, for the most part, are omnidirectional.
 When an antenna transmits radio waves, they are propagated in all directions.
 A sending antenna sends waves that can be received by any receiving antenna.

Micro Waves
 Electromagnetic waves ranging in frequencies between 1 and 300 GHz are normally called micro waves.
 Microwaves are unidirectional.
 When an antenna transmits microwave waves, they can be narrowly focused.
Infrared
 Electromagnetic waves ranging in frequencies between 300 GHz and 400 THz are normally called Infrared
waves(wavelength 1mm to 770nm) – used for short-range communication.
 Infrared waves, having high frequencies, cannot penetrate walls.
 This advantageous characteristic prevents interference between one system and another; a short-range communication
system in one room cannot be affected by another system in the next room.

Subject: Computer Networks


13. Layering in Computer Networks

 Layering means decomposing the problem into more manageable components or layers.
 Advantages:
1. It provides a more modular design.
2. Easy to troubleshoot.

 The basic elements of layered architecture are services, protocols, and interfaces.
• Service: It is a set of actions that a layer provides to the higher layer.
• Protocol: It defines a set of rules that a layer uses to exchange information with a peer
entity. These rules mainly concern both the contents and order of the messages used.
• Interface: It is a way through which the message is transferred from one layer to
another layer.

Subject: Computer Networks


13.1 Why do we require Layered architecture?
 Divide-and-conquer approach: Divide-and-conquer approach makes a design process
in such a way that unmanageable tasks are divided into small and manageable tasks. In
short, we can say that this approach reduces the complexity of the design.
 Modularity: Layered architecture is more modular. Modularity provides the
independence of layers, which is easier to understand and implement.
 Easy to modify: It ensures the independence of layers so that implementation in one
layer can be changed without affecting other layers.
 Easy to test: Each layer of the layered architecture can be analyzed and tested
individually.
Subject: Computer Networks
Layered Architectures

1. The OSI reference model (Open Systems Interconnection )

2. TCP/IP model (Transmission Control Protocol/Internet Protocol)

Subject: Computer Networks


THE OSI MODEL

14. The OSI Model


 Established in 1947, the International Standards Organization (ISO) is a
multinational body dedicated to a worldwide agreement on international standards.
 An ISO standard that covers all aspects of network communications is the Open
Systems Interconnection (OSI) model. It was first introduced in the late 1970s.
 It is a model for understanding and designing a network architecture that is flexible,
robust, and interoperable.
 It allows two systems to communicate regardless of their architecture.

Subject: Computer Networks


Layers in the OSI reference model

Figure. Seven layers of the OSI model

Subject: Computer Networks


Figure 14.1 The interaction between layers in the OSI model

Subject: Computer Networks


Physical Layer
1. Physical Layer
The physical layer is responsible for movements of individual bits from one hop (node) to the next.

Figure Physical layer

Subject: Computer Networks


Physical Layer
Responsibilities of the Physical layer:

 Physical characteristics of interfaces and medium


Defines the types of transmission medium
 Representation of bits
The physical layer data consists of a stream of bits(0s and 1s) with no interpretation.
Defines the type of encoding(how 0s and 1s are changed to signals)
 Data rate
Transmission rate- the no of bits sent each second.
 Synchronization of bits
The sender and the receiver must be synchronized at the bit level. Both the clocks must be synchronized
 Line configuration
Point-to-point and multipoint connection among the devices.
 Physical topology
Defines how the devices are connected to make a network. Mesh, Star, Bus, Ring and Hybrid
 Transmission Media
Defines the direction of transmission between the devices: simplex, half-duplex, and duplex.

Subject: Computer Networks


Data link Layer
2. Data Link Layer (DLL)
The data link layer is responsible for moving frames from one hop (node) to the next.

Subject: Computer Networks


Data link Layer
Responsibilities of the Data Link Layer:

Framing
• Divides the stream of bits received from the network layer into manageable data units called frames.
Physical addressing
• If frames are to be distributed to different systems on the network, the DLL adds a header to the frame to define the
sender and receiver of the frame.
Access Control
• When two or more devices are connected to the same link, data link layer protocols are necessary to determine which
has control over the link at any given time.
Flow Control
• If the rate at which the data are absorbed by the receiver is less than the rate at which data are produced by the sender
than the DLL impose a flow control mechanism to avoid overwhelming the receiver.
Error control
• It adds reliability to the physical layer by adding mechanism to detect and retransmit damaged or lost frames. Also
uses mechanism to recognize duplicate frames.

Subject: Computer Networks


Network layer
3. Network Layer
The network layer is responsible for the delivery of individual packets from the source host to the destination host.

Figure Network layer

Subject: Computer Networks


Network layer
Responsibilities of the Network Layer:

Logical Addressing
• The physical addressing implemented by the DL layer handles the addressing problem locally.
• If a packet passes the network boundary, we need another addressing scheme to help distinguish the source
and destination systems.
• This layer adds a header to the packet coming from the upper layer, includes the logical address of the
sender and the receiver.
Routing
• We have written the address but how we will reach that address, for this we use routing protocols and
algorithms.
• When independent networks or links are connected to create internetworks(network of networks) or a large
network, the connecting devices (called routers or switches) route or switch the packets to their final
destination.

Subject: Computer Networks


Transport layer
4. Transport Layer

The transport layer is responsible for the delivery of a message from one process to another.

Figure Transport layer

Subject: Computer Networks


Transport layer
Responsibilities of the Transport Layer:

Service Point Addressing


• Computers often run several programs at the same time. For this reason, source-to-destination delivery means
not only from one computer to another computer but also from a specific process on one computer to another.
• This layer must include a type of address called a service point address ( or port address).
Segmentation and reassembly
• A message is divided into transmittable segments, with each segment containing a sequence number.
• This number enables the transmission layer to reassemble the messages correctly upon arriving at the
destination and to identify and replace the packets that were lost in transmission.
Connection Control
• This layer can be either connectionless or connection-oriented.
• A connectionless treats each segment as an independent packet and delivers it to the transport layer at the
destination machine.
• A connection-oriented transport layer makes a connection with the transport layer at the destination machine
before delivering the packets.
• After all the data are transferred, the connection is terminated.

Subject: Computer Networks


Transport layer
Responsibilities of the Transport Layer:
Flow Control
• Like the DL layer, the transport layer is responsible for flow control.
• However, flow control at this layer is performed end to end rather than across a single link.

Error Control
• Like the DL layer, the transport layer is responsible for error control.
• However, error control at this layer is performed process-to-process rather than across a single link.
• The sending transport layer makes sure that the entire message arrives at the receiving transport layer without
error (damages, loss or duplication).
• This is achieved through retransmission.

Subject: Computer Networks


Session layer
5. Session Layer
The session layer is responsible for dialog control and synchronization.

Figure Session layer

Subject: Computer Networks


Session layer
Responsibilities of the Session Layer:

The session layer is the network dialog controller. It establishes, maintains, and synchronizes the interaction among
communicating systems.

Dialog Control
• This 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.
• For example, if a system is sending a file of 2000 pages, it is advisable to insert checkpoints after every 100 pages to
ensure that each 100-page unit is received and acknowledged independently.

Subject: Computer Networks


Presentation layer
6. Presentation Layer

The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems.
The presentation layer is responsible for translation, compression, and encryption.

Figure Presentation layer

Subject: Computer Networks


Presentation layer
Responsibilities of the Presentation Layer:

Translation
• The processes (running programs) in two systems are usually exchanging information in the form of character strings,
numbers, and so on.
• The information must be changed to bit streams before being transmitted.
• It is responsible for interoperability between different encoding methods of different computers.
• The presentation layer at the sender changes the information in its sender-dependent format into a common format.
• The presentation layer at the receiver side changes the common format into its receiver-dependent format.
Encryption
• To carry sensitive information, a system must be able to ensure privacy.
• Encryption means that the sender transforms the original information into 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 no of bits contained in the information.
• It becomes important in the transmission of multimedia content such as text, audio, video, etc.,

Subject: Computer Networks


Application layer
7. Application Layer

The application layer provides users support for services such as email, remoter file access and transfer, shared
database management, and other types of distributed information services.
The application layer is responsible for providing services to the user.

Figure Application layer


Subject: Computer Networks
Application layer
Responsibilities of the Application Layer:

Network Virtual Terminal


• It is a software version of a physical terminal and it allows a user to log on to a remote host.
• To do so, the application creates a software emulation of a terminal at the remote host.
• The user’s computer talks to the software terminal which, in turn, talks to the host, and vice versa.
• The remote host believes it is communicating with one of its own terminals and allows the user to log on.
File transfer, access, and management
• It allows a user to access files in a remote host, retrieve files from a remote computer for use in the local computer, and to
manage or control files in a remote computer locally.
Mail services
• This application provides the basis for e-mail forwarding and storage.
Directory services
• This application provides distributed database sources and access to global information about various objects and services.

Subject: Computer Networks


Summary of layers

Figure Summary of layers

Subject: Computer Networks


TCP/IP PROTOCOL SUITE
15. TCP/IP PROTOCOL SUITE
• The layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
• The original TCP/IP protocol suite was defined as having four layers: host-to-network, internet, transport, and
application.
• However, when TCP/IP is compared to OSI, we can say that the TCP/IP protocol suite is made of five layers: physical,
data link, network, transport, and application.

Subject: Computer Networks


Figure TCP/IP and OSI model

Subject: Computer Networks


TCP/IP Protocol Suite
• The host-to-network layer is équivalent to the combination of physical and data link layers.
• The internet layer is equivalent to the network layer and the application layer is doing the job of
session, presentation and application layers.
• The transport layer in TCP/IP suite taking care of the duties of session layer.
• TCP/IP is a hierarchical protocol made up of interactive modules, each of which provides a
specific functionality; however, the modules are not necessarily independent.
• The term hierarchical means that each upper-level protocol is supported by one or more lower-
level protocols.

Subject: Computer Networks


1. Physical and data link layers
 At this physical and data Link layer, TCP/IP does not define any specific protocol.
 It supports all the standard and proprietary protocols.
 A network in a TCP/IP internetwork can be a LAN or WAN.

Subject: Computer Networks


2. Network Layer
 At the network layer, TCP/IP supports the Inter networking Protocol.
 IP, in turn, uses four supporting protocols: ARP, RARP, ICMP and IGMP.
 IP
 Internetworking Protocol is the transmission mechanism used by TCP/IP protocols which is an
unreliable and connectionless protocol – a best-effort delivery service.
 The term effort means that IP provides no error checking and tracking.
 IP assumes the unreliability of underlying layers and does its best to get a transmission through to its
destination, but with no guarantees.
 IP transports data in packets called datagrams, each of which is transported separately.
 Datagrams can travel along different routes and can arrive out of sequence or be duplicated.
 IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at the
destination.
Subject: Computer Networks
3. Transport Layer
 Three protocols: TCP, UDP and SCTP
 UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) are transport level protocols responsible for
delivery of a message from a process to another process.
 SCTP (Stream Control Transmission Protocol) provides support for applications such as Voice over Internet.
 UDP
 It is a process-to-process protocol that adds only port address, checksum error control, and length to the data
from the upper layer.
 TCP
 It provides full transport layer services to application layer.
 TCP is a reliable stream transport protocol.

Subject: Computer Networks


Transport Layer
 TCP
 A connection must be established between both ends of a transmission before they can transmit data.
 At the sending end of each transmission, TCP divides a stream of data into smaller units called segments.
 Each segment includes a sequence number for reordereing after reciept, together with an acknowldegement
number for the segments received.
 At the receiving end, TCP collects each datagram as it comes in and reorders the transmission based on
séquence Numbers.

4. Application Layer
 This layer is équivalent to the combined session, presentation and application layers in the OSI model.

Subject: Computer Networks


16. ANALOG AND DIGITAL
 Data can be analog or digital.
 The term analog data refers to information that is continuous; digital data refers to information that has discrete states.
 Analog data take on continuous values. Digital data take on discrete values.
 An analog signal has infinitely many levels of intensity over a period of time. A digital signal can have a limited number
of defined values.

Figure 16.1 Comparison of analog and digital signals

Subject: Computer Networks


PERIODIC ANALOG SIGNALS

 Periodic analog signals can be classified as simple or composite.


 A simple periodic analog signal, a sine wave, cannot be decomposed into simpler signals.
 A composite periodic analog signal is composed of multiple sine waves.
A periodic signal completes a pattern within a measurable time frame, called a period,
and repeats that pattern over subsequent identical periods.
The completion of one full pattern is called a cycle.
A nonperiodic signal changes without exhibiting a pattern or cycle that repeats over time.

Subject: Computer Networks


DIGITAL SIGNALS
In addition to being represented by an analog signal, information can also be represented by a digital signal. For example, a
1 can be encoded as a positive voltage and a 0 as zero voltage. A digital signal can have more than two levels. In this case,
we can send more than 1 bit for each level.

Figure 16.2 Two digital signals: one with two signal levels and the other with four signal levels

Subject: Computer Networks


17. TRANSMISSION IMPAIRMENT
• Signals travel through transmission media, which are not perfect.
• The imperfection causes signal impairment. This means that the signal at the beginning of the medium is
not the same as the signal at the end of the medium. What is sent is not what is received.
• Three causes of impairment are attenuation, distortion, and noise.

Figure 17.1 Causes of impairment

Subject: Computer Networks


17.1 Attenuation
• Attenuation means a loss of energy. When a signal, simple or composite, travels through a medium, it losses some of its
energy in overcoming the resistance of the medium.
• To show that a signal has lost or gained strength, engineers use the unit of decibel. It measures the relative strengths of
two signals or one signal at different points.
dB = 10 log10 P2 / P1

Figure 17.2 Attenuation

Subject: Computer Networks


17.2 Distortion
• Distortion means that the signal changes its form or shape.
• It can occur in a composite signal made of different frequencies. Each signal component has its own
propagation speed through a medium and, therefore, its own delay in arriving at the final destination.
• Differences in delay may create a difference in phase if the delay is not exactly the same as the period duration.

Figure 17.3 Distortion

Subject: Computer Networks


17.3 Noise
Several types of noise such as thermal noise, induced noise, crosstalk, and impulse noise, may corrupt the signal.
Signal-to-Noise Ratio (SNR)
SNR is actually the ratio of what is wanted (signal) to what is not wanted (noise). A high SNR means the signal is less
corrupted by noise; a low SNR means the signal is more corrupted by noise.
SNR = average signal power / average noise power
SNRdB = 10 log10 SNR

Figure 17.4 Noise

Subject: Computer Networks


18. DATA RATE LIMITS

A very important consideration in data communications is how fast we can send data, in bits per second, over a
channel.
The data rate depends on three factors:
1. The bandwidth available
2. The level of the signals we use
3. The quality of the channel (the level of noise)

Subject: Computer Networks


How to calculate data rate
Noiseless Channel: Nyquist Bit Rate
For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bit rate
BitRate = 2 x bandwidth x log2 L
In this formula, bandwidth is the bandwidth of the channel, L is the number of signal levels used to represent data, and BitRate
is the bit rate in bits per second.
Noisy Channel: Shannon Capacity
In reality, we cannot have a noiseless channel; the channel is always noisy. Claude Shannon introduced a formula, called the
Shannon capacity, to determine the theoretical highest data rate for a noisy channel:
Capacity =bandwidth X log2 (1 +SNR)
In this formula, bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio, and capacity is the capacity of the
channel in bits per second.

Subject: Computer Networks


PERFORMANCE
One important issue in networking is the performance of the network—how good is it?
In networking, we use the term bandwidth in two contexts.
1. The first, bandwidth in hertz, refers to the range of frequencies in a composite signal or the range of frequencies that a
a channel can pass.
2. The second, bandwidth in bits per second, refers to the speed of the bit transmission in a channel or link.

Throughput
• The throughput is a measure of how fast we can actually send data through a network. The throughput is an actual
measurement of how fast we can send data.
• For example, we may have a link with a bandwidth of 1 Mbps, but the devices connected to the end of the link may
handle only 200 kbps. This means that we cannot send more than 200 kbps through this link.

Subject: Computer Networks


LATENCY
Latency(also known as delay) is defined as the total time taken for a complete message to arrive at
the destination, starting with the time when the first bit of the message is sent out from the source
and ending with the time when the last bit of the message is delivered at the destination.

Latency = Propagation Time + Transmission Time + Queuing Time + Processing


Delay

• Propagation Time
• It is the time required for a bit to travel from the source to the destination.
Propagation time = Distance / Propagation speed
18. Switching
o The technique of transferring information from one computer network toanother network is known as switching.

o It helps in deciding the best route for data transmission if there are multiple paths in a larger network.

o Switching in a computer network is achieved by using switches.

o A switch is a small hardware device that is used to join multiple computers together with one local area network
(LAN).

o Switches are devices capable of creating temporary connections between two ormore devices linked to the switch.
o Switches are used to forward the packets based on MAC addresses.
o A Switch is used to transfer the data only to the device that has been addressed. It verifies the destination address to
route the packet appropriately.
o It is operated in full duplex mode.

Subject: Computer Networks


18.1 Types of Switching Techniques

Subject: Computer Networks


18.2 CIRCUIT SWITCHING

o A technique that establishes a dedicated pathbetween sender and receiver.


o Once the connection is established then thededicated path will remain to exist until the connection is terminated.
o In a network it operates in a similar way as the telephone works.

Phases in Circuit Switching


Communication through circuit switching has 3 phases:
1. Connection Setup / Establishment
2. Data transfer
3. Connection teardown / Termination

Subject: Computer Networks


18.3 PACKET SWITCHING

o A technique in which the message is sent in onego, but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given aunique number to identify their order
at the receiving end.
o Every packet contains some information in its headers such as source address,destination address and sequence
number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If the correct order of the packets is reached, then the acknowledgment messagewill be sent.

Subject: Computer Networks


APPROACHES OF SWITCHING
There are two approaches to Packet Switching:
1. Datagram Packet switching 2. PACKET Virtual Circuit Switching
Datagram Packet switching
o a packet known as a datagram, isconsidered an independent entity.
o Each packet contains information about the destination and the switch uses thisinformation to forward the
packet to the correct destination.
o The packets are reassembled at the receiving end in the correct order.
o The path is not fixed.
o Also known as connectionless switching.
Virtual Circuit Switching
o Also known as connection-oriented switching.
o A virtual connection is established before the messages are sent.
o Call request and call accept packets are used to establish the connection between sender and receiver.
o In this case, the path is fixed for the duration of a logical connection.

Subject: Computer Networks


18.4 MESSAGE SWITCHING
o A technique in which a message is transferred as a complete unit and routed through intermediate nodes at which it is
stored and forwarded.
o In this there is no establishment of a dedicated path between the sender and receiver. The destination address is
appended to the message.
o Message switches are programmed in such a way that they can provide the most efficient routes.
o Each and every node stores the entire message and then forwards it to the next node. This type of network is known
as store and forward network.
o Message switching treats each message as an independent entity.

Subject: Computer Networks


19. What is Multiplexing?
 Multiplexing is a technique used to combine and send multiple data streams over a single medium. The process of
combining the data streams is known as multiplexing and the hardware used for multiplexing is known as a
multiplexer.
 Multiplexing is achieved by using a device called Multiplexer (MUX) that combines n input lines to generate a single
output line. Multiplexing follows many-to-one, i.e., n input lines and one output line.
 Demultiplexing is achieved by using a device called Demultiplexer (DEMUX) available at the receiving end.
DEMUX separates a signal into its component signals (one input and n outputs). Therefore, we can say that
demultiplexing follows the one-to-many approach.

Subject: Computer Networks


19.1 Why Multiplexing?
o The transmission medium is used to send the signal from sender to receiver. The medium can only have one signal at a
time.
o If there are multiple signals to share one medium, then the medium must be divided in such a way that each signal is
given some portion of the available bandwidth. For example: If there are 10 signals and the bandwidth of the medium is
100 units, then the 10 unit is shared by each signal.
o When multiple signals share a common medium, there is a possibility of collision. The multiplexing concept is used to
avoid such collision.
o Transmission services are very expensive.

Subject: Computer Networks


Multiplexing Techniques

Subject: Computer Networks


Frequency-division Multiplexing (FDM)
o It is an analog technique.
o Frequency Division Multiplexing is a technique in which the available bandwidth of a single transmission medium is
subdivided into several channels.
o The carriers which are used for modulating the signals are known as sub-carriers. They are represented as f1,f2..fn.
o FDM is mainly used in radio broadcasts and TV networks.

Subject: Computer Networks


Wavelength Division Multiplexing (WDM)
o Wavelength Division Multiplexing is the same as FDM except that the optical signals are transmitted through the fiber
optic cable.
o WDM is used on fiber optics to increase the capacity of a single fiber.
o It is used to utilize the high data rate capability of fiber optic cable.
o It is an analog multiplexing technique.
o Optical signals from different sources are combined to form a wider band of light with the help of a multiplexer.
o At the receiving end, the demultiplexer separates the signals to transmit them to their respective destinations.

Subject: Computer Networks


Time Division Multiplexing
o In the Time Division Multiplexing technique, the total time available in the channel is distributed among different
users. Therefore, each user is allocated with different time interval known as a Time slot at which data is to be
transmitted by the sender.
o A user takes control of the channel for a fixed amount of time.
o In the Time Division Multiplexing technique, data is not transmitted simultaneously rather the data is transmitted one
by one.
o In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of time slots in which each frame
contains one or more slots dedicated to each user.
o It can be used to multiplex both digital and analog signals but is mainly used to multiplex digital signals.

There are two types of TDM:


o Synchronous TDM: A Synchronous TDM is a technique in which a time slot is preassigned to every device.
o Asynchronous TDM: An asynchronous TDM is a technique in which time slots are not fixed as in the case of
Synchronous TDM. Time slots are allocated to only those devices which have the data to send.

Subject: Computer Networks

You might also like