Professional Documents
Culture Documents
Computer Networks
5th IT
1
What Transport layer does?
Transport layer is responsible for the delivery of a
message from one process to another.
Transport layer protocol can be connection
oriented or connection less.
Transport layer divide the message into
transmittable segments
UDP is connection less protocol- It handles each
segment separately
TCP is connection oriented protocol- Create the
relationship between Segments using sequence
numbers
Transport layer is responsible for Error and Flow
control
2
Position of transport layer
3
Transport layer duties
4
Types of data deliveries
5
Port numbers
7
IANA(Internet Assigned Number Authority) ranges
8
Socket address
9
Encapsulation and decapsulation
Multiplexing and demultiplexing
11
12
13
Connection establishment
14
Connection termination
15
Error control
16
17
Connectionless service
Connection-oriented service
19
20
UDP is a connectionless, unreliable
protocol that has no flow and error
control. It uses port numbers to
multiplex data from the application
layer.
21
22
Table 22.1 Well-known ports used by UDP
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
53 Nameserver Domain Name Service
67 Bootps Server port to download bootstrap information
68 Bootpc Client port to download bootstrap information
69 TFTP Trivial File Transfer Protocol
111 RPC Remote Procedure Call
123 NTP Network Time Protocol
161 SNMP Simple Network Management Protocol
162 SNMP Simple Network Management Protocol (trap)
23
User datagram format
24
User datagram format
CheckSum: This field is used to detect the errors over the entire user
datagram.
25
Checksum calculation
26
27
Example.
28
The calculation of checksum and its
inclusion in the user datagram are
optional.
29
Note:
30
22.3 TCP
Port Numbers
Services
Sequence Numbers
Segments
Connection
Transition Diagram
Flow and Error Control
Silly Window Syndrome
31
Table 22.2 Well-known ports used by TCP
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
20 FTP, Data File Transfer Protocol (data connection)
21 FTP, Control File Transfer Protocol (control connection)
23 TELNET Terminal Network
25 SMTP Simple Mail Transfer Protocol
53 DNS Domain Name Server
67 BOOTP Bootstrap Protocol
79 Finger Finger
80 HTTP Hypertext Transfer Protocol
111 RPC Remote Procedure Call
32
Figure 22.11 Stream delivery
33
Figure 22.12 Sending and receiving buffers
34
Figure 22.13 TCP segments
35
Example 1
Imagine a TCP connection is transferring a file of 6000 bytes. The
first byte is numbered 10010. What are the sequence numbers for
each segment if data are sent in five segments with the first four
segments carrying 1000 bytes and the last segment carrying 2000
bytes?
Solution
The following shows the sequence number for each segment:
Segment 1 ==> sequence number: 10,010 (range: 10,010 to 11,009)
Segment 2 ==> sequence number: 11,010 (range: 11,010 to 12,009)
Segment 3 ==> sequence number: 12,010 (range: 12,010 to 13,009)
Segment 4 ==> sequence number: 13,010 (range: 13,010 to 14,009)
Segment 5 ==> sequence number: 14,010 (range: 14,010 to 16,009)
36
Note:
37
Note:
38
Note:
39
Figure 22.14 TCP segment format
40
Figure 22.15 Control field
41
Table 22.3 Description of flags in the control field
Flag Description
42
Figure 22.16 Three-step connection establishment
43
Figure 22.17 Four-step connection termination
44
Table 22.4 States for TCP
State Description
45
Figure 22.18 State transition diagram
46
Note:
47
Figure 22.19 Sender buffer
48
Figure 22.20 Receiver window
49
Figure 22.21 Sender buffer and sender window
50
Figure 22.22 Sliding the sender window
51
Figure 22.23 Expanding the sender window
52
Figure 22.24 Shrinking the sender window
53
Note:
55
Figure 22.25 Lost segment
56
Figure 22.26 Lost acknowledgment
57
Figure 22.27 TCP timers
58
Multiplexing
59
Figure 6.1 Dividing a link into channels
60
Figure 6.2 Categories of multiplexing
61
6.1 FDM
Multiplexing Process
Demultiplexing Process
The Analog Hierarchy
Other Applications of FDM
Implementation
62
Figure 6.3 FDM
63
Note:
64
Figure 6.4 FDM process
65
Figure 6.5 FDM demultiplexing example
66
Example 1
Assume that a voice channel occupies a bandwidth of 4
KHz. We need to combine three voice channels into a link
with a bandwidth of 12 KHz, from 20 to 32 KHz. Show
the configuration using the frequency domain without the
use of guard bands.
Solution
Shift (modulate) each of the three voice channels to a
different bandwidth, as shown in Figure 6.6.
67
Figure 6.6 Example 1
68
Example 2
Five channels, each with a 100-KHz bandwidth, are to be
multiplexed together. What is the minimum bandwidth of
the link if there is a need for a guard band of 10 KHz
between the channels to prevent interference?
Solution
For five channels, we need at least four guard bands.
This means that the required bandwidth is at least
5 x 100 + 4 x 10 = 540 KHz,
as shown in Figure 6.7.
69
Figure 6.7 Example 2
70
Example 3
Four data channels (digital), each transmitting at 1 Mbps,
use a satellite channel of 1 MHz. Design an appropriate
configuration using FDM
Solution
The satellite channel is analog. We divide it into four
channels, each channel having a 250-KHz bandwidth.
Each digital channel of 1 Mbps is modulated such that
each 4 bits are modulated to 1 Hz. One solution is 16-
QAM modulation. Figure 6.8 shows one possible
configuration.
71
Figure 6.8 Example 3
72
Figure 6.9 Analog hierarchy
73
Example 4
The Advanced Mobile Phone System (AMPS) uses two
bands. The first band, 824 to 849 MHz, is used for
sending; and 869 to 894 MHz is used for receiving. Each
user has a bandwidth of 30 KHz in each direction. The 3-
KHz voice is modulated using FM, creating 30 KHz of
modulated signal. How many people can use their cellular
phones simultaneously?
Solution
Each band is 25 MHz. If we divide 25 MHz into 30 KHz,
we get 833.33. In reality, the band is divided into 832
channels.
74
6.2 WDM
75
Figure 6.10 WDM
76
Note:
77
Figure 6.11 Prisms in WDM multiplexing and demultiplexing
78
6.3 TDM
Time Slots and Frames
Interleaving
Synchronizing
Bit Padding
Digital Signal (DS) Service
T Lines
Inverse TDM
More TDM Applications
79
Figure 6.12 TDM
80
Note:
81
Figure 6.13 TDM frames
82
Example 5
Four 1-Kbps connections are multiplexed together. A unit
is 1 bit. Find (1) the duration of 1 bit before multiplexing,
(2) the transmission rate of the link, (3) the duration of a
time slot, and (4) the duration of a frame?
Solution
We can answer the questions as follows:
84
Figure 6.14 Interleaving
85
Example 6
Four channels are multiplexed using TDM. If each
channel sends 100 bytes/s and we multiplex 1 byte per
channel, show the frame traveling on the link, the size of
the frame, the duration of a frame, the frame rate, and the
bit rate for the link.
Solution
The multiplexer is shown in Figure 6.15.
86
Figure 6.15 Example 6
87
Example 7
A multiplexer combines four 100-Kbps channels using a
time slot of 2 bits. Show the output with four arbitrary
inputs. What is the frame rate? What is the frame
duration? What is the bit rate? What is the bit duration?
Solution
Figure 6.16 shows the output for four arbitrary inputs.
88
Figure 6.16 Example 7
89
Figure 6.17 Framing bits
90
Example 8
Solution
92
Example 9
Two channels, one with a bit rate of 100 Kbps and
another with a bit rate of 200 Kbps, are to be multiplexed.
How this can be achieved? What is the frame rate? What
is the frame duration? What is the bit rate of the link?
Solution
We can allocate one slot to the first channel and two slots
to the second channel. Each frame carries 3 bits. The
frame rate is 100,000 frames per second because it
carries 1 bit from the first channel. The frame duration is
1/100,000 s, or 10 ms. The bit rate is 100,000 frames/s x
3 bits/frame, or 300 Kbps.
93
Figure 6.18 DS hierarchy
94
Table 6.1 DS and T lines rates
Rate Voice
Service Line
(Mbps) Channels
DS-1 T-1 1.544 24
95
Figure 6.19 T-1 line for multiplexing telephone lines
96
Figure 6.20 T-1 frame structure
97
Table 6.2 E line rates
Rate Voice
E Line
(Mbps) Channels
E-1 2.048 30
98
Figure 6.21 Multiplexing and inverse multiplexing
99
Client-Server
Model:
Socket Interface
100
24.1 Client-Server Model
Relationship
Concurrency
Processes
101
Figure 24.1 Client-server model
102
Figure 24.2 Client-server relationship
103
Figure 24.3 Connectionless iterative server
104
Figure 24.4 Connection-oriented concurrent server
105
24.2 Socket Interface
Sockets
Connection-Oriented Server
106
Figure 24.5 Socket structure
107
Figure 24.6 Socket types
108
Figure 24.7 Socket interface for connectionless iterative server
109
Figure 24.8 Socket interface for connection-oriented concurrent server
110
Congestion Control
and
Quality of Service
111
23.1 Data Traffic
Traffic Descriptor
Traffic Profiles
112
Figure 23.1 Traffic descriptors
113
Figure 23.2 Constant-bit-rate traffic
114
Figure 23.3 Variable-bit-rate traffic
115
Figure 23.4 Bursty traffic
116
23.2 Congestion
Network Performance
117
Figure 23.5 Incoming packet
118
Figure 23.6 Packet delay and network load
119
Figure 23.7 Throughput versus network load
120
23.3 Congestion Control
Open Loop
Closed Loop
121
23.4 Two Examples
122
Note:
123
Note:
124
Figure 23.8 Multiplicative decrease
125
Figure 23.9 BECN
126
Figure 23.10 FECN
127
Figure 23.11 Four cases of congestion
128
23.5 Quality of Service
Flow Characteristics
Flow Classes
129
23.6 Techniques to Improve QoS
Scheduling
Traffic Shaping
Resource Reservation
Admission Control
130
Figure 23.12 Flow characteristics
131
Figure 23.13 FIFO queue
132
Figure 23.14 Priority queuing
133
Figure 23.15 Weighted fair queuing
134
Figure 23.16 Leaky bucket
135
Figure 23.17 Leaky bucket implementation
136
Note:
137
Figure 23.18 Token bucket
138
Note:
139
23.7 Integrated Services
Signaling
Flow Specification
Admission
Service Classes
RSVP
140
Note:
141
Figure 23.19 Path messages
142
Figure 23.20 Resv messages
143
Figure 23.21 Reservation merging
144
Figure 23.22 Reservation styles
145