Thursday, August 22, 2013

TCP/IP Reference Model

TCP/IP Reference Model

The TCP/IP Reference Model

The TCP/IP reference model is the network model used in the current Internet architecture. It has its origins back in the 1960's with the grandfather of the Internet, the ARPANET. This was a research network sponsored by the Department of Defense in the United States. The following were seen as major design goals:

ability to connect multiple networks together seamlessly
ability for connections to remain intact as long as the source and destination machines were functioning
to be built on flexible architecture
The reference model was named after two of its main protocols, TCP (Transmission Control Protocol) and IP (Internet Protocol).
They choose to build a packet-switched network based on a connectionless internetwork layer.
  
TCP/IP Network Protocol
A detailed description of the reference model is beyond the scope of this document and project. The basic idea of the networking system is to allow one application on a host computer to talk to another application on a different host computer.

The application forms its request, then passes the packet down to the lower layers, which add their own control information, either a header or a footer, onto the packet. Finally the packet reaches the physical layer and is transmitted through the cable onto the destination host. The packet then travels up through the different layers, with each layer reading, deciphering, and removing the header or footer that was attached by its counterpart on the originating computer. Finally the packet arrives at the application it was destined for. Even though technically each layer communicates with the layer above or below it, the process can be viewed as one layer talking to its partner on the host.


Layers of TCP/IP Reference Model

The Host-to-Network Layer

The Host-to-Network layer interfaces the TCP/IP protocol stack to the physical network. The TCP/IP reference model does not specify in any great detail the operation of this layer, except that the host has to connect to the network using some protocol so it can send IP packets over it.

As it is not officially defined, it varies from implementation to implementation, with vendors supplying their own version.

The Network Layer

The job of the network layer is to inject packets into any network and have them travel independently to the destination. The layer defines IP (Internet Protocol) for its official packet format and protocol. Packet routing is a major job of this protocol.

The Transport Layer

The transport layer is the interface between the application layer and the complex hardware of the network. It is designed to allow peer entities on the source and destination hosts to carry on conversations.

Data may be user data or control data. Two modes are available, full-duplex and half duplex. In full-duplex operation, both sides can transmit and receive data simultaneously, whereas in half duplex, a side can only send or receive at one time.

Any program running in the application layer has the ability to send a message using TCP or UDP, which are the two protocols defined for the transport layer. The application can communicate with the TCPgif or the UDP service, whichever it requires. Both the TCP and UDP communicate with the Internet Protocol in the internet layer. In all cases communication is a two way process. The applications can read and write to the transport layer. The diagram only shows two protocols in the transport layer. T/TCP will also reside in this layer between the other two protocols and function in the same manner.

The Application Layer

The original TCP/IP specification described a number of different applications that fit into the top layer of the protocol stack. These applications include Telnet, FTP, SMTP and DNS.

Telnet is a program that supports the TELNET  protocol over TCP. TELNET is a general two-way communication protocol that can be used to connect to another host and run applications on that host remotely.

FTP (File Transfer Protocol)  is a protocol that was originally designed to promote the sharing of files among computer users. It shields the user from the variations of file storage on different architectures and allows for a reliable and efficient transfer of data.

SMTP (Simple Mail Transport Protocol)  is the protocol used to transport electronic mail from one computer to another through a series of other computers along the route.

DNS  (Domain Name System) resolves the numerical address of a network node into its textual name or vice-versa. It would translate www.yahoo.com to 204.71.177.71 to allow the routing protocols to find the host that the packet is destined for.


Upload UIImage as base64 String

Upload UIImage as Base64 String (Upload UIImage as string) //Select Pic From Camera or Gallery       @objc func btnPro...