Transmission Control Protocol/Internet Protocol (TCP/IP)

Discussion in 'Linux Networking' started by Jarret W. Buse, Oct 3, 2013.

  1. Jarret W. Buse

    Jarret W. Buse Well-Known Member Staff Writer

    Messages:
    175
    Likes Received:
    259
    Trophy Points:
    63
    Transmission Control Protocol/Internet Protocol (TCP/IP)

    The Transmission Control Protocol/Internet Protocol (TCP/IP) is a widely used networking protocol. Its use on the Internet has broadened its popularity since it is the only protocol used on the Internet.

    In the late 1960’s, the Defense Advanced Research Projects Agency (DARPA) started research and development to create the ARPANET. On January 1, 1983, ARPANET was using TCP/IP.

    In March of 1982, the U.S. military adopted TCP/IP as the standard for all computer communications. TCP/IP became more popular in June 1989 when AT&T released the code for TCP/IP into the public domain.

    The TCP/IP Protocol Suite has its own network stack similar to the OSI Model. The seven layers of the OSI Model map to four layers for TCP/IP as shown in the following figure:

    TCPIP Figure 1.jpg

    The layers perform the following functions:
    • Application – applications create data to send to a peer on the network
    • Transport – sends the data from one process (port) to another
    • Internet – manages addressing and routing of the data on the network topology (whatever it may be)
    • Network Interface – handles the physical network interface and medium such as Ethernet, etc.

    As the data is sent from the application to another system, such as a web server (HTTP), many things occur.

    NOTE: The example is a basic representation to provide an understanding of encapsulation.

    Encapsulation is when information is sent from one layer to another and at each layer more information is added, or encapsulated. A basic diagram is shown as follows:

    TCPIP Figure 2.jpg

    At the Application Layer, data is made by a browser, such as a web address. The data is passed to the Transport Layer, where a Header is placed on it that contains the port number for the HTTP request (port 80). The new data is sent to the Internet Layer where the IP address is placed in the IP Header and encapsulated with the data. The IP address is obtained by cache or requested by the Primary or Secondary DNS server. The encapsulated data is then sent to the Network Interface Layer where the data is manipulated to the proper size, split into multiple pieces with a number to specify the order to place the pieces back together properly. The receiving system’s MAC address is also placed in the header. The data is then sent along the network medium to the Internet.

    Once the Frame is received at the proper client, the web server, the data goes along a reverse path. At the Network Interface Layer, the MAC address is checked to verify the receiving system is the correct one. Once confirmed, the pieces are placed back together in the proper order, as they are received. It is possible to receive the data out of order. As data frames are received, they are acknowledged. If a frame is not acknowledged, the requesting system will retransmit the missing data. Once all data is received and placed together, the Frame Header is removed. The resulting packet is sent to the Internet Layer where the IP address is verified. Once the IP Header is removed, the data is sent up to the Transport Layer. Here the port number is verified and the UDP Header is removed. The last piece left is the data. The data is sent to port 80 (HTTP). The Web Services check the data, a web address for a web page, which is then retrieved and the process is performed again in the reverse order from the Web Server to the client system.


    NOTE: Every request, whether on a LAN, WAN or the Internet, are all performed in the same manner.

    Of course, the process is a basic explanation which does not include the routing managed by the Internet Layer.

    You may ask, “How do network devices deal with the TCP/IP encapsulated ‘frames’?”.

    Each device works at a different level of the OSI Model as shown in the following table.
    Code:
    Device     OSI Layer            TCP/IP Layer
    Hub        1. Physical          1. Network Interface
    Switch     2. Data Link         1. Network Interface
    Bridge     2. Data Link         1. Network Interface
    NIC        2. Data Link         1. Network Interface
    Router     3. Network           2. Internet  
    NOTE: Consider these devices as a system which can perform the same functions as described previously. The Headers are scanned at the specified TCP/IP Layer for the needed information to manage the frame as follows:

    A Hub for instance can pass a TCP/IP frame. It usually passes the frame to every connected system and it is up to the system to determine if it has reached the proper destination.

    A Switch is similar to a Hub, but it is ‘smarter’. Instead of sending the frame to all systems connected to it, it tracks the MAC addresses of each system connected. When a frame is received, the Frame Header is checked for the MAC address. If the system with the MAC address is connected to the local switch, the frame is sent only to the one system.

    Bridges are used to connect two segments of the network. Each segment can consist of different topologies. When the Bridge receives a frame, it checks the MAC address to determine if the frame should be forwarded to the next segment. If the system with the specified MAC address does not exist on the second segment, the Bridge will not forward the frames to the second segment. If the system with the MAC address does exist, the frame is forwarded to the second segment.

    A Network Interface Card (NIC) is used to connect the network medium to a computer or device. When a frame is received by a system, the NIC can check the MAC address in the Frame Header to verify if it matches the MAC address of the NIC. If it does match, the frame is then sent up the TCP/IP stack as described previously. If the MAC address does not match, the frame is discarded.

    The Router is used to route frames over various network segments and/or topologies. The router is a ‘smart’ system which sends frames to the designated network where the system resides to which the frames are meant to go. Routing is managed by using the IP Address from the Internet Layer. In this case, the Router will remove the Frame Header and then look at the IP Header where the IP Address resides. Once done, the frame is reassembled and sent to the proper destination.

    Attached Files:

    Last edited: Oct 4, 2013
    DevynCJohnson likes this.

Share This Page