Transmission Control Protocol

 

      

 

         When two computers wish to exchange information over a network, the physical hardware must exist, which is typically either a network interface card (NIC) or a serial communications port for dial-up networking connections. Beyond this physical connection, however, computers also need to use a protocol which defines the parameters of the communication between them.

 

An Internet is a collection of networks, combined into a single, virtual network.

 

The Internet Protocol provides the means by which any system on any network can communicate with another as easily as if they were on the same physical network.

 

Dot-notation looks something like "192.43.19.64".

 

 

Internet Protocol

 

        When a system sends data over the network using the Internet Protocol, it is sent in discrete units called Datagrams,also commonly referred to as packets. A datagram consists of a header followed by application-defined data. The header contains the addressing information which is used to deliver the datagram to it’s destination, much like an envelope is used to address and contain postal mail. In fact, Datagrams may be lost, duplicated or delivered out of order during their travels over the network. What’s really needed is a reliable, straight-forward way to exchange data without having to worry about lost packets or jumbled data.

 

 

TCP

 

        Built on top of IP, TCP offers a reliable, full-duplex byte stream which may be read and written to in a fashion similar to reading and writing a file. TCP is known as a connection-oriented protocol. In other words, before two programs can begin to exchange data they must establish a "connection" with each other. This is done with a three-way handshake in which both sides exchange packets and establish the initial packet sequence numbers (the sequence number is important because, as mentioned above, datagrams can arrive out of order; this number is used to ensure that data is received in the order that it was sent). When establishing a connection, one program must assume the role of the client, and the other the server. The client is responsible for initiating the connection, while the server’s responsibility is to wait, listen and respond to incoming connections. Once the connection has been established, both sides may send and receive data until the connection is closed.

 

 

  User Datagram Protocol

 

        Unlike TCP, the User Datagram Protocol (UDP) does not present data as a stream of bytes, nor does it require that you establish a connection with another program in order to exchange information. Data is exchanged in discrete units called datagrams, which are similar to IP datagrams. In fact, the only features that UDP offers over raw IP datagrams are port numbers and an optional checksum.UDP is sometimes referred to as an unreliable protocol because when a program sends a UDP datagram over the network, there is no way for it to know that it actually arrived at it’s destination.

 

This means that the sender and receiver must typically implement their own application protocol on top of UDP. Much of the work that TCP does transparently (such as generating checksums, acknowledging the receipt of packets, retransmitting lost packets and so on) must be performed by the application itself.

 

UDP has the advantage over TCP in two critical areas: speed and packet overhead. Because TCP is a reliable protocol, it goes through great lengths to insure that data arrives at it’s destination intact, and as a result it exchanges a fairly high number of packets over the network. UDP doesn’t have this  overhead, and is considerably faster than TCP. In those situations where speed is paramount,or the number of packets sent over the network must be kept to a minimum, UDP is the solution.

 

 

 Hostnames

 

        IP address of the system  represented by a 32-bit number, it is typically expressed in either dot-notation or by a logical name called a hostname. Like an address in dot-notation, hostnames are divided into several pieces separated by periods, called domains. Domains are hierarchical, with the top-level domains defining the type of organization that network belongs to, with sub-domains further identifying the specific network.

 

       The fully qualified domain name is specified by naming the host and each parent sub-domain above it, separating them with periods. For example, the fully qualified  domain name for the "jupiter" host would be "jupiter.catalyst.com". In other words, the system "jupiter" is part of the "catalyst" domain (a company’s local network) which in turn is part of the "com" domain (a domain used by all commercial enterprises). a local host table or a name server. A host table is a text file that lists the IP address of a host, followed by the names that it’s known by. Typically this file is named hosts and is found in the same directory in which the TCP/IP software has been installed. A name server, on the other hand, is a system (actually, a program running on a system) which can be presented with a hostname and will return that host’s IP address. This approach is advantageous because the host information for the entire network is maintained in one centralized location, rather than being scattered about on every host on the network.

 

 Service Ports

 

 

        In addition to the IP address of the remote system, an application also needs to know how to address the specific program that it wishes to communicate with. This is accomplished by specifying a service port, a 16-bit number that uniquely identifies an application running on the system. Instead of numbers, however, service names are usually used instead. Like hostnames, service names are usually matched to port numbers through a local file, commonly called services. This file lists the logical service name, followed by the port number and protocol used by the server.A number of standard service names are used by Internet-based applications and these are referred to as well-known services. These services are defined by a standards document and include common application protocols such as FTP, POP3, SMTP and HTTP.

 

        Remember that a service name or port number is a way to address an application running on a remote host. Because a particular service name is used, it doesn’t guarantee that the service is available, just as dialing a telephone number doesn’t guarantee that there is someone at home to answer the call.

 

 

Sockets

 

        socket address of the application  consists of three key parts: the protocol family, Internet Protocol (IP) address and the service port number. We’ve already talked about the IP address and service port, but what’s the protocol family? It’s a number which is used to logically designate the group that a given protocol belongs to. Since the socket interface is general enough to be used with several different protocols, the protocol family tells the underlying network software which protocol is being used by the socket. With the protocol family, IP address of the system and the service port number for the program that you want to exchange data with, you’re ready to establish a connection.

 

 

Hosted by www.Geocities.ws

1