TCP THREE WAY HANDSHAKE: Hosts track each data segment within a session and exchange information

about what data is received using the information in the TCP header. TCP is a full-duplex protocol, where each connection represents two one-way communication streams or sessions. To establish the connection, the hosts perform a three-way handshake. Control bits in the TCP header indicate the progress and status of the connection.The three-way handshake:

Establishes that the destination device is present on the network, Verifies that the destination device has an active service and is accepting requests on the destination port number that the initiating client intends to use, Informs the destination device that the source client intends to establish a communication session on that port number. During session setup, an initial sequence number (ISN) is set. This ISN represents the starting value of the bytes for this session that is transmitted to the receiving application. As data is transmitted during the session, the sequence number is incremented by the number of bytes that have been transmitted. This data byte tracking enables each segment to be uniquely identified and acknowledged. Missing segments can then be identified. Hosts today typically employ an optional feature called selective acknowledgements (SACK). If both hosts support SACKs, it is possible for the destination to acknowledge bytes in discontinuous segments and the host would only need to retransmit the missing data. 3 type of UDP application: Live video and multimedia applications – Simple request and reply applications – Applications that handle reliability themselves. The application layer is closest to the end user. it is the layer that provides the interface between the applications used to communicate and the underlying network over which messages are

transmitted. Application layer protocols are used to exchange data between programs running on the source and destination hosts.The presentation layer has three primary functions:

Formatting, or presenting, data at the source device into a compatible form for receipt by the destination device, Compressing data in a way that can be decompressed by the destination

Device, Encrypting data for transmission and decrypting data upon receipt. In the client-server model, the device requesting the information is called a client and the device responding to the request is called a server. Client and server processes are considered to be in the application layer. The client begins the exchange by requesting data from the server, which responds by sending one or more streams of data to the client. Application layer protocols describe the format of the requests and responses between clients and servers. In addition to the actual data transfer, this exchange may also require user authentication and the identification of a data file to be transferred. One example of a client-server network is using an ISP’s email service to send, receive, and store email. The email client on a home computer issues a request to the ISP’s email server for any unread mail. The server responds by sending the requested email to the client. The data transfer from a client to a server is referred to as an upload and data from a

server to a client as a download.

In the peer-to-peer (P2P) networking model, the data is accessed from a peer device without the use of a dedicated server. The P2P network model involves two parts: P2P networks and P2P applications. Both parts have similar features, but in practice work quite Differently. In a P2P network, two or more computers are connected via a network and can share resources (such as printers and files) without having a dedicated server. Every connected end device (known as a peer) can function as both a server and a client. One computer might assume the role of server for one transaction while simultaneously serving as a client for another. The roles of client and server are set on a per request basis. A simple example of P2P networking is shown in. In addition to sharing files, a network such as this one would allow users to enable networked games, or share an Internet connection. EXP eDonkey, G2, BitTorrent, Bitcoin.

The Server Message Block (SMB) is a client/server file sharing protocol that describes the structure of shared network resources, such as directories, files, printers, and serial ports. It is a request-response protocol. All SMB messages share a common format. This format uses a fixed-sized header, followed by a variable-sized parameter and data component.

SMB messages can, Start, authenticate, and terminate sessions, Control file and printer access, Allow an application to send or receive messages to or from another device.