HyperText Transfer Protocol (HTTP)
HTTP (Hypertext Transfer Protocol) is perhaps the most popular application
protocol used in the Internet (or The WEB).
- HTTP is an asymmetric request-response client-server protocol as illustrated. An HTTP client sends a request message to an HTTP server. The server, in turn, returns a response message. In other words, HTTP is a pull protocol, the client pulls information from the server (instead of server pushes information down to the client).
- HTTP is a stateless protocol. In other words, the current request does not know what has been done in the previous requests.
- HTTP permits negotiating of data type and representation, so as to allow systems to be built independently of the data being transferred.
- Quoting from the RFC2616: "The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems, through extension of its request methods, error codes and headers."
Transmission Control Protocol (TCP)
TCP is connection-oriented in the sense that prior to transmission end
points need to establish a connection first. TCP protocol data units are called
segments. The sending and receiving TCP entities exchange data in the form of
segments, which consist of a fixed 20-byte header followed by a variable size
data field.
TCP is responsible for breaking down a stream of bytes into segments and reconnecting them at the other end, retransmitting whatever might be lost and also organizing the segments in the correct order
TCP is responsible for breaking down a stream of bytes into segments and reconnecting them at the other end, retransmitting whatever might be lost and also organizing the segments in the correct order
- Source Port and Destination Port fields together identify the two local end points of the particular connection. A port plus its hosts’ IP address forms a unique end point. Ports are used to communicate with the upper layer and distinguish different application sessions on the host.
- The Sequence Number and Acknowledgment Number fields specify bytes in the byte stream. The sequence number is used for segment differentiation and is useful for reordering or retransmitting lost segments. The Acknowledgment number is set to the next segment expected.
- Data offset or TCP header length indicates how many 4-byte words are contained in the TCP header.
- The Window field indicates how many bytes can be transmitted before an acknowledgment is received.
- The Checksum field is used to provide extra reliability and security to the TCP segment.
- The actual user data are included after the end of the header.
User Datagram Protocol (UDP)
UDP protocol consists of fewer fields compared to TCP. The reason for that
is because certain data types do not require reliable delivery and extra
overhead. Real-time traffic for example, needs to be transported in an
efficient way without error correction and retransmission mechanisms.
UDP is considered to be a connectionless protocol. It leaves reliability to be handled by the application layer.
UDP is considered to be a connectionless protocol. It leaves reliability to be handled by the application layer.
TCP (Transmission Control Protocol) is a transport-layer
protocol, responsible for establish a connection between two machines. TCP
consists of 2 protocols: TCP and UDP (User Datagram Package). TCP is reliable,
each packet has a sequence number, and an acknowledgement is expected. A
packet will be re-transmitted if it is not received by the receiver.
Packet delivery is guaranteed in TCP. UDP does not guarantee packet
delivery, and is therefore not reliable. However, UDP has less network
overhead and can be used for applications such as video and audio streaming,
where reliability is not critical.
IP
IP (Internet Protocol) is a network-layer protocol, deals
with network addressing and routing. In an IP network, each machine is assigned
an unique IP address (e.g., 165.1.2.3), and the IP software is responsible for
routing a message from the source IP to the destination IP. In IPv4 (IP version
4), the IP address consists of 4 bytes, each ranges from 0 to 255, separated by
dots, which is called a quad-dotted form. This numbering scheme
supports up to 4G addresses on the network. The latest IPv6 (IP version
6) supports more addresses. Since memorizing number is difficult for most
of the people, an english-like domain name, such as
www.test101.com
is used instead.
The DNS (Domain Name Service) translates the domain name into the IP address
(via distributed lookup tables). A special IP address 127.0.0.1 always refers
to your own machine. It's domian name is "localhost
" and can be used for local
loopback testing.
ARP stands for Address Resolution Protocol and RARP stands
for Reverse Address Resolution Protocol. ARP convert IP address to physical
address(i.e. ethernet address). RARP convert physical address to the IP address
IMAP versus POP3 comparison chart
|
||
IMAP
|
POP3
|
|
Introduction
(from Wikipedia)
|
Internet message access protocol (IMAP) is one of the two
most prevalent Internet standard protocols for e-mail retrieval, the other being
the Post Office Protocol (POP).
|
In computing, the Post Office Protocol (POP) is an
application-layer Internet standard protocol used by local e-mail clients to
retrieve e-mail from a remote server over a TCP/IP connection.
|
Speed
|
Slow
|
Fast
|
Storage of
content
|
Always on server
|
Downloaded onto local device, unless ‘keep a copy on the
server’ selected.
|
Mail Syncing
|
Yes
|
No
|
Direction
|
Bi-directional - Whatever changes you make on server or
device, the other side shows the changes too.
|
One-direction - Changes made on device have no effect on
server content.
|
Offline Use (no
internet connection)
|
Mails downloaded can be read or deleted when offline.
Changes made on the device are synced with the server when device goes
online.
|
Mails can be read offline once downloaded; device only
needs to go online to download email.
|
Port used by
server
|
Port 143
|
Port 110
|
Consolidation of
multiple accounts
|
No
|
Yes
|
Keep messages on
the server
|
Required
|
Possible
|
Current version
|
IMAP4rev1
|
POP3
|
Year of Creation
|
Imap 2 was first specified in 1990 (RFC 1176)
|
First specified in paper 1988 (RFC 1081)
|
Previous
versions
|
IMAP, IMAP2, IMAP3 (never accepted), IMAP2bis (renamed
IMAP4)
|
POP (POP1), POP2, POP3, POP4 (proposed)
|
The File Transfer Protocol (FTP)
is used to transfer files between two computers over a
network and Internet.Transferring files from a client computer to a server
computer is called "uploading" and transferring from a server
to a client is "downloading".
Active and Passive Connection Mode
The FTP server may support Active or Passive connections,
or both. In an Active FTP connection, the client opens a port and listens
and the server actively connects to it. In a Passive FTP connection, the
server opens a port and listens (passively) and the client connects to
it. You must grant Auto FTP Manager access to the Internet and to choose
the right type of FTP Connection Mode.
Most FTP client programs select passive connection mode by default because server administrators prefer it as a safety measure. Firewalls generally block connections that are "initiated" from the outside. Using passive mode, the FTP client (like Auto FTP Manager) is "reaching out" to the server to make the connection. The firewall will allow these outgoing connections, meaning that no special adjustments to firewall settings are required
Most FTP client programs select passive connection mode by default because server administrators prefer it as a safety measure. Firewalls generally block connections that are "initiated" from the outside. Using passive mode, the FTP client (like Auto FTP Manager) is "reaching out" to the server to make the connection. The firewall will allow these outgoing connections, meaning that no special adjustments to firewall settings are required
stateless protocol vs statefull protocol
In stateless protocol there is no record of the
state is saved at server end.Client send request to the server and server
response back according to current state. A stateless server does not keeps
state between connections.So,When you send a request to a stateless server, it
does not create any objects that track information regarding your requests.
ex.UDP , HTTP etc.
On the other hand in statefull protocol there is tight dependency between
client and server . If client send a request to the server then it expects some
kind of response, if it does not get any responce then resend request.A
stateful server keeps state of connections. ex.FTP , Talnet.
Even you can force to make stateless behave like stateful if need by keep data using session , cookies.
Even you can force to make stateless behave like stateful if need by keep data using session , cookies.
connectionless and connection oriented communication
connection less
|
connection oriented
|
|
connection between source (sender) and destination
|
no need
|
must established before data transfer
|
reliable
|
less
|
more
|
HANDSHAKING process
|
Not use
|
use
|
bandwidth
|
less
|
high
|
guaranteed delivery
|
no
|
yes
|
example
|
TCP,HTTP,SMTP,FTP,TELNET
|
* In conection-oriented system a HANDSHAKING process is used i.e the process tsarts from the sender computer by
sending a request to start the transfer that is to be acknowledged by the destination device before the data can be send.
while in CONNECTIONLESS system no handshaking process is used. if one computer wants to send data,it just
sends the data packet to the end system.
No comments:
Post a Comment
Please write your view and suggestion....