0% found this document useful (0 votes)
21 views62 pages

CSC311 Lecture 2

Uploaded by

fortunedako2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views62 pages

CSC311 Lecture 2

Uploaded by

fortunedako2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 62

CSC 311: Computer

Networks and
Communication
(Lecture 02)
Dr. S. Omaji
Email: omaji.samuel@edouniversity.edu.ng
Department of Computer Science
Edo State University Uzairue, Edo State Nigeria
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
2

Introduction To Networking (1/2)


A network is a small group of computers that
share information
It can be very complex, spanning large
geographical areas that provide its users
with unique capabilities above and beyond
what the individual machines and their
software applications can provide.
The goal of any computer network is to allow
multiple computers to communicate.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
3

Introduction To Networking (2/2)

Figure 1.1: Computer Network


https://laptrinhx.com/types-of-network-543738597/

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
4

Advantages and Disadvantages of


Computer Network
S/N Advantages Disadvantages
1 Connectivity and Network hardware and software
communication costs
2 Data and hardware sharing Hardware and software
management, administrative
cost
3 Internet access Undesirable sharing
4 Data security and Illegal and undesirable behavior
management
5 Performance enhancement Data privacy and security
and load balancing concerns

6 Entertainment
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
Network Types

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
6

Local Area Network (LAN)

Figure 1.2: Local Area Network


https://msatechnosoft.in/blog/types-of-computer-network-lan-wan-man-wlan-pan-can/)
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
7

Local Area Network (LAN) is limited to a specific


area, usually an office, and cannot extend beyond
the boundaries of a single building.
The first LANs were limited to a range (from a
central point to the most distant computer) of 185
meters (about 600 feet) and no more than 30
computers.
Today’s technology allows a larger LAN, but
practical administration limitations require dividing
it into small, logical areas called workgroups.
A workgroup is a collection of individuals who share
the same files and databases over the LAN.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
8

Wide Area Network

Figure 1.3: Wide Area Network


https://docs.oracle.com/cd/E93309_01/docs.466/SIGTRAN/GUID-3DC550CC-60
58-4299-BB01-919C9EFF3978.htm
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
9

Wide Area Network (WAN)

Wide Area Network (WAN) If you have ever


connected to the Internet, you have used the
largest WAN on the planet.
A WAN is any network that crosses metropolitan,
regional, or national boundaries.
Most networking professionals define a WAN as
any network that uses routers and public network
links. The Internet fits both definitions.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
10
Differences Between LAN and WAN
(1/2)
Factor LAN WAN
Definition A computer network A computer network that
covering a small geographic covers a broad area or any
area, like a home, office, network whose
school, or group of buildings communications links cross
metropolitan, regional, or
national boundaries over a
long distance
Speed High speed(1000mbps) Less speed(150mbps)
Data High data transfer rate Lower data transfer rate as
transfer compared to LANs
rate
Example Organization The Internet
Data Experiences few data Experiences more data
transmissio transmission errors transmission error as
n error compared to LAN
Component Layer 2 devices like Layer 3 devices like routers,
“CSCswitches,
311: Computer
and Networks and Layer
bridges. Communication”
switchesUnit:3
and ATM or Frame-
Lecture 02: 2023-2024 Academic Session
1 devices like hub and relay switches
repeaters
11
Differences Between LAN and WAN
(2/2)
Factor LAN WAN
Ownership Typically own, controlled and
Are not owned by a single
managed by a single
organization but by collective
individual organization distributed ownership and
management over long
distances
Set-up cost Set up extra devices on the Networks in remote areas have
network, it is not very to be connected, Set-up costs
expensive. are higher

Maintenanc Covers a relatively small Maintaining WAN is difficult


e cost geographical area, LAN is because of its wider
easier to maintain at geographical coverage and
relatively low costs higher maintenance costs.
Geographica Have a small geographical Have a large geographical
l Spread range range generally spreading
across boundaries
Bandwidth“CSCHigh bandwidth
311: Computer is and
Networks available Low bandwidth
Communication” Unit:3 is available for
Lecture 02: 2023-2024 Academic Session
for transmission transmission
Intranet, Extranet
and Internet

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
13

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
14
Internet
Internet is global communication accessed
through the Web
The Internet is a global network of
interconnected computers and servers that
allows people to communicate and access
information from anywhere in the world.
It is a public network that is open to
everyone, enabling them the unrestricted
ability to view public websites, send emails,
download files, and more.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
15
Extranet
Extranet is shared content accessed by groups
through cross-enterprise boundaries.
An extranet is a network that allows people outside
the organization to access certain information and
resources.
It is a secure network that can connect the
organization with customers, suppliers, and other
partners, providing them with access to shared
resources such as files, databases, and
applications.
Access is restricted and controlled, so only
authorized users can use the network.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
16
Intranet
Intranet is typically used for internal
communication and increased employee
engagement, while an extranet allows
for limited access by external parties.
Intranet is shared content accessed by
members within a single organization.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
17
Comparison (1/3)
Point of Internet Extranet Intranet
Comparison
Accessibility to Public Private Private
network
Availability Global system Shared Specific to an
information organization
with suppliers,
customers via
public network
Accessibility of Every one Accessible to Accessible to
content connected only member of only member of
organization the
and external organization
members with
logins

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
18
Comparison (2/3)
Point of Internet Extranet Intranet
Comparison
Owner None Single/Multiple Single
organizations organization
Number of Large number Connected Minimal number
connected of connected devices are of connected
devices devices more devices
comparable
with Intranet
Purpose of the Share Share Share
network information information information
throughout the between throughout the
world external organization
internal and
external
members
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
19
Comparison (3/3)
Point of Internet Extranet Intranet
Comparison
Security Depend on the It is enforced It is enforced
users via firewall that via firewall
connected to separates
the devices internet and
extranet
Maintenance Internet service Organization's Organization's
provider (ISP) chief chief
information information
officer and officer and
human resource human resource
(HR) person (HR) person
Economical More Less Less
economical to economical to economical to
use use use
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
Protocols and
Description of Network

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
21

TCP/IP Protocol Suite (1/4)


The TCP/IP protocol suite was developed during the
initial days of research on the Internet and evolved
over the years, making it a simple yet efficient
architecture for computer networking.
The ISO/OSI architecture developed subsequently
has not caught on very well because the Internet
had spread very fast and the large installation base
of TCP/IP-based networks could not be replaced
with the ISO/OSI protocol suite.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
22

TCP/IP Protocol Suite (2/4)


The TCP/IP protocol suite is now an integral part of
most operating systems, making every computer
network-ready.
Even very small embedded systems are being
provided with TCP/IP support to make them
network enabled.
These systems include Web cameras, Web TVs, and
so on.
In this course, we will study TCP/IP architecture.
A thorough understanding of this architecture is a
must for everyone who is interested in the field of
computer networking.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
23
TCP/IP Protocol Suites (3/4)
The TCP/IP protocol suite was developed as part of
the United States Department of Defense's project
ARPAnet (Advanced Research Projects Agency
Network), but the standards are publicly available.
Due to fast spread of the Internet, the TCP/IP
protocol suite has a very large installation base.
The TCP/IP software is now an integral part of most
operating systems, including Unix, Linux, Windows.
The TCP/IP stack is also being embedded into
systems running real-time operating systems such as
VxWorks, RTLinux, and OS/9 and handheld operating
systems such as Embedded XP, Palm OS, Symbian OS
and so on.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
24
TCP/IP Protocol Suite (4/4)
The TCP/IP protocol suite is depicted in Figure 1. It
consists of 5 layers.

Figure 1: TCP/IP protocol suite


“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
25
Layers of TCP/IP Protocol Suite
Physical layer: This layer defines the
characteristics of the transmission such as data
rate and signal-encoding scheme.
Datalink layer: This layer defines the logical
interface between the end system and the
subnetwork.
Internet Protocol (IP) layer: This layer routes
the data from source to destination through
routers.
Addressing is an integral part of the routing
mechanism.
IP provides an unreliable service: the packets may
be lost, arrive out of order, or have variable delay.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
26
Layers of TCP/IP Protocol Suite
The IP layer runs on every end system and every
router.
Transport layer: This layer is also called the host-
to-host layer because it provides end-to-end data
transfer service between two hosts (or end
systems) connected to the Internet.
Because the IP layer does not provide a reliable
service, it is the responsibility of the transport layer
to incorporate reliability through
acknowledgments, retransmissions, and so on.
The transport layer software runs on every end
system.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
27
Layers of TCP/IP Protocol Suite
For applications that require reliable data transfer
(such as most data applications), a connection-
oriented transport protocol called Transmission
Control Protocol (TCP) is defined. For
connectionless service, user datagram protocol
(UDP) is defined.
Applications such as network management, that do
not need very reliable packet transfer use the UDP
layer.
Application layer: This layer differs from
application to application.
Two processes on two end systems communicate
with the application layer as the interface.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
28
Layers of TCP/IP Protocol Suite
As in OSI architecture, peer-to-peer communication
applies to the TCP/IP architecture as well.
The application process (such as for transferring a
file) generates an application byte stream, which is
divided into TCP segments and sent to the IP layer.
The TCP segment is encapsulated in the IP
datagram and sent to the datalink layer.
The IP datagram is encapsulated in the datalink
layer frame.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
29
Layers of TCP/IP Protocol Suite
Since datalink layer can be subdivided into LLC
layer and MAC layer, IP datagram is encapsulated
in the LLC layer and then passed on to the MAC
layer.
The MAC frame is sent over the physical medium.
At the destination, each layer strips off the header,
does the necessary processing based on the
information in the header, and passes the
remaining portion of the data to the higher layer.
This mechanism for protocol encapsulation is
depicted in Figure 2.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
30

Protocol encapsulation in TCP/IP

Figure 2:Protocol encapsulation in TCP/IP

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
31
Application Layer Protocols
The various application layer protocols are
Simple Mail Transfer Protocol (SMTP), for electronic
mail containing ASCII text.
Multimedia Internet Mail Extension (MIME), for
electronic mail with multimedia content.
File Transfer Protocol (FTP) for file transfer.
Telnet for remote login.
Hypertext Transfer Protocol (HTTP) for World Wide
Web service

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
32
Application Layer Protocols
Border gateway protocol (BGP), a routing protocol
to exchange routing information between routers.
Exterior gateway protocol (EGP) is another routing
protocol.
Internet Control Message Protocol (ICMP), which is
at the same level as IP but uses IP service.
Simple Network Management Protocol (SNMP) for
network management. Note that SNMP uses UDP
and not TCP.
Note The TCP and IP layer software runs on every
end system. The IP layer software runs on every
router

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
33

Operation of TCP AND IP (1/5)


Consider the internet shown in Figure 3. Each end
system will be running the TCP/IP protocol stack,
including the application layer software.
Each router will be running the IP layer software.
If the networks use different protocols (e.g., one is
an Ethernet LAN and another is an X.25 WAN), the
router will do the necessary protocol conversion as
well.
End system A wants to transfer a file to end system
B.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
34
Operation of TCP AND IP (2/5)

Figure 3: TCP/IP operation in an internet

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
35
Operation of TCP and IP (3/5)
When two end systems have to exchange data using
TCP/IP protocol stack, a TCP connection is
established, and the data transfer takes place.
Though IP layer does not provide a reliable service, it
is the TCP layer that will ensure end-to-end reliable
transfer of data through error detection and
retransmission of packets.
Each end system must have a unique address—this
address is the IP address.
In addition, the process in end system A should
establish a connection with the process running in
end system B to transfer the file.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
36
Operation of TCP and IP (4/5)
Another address is assigned to this address, known
as the port address.
For each application, a specific port address is
specified.
When port 1 of A wishes to exchange data with port 2
on B, the procedure is:
1. Process on A gives message to its TCP: Send to B
port 2.
2. TCP on A gives the message to its IP: Send to host B.
(Note: IP layer need not know the port of B.)
3. IP on A gives message to the datalink layer with
instructions to send it to router X.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
37
Operation of TCP and IP (5/5)
4. Router X examines the IP address and routes it to B.
5. B receives the packet, each layer strips off the
header, and finally the message is delivered to the
process at port 2.
Note Though we talk about TCP connection, it needs to
be noted that there is no real connection between the
end systems.
It is a virtual connection. In other words, TCP
connection is only an abstraction.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
38
Internet Protocol (IP) (1/4)
Internet Protocol (IP) is the protocol that enables
various networks to talk to each other.
IP defines the data formats for transferring data
between various networks, and it also specifies the
addressing and routing mechanisms.
The service delivered by IP is unreliable
connectionless packet service.
The service is unreliable because there is no
guarantee that the packets will be delivered—
packets may be lost if there is congestion, though
a best effort is made for the delivery.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
39
Internet Protocol (IP) (2/4)
The packets may not be received in sequence,
packets may be duplicated, and packets may arrive
at the destination with variable delay.
The service is connectionless because each packet
is handled independently.
IP defines the rules for discarding packets,
generating error messages, and how hosts and
routers should process the packets.
The main functions of the IP layer are addressing
and routing.
Each machine is given an IP address that is unique
on the network.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
40
Internet Protocol (IP) (3/4)
The destination address in the IP datagram is used
to route the packet from the source to the
destination.
IP is implemented as software.
This software must run on every end system and
on every router in any internet using the TCP/IP
protocol suite.
In Figure 3, the router X may deliver the packet to
network Q directly or it may deliver it to router Y,
which in turn delivers to network Q.
So, the packets may take different routes and
arrive at the end system B out of sequence.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
41
Internet Protocol (IP) (4/4)
It is the TCP layer that takes care of presenting the
data in proper format to the application layer.
It is important to note that the IP layer does not
provide a reliable service.
The packets may be lost on the route from the
source to the destination if there is congestion in
the network.
It is the responsibility of the TCP layer to ask for
retransmissions and ensure that all the packets are
received at the destination.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
42
Transmission Control Protocol
(TCP) (1/5)
It is the job of transport layer protocol to ensure that
the data is delivered to the application layer without
any errors.
The functions of the transport layer are:
■ To check whether the packets are received in
sequence or not. If they are not in sequence, they
have to be arranged in sequence.
■ To check whether each packet is received without
errors using the checksum. If packets are received in
error, TCP layer has to ask for retransmissions.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
43
Transmission Control Protocol
(TCP) (2/5)
■ To check whether all packets are received or
whether some packets are lost.
It may happen that one of the routers may drop a
packet (discard it) because its buffer is full, or the
router itself may go faulty.
If packets are lost, the TCP layer has to inform the
other end system to retransmit the packet.
 Dropping a packet is generally due to congestion on
the network.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
44
Transmission Control Protocol
(TCP) (3/5)
 The TCP layer provides end-to-end reliable transfer
of data by taking care of flow control and error
control.
 If packets are received in error, retransmission is
requested.
 If packets are received out of order, they are put in
sequence.
 It appears to the application layer as though
everything is fine, but the TCP layer needs to do a lot
of work to achieve this

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
45
Transmission Control Protocol
(TCP) (4/5)
 Sometimes, one system may send the packets very
fast, and the router or end system may not be able
to receive the packets at that speed.
 Flow control is done by the transport layer.
 It is the job of the transport layer to provide an end-
to-end reliable transfer of data even if the
underlying IP layer does not provide reliable service.
 The Transmission Control Protocol (TCP) does all
these functions, through flow control and
acknowledgements.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
46
Transmission Control Protocol
(TCP) (5/5)
 In TCP/IP networks, it is not possible to ensure that
all the packets are received at the destination with
constant delay.
 In other words, the delay may vary from packet to
packet.
 Hence, we can say that TCP/IP networks do not
guarantee a desired quality of service.
 This characteristic poses problems to transfer real
time data such as voice or video over TCP/IP
networks.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
47
Flow Control and
Acknowledgements
To provide a reliable transmission, the
acknowledgement policy is used.
The two protocols for this mechanism
are the stop-and-wait protocol and the
sliding window protocol.
These protocols take care of lost
packets, flow control, and error
detection.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
48
Stop-and-Wait Protocol (1/4)
When the source (end system A) sends the first
packet to the destination (end system B), B sends
an acknowledgment packet.
Then A sends the second packet, and B sends the
acknowledgement.
This is a very simple protocol.
But the problem is that if the acknowledgement for
a packet is lost, what has to be done? A sends the
first packet and then starts a timer.
The destination, after receiving the packet, sends
an acknowledgement.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
49
Stop-and-Wait Protocol (2/4)
If the acknowledgement is received before the
timer expires, the source sends the next packet
and resets the timer.
If the packet sent by the source is lost, or if the
acknowledgement sent by the destination is lost,
the timer will expire, and the source resends the
packet.
In stop-and-wait protocol, the source sends a
packet and only after the acknowledgement is
received from the destination is the next packet
sent.
This is a simple protocol, but it results in lots of
delay, and the bandwidth is not used efficiently.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
50
Stop-and-Wait Protocol (3/4)

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
51
Stop-and-Wait Protocol (4/4)
This protocol is very simple to implement.
However, the drawback is that the throughput will
be very poor and the channel bandwidth is not
used efficiently.
For instance, if this protocol is used in a satellite
network, A will send a packet, and after one second
it will receive the acknowledgment.
During that one second, the satellite channel is
free, and the channel is not used effectively.
A refinement to this protocol is the sliding window
protocol.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
52
Sliding Window Protocol (1/4)
In this protocol, the source sends a certain number
of packets without waiting for the
acknowledgements.
The destination receives the packets and sends an
acknowledgement for each packet.
The source will have a timer for each packet and
keeps track of the unacknowledged packets.
If the timer expires for a particular packet and the
acknowledgement is not received, that packet will
be resent.
This way, the throughput on the network can be
increased substantially.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
53
Sliding Window Protocol (2/4)
There are many options as to when to send the
acknowledgement.
One option is the window size.
If the sliding window size is seven, the source can
send up to seven packets without waiting for the
acknowledgement.
The destination can send an acknowledgement
after receiving all seven packets.
If the destination has not received packet four, it
can send an acknowledgement indicating that up
to packet three were received.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
54
Sliding Window Protocol (3/4)
As shown in Figure 5, if B sends ACK three, the
source knows that up to packet three were
received correctly, and it sends all the packets
from four onwards again.
Another option in the sliding window protocol is
when to send the acknowledgements.
A positive acknowledgment can be sent indicating
that up to packet #n all packets are received.
Alternatively, a negative acknowledgement may
be sent indicating that packet #n is not received.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
55
Sliding Window Protocol (4/4)

Figure 5:Sliding window protocol

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
56
Congestion Control (1/3)
On the Internet, many connections get established
and closed, so the traffic on the Internet is difficult
to predict.
If the traffic suddenly goes up, there will be
congestion in the network and, as a result, some
packets may be discarded by the routers.
Every host has to have some discipline in
transmitting its packets—there is no point in
pushing packets onto the network if there is
congestion.
In TCP/IP networks, congestion control is done
through an additive-increase, multiplicative-
decrease mechanism.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
57
Congestion Control (2/3)
To start with, a congestion window size is fixed.
If there is congestion, the window size is reduced
to half.
If the congestion is reduced, the window size is
increased by one.
In TCP, congestion control is done through a
mechanism called additive increase/multiplicative
decrease.
A congestion window size is fixed at the beginning
of the transmission, such as 16 packets.
If there is suddenly congestion, and a packet loss is
detected, the TCP reduces the congestion window
size to 8.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
58
Congestion Control (3/3)
Even then, if a packet loss is detected, the window
size is reduced to 4, and then to Z.
The decrease is multiplicative.
If the congestion is reduced on the network, and
acknowledgements for the packets are being
received by the source, for each acknowledgement
received, the TCP increases the window size by 1.
If 4 was the earlier window size, it becomes 5,
then 6 and so on.
The increase is additive.
This simple mechanism for flow control ensures
that the transmission channel is used effectively.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
59

User Datagram Protocol (UDP)


The TCP provides a reliable service by taking care
of error control and flow control.
However, the processing required for the TCP layer
is very high and is called a heavyweight protocol.
In some applications such as real-time voice/video
communication and network management, such
high processing requirements create problems.
Another transport protocol is used for such
applications.
That is user datagram protocol (UDP).
UDP provides a connectionless service.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
60

User Datagram Protocol (UDP)


It sends the packets to the destination one after the
other, without caring whether they are being received
correctly or not.
It is the job of the application layer to take care of the
problems associated with lack of acknowledgements
and error control.
Simple Network Management Protocol (SNMP), which is
used for network management, runs above the UDP.
In applications such as real-time voice
communications, if a packet is lost, there is no point in
asking for a retransmission because it causes lots of
delay.
For such applications, UDP is a better choice than TCP.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session
61
Assignments (1/2)
1. Explain the functions of different layers in the
TCP/IP protocol architecture.
2. Explain the operation of TCP and IP.
3. IP does not provide a reliable service, but TCP
provides end-to-end reliable service. How?
4. What are the limitations of the TCP/IP protocol
stack?
5. Differentiate between TCP and UDP.
6. List the problems associated with running the
TCP/IP protocol stack in a satellite network.
7. Explain how congestion is controlled in TCP/IP
networks.

“CSC 311: Computer Networks and Communication” Unit:3


Lecture 02: 2023-2024 Academic Session
62

Assignments (2/2)
1. Write a technical report on Interplanetary Internet.
2. Prepare a technical report on running the TCP/IP
protocol stack on a satellite network.
3. Two systems, A and B, are connected by a point-to-
point link, but the communication is only from A to B.
Work out a mechanism to transfer a file from A to B
using UDP as the transport protocol.
4. Discuss the benefits of using UDP for data
applications if the transmission link is very reliable
and if there is no congestion on the network.
5. Compare the performance of stop-and-wait
protocol and sliding window protocol in terms of delay
and throughput.
“CSC 311: Computer Networks and Communication” Unit:3
Lecture 02: 2023-2024 Academic Session

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy