4. SYLLABUS
1 Introduction to computer networks and Internet:
• Understanding of network and Internet, The network edge, The
network core, Understanding of Delay, Loss and Throughput in
the packet-switching network, protocols layers and their service
model, History of the computer network
2 Application Layer:
• Principles of computer applications, Web and HTTP, E-mail, DNS,
Socket programming with TCP and UDP
3 Transport Layer:
• Introduction and transport layer services, Multiplexing and
Demultiplexing, Connection less transport (UDP), Principles of
reliable data transfer, Connection oriented transport (TCP),
Congestion control.
5. 4 Network Layer:
• Introduction, Virtual and Datagram networks, study of
router, IP protocol and addressing in the Internet, Routing
algorithms, Broadcast and Multicast routing
5 The Link layer and Local area networks:
• Introduction and link layer services, error-detection and
correction techniques, Multiple access protocols, addressing,
Ethernet, switches.
6. BOOKS
• Reference Books:
1.Computer Networking- A Top-Down approach, 5th edition, Kurose
and Ross, Pearson
2.Computer Networks- A Top-Down approach, Behrouz Forouzan,
McGraw Hill
3.Computer Networks (4th edition), Andrew Tanenbaum, Prentice
Hall
4.Computer Networking and the Internet (5th edition),Fred Halsall,
Addison Wesley
5.Data Communications and Networking (4th edition), Behrouz
Forouzan, McGraw Hill
6.TCP/IP Protocol Suite (3rd edition), Behrouz Forouzan, McGraw
Hill
8. Introduction
• The old model of a single computer serving all of the
organization’s computational needs has been
replaced by one in which a large number of separate
but interconnected computers do the job.
• These systems are called computer networks.
• “A computer network is a set of computers
connected together for the purpose of sharing
resources.”
• The most common resource shared today is
connection to the Internet.
• Other shared resources can include a printer or a file
server.
9. Uses of Compute Networks
• Uses of Networks for Companies:
– Resource Sharing
• It allows all programs, equipments and data available to
anyone on the network irrespective of the physical
location of the resource and the user.
– High Reliability
• It provides high reliability by having alternative sources of
data.
• For e.g. all files could be replicated on more than one
machines, so if one of them is unavailable due to
hardware failure or any other reason, the other copies
can be used.
10. Continue…
– Saving Money
• Organizations can use separate personal computer one
per user instead of using mainframe computer which are
expensive.
• The organizations can use the workgroup model (peer to
peer) in which all the PCs are networked together and
each one can have the access to the other for
communicating or sharing purpose.
– Scalability
• Another goal is scalability. Scalability is the ability to
increase the system performance gradually as the
workload grows, by just adding more processors.
11. Continue…
• Uses of Networks to People:
– Access to Remote Information
(i) Home shopping, paying telephone, electricity bills, e-
banking, on line share market etc.
(ii) Newspaper is On-line and is personalized, digital library
consisting of books, magazines, scientific journals etc.
(iii) World wide web which contains information. about the
arts, business, cooking, government, health, history,
hobbies, recreation, science, sports etc.
12. Continue…
–Person to Person Communication
(i) Electronic-mail (e-mail)
(ii) Real time e-mail i.e. video conferencing allows remote
users to communicate with no delay by seeing and hearing
each other. Video-conferencing is being used for remote
school, getting medical opinion from distant specialists
etc.
(iii) Worldwide newsgroups in which one person posts a
message and all other subscribers to the newsgroup can
read it or give their feedbacks.
–Interactive Entertainment
(i) Multiperson real-time simulation games.
(ii) Video on demand.
(iii)Participation in live TV programmes likes quiz, contest,
discussions etc.
13. Continue…
• We use the concept ofWe use the concept of layerslayers in our daily life.in our daily life.
As an example, let us consider two friends whoAs an example, let us consider two friends who
communicate through postal mail.communicate through postal mail.
• The process of sending a letter to a friendThe process of sending a letter to a friend
would be complex if there were no serviceswould be complex if there were no services
available from the post office.available from the post office.
• Tasks involved in sending a letter shown below:
14.
15. 5-Layer Model(the TCP Model)
• The 5-layer model serves primarily the protocols
known as Transmission Control Protocol (TCP)
and Internet Protocol (IP), or jointly, TCP/IP.
• The User Datagram Protocol (UDP) is also served
by this model.
• The 5-layer model was developed along with
these protocols, antedating the 7-layer model,
and is sometimes called the TCP Model.
16.
17. THE OSI MODELTHE OSI MODEL
• Established in 1947, the International StandardsEstablished in 1947, the International Standards
Organization (Organization (ISOISO) is a multinational body) is a multinational body
dedicated to worldwide agreement ondedicated to worldwide agreement on
international standards.international standards.
• An ISO standard that covers all aspects of networkAn ISO standard that covers all aspects of network
communications is the Open Systemscommunications is the Open Systems
Interconnection (Interconnection (OSIOSI) model.) model.
• It was first introduced in the late 1970s.It was first introduced in the late 1970s.
18. ISO is the organization.
OSI is the model.
Note
28. The Transport Services
• Networked applications are built on top of the
transport service.
• There are two main types of transport services :
– The connectionless or datagram service
– The connection-oriented or byte-stream service
29. Continue…
• The connectionless service allows applications to easily
exchange messages or Service Data Units. On the
Internet.
• This service is provided by the UDP protocol.
• The connectionless transport service on the Internet is
unreliable, but is able to detect transmission errors.
30. Continue…
• Each of these applications must be able to exchange SDUs with
remote applications.
• To enable these exchanges of SDUs, each networked application
running on a host is identified by the following information :
– the host on which the application is running
– the port number on which the application listens for SDUs
• On the Internet, the port number is an integer and the host is
identified by its network address.
• In the network layer there are two types of Internet Addresses:
– IP version 4 addresses that are 32 bits wide
– IP version 6 addresses that are 128 bits wide
31. Continue…
• IPv4 addresses are usually represented by using a dotted
decimal representation where each decimal number
corresponds to one byte of the address, e.g. 203.0.113.56.
• IPv6 addresses are usually represented as a set of
hexadecimal numbers separated by semicolons, e.g.
2001:db8:3080:2:217:f2ff:fed6:65c0.
• Today, most Internet hosts have one IPv4 address.
• In the future, we can expect that more and more hosts will
have IPv6 addresses and that some of them will not have an
IPv4 address anymore.
• A host that only has an IPv4 address cannot communicate
with a host having only an IPv6 address.
32. Continue…
• The second transport service is the connection-oriented
service.
• On the Internet, this service is often called the byte-
stream service as it creates a reliable byte stream
between the two applications that are linked by a
transport connection.
38. WEB
• The web, as the World Wide Web is popularly known, is
an architectural framework for accessing linked content
spread out over millions of machines all over the
internet.
• The user’s point of view, the Web consists of a vast,
worldwide collection of content in the form of Web
pages, often just called pages for short.
• The idea of having one page point to another, now
called hypertext, was invented by a M.I.T professor of
electrical engineering in 1945.
39. • HTTP:
• These messages include requests from client to server and
responses from server to client which will have the following
format:
– HTTP-message = <Request> | <Response> ; HTTP/1.1
messages
• HTTP requests and HTTP responses use a generic message
format of RFC 822 for transferring the required data. This
generic message format consists of the following four items.
– A Start-line
– Zero or more header fields followed by CRLF
– An empty line (i.e., a line with nothing preceding the CRLF)
indicating the end of the header fields
– Optionally a message-body
40. • Carriage Return, Line Feed:
• CR LF means "Carriage Return, Line Feed" –
it's a DOS hangover from the olden days from
when some devices required a Carriage
Return, and some devices required a Line
Feed to get a new line, so Microsoft decided
to just make a new-line have both characters,
so that they would output correctly on all
devices.
41. • Message Start-Line: Syntax
– start-line = Request-Line | Status-Line
• For now, let's see the examples of start line in case of
request and response:
– GET /hello.htm HTTP/1.1 (This is Request-Line sent by the
client)
– HTTP/1.1 200 OK (This is Status-Line sent by the server)
42. • Header Fields:
• There are four types of HTTP message headers:
– General-header: These header fields have general
applicability for both request and response
messages.
– Request-header: These header fields have
applicability only for request messages.
– Response-header: These header fields have
applicability only for response messages.
– Entity-header: These header fields define meta
information about the entity-body or, if no body is
present, about the resource identified by the
request.
44. • Message Body:
• The message body part is optional for an HTTP
message but if it is available, then it is used to carry
the entity-body associated with the request or
response.
• Example:
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
45. HTTP request message
• An HTTP client sends an HTTP request to a server in the
form of a request message which includes following
format:
– A Request-line
– Zero or more header (General|Request|Entity)
fields followed by CRLF
– An empty line (i.e., a line with nothing preceding the
CRLF) indicating the end of the header fields
– Optionally a message-body
46. • Request-Line:
• The Request-Line begins with a method token,
followed by the Request-URI and the protocol
version, and ending with CRLF.
• The elements are separated by space SP
characters.
– Request-Line = Method SP Request-URI SP HTTP-
Version CRLF
47. • Request Method:
• The request method indicates the method to
be performed on the resource identified by the
given Request-URI.
• The method is case-sensitive and should always
be mentioned in uppercase.
• The following table lists all the supported
methods in HTTP/1.1.
48. S.N. Method and Description
1 GET : The GET method is used to retrieve information from the given server
using a given URI. Requests using GET should only retrieve data and should have
no other effect on the data.
2 HEAD : Same as GET, but it transfers the status line and the header section only.
3 POST : A POST request is used to send data to the server, for example, customer
information, file upload, etc. using HTML forms.
4 PUT : Replaces all the current representations of the target resource with the
uploaded content.
5 DELETE : Removes all the current representations of the target resource given by
URI.
6 CONNECT : Establishes a tunnel to the server identified by a given URI.
7 OPTIONS : Describe the communication options for the target resource.
8 TRACE : Performs a message loop back test along with the path to the target
resource.
49. • Request-URI:
• The Request-URI is a Uniform Resource
Identifier and identifies the resource upon
which to apply the request.
• Following are the most commonly used forms
to specify an URI:
– Request-URI = "*" | absoluteURI | abs_path |
authority
50. S.N Method and Description
1 The asterisk * is used when an HTTP request does not apply to a particular
resource, but to the server itself, and is only allowed when the method used does
not necessarily apply to a resource. For example: OPTIONS * HTTP/1.1
2 The absoluteURI is used when an HTTP request is being made to a proxy. The
proxy is requested to forward the request or service from a valid cache, and return
the response. For example: GET http://www.w3.org/pub/WWW/TheProject.html
HTTP/1.1
3 The most common form of Request-URI is that used to identify a resource on an
origin server or gateway. For example, a client wishing to retrieve a resource
directly from the origin server would create a TCP connection to port 80 of the
host "www.w3.org" and send the following lines: GET
/pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org
Note that the absolute path cannot be empty; if none is present in the original URI,
it MUST be given as "/" (the server root).
51. • Request Header Fields:
• The request-header fields allow the client to pass
additional information about the request, and about
the client itself, to the server.
• These fields act as request modifiers.
• Here is a list of some important Request-header fields
that can be used based on the requirement:
53. Examples of Request Message
• Now let's put it all together to form an HTTP request to
fetch hello.htm page from the web server running on
tutorialspoint.com
GET /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
• Here we are not sending any request data to the server because
we are fetching a plain HTML page from the server.
• Connection is a general-header, and the rest of the headers are
request headers.
54. • The following example shows how to send form data to the server
using request message body:
POST /cgi-bin/process.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
licenseID=string&content=string&/paramsXML=string
• Here the given URL /cgi-bin/process.cgi will be used to process the passed
data and accordingly, a response will be returned.
• Here content-type tells the server that the passed data is a simple web
form data and length will be the actual length of the data put in the
message body.
55. • The following example shows how you can pass plain XML to your
web server:
POST /cgi-bin/process.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
• <?xml version="1.0" encoding="utf-8"?>
• <string xmlns="http://clearforest.com/">string</string>
61. HTTP response message
• After receiving and interpreting a request
message, a server responds with an HTTP
response message:
– A Status-line
– Zero or more header (General|Response|Entity)
fields followed by CRLF
– An empty line (i.e., a line with nothing preceding
the CRLF) indicating the end of the header fields
– Optionally a message-body
62. • Message Status-Line:
• A Status-Line consists of the protocol version
followed by a numeric status code and its
associated textual phrase.
• The elements are separated by space SP
characters.
– Status-Line = HTTP-Version SP Status-Code SP
Reason-Phrase CRLF
63. • HTTP Version:
• A server supporting HTTP version 1.1 will return
the following version information:
– HTTP-Version = HTTP/1.1
• Status Code:
• The Status-Code element is a 3-digit integer
where first digit of the Status-Code defines the
class of response and the last two digits do not
have any categorization role.
• There are 5 values for the first digit:
64. S.N. Code and Description
1 1xx: Informational
It means the request was received and the process is continuing.
2 2xx: Success
It means the action was successfully received, understood, and
accepted.
3 3xx: Redirection
It means further action must be taken in order to complete the
request.
4 4xx: Client Error
It means the request contains incorrect syntax or cannot be
fulfilled.
5 5xx: Server Error
It means the server failed to fulfill an apparently valid request.
65. • Response Header Fields:
• The response-header fields allow the server to pass
additional information about the response which cannot be
placed in the Status- Line.
• These header fields give information about the server and
about further access to the resource identified by the
Request-URI.
– Accept-Ranges
– Age
– ETag
– Location
– Proxy-Authenticate
– Retry-After
– Server
– Vary
– WWW-Authenticate
66. Examples of Response Message
• Now let's put it all together to form an HTTP
response for a request to fetch the hello.htm page
from the web server running on tutorialspoint.com
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
Content-Length: 88
Content-Type: text/html
Connection: Closed
Output:
<html>
<body>
<h1>Hello , World!</h1>
</body>
</html>
Output:
<html>
<body>
<h1>Hello , World!</h1>
</body>
</html>
67. • The following example shows an HTTP response
message displaying error condition when the web
server could not find the requested page:
HTTP/1.1 404 Not Found
Date: Sun, 18 Oct 2012 10:36:20 GMT
Server: Apache/2.2.14 (Win32)
Content-Length: 230
Connection: Closed
Content-Type: text/html; charset=iso-8859-1
68. Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL /t.html was not found on this
server.</p>
</body>
</html>
Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL /t.html was not found on this
server.</p>
</body>
</html>
69. • Following is an example of HTTP response
message showing error condition when the web
server encountered a wrong HTTP version in the
given HTTP request:
HTTP/1.1 400 Bad Request
Date: Sun, 18 Oct 2012 10:36:20 GMT
Server: Apache/2.2.14 (Win32)
Content-Length: 230
Content-Type: text/html; charset=iso-8859-1
Connection: Closed
70. Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not
understand.</p>
<p>The request line contained invalid characters following
the protocol string.</p>
</body>
</html>
Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not
understand.</p>
<p>The request line contained invalid characters following
the protocol string.</p>
</body>
</html>
73. Cookies
• Cookies are small files which are stored on a
user's computer.
• They are designed to hold a modest amount of
data specific to a particular client and website,
and can be accessed either by the web server or
the client computer.
74. • An HTTP cookie (also called web cookie, Internet
cookie, browser cookie or simply cookie), is a
small piece of data sent from a website and
stored in the user's web browser while the user is
browsing it.
• Every time the user loads the website, the
browser sends the cookie back to the server to
notify the user's previous activity.
• Cookies can also store passwords and form
content a user has previously entered, such as a
75. • Why are Cookies Used?
• Cookies are a convenient way to carry
information from one session on a website to
another, or between sessions on related
websites, without having to burden a server
machine with massive amounts of data storage.
• Storing the data on the server without using
cookies would also be problematic because it
would be difficult to retrieve a particular user's
information without requiring a login on each
visit to the website.
76. • How Long Does a Cookie Last?
• The time of expiry of a cookie can be set when the
cookie is created. By default the cookie is destroyed
when the current browser window is closed.
• Who Can Access Cookies?
• When a cookie is created it is possible to control its
visibility by setting its 'root domain'. It will then be
accessible to any URL belonging to that root.
• For example the root could be set to
"whatarecookies.com" and the cookie would then be
available to sites in "www.whatarecookies.com" or
"xyz.whatarecookies.com" or "whatarecookies.com".
84. Electronic Mail
• E-mail (electronic mail) is the exchange of computer-
stored messages by telecommunication. (Some
publications spell it email; we prefer the currently
more established spelling of e-mail.)
• E-mail messages are usually encoded in ASCII text.
88. TCP/IP Protocol Suite 88
When the sender and the receiver of an
email are on different systems, we need
two UAs and a pair of MTAs (client and
server).
Note:Note:
90. TCP/IP Protocol Suite 90
When the sender is connected to the
mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs
(client and server).
Note:Note:
93. TCP/IP Protocol Suite 93
When both sender and receiver are
connected to the mail server via a LAN
or a WAN, we need two UAs, two pairs
of MTAs (client and server), and a pair
of MAAs (client and server). This is the
most common situation today.
Note:Note:
94. Botnets: bot + network-WINTER 2015
• A botnet is a group of computers connected in a
coordinated fashion for malicious purposes.
• Each computer in a botnet is called a bot.
• These bots form a network of compromised
computers, which is controlled by a third party
and used to transmit malware or spam, or to
launch attacks.
• A network of private computers infected with
malicious software and controlled as a group
without the owners' knowledge, e.g. to send
spam.
97. USER AGENT
The user agent (UA) provides service to the user to make theThe user agent (UA) provides service to the user to make the
process of sending and receiving a message easier.process of sending and receiving a message easier.
Services Provided by a User AgentServices Provided by a User Agent
User Agent TypesUser Agent Types
Sending MailSending Mail
Receiving MailReceiving Mail
AddressesAddresses
Mailing ListMailing List
MIMEMIME
106. Message Formats
Header Description
To: E-mail address(es) of the primary recipient(s).
CC: E-mail address(es) of the secondary recipient(s).
BCC: E-mail address(es) which should receive blind carbon copies. This line is
deleted from all the copies sent to the primary and secondary recipients.
From: The mailbox from which the message is sent.
Sender: E-mail address of the sender.
Received: Line added by each MTA during the e-mail transfer.
Return-
Path:
This field is added by the final MTA and is intended to inform you how to get
back to the sender. In theory, this information can be gathered from all
the Received headers (except for the name of the sender’s mailbox).
Typically it just contains the sender’s address.
107. Multipurpose Internet Mail
Extensions(MIME)
• MIME (Multi-Purpose Internet Mail
Extensions) is an extension of the original
Internet e-mail protocol that lets people use
the protocol to exchange different kinds of
data files on the Internet: audio, video,
images, application programs, and other
kinds, as well as the ASCII text handled in the
original protocol, the Simple Mail Transport
Protocol (SMTP)
108. Multipurpose Internet Mail
Extensions(MIME)
• In the early days, e-mail consisted exclusively of text messages
written in English and expressed in ASCII.
• For this environment, RFC 822 was sufficient; it defined the
headers but left the content entirely up to the users.
• Nowadays, on the Internet, this approach is no longer adequate.
The problems include sending and receiving:
– Messages written in languages containing accents and other
special characters (e.g. French, Spanish and German).
– Messages written in languages based on non-Latin alphabets
(e.g. Hebrew, Russian, Japanese).
– Messages containing audio, images or other non-ASCII
information.
109. Header Description
MIME-Version Indicates the MIME version being used.
Content-Description Human-readable string which describes the
content of the message.
Content-ID Unique identifier
Content-Transfer-
Encoding
Indicates how the e-mail body is wrapped for
transmission.
Content-Type Type and format of the content. It specifies the
nature of the message body. Content types are
defined per RFC 2045, RFC 2854, RFC 3003 and
RFC 3023 (This list is subject to changes) Each
content type has one or more subtypes. The
type and subtype are separated by a slash,
e.g. Content-Type: video/mpeg
110.
111. • Separator line gives information about specific
encoding
• MIME is extensible - sender and receiver agree on
encoding scheme
• MIME is compatible with existing mail systems
• Everything encoded as ASCII
• Headers and separators ignored by non-MIME
mail systems
• MIME encapsulates binary data in ASCII mail
envelope
115. EMAIL PROTOCOLS
• There are three E-mail protocols:
–SMTP (Simple Mail Transfer Protocol)
–POP3 (Post Office Protocol)
–IMAP (Internet Mail Access Protocol)
116. MESSAGE TRANSFER AGENT: SMTP[RFC 2821]
• Simple Mail Transfer Protocol (SMTP) is the standard
application protocol for application protocol delivery of
mail from source to destination
• Provides reliable delivery of messages
• Uses TCP well-known port 25 for message exchange
between client and server.
• Command/Response interaction:
– commands: ASCII text
– response: status code and phrase
• Other functions: E-mail address lookup & address
verification
• Messages must be in 7-bit ASCII
117. • General characteristics:
• Three phases of transfer: handshaking, mail
transfer, closure
• Attempts to provide reliable service
• No guarantee to recover lost messages
• No end to end acknowledgement to originator
• Error indication delivery not guaranteed
• Generally considered reliable!
128. TCP/IP Protocol Suite 128
ExamplE 1
$ telnet mail.adelphia.net 25
Trying 68.168.78.100...
Connected to mail.adelphia.net (68.168.78.100).
Let us see how we can directly use SMTP to send an email and simulate the
commands and responses we described in this section. We use TELNET to log
into port 25 (the well-known port for SMTP). We then use the commands
directly to send an email. In this example, forouzanb@adelphia.net is sending
an email to himself. The first few lines show TELNET trying to connect to the
adelphia mail server.
After connection, we can type the SMTP commands and then receive the
responses as shown below. We have shown the commands in black and the
responses in color. Note that we have added for clarification some comment
lines, designated by the “=” sign. These lines are not part of the email
procedure.
129. TCP/IP Protocol Suite 129
ExamplE 1 (ContinuEd)
================== Connection Establishment
================
220 mta13.adelphia.net SMTP server ready Fri, 6 Aug 2004 . . .
HELO mail.adelphia.net
250 mta13.adelphia.net
===================== Envelope ===================
MAIL FROM: forouzanb@adelphia.net
250 Sender <forouzanb@adelphia.net> Ok
RCPT TO: forouzanb@adelphia.net
250 Recipient <forouzanb@adelphia.net> Ok
=================== Header and Body
==================
DATA
354 Ok Send data ending with <CRLF>.<CRLF>
From: Forouzan
TO: Forouzan
This is a test message
to show SMTP in action.
.
130. ExamplE 1 (ContinuEd)
============= Connection Termination===============
250 Message received: adelphia.net@mail.adelphia.net
QUIT
221 mta13.adelphia.net SMTP server closing connection
Connection closed by foreign host.
131. MESSAGE ACCESS AGENT:POP AND IMAP
• The third stage of mail delivery uses a message access agent;The third stage of mail delivery uses a message access agent;
the client must pull messages from the server.the client must pull messages from the server.
• Currently two message access protocols are available: PostCurrently two message access protocols are available: Post
Office Protocol, (POP3) and Internet Mail Access Protocol,Office Protocol, (POP3) and Internet Mail Access Protocol,
version 4.version 4.
• POP3POP3
– The POP (Post Office Protocol 3) protocol provides a simple,The POP (Post Office Protocol 3) protocol provides a simple,
standardized way for users to access mailboxes andstandardized way for users to access mailboxes and
download messages to their computers.download messages to their computers.
• IMAP4IMAP4
– IMAP (Internet Message Access Protocol) – Is a standardIMAP (Internet Message Access Protocol) – Is a standard
protocol for accessing e-mail from your local server.protocol for accessing e-mail from your local server.
– IMAP (the latest version is IMAP Version 4)IMAP (the latest version is IMAP Version 4)
135. • Suppose you use hMailServer as your email
server to send an email to bill@microsoft.com.
– You click Send in your email client, say, Outlook
Express.
– Outlook Express delivers the email to hMailServer
using the SMTP protocol.
– hMailServer delivers the email to Microsoft's mail
server, mail.microsoft.com, using SMTP.
– Bill's Mozilla Mail client downloads the email from
mail.microsoft.com to his laptop using the POP3
protocol (or IMAP).
EXAMPLE:
136.
137. DNS(Domain Name System)
• Domain Name System (or Service or Server), an
Internet service that translates domain names
into IP addresses.
• Because domain names are alphabetic, they're
easier to remember.
• For example, what is the internet address of
en.wikipedia.org?
– The Domain Name System can be used to tell you it is
66.230.200.100
138. 1. What is the IP
address of
udel.edu ?
1. What is the
host name of
128.175.13.74
It is 128.175.13.92
Itis strauss.udel.edu
Introduction
139. DNS
ComponentsThere are 3 components:
• Name Space:
Specifications for a structured name space and data
associated with the names.
• Resolvers:
Client programs that extract information from Name
Servers.
• Name Servers:
Server programs which hold information about the structure
and the names.
145. Resolver
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Authoritative Data:
Name Server (cont’d)
147. Cached Data :
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Resolver
Name Server (cont’d)
150. How DNS Works?
• Domain names
– Arranged in a tree
• Cut into zones
– Each served by a name server
•The domain name space consists of a tree of domain
names.
Each node or leaf in the tree has one or more resource
records, which hold information associated with the
domain name.
The tree sub-divides into zones.
A zone consists of a collection of connected nodes
authoritatively served by an authoritative DNS
nameserver.
Note that a single nameserver can host several zones
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162. Socket (Berkley Sockets)
• Universally known as Sockets.
• A socket is the mechanism that most popular
operating systems provide to give programs
access to the network.
• It allows messages to be sent and received
between applications (unrelated processes) on
different networked machines.
• The sockets mechanism has been created to be
independent of any specific type of network.
164. • Uniquely identified by
–an internet address
–an end-to-end protocol (e.g. TCP or UDP)
–a port number
• Two types of (TCP/IP) sockets
–Stream sockets (e.g. uses TCP)
• provide reliable byte-stream service
–Datagram sockets (e.g. uses UDP)
• provide best-effort datagram service
• messages up to 65.500 bytes
Sockets
170. Programming with TCP/IP sockets
• There are a few steps involved in using sockets:
– Create the socket
– Identify the socket
– On the server, wait for an incoming connection
– On the client, connect to the server's socket
– Send and receive messages
– Close the socket
171. Programming with UDP sockets
• UDP is a connection-less, unreliable, datagram
protocol (TCP is instead connection-oriented,
reliable and stream based).
• Some popular applications built around UDP
are DNS, NFS, SNMP and for example, some
Skype services and streaming media.
172. • The steps of establishing a UDP socket communication
on the client side are as follows:
– Create a socket using the socket() function;
– Send and receive data by means of
the recvfrom() and sendto() functions.
• The steps of establishing a UDP socket communication
on the server side are as follows:
– Create a socket with the socket() function;
– Bind the socket to an address using the bind() function;
– Send and receive data by means of recvfrom() and sendto().