ppt3 CN
ppt3 CN
Chapter 10
Application Layer
Data Communications and
Networking, With TCP/IP
protocol suite
Sixth Edition
Behrouz A. Forouzan
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.
Chapter 10: Outline
10.1 Introduction
Method Action
GET Requests a document from the server
HEAD Requests information about a document but not the document itself
PUT Sends a document from the client to the server
POST Sends some information from the client to the server
TRACE Echoes the incoming request
DELETE Removes the web page
CONNECT Reserved
OPTIONS Inquires about available options
Header Description
User-agent Identifies the client program
Accept Shows the media format the client can accept
Accept-charset Shows the character set the client can handle
Accept-encoding Shows the encoding scheme the client can handle
Accept-language Shows the language the client can accept
Authorization Shows what permissions the client has
Host Shows the host and port number of the client
Date Shows the current date
Upgrade Specifies the preferred communication protocol
Cookie Returns the cookie to the server (explained later in this section)
If-Modified-Since Specifies if the file has been modified since a specific date
Header Description
Date Shows the current date
Upgrade Specifies the preferred communication protocol
Server Gives information about the server
Set-Cookie The server asks the client to save a cookie
Content-Encoding Specifies the encoding scheme
Content-Language Specifies the language
Content-Length Shows the length of the document
Content-Type Specifies the media type
Location To ask the client to send the request to another site
Accept-Ranges The server will accept the requested byte-ranges
Last-modified Gives the date and time of the last change
The status line in the response shows the file was not modified
after the defined point in time. The body of the response message is
also empty.
HTTP/1.1 304 Not Modified Status line
Date: Sat, Sept 06 08 16:22:46 GMT First header line
Server: commonServer.com Second header line
Blank line
(Empty Body) Empty body
© McGraw Hill, LLC 47
Example 10.9
HTTP per se does not provide security. However, HTTP can be run
over the Secure Socket Layer (SSL). In this case, HTTP is referred
to as HTTPS. HTTPS provides confidentiality, client and server
authentication, and data integrity.
The data connection uses the well-known port 20 at the server site.
However, the creation of a data connection is different from the
control connection. The following shows the steps:
2. Using the PORT command the client sends the port number to
the server..
3. The server receives the port number and issues an active open
using the well-known port 20 and the received ephemeral port
number.
The following shows an actual FTP session that lists the directories.
$ ftp voyager.deanza.fhda.edu
Connected to voyager.deanza.fhda.edu.
220 (vsFTPd 1.2.1)
530 Please login with USER and PASS.
Name (voyager.deanza.fhda.edu:forouzan): forouzan
331 Please specify the password.
Password:*********
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
227 Entering Passive Mode (153,18,17,11,238,169)
150 Here comes the directory listing.
drwxr-xr-x 2 3027 411 4096 Sep 24 2002 business
drwxr-xr-x 2 3027 411 4096 Sep 24 2002 personal
drwxr-xr-x 2 3027 411 4096 Sep 24 2002 school
226 Directory send OK.
ftp> quit
221 Goodbye.
© McGraw Hill, LLC 63
Security for FTP
The FTP protocol was designed when security was not a big issue.
Although FTP requires a password, the password is sent in
plaintext (unencrypted), which means it can be intercepted and
used by an attacker. The data transfer connection also transfers
data in plaintext, which is insecure. To be secure, one can add a
Secure Socket Layer between the FTP application layer and the
TCP layer. In this case FTP is called SSL-FTP. We also explore
some secure file transfer applications when we discuss SSH later in
the chapter.
Based on the common scenario (Figure 10.19), we can say that the
e-mail is one of those applications that needs three uses of client-
server paradigms to accomplish its task. It is important that we
distinguish these three when we are dealing with e-mail. Figure
10.22 shows these three client-server applications. We refer to the
first and the second as Message Transfer Agents (MTAs), the third
as Message Access Agent (MAA).
To show the three mail transfer phases, we show all of the steps
described above using the information depicted in Figure 10.23. In
the figure, we have separated the messages related to the envelope,
header, and body in the data transfer section. Note that the steps in
this figure are repeated two times in each e-mail transfer: once
from the e-mail sender to the local mail server and once from the
local mail server to the remote mail server. The local mail server,
after receiving the whole e-mail message, may spool it and send it
to the remote mail server at another time.
The first and second stages of mail delivery use SMTP. However,
SMTP is not involved in the third stage because SMTP is a push
protocol; it pushes the message from the client to the server. In
other words, the direction of the bulk data (messages) is from the
client to the server. On the other hand, the third stage needs a pull
protocol; the client must pull messages from the server. The
direction of the bulk data is from the server to the client. The third
stage uses a message access agent.
Type Description
7-bit NVT ASCII characters with each line less than 1000 characters
8-bit Non-ASCII characters with each line less than 1000 characters
Binary Non-ASCII characters with unlimited-length lines
Base64 6-bit blocks of data encoded into 8-bit ASCII characters
Quoted-printable Non-ASCII characters encoded as an equal sign plus an ASCII code
Value Code Value Code Value Code Value Code Value Code Value Code
0 A 11 L 22 W 33 h 44 s 55 3
1 B 12 M 23 X 34 i 45 t 56 4
2 C 13 N 24 Y 35 j 46 u 57 5
3 D 14 O 25 Z 36 k 47 v 58 6
4 E 15 P 26 a 37 l 48 w 59 7
5 F 16 Q 27 b 38 m 49 x 60 8
6 G 17 R 28 c 39 n 50 y 61 9
7 H 18 S 29 d 40 o 51 z 62 +
8 I 19 T 30 e 41 p 52 0 63 /
9 J 20 U 31 f 42 q 53 1
10 K 21 V 32 g 43 r 54 2
$nslookup www.forouzan.biz
Name: www.forouzan.biz
Address: 198.170.240.179
DNS can use either UDP or TCP. In both cases the well-known
port used by the server is port 53. UDP is used when the size of the
response message is less than 512 bytes because most UDP
packages have a 512-byte packet size limit. If the size of the
response message is more than 512 bytes, a TCP connection is used.
In that case, one of two scenarios can occur.
When the DNS was designed, no one predicted that there would be
so many address changes. In DNS, when there is a change, such as
adding a new host, removing a host, or changing an IP address, the
change must be made to the DNS master file. These types of
changes involve a lot of manual updating. The size of today’s
Internet does not allow for this kind of manual operation.
Internet users that are ready to share their resources become peers
and form a network. When a peer in the network has a file) to
share, it makes it available to the rest of the peers. An interested
peer can connect itself to the computer where the file is stored and
download it. After a peer downloads a file, it can make it available
for other peers to download. As more peers join and download that
file, more copies of the file become available to the group.
Data items and nodes in Chord are m-bit identifiers that create an
identifier space of size 2m points distributed in a circle in the
clockwise direction. We refer to the identifier of a data item as k
(for key) and the identifier of a peer as N (for node). Arithmetic in
the space is done modulo 2m, which means that the identifiers are
wrapped from 2m - 1 back to 0. Although some implementations
use a collision-resistant hash function like SHA1 with m = 160, we
use m = 5 in our discussion to make the discussion simpler.
Lookup (key)
{
if (node is responsible for the key)
return (node’s ID)
else
return find_succesor (key)
}
find_successor (id)
{
x = find_ predecessor (id)
return x.finger[1]
}
find_predecessor (id)
{
x=N // N is the current node
while (id ∉ (x, x.finger[1]))
{
x = x.find_closest_predecessor (id) // Let x find it
}
return x
}
find_closest_predecessor (id)
{
for (i = m downto 1)
{
if (finger [i] ∈ (N, id)) //N is the current node
return (finger [i])
}
return N //The node itself is closest predecessor
}
Stabilize ()
{
P = finger[1].Pre //Ask the successor to return its predecessor
if (P ∈ (N, finger[1])) finger[1] = P // P is the possible successor of N
finger[1].notify (N) // Notify P to change its predecessor
}
Notify (x)
{
if (Pre = null or x ∈ (Pre, N)) Pre = x
}
Fix_Finger ()
{
Generate (i ∈ (1, m]) //Randomly generate i such as 1 < i ⩽ m
finger[i] = find_successor (N 2i1 ) // Find value of finger[i]
}
Join (x)
{
Initialize (x)
finger[1].Move_Keys (N)
}
Initialize (x)
{
Pre = null
if (x = null) finger[1] = N
else finger[1] = x. Find_Successor (N)
}
Move_Keys (x)
{
for (each key k)
{
if (x ∈ [k, N)) move (k to node x) // N is the current node
}
}
We assume that node N17 joins the ring in Figure 10.49 with the
help of N5. Figure 10.51 shows the ring after the ring has been
stabilized. The following five steps shows the process:
1. N17 set its predecessor to null and its successor to N20.
2. N17 then asks N20 to send k14 and k16 to N17.
3. N17 validates its own successor and asks N20 to change its
predecessor to N17
4. The predecessor of N17 is updated to N12.
5. The finger table of nodes N17, N10, N5, and N12 is changed.
We assume that a node, N10, leaves the ring in Figure 2.51. Figure
2.52 shows the ring after it has been stabilized. The following
shows the process:
1. Node N5 finds out about N10’s departure when it does not
receive a pong message to its ping message. Node N5 changes
its successor to N12 in the list of successors.
2. Node N5 immediately launches the stabilize function and asks
N12 to change its predecessor to N5.
3. Hopefully, k7 and k9, which were under the responsibility of
N10, have been duplicated in N12 before the departure of N10.
4. Nodes N5 and N25 update their finger tables.
In Pastry, like Chord, nodes and data items are m-bit identifiers
that create an identifier space of 2^m points distributed uniformly
on a circle in the clockwise direction. The common value for m is
128. The protocol uses the SHA-1 hashing algorithm with m = 128.
However, in this protocol, an identifier is seen as an n-digit string
in base 2b in which b is normally 4 and n = (m / b). In other words,
an identifier is a 32-digit number in base 16 (hexadecimal).
Lookup (key)
{
if (key is in the range of N’s leaf set)
forward the message to the closest node in the leaf set
else
route (key, Table)
}
route (key, Table)
{
p = length of shared prefix between key and N
v = value of the digit at position p of the key // Position starts from 0
if (Table [p, v] exists)
forward the message to the node in Table [p, v]
else
forward the message to a node sharing a prefix as long as the current node, but
numerically closer to the key.
}
The process of joining the ring in Pastry is simpler and faster than
in Chord. The new node, X, should know at least one node N0,
which should be close to X (based on the proximity metric); this
can be done by running an algorithm called Nearby Node
Discovery. Node X sends a join message to N0. In our discussion,
we assume that N0’s identifier has no common prefix with X’s
identifier.
Figure 10.54 shows how a new node X with node identifier N2212
uses the information in four nodes in Figure 2.53 to create its initial
routing table and leaf set for joining the ring. Note that the contents
of these two tables will become closer to what they should be in the
updating process. In this example, we assume that node 0302 is a
nearby node to node 2212 based on the proximity metric.
Each Pastry node periodically tests the liveliness of the nodes in its
leaf set and routing table by exchanging probe messages. If a local
node finds that a node in its leaf set is not responding to the probe
message, it assumes that the node has failed or departed. To
replace it in its leaf set, the local node contacts the live node in its
leaf set with the largest identifier and repairs its leaf set with the
information in the leaf set of that node. Since there is an overlap in
the leaf set of close-by nodes, this process is successful.
In Kademlia, nodes and data items are m-bit identifiers that create
an identifier space of 2m points distributed on the leaves of a
binary tree. The protocol uses the SHA-1 hashing algorithm with m
= 160.
Kademlia keeps only one routing table for each node; there is no
leaf set. Each node in the network divides the binary tree into m
subtrees that do not include the node itself. Subtree i includes nodes
that share i leftmost bit (common prefix) with the corresponding
node. The routing table is made of m rows but only one column. In
our discussion, we assume that each row holds the identifier of one
of the nodes in the corresponding subtree, but later we show that
Kademlia allows up to k nodes in each row. The idea is the same as
that used by Pastry, but the length of the common prefix is based on
the number of bits instead of the number of digits in base 2b.
Let us find the routing table for Example 2.23. To make the
example simple, we assume that each row uses only one identifier.
Since m = 4, each node has four subtrees corresponding to four
rows in the routing table. The identifier in each row represents the
node that is closest to the current node in the corresponding subtree.
Figure 2.56 shows all routing tables, but only three of the subtrees.
We have chosen these three, out of eight, to make the figure smaller.
When a node leaves the network or fails, other nodes update their
k-buckets using the concurrent process described before.
www.mheducation.com
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.
Accessibility Content: Text Alternatives for Images
The sky center has two laptops connected to a L A N switch. One of the laptops
is labeled as Alice. The L A N switch is connected to R 2 which is further
connected to R 4 and R 1. R 1 is connects to other I S Ps. R 4 connects to W A N
switch 2 which is further connected between W A N switch 1 and 3. This
connection between W A N 1, 2, and 3 is labeled as switched W A N. The W A N
switch 1 is connected to R 3 which is further connected to other I S Ps. The W A
N switch 3 connects to router R 5 by point-to-point W A N represents National I
S P. The router R 5 connects to router R 7 which connects to L A N switch two
laptops, and a mainframe shows Bob scientific books. R 7 connects to router R 6
which connects to other I S Ps, by point-point W A N. The application layers are
as follows: Transport, Network, Datalink, and physical. The legend represents
point-to-point WAN, LAN switch, WAN switch, and Router.
The diagram shows three LANs connected to the internet. Two LANs are similar
such that the clients are connected by WAN and each client is connected to the
switch. This switch connects to the router of the LAN, which connects to the
router of the internet by WAN. The third LAN has a server connected to the
switch, and the clients are connected to the switch, which connects to the router
of the internet by WAN. These three small LANs are connected by the internet,
hence, the client of one LAN communicates with the server of the other LAN is
represented by a direct bi-directional link between the client of one LAN to the
server of other LAN.
The diagram shows three LANs connected to the internet. Two LANs are similar
such that the peers are connected by WAN and each peer is connected to the
switch. This switch connects to the router of the LAN, which connects to the
router of the internet by WAN. The third LAN has a server connected to the
switch, and the peers are connected to the switch, which connects to the router of
the internet by WAN. These three small LANs are connected by the internet,
hence, the peer of one LAN communicates with the server of the other LAN is
represented by a direct bi-directional link between the peer of one LAN to the
server of other LAN.
Both client site and server site show the layers as follows: Application layer,
socket interface, Transport layer, Network layer, Data-link layer, Physical layer.
The client site is listed under a box where one corner has a laptop image, and the
server site is listed under another box where one corner has a server image. The
socket interface is highlighted and, the layers below that are on a box and labeled
at the bottom as the operating system.
A long horizontal box at the top represents the application program, and three
boxes at the bottom represent different types of source and sink. Box 1 shows the
keyboard as source and monitor as sink, and arrow point from keyboard to
application represents read, and arrow from application to monitor represents
write. Box 2 shows a file, and box 3 shows a socket. In both box-2 and box-3
files and socket are represented as both source and sink, and arrow from the file
or socket to application represents read and arrow from application to file or
socket represents write.
Two application layers, where the one on the left shows a laptop representing
client process, and the one on the right shows server representing server process.
These two application layers are connected by a logical connection, through a
socket in each application layer. An arrow from client to socket, and socket to
server shows request, and arrow from server to socket and socket to client shows
a response.
Site 1 has file A and image B, while site 2 has a file C, which is requested by a
client, where A is the original document, B is the image, and C is the referenced
file. Step 1: Client makes request 1 to site 1. Step 2: Site 1 sends response 1 as
file A to the client. Step 3: Client makes request 2 to site 1. Step 4: Site 1 sends
response 2 as image B to the client. Step 5:Request 3 from client to site 2. Step
6: Site 2 sends Response 3 as file C to the client.
At the top client is represented on the left and the server is represented on the
right. Sever has a file and image. A vertical line is represented below the client
and server. Three handshake takes place between client and server, where the
first and third handshake is from client to the server and the second handshake is
from server to the client. Four sets of handshakes are represented, where the first
two sets of handshakes represent the first connection, and the last two sets of
handshakes represent the second connection. The first set of handshakes has a
request from the client in the third handshake. Both the connections are similar,
where the first set of handshake in the first connection response is a file and the
second connection response is an image, followed by the second set of the 3-way
handshake.
At the top client is represented on the left and the server is represented on the
right. Sever has a file and image. A vertical line is represented below the client
and server. Three handshake takes place between client and server, where the
first and the third handshake is from client to the server and the second
handshake is from server to the client. The third handshake from the client to the
server has a request in it. The server sends a response to the client after the third
handshake, where the client receives the file. Again the client sends a request to
the server, and then the server sends a response to the client, where an image is
received. This is followed by a three-way handshake.
Both the request and response have 4 sections, where the first section alone
differs. The first section in a request message is the request line and the first
section in the response message is the status line. The next sections are header
lines, blank-line, and body. The request line has the following: Method, space,
URL, space, Version, carriage return, and line feed. The status line has the
following: Version, space, status code, space, phrase, carriage return, and line
feed. The header has the following in the first and last- header name, colon,
space, value, carriage return, and line feed. The blank line has a carriage return
and line feed. The body has a text variable number of lines present only in some
messages.
On the left client is represented with a computer and on the right server is
represented, and a vertical line below the client and server points down to time. 1
is the request from the client to the server has the following 3 sections. The first
section-request line has GET space forward-slash u s r forward-slash bin
forward-slash image1 space HTTP forward-slash 1.1. The second section shows
Accept colon space image forward-slash gif and Accept colon space image
forward-slash jpeg. The third section is a blank region. 2 is the response from the
server to the client has 4 sections. The first section-status line has HTTP
forward-slash 1.1 space 200 space OK. The second section has the following
Date, server, content-encoding, and content length. Third section plain space.
The fourth section has the body of the document.
On the left client is represented with a computer and on the right server is
represented, and a vertical line below the client and server points down to time. 1
is the request from the client to the server has the following 4 sections. The first
section-request line has PUT space forward-slash c g i hyphen bin forward-slash
doc dot pl space HTTP forward-slash 1.1. The second section shows Accept
colon space asterisk forward-slash asterisk, Accept colon space image forward-
slash gif, Accept colon space image forward-slash jpeg, and Content-length
colon 50. The third section is plain space. The fourth section has the input
information. 2 is the response from the server to the client has 4 sections. The
first section-status line has HTTP forward-slash 1.1 space 200 space OK. The
second section has the following Date, server, content-encoding, and content
length. Third section plain space. The fourth section has the body of the
document.
The left side shows the client and the right side shows the server, and between
the client and server three requests numbered 1, 3, and 5 and three responses
numbered 2, 4, and 6 are represented. After request 1, a customer file is created
with ID 12343 on the server-side. Response 2, creates a vendor file with cookie
12343, and simultaneously the customer file is updated. Response 2 has a body
page representing the toys. Request 3 has the cookie from the vendor file and the
response-4 is given where the customer file is updated. Response 4 has a body
Page representing the price. Again the request 5 has a cookie from the vendor
file and the response is given and the customer file is updated. Request 5 has the
information about the payment in the body, and response 6 has order
confirmation in the body.
On the left side a local network, and on the right side internet is represented, and
these are connected by WAN in each. The local network has a proxy server and
the client's computers are connected to the Router and the Router is connected to
the WAN of the local network. The internet has several web servers connected to
a WAN.
The local file system on the client-side and the remote file system on the server
side is represented as a pile of discs on the left side and the right side
respectively. The client has 3 layers namely user interface, control process, and
data transfer process, while the server has 2 layers namely control process, and
data transfer process. The control process is connected by a bi-directional arrow
labeled control connection, and the data transfer process is connected by a bi-
directional arrow labeled data connection.
The server on the right and the client on the left are represented. To the client and
the server, the control process port 21 is represented as a vertical tall box
attached to it. Between port 21, the request and response are represented from 1
to 22 are as follows: 1. Command 220 service ready. 2. Response User Forouzan.
3.Command 331 username ok password. 4.Response Pass x x x x x x.
5.command 230 user login ok. 6.Response-port 1267. 7.Command 150 data
connections open shortly. 8.response EBCDIC. 9.Command 200 ok.
10.Response STRU R. 11.Command 200 ok. 12. Response RETR forward-slash
usr forward-slash user forward-slash forouzan forward-slash reports forward-
slash file 1. 13.Command 250 ok. 14 to 19 are data transfers from the client to
the server in the data transfer process port 20. 20.Command 226 closing data
connection. 21. Response quit. 22.Command 221 service closing.
The diagram shows Email id format from left to right as follows: Local part-
mailbox address of the recipient, at symbol, and the domain name of the mail
server.
The diagram shows an SMTP client and an SMTP server, and a block below them, where
the request and responses are sent and received. The first phase shows connection
establishment, where the SMTP server sends 220 service-ready to the SMTP client. The
SMTP client sends HELLO colon some dot con to the SMTP server. The SMTP server
sends 250-OK to the SMTP client. The second phase shows data transfer, where envelope,
header, blank line, and body are represented. The envelope has mail from the address and
to address sent as a request to server and 250 ok response to the client. The header has
data as a request to the server, and the server sends 354 start mail input as a response to
the client, followed by from, to date, and the subject of the mail is sent to the server. The
blank line is empty sent from the client to the server. The body has salutation and message,
and the last one is a dot sent to the server, and then the server sends response 250 OK to
the client. are sent and received between SMTP the client and SMTP the server. The last
or the third phase is connection termination, where the client sends QUIT as a request to
the server, and the server sends 221-service closed as a response to the client.
The diagram shows the POP server as a remote server on one end and the POP
client e-mail receiver Bob on the opposite end. An arrow from the POP server to
the POP client represents messages are pulled. The request and the response
between the client and the server are as follows: The POP client sends the user
name to the POP server. The POP server sends the OK response to the POP client,
followed by the Password request, OK response. This is followed by list request,
e-mail number and their size response, retrieve 1 request, e-mail 1 response,
followed by several messages of retrieve N request and e-mail N response.
Alice UA sends non-ASCII code through MIME to the E-mail system, where it
is transferred as 7-bit NVT ASCII. From the e-mail system, 7-bit NVT ASCII is
received by MIME in Bob where Non-ASCII code is decoded in Bob UA.
The panel shows 3 sections as follows: the top section as e-mail header, the
middle section as MIME header, and the bottom section as E-mail body. The
MIME header has the following content in five lines. Line 1-MIME hyphen
version colon 1.1. Line 2-Content hyphen Type colon type forward-slash subtype.
Line 3-Content hyphen Transfer hyphen Encoding colon encoding type. Line 4-
Content hyphen ID colon message ID. Line 5-Content hyphen Description colon
textual explanation of nontextual contents.
The mixed ASCII data and Non-ASCII data in the top shows five 8-bit chunks,
each with a character below it. The first 2 and the last 2 are not highlighted,
while the one in the middle is highlighted and represents non-ASCII 1001 1101
9D. The conversion into ASCII data shows the first 2 sections and the last 2
sections are represented the same, while the highlighted one is pointed down by
an arrow labeled quoted-printable, which represents three 8-bit chunks of ASCII
data for the one 4,4-bit of non-ASCII data. The three converted ASCII data from
quoted-printable are 00111101 equal sign, 00111001 9, and 01000100-uppercase
D.
Case 1 represents the only receiver uses HTTP, while Case 2 represents both
sender and receiver use HTTP. The diagram shows Alice the sender is connected
to the SMTP client in Alice site and Bob the receiver is connected to the SMTP
server in Bob site, and these two sites are connected to the internet in the middle.
Case 1 and case 2 differs on the client-side, where the SMTP server is used in
Alice site in case 1, and the HTTP server is used in Alice site in case 2. Case 1
has an extra step because of the SMTP server, such that Step 1 shows Alice
SMTP client to the SMTP server. Step 2 SMTP server to the SMTP client in
Alice site. Step 3 SMTP client of Alice site to the SMTP server of Bob site over
the internet. Step 4 SMTP server of Bob site to the HTTP server of Bob site. Step
1 of case 1 eliminated in case 2 because of the HTTP server, such that step 2, 3,
and 4 are the step 1, 2, and 3 in case 2.
Part A shows local logging, where the computer terminal connects to the
terminal driver of the operating system. Arrows from the terminal driver point to
the files in the application programs. Part B shows remote logging, where two
operating systems are connected by the internet. The operating system on the left
has the client terminal connected to the terminal driver in the operating system.
The terminal driver is connected to the TELNET client outside the OS. The
TELNET client connects to the block of TCP, IP, Datalink, and Physical. This
block in OS connects to the internet. From the internet, a similar downlink is
represented on the opposite side. From the internet, an arrow points to the block
of TCP, IP, Datalink, and Physical in the OS. This block connects to the TELNET
server outside the OS, which then connects back to the pseudoterminal driver
inside the OS. The pseudoterminal driver in the OS arrows points to the files in
the application programs.
The first part shows the connection from left to right as follows: A computer
representing terminal, connected to TELNET client, and this connection
represents the local computer character set. The TELNET client connects to the
TELNET server through the internet, and this connection represents the N V T
character set. The TELNET server connects to the Pseudoterminal driver, and
this connection represents the remote computer character set. The second part
shows two parts. Part a shows a Data character with 8 digits starting with 0, and
part b shows a control character with 8 digits starting with 1.
FTP client and SSH client on the left side are connected by bi-directional
arrowheads and FTP server and SSH server are on the right side, connected by
bi-directional arrowheads. The Client-side is represented as a local site, and the
server site is represented as a remote site. Between the SSH client and S S H
server, a tunnel represents the secure connection, to which S S H client and S S
H server are connected by bi-directional arrowheads.
The packet has 5 sections, represented with their length, where the last 4 sections
are encrypted for confidentiality. From the left to right the sections are as
follows: Length-4 bytes, Padding-1 to 8 bytes, Type-1 byte, Data-variable, and
CRC-4 bytes.
The diagram shows the user at the top, followed by the Application layer and
network layer one below the other. The application layer has a file transfer client
and D N S client in it. Outside the application layer in the same level D N S
server is represented. The steps from user to the network layer are as follows:
Step1 1: Host-name from user to file transfer client. Step 2:Host name from File
transfer client to D N S client. Step 3: Querry from D N S client to D N S server.
Step 4: Response from D N S server to D N A client. Step 5:I P address from D
N S client to File transfer client. Step 6: I P address from file transfer client to the
network layer.
A root node is represented. From the root, several sibling nodes are represented
in level 1 as top-level nodes. From each top-level node, further nodes are
represented in different levels and different numbers.
A tree diagram path shows 4 levels, with the label and domain name. Arrow
starts from the last node and ends at the root. At level 4, the label represents a
computer, and the domain name represents a Computer dot b Department dot top
university dot e d u dot. At Level 3, the label represents b Department, and the
domain name represents b Department dot top university dot e d u dot. At level 2,
the label represents the top university, and the domain name represents the top
university dot e d u dot. level 4, the label represents e d u, and the domain name
represents e d u dot.
A tree diagram shows the root node, and three branches from it to level 1, of
which 2 are labeled as com and e d u. Com domain represents two nodes
branching from level 2. One node in level 3 branches further marks another
domain, while the unbranched node in level 3 falls under the domain of Com.
Similarly, in edu, three branches lead to 3 nodes in level 2.
The root represents the root server. Three nodes in level 1 represent e d u server,
com server, and u-s server. The edu server branches into two noes in level 2
namely f h d a dot e d u and b k dot e d u. The com server branches into two
nodes in level 2 namely McGraw-dot-com and irwin-dot-com. Three dots are
represented between each node at the same level.
A root node branches to a node representing com in level 1. The circular region
surrounding the node com represents the zone, and the entire regions that fall
under this node represent the domain. From com, another node branches down,
where one is named mhhe, which is represented in level 2. The nodes following
mhhe and the regions around it represent the zone and domain of mhhe.
A root node branches into 14 nodes in level 1 as follows: aero, biz, com, coop,
edu, gov, info, int, mil, museum, name, net, org, and pro. From the nodes in level
1, lines are represented under each node. Node edu branches into several nodes,
of which one is uci. From uci, an arrow shows the label uci-dot-edu, where a text
reads index to the addresses.
A root node branches into four nodes in level 1 namely a-e, f-r, u-s, and z-w.
Each node in level shows branch below it. The branches under node u-s in level
1 shows 1 path c a node. The c a node in level 2 leads down to node u s I, from
which an arrow points to label u c-i dot c-a dot u-s, where a text reads index to
the addresses.
In the left Anet ISP represents d n s dot anet dot com with a client as the source
and a local server in it. On the right, McGraw-Hill Network represents dns-dot-
McGraw hyphen hill dot com with a destination server and a local server in it.
Between these two domains, a root-server and a dot-com-server are represented.
The steps in the recursive resolution are as follows: Step 1: From Source of Anet
ISP to local server of Anet ISP. Step 2: From the local server of Anet ISP to the
root server. Step 3: From Root server to dot-com server. Step 4. From dot-com
server to local server of McGraw-Hill network. Step 5. From the local server of
the McGraw-Hill network to the dot-com server. Step 6. From the dot-com
server to the root server. Step 7. From the root server to the local server of anet I
S P. Step 8. From the local server of Anet ISP to the source of Anet ISP. A text at
the bottom reads as follows Source some dot anet dot com, and destination
engineering dot McGraw-Hill dot com.
In the left Anet ISP represents d n s dot anet dot com with a client as the source
and a local server in it. In the right, McGraw-Hill Network represents d n s dot
McGraw hyphen hill dot com with a destination server and a local server in it.
Between these two domains, a root-server and a dot-com-server are represented.
The steps in the iterative resolution are as follows: Step 1: From Source of Anet
ISP to local server of Anet ISP. Step 2: From the local server of Anet ISP to the
root server. Step 3: From Root server to Anet ISP. Step 4. From Anet ISP to dot-
com server. Step 5. From dot-com server to Anet ISP. Step 6. From the local
server of the Anet ISP to the local server of the McGraw hill network. Step 7.
From the McGraw hill network to the Anet ISP. A text at the bottom reads as
follows Source some dot anet dot com, and destination engineering dot McGraw-
Hill dot com.
The structure shows a table of 7 rows, where the first three rows represent the
header and are split into two 0 to 16 and 16 to 31. The content is as follows: Row
1 Identification and flags. Row 2 number of question records and number of
answer records all 0s in a query message. Row 3 number of authoritative records
all 0s in query message and number of additional records all 0s in the query
message. Row 4 Question section. Row 5 Answer section resource records. Row
6 Authoritative section. Row 7 Additional section. At the bottom, the text reads
as follows: Note: The query message contains only the question section. The
response message includes the question section, the answer section, and possibly
two other sections.
A server represents the directory center, and 6 computers represent the peer. Each
peer is connected to the directory center by an individual dashed line with arrows
in both ends representing directory information. The peers are randomly
connected by a straight line with arrows on both ends representing sharing
objects.
A circle with 4 dots on it, divides the circle into 4 equal sections, represents 0 at
the top, 1 by 4 times 2 power m at the right, 1 by 2 times 2 power m at the
bottom, and 3 by 4 times 2 power m at the left. A three-fourth circular arrow
inside the circle is represented in a clockwise direction between 0 and three
fourth of the circle. At the center of the circle Address space of size, 2-power-m
is represented. The text reads as follows: Note 1. Space range is 0 to 2 power m
minus 1. 2. The calculation is done modulo 2-power-m.
The legends show a solid black circle represents key equal hash object name, a
solid pink circle represents node equal hash IP address, and a plain circle
represents point-potential key or node. The diagram shows a circle divided into
32 equal segments starts at the top center as 0 and continues in a clockwise
direction. N2, N5, N10, N17, N20, N25, and N29 are represented in a solid pink
circle, while K14 is represented in a solid black circle, and other points on the
circle are represented in a plain circle. At the center, an ID space of size 2 power
5, where m equals 5 is written. N5 and K14 are pointed from a client numbered
5200 with IP address 110-dot-34-dot-56 dot 20. K14 is pointed from the liberty
file of the foresaid IP with label 14 equal hash liberty enclosed in quotation mark
and simple parenthesis. N5 is pointed with a label 5 equal hash aforesaid IP
address enclosed in simple parenthesis. N17 points to an IP address 80-dot-201-
dot-52-dot-40. This has key 14 and a reference 110-dot-34-dot-56-dot-20 coma
5200.
The legends show a solid black circle represents key equal hash object name, a
solid red circle represents node equal hash IP address, and a plain circle
represents point-potential key or node. The diagram shows a circle divided into
32 equal segments starts at the top center as 0 and continues in a clockwise
direction. At the center, the text represents pre as predecessor and finger 1 as
successor. K4, K7, K9, K14, K16, K22, and K26 are represented in black solid
circles, while N5, N10, N12, N20, and N25 are represented in a solid red circle.
The red circles are expanded and show the respective predecessor and the fingers
in it. The expanded N5 shows Pre N 25, and Finger array 1-N10, 2-N10, 3-N10,
4-N20, and 5-N25. The expanded N10 shows Pre N5, and Finger array 1-N12, 2-
N12, 3-N20, 4-N20, and 5-N5. The expanded N12 shows Pre N10, and Finger
array 1-N20, 2-N20, 3-N20, 4-N20, and 5-N5. The expanded N20 shows Pre
N12, and Finger array 1-N25, 2-N25, 3-N25, 4-N5, and 5-N5. The expanded
N25 shows Pre N20, and Finger array 1-N5, 2-N5, 3-N5, 4-N5, and 5-N10.
A text reads as follows: Note: when the loop in the find underscore predecessor
function terminates, the current node knows that it has found the key's
predecessor. The diagram shows N5 where step 1 shows k14 initiates find
underscore successor. Step 2 K 14 leads to find underscore predecessor. Step 3 K
14 leads to find the underscore closest underscore predecessor. Step 4 shows
N10 is checked if it is the closest predecessor and the result shows N10 is not the
predecessor of K14. Again step 5 initiates to find underscore closest underscore
predecessor where step 6 gives the result as N12. Then N12 is checked for the
predecessor of K14, where the result gives N20. Thus N20 is found as the
successor of K 14.
The legends show a solid black circle represents key equal hash object name, a solid red
circle represents node equal hash IP address, and a plain circle represents point-potential
key or node. The diagram shows a circle divided into 32 equal segments starts at the top
center as 0 and continues in a clockwise direction. At the center, the text represents pre as
predecessor and finger 1 as successor. K4, K7, K9, K14, K16, K22, and K26 are
represented in black solid circles, while N5, N10, N12, N17, N20, and N25 are
represented in a solid red circle, where N 17 is the new node, and it is updated where ever
it reflects. The red circles are expanded and show the respective predecessor and the
finger index in it. The expanded N5 shows Pre N 25, and Finger array 1-N10, 2-N10, 3-
N10, 4-N17 updated, and 5-N25. The expanded N10 shows Pre N5, and Finger array 1-
N12, 2-N12, 3-N17updated, 4-N20, and 5-N5. The expanded N12 shows Pre N10, and
Finger array 1-N17 updated, 2-N17 updated, 3-N17 updated, 4-N20, and 5-N5. The
expanded N17 shows Pre N12, and Finger array 1-N20, 2-N20, 3-N25, 4-N25, and 5-N5.
The expanded N20 shows Pre N17 updates, and Finger array 1-N25, 2-N25, 3-N25, 4-N5,
and 5-N5. The expanded N25 shows Pre N20, and Finger array 1-N5, 2-N5, 3-N5, 4-N5,
and 5-N10.
The legends show a solid black circle represents key equal hash object name, a
solid red circle represents node equal hash IP address, and a plain circle
represents point-potential key or node. The diagram shows a circle divided into
32 equal segments starts at the top center as 0 and continues in a clockwise
direction. At the center, the text represents pre as predecessor and finger 1 as
successor. K4, K7, K9, K14, K16, K22, and K26 are represented in black solid
circles, while N5, N10 departed, N12, N17, N20, and N25 are represented in a
solid red circle. The red circles are expanded and show the respective
predecessor and the fingers in it. The expanded N5 shows Pre N25, and Finger
array 1-N12 updated, 2-N12 updated, 3-N12 updated, 4-N17, and 5-N25. The
expanded N12 shows Pre N5 updated, and Finger array 1-N17, 2-N17, 3-N17, 4-
N20, and 5-N5. The expanded N17 shows Pre N12, and Finger array 1-N20, 2-
N20, 3-N25, 4-N25, and 5-N5. The expanded N20 shows Pre N17, and Finger
array 1-N25, 2-N25, 3-N25, 4-N5, and 5-N5. The expanded N25 shows Pre N20,
and Finger array 1-N5, 2-N5, 3-N5, 4-N5, and 5-N12 updated.
The diagram shows an address space ring at the center with m value 8 and b
value 2. The red dots represent N0002, N0101, N0202, N0301, N0302, N0321,
N1000, N1103, N1212, N1220, N1302, N2001, N2013, N2103, N2200, N2203,
N2210, N2213, N2230, N3122, and N3200. black dots represent K0203 stored in
N0202, K1110 stored in N1103, K1213 is stored in N1212 and N 1220, K2008
stored in N2013, K2233 stored in N2230, K3122 lie on N 3122, K3133 and
K322 are stored in N3200. The nodes 0302, 2001, 2200, and 2210 are expanded
and show the corresponding leaf set and 4 by 4 routing table.
The diagram shows the leaf set and routing table of node N2212. Above this,
nodes 2212, 0302, 2001, 2200, and 2210 are represented and arrow point from
node 2212 to 0302, from 0302 to 2001, and so on. Node 0302 is represented as
Row 0, Node 2001 as Row 1, Node 2200 as Row 2, and Node 2210 as Row 3.
The leaf set is pointed from node 2210 as 4 cells namely 2200, 2203, 2213, and
2230. The routing table shows a 4 by 4 matric, with rows and columns numbered
from 0 to 3. The routing table cell and value are as follows: 0,1 is 1302, 0,13 is
3122, 1,2 is 2103, 2,3 is 2230, and 3,3 is 2213.
The first format shows the live nodes and keys represented on a straight line,
while the second format shows the nodes and keys represented on a binary tree.
The live nodes are N0, N1, N3, N5, N6, N8, N11, and N15, while the keys are
K3, K4, K7, K9, and K12. The first format shows the nodes are plotted in
increasing number from the left to the right, where k3 is plotted on N3, K4
plotted before node N5 and key K4 is stored at N5 is represented by an arrow,
similarly, K12 is stored on N15. K7 and K9 are plotted after N6 and N8
respectively and thus keys K7 and K9 are stored in the previous node N6 and N8
respectively. The second format shows a four-level binary tree with an equal
number of nodes on each side. n level 4, 16 nodes are present, where the nodes
N0, N1, N3, N5, N6, N8, N11, and N15 and keys K3, K4, K7, K9, and K12 are
represented from the left to right in increasing order of the position number from
0 to 15, while the does without N and K remain blank.
A diagram shows the routing table for the nodes N0, N1, N3, N5, N6, N8, N11, and N15,
where the foresaid nodes and the keys K3, K4, K7, K9, and K12 are plotted on the line
from the left to the right at an increasing order. The routing table for node 0 shows 0-N8,
1-N5, 2-N3, and 3-N1. The routing table for node 15 shows 0-N6, 1-N11, and 2 and 3 are
empty. The corresponding sub tree diagram is represented for nodes No, N6, and N15. All
the three tree diagram shows 4 level binary tree, where the nodes and key are represented
from the left to the right in increasing order at the respective places and some places are
left empty where no key or node is given. The sub tree for n0 shows the right half, from
node 8 to 15 are grouped under p0, node 4 to 7 are grouped under p1, node 3 and 4 are
grouped under p2, and node 1 as p3. The sub tree for n6 shows the right half, from node 8
to 15 are grouped under p0, node 0 to node 3 are grouped under p1, node 4 to node 5 are
grouped under p2, and node 7 as p3. Similarly, the sub tree for node 15 shows the left half
node 0 to node 7 grouped under p0, node 8 to node 11 grouped under p1, node 12 and 13
grouped under p2, and node 14 as p3.
The legends show a rectangular box with 5 sections representing content file
with 5 chunks, and a laptop representing peer. The diagram shows a server
labeled tracker expands and shows it has 11 peers in it, where a content file with
5 chunks is represented below each peer. The peers have all the 5 chunks shaded
in peer-2 and peer-4, while the other peers have 1 or 2 or 3 chunks shaded.I58 A
text at the bottom reads as follows: Note: Peers 2 and 4 are seeds, while other
peers are leeches.
The structure of the socket shows three layers, the top layer has three units
namely family, type, and protocol, the middle layer has a local socket address,
and the bottom layer has a remote socket address. The structure of the socket
address shows four layers, the top layer has two sections namely length and
family, the second layer has a port number the third layer has an IP address, and
the fourth layer is labeled unused.
The diagram shows two clients are connected to a common server. Both client 1
and client 2 have a socket in it, also the server has a socket in it. Step 1 request is
made from the socket of client 1 to the socket of the server. Step 2 Response is
sent from server socket to the client 1 socket. Similarly, step 3 requests from
client-2 to the server, and step-4 is the response to client-2 from the server
through the socket. The requests and the responses are datagrams.
The client shows a flowchart represents as follows: Start, s equal socket function,
send to function, recvfrom function, block, unblock, handle the response, close
function with parameter s, and stop. The server shows a flowchart represents as
follows: Start, s equal socket function, bind function with first parameter s,
decision loop, recvfrom function with first parameter s, block, unblock, handle
the request and create the response, send to function with first parameter s points
back to the decision loop. In the start stage only the family, type, and protocol
are filled in the socket. At the send to function and unblock step the entire socket
is filled. At the close function, the entire socket is empty. At bind function and
recv from function in server the family, type, protocol, and the local socket
address are filled and the remote socket address is not filled. The send-to
function is where the request is sent from the client as a datagram to the server,
and similarly, the send-to function is where the response is sent to the client as a
datagram from the server.
A diagram shows two clients each with a socket that connects to a common
server. Step 1. From client 1 to server connection establishment is made. Step 2.
From server create-socket. Step 3. A tube represents the connection between the
server socket and the client 1 socket, where data transfer and termination take
place. Similarly, Step 4 From client 2 to server connection establishment is made.
Step 5. From server create socket. Step 6. A tube represents the connection
between the server socket and the client 2 socket, where data transfer and
termination take place. Similarly, more clients make data transfer and
termination through sockets.
The client shows a flowchart represents as follows: Start, s equal socket function,
connect function with parameter s, block, unblock, client data transfer, handle
responsible, close function with parameter s, and stop. The server shows a
flowchart represents as follows: Start, l s equal socket function, bind function
with first parameter l-s, listen-function with first parameter l s, decision loop
condition infinite loop, s equal accept-function with first parameter l s, block,
unblock, server data transfer, handle-request, and create-response, close function
with parameter s points back to the decision loop. The connection establishment
is represented by a dashed arrow between the client at connect-function and the
server at listen-function. The data transfer between the client and server is
represented by a pair of tubes between client data transfer and server-data
transfer. The connection termination is represented by an arrow between the
close function in both the client and server.
Client data transfer shows the flow as follows. An arrow points to send function
with first parameter s then to n equal recv function with first parameter s then
block. Then unblock. And no link between block and unblock. From unblock,
update receive status, a decision loop more bytes to receive. If yes, go to n equal
to recv function, and if no client data transfer. The server data transfer shows the
flow as follows. An arrow point to n equal recv function with first parameter s,
then block. Then unblock. And no link between block and unblock. From
unblock, update receive status, a decision loop more bytes to receive. If yes, go
to n equal to recv function, and if no send function with first parameter s, and
arrow points to client data transfer.
The diagram shows three buffers. The first one represents the original, the
second one represents after one recv call, and the third one represents after two
recv calls. The original buffer shows a long frame with 16 chunks on the left side
and 10 chunks on the right side and three dots in between. The max-Len is equal
to size of-function with parameter buffer. The first chunk points the ptr. The
second one the first 4 chunks are buffer and the length of the buffer is 4, and n
equals 4, and ptr points to the fifth chunk. The third one shows the first 9 chunks
are buffer length is 9 and n value 5, and ptr point to tenth chunk.