Vous êtes sur la page 1sur 5

NETWORKS

Network: A computer network is a group of computer systems and other computing


hardware devices that are linked together through communication channels to facilitate
communication and resource-sharing among a wide range of users. Networks are commonly
categorized based on their characteristics.

Network protocols: defines rules and conventions for communication between network devices.
Network protocols include mechanisms for devices to identify and make connections with each other,
as well as formatting rules that specify how data is packaged into messages sent and received. Some
protocols also support message acknowledgement and data compression designed for reliable and/or
high-performance network communication. Hundreds of different computer network protocols have
been developed each designed for specific purposes and environments.

Transport layer: The transport layer is the fourth layer of the OSI reference model. It provides
transparent transfer of data between end systems using the services of the network layer .The
end-user cannot control what is in the network. So the end-user establishes another layer, only
at end hosts, to provide a transport service that is more reliable than the underlying network
service.

Transport layer protocols: the most important and common protocols of transport layers are:

• User Datagram Protocol (UDP)

• Transmission Control Protocol (TCP).

Transmission Control Protocol (TCP) is a connection oriented – once a connection is


established, data can be sent bidirectional. TCP (Transmission Control Protocol) is the most
commonly used protocol on the Internet. The reason for this is because TCP offers error
correction. When the TCP protocol is used there is a "guaranteed delivery." This is due largely in
part to a method called "flow control." Flow control determines when data needs to be re-sent,
and stops the flow of data until previous packets are successfully transferred. This works
because if a packet of data is sent, a collision may occur. When this happens, the client re-
requests the packet from the server until the whole packet is complete and is identical to its
original.

User Datagram Protocol (UDP) is a connectionless Internet protocol. Multiple


messages are sent as packets in chunks using UDP. UDP (User Datagram Protocol) is anther
commonly used protocol on the Internet. However, UDP is never used to send important data
such as webpage’s, database information, etc; UDP is commonly used for streaming audio and
video. Streaming media such as Windows Media audio files (.WMA) , Real Player (.RM), and
others use UDP because it offers speed! The reason UDP is faster than TCP is because there is
no form of flow control or error correction. The data sent over the Internet is affected by
collisions, and errors will be present. Remember that UDP is only concerned with speed. This is
the main reason why streaming media is not high quality.

Difference between UDP and TCP:

TCP :

Acronym for: Transmission Control Protocol.

Connection: TCP is a connection-oriented protocol.

Function: As a message makes its way across the internet from one computer to another. This is
connection based

Usage: TCP is suited for applications that require high reliability, and transmission time is
relatively less critical.

Examples: Telephone communication, HTTP, HTTPs, FTP, SMTP, Telnet.

Ordering of data packets: TCP rearranges data packets in the order specified.

Speed of transfer: The speed for TCP is slower than UDP.

Reliability: There is absolute guarantee that the data transferred remains intact and arrives in the
same order in which it was sent.

Streaming of data: Data is read as a byte stream, no distinguishing indications are


transmitted to signal message (segment) boundaries.

Weight: TCP is heavy-weight. TCP requires three packets to set up a socket connection,
before any user data can be sent. TCP handles reliability and congestion control.

Data Flow Control: TCP does Flow Control. TCP requires three packets to set up a socket
connection, before any user data can be sent. TCP handles reliability and congestion control.

Error Checking: TCP does error checking.

Acknowledgement: Acknowledgement segments.

UDP:
Acronym for: User Datagram Protocol or Universal Datagram Protocol.

Connection: UDP is a connectionless protocol.


Function: UDP is also a protocol used in message transport or transfer. This is not
connection based which means that one program can send a load of packets to another and
that would be the end of the relationship.

Usage: UDP is suitable for applications that need fast, efficient transmission, such as
games. UDP's stateless nature is also useful for servers that answer small queries from huge
numbers of clients.

Examples: video conferencing , Postcard communication, Media Streaming,


,RADIO, DNS, DHCP, TFTP, SNMP, RIP, VOIP.

Ordering of data packets:UDP has no inherent order as all packets are independent of
each other. If ordering is required, it has to be managed by the application layer.

Speed of transfer: UDP is faster because there is no error-checking for packets.

Reliability: There is no guarantee that the messages or packets sent would reach at all.

Streaming of data: Packets are sent individually and are checked for integrity only if they
arrive. Packets have definite boundaries which are honored upon receipt, meaning a read
operation at the receiver socket will yield an entire message as it was originally sent.

Weight: UDP is lightweight. There is no ordering of messages, no tracking connections, etc.


It is a small transport layer designed on top of IP.

Data Flow Control: UDP does not have an option for flow control.

Error Checking: UDP does error checking, but no recovery options.

Acknowledgement: No Acknowledgment.

Different Applications of TCP and UDP:

Web browsing, email and file transfer are common applications that make use of TCP. TCP
is used to control segment size, rate of data exchange, flow control and network
congestion. TCP is preferred where error correction facilities are required at network
interface level. UDP is largely used by time sensitive applications as well as by servers that
answer small queries from huge number of clients. UDP is compatible with packet
broadcast - sending to all on a network and multicasting – sending to all subscribers. UDP is
commonly used in Domain Name System, Voice over IP, Trivial File Transfer Protocol and
online games.
TCP vs. UDP for game servers:
For massively multiplayer online (MMO) games, developers often have to make an
architectural choice between using UDP or TCP persistent connections. The advantages
of TCP are persistent connections, reliability, and being able to use packets of arbitrary
sizes. The biggest problem with TCP in this scenario is its congestion control algorithm,
which treats packet loss as a sign of bandwidth limitations and automatically throttles
the sending of packets. On 3G or Wi-Fi networks, this can cause a significant latency.

How Does One Decide Between TCP And UDP?

A lot of people ask this question and think in these terms, but here’s a
different point of view. TCP and UDP are not at the same level of
abstraction and they’re not really competitors.

Let’s start in a different place. Generally speaking, the Internet’s job is to


get IP packets (formally, Internet Protocol datagram) from one computer
to another. IP provides what we call a “best-effort datagram service” to a
computer.
By “ best-effort datagram service,” we mean there’s no guarantee that any
particular datagram will get to the destination computer at all. And there’s
no guarantee that a pair of datagrams won’t be flipped and delivered out-
of-order. And there’s no guarantee that a bit won’t be flipped inside the
datagram (although this is rare).

The most popular way to do that is to use TCP, the Transmission Control
Protocol. TCP runs on top of “best-effort datagram service” and turns that
into a “bidirectional reliable ordered byte stream” between applications.
An application provides TCP with a sequence of bytes, and TCP guarantees
that it will deliver them to the remote computer accurately and in order, if
they get there at all. TCP provides this not “ to a computer” but “between
applications” — meaning TCP has another level of addressing that keeps
track of which application the stream belongs to (i.e. a port number).

Lots of applications use TCP because this is the abstraction they


want. Because TCP is so popular, the operating system generally provides
some flavor of TCP by default as an OS service for all applications. Any
application can open a stream socket, and boom, they can push bytes into
the socket and they’ll be delivered by TCP over those best-effort IP
datagrams to the application on the other side. Different OS’s provide
different flavors of TCP with different performance characteristics (e.g.
Linux defaults to TCP Cubic, some Windows to TCP Compound) as this
default. But some applications don’t want to use the default TCP. These
applications may want finer control over the performance characteristics
or the reliability of their communications. For this, the operating system
exposes IP’s “best-effort datagrams” to the application for it to do
whatever it wants with them.

To do this, the OS provides UDP — the “user” datagram protocol. It’s just
like IP, in that the service is best-effort datagram’s, but instead of
delivering those datagrams “to a computer,” there’s an added layer of
addressing that says which application is interested in them (and like TCP,
UDP does this with a port number).
TCP is one of those protocol, and it can run on top of IP datagrams (as is done typically) or UDP
datagrams, in the case of applications like MixApp that don’t want to use the operating
system’s “default” implementation of TCP.

In addition to TCP, there are plenty of other protocols that run on top of “best-effort datagram
service” — e.g. Skype, BitTorrent (LEDBAT), the Web (QUIC and WebRTC), Mosh (SSP), Bonjour
(mDNS), and NTP. These all run over UDP because they want to provide different kinds of
abstractions or different performance characteristics than TCP does.

Vous aimerez peut-être aussi