Introduction to TCP/IP
This manual is intended for embed System Engineer and to support professionals who are not familiar with the basic of Networking concepts. Throughout this manual, you will find an overview of TCP/IP suite of protocols used to communicate across the network.
The TCP/IP were developed by the Department of Defense (DOD), their goal is to connect a number of different networks designed by different vendors into a single networks called "the Internet". It was initially successful because it delivered a few basic services that everyone needs across a large number of client and server systems. Many computers in the small department also used the TCP/IP with different protocols on a single LAN to help securing data when traveling over the networks. The IP component provides routing from the department to the enterprise network, then to regional networks, and finally to the Internet.
What is TCP/IP?
TCP/IP is made up of two acronyms (the "TCP" and the "IP"): The TCP is known as the (Transmission Control Protocol) and an IP is called the (Internet Protocol). TCP handles and breaking up the message into datagrams, and reassembling them at the other end followed by the OSI Model. In addition, it also adds support to detect errors or lost of data, for example, while transferring files along the network, if data is lost or corrupted, the TCP automatic features will automatically resend the files. As mentioned, to send a file, TCP break data into pieces, therefore, each peace have to have a header which keep track of a package. The header contains source port, destination port, and sequence port number which used to keep track of different conversations over the network. For example, if two different people are transferring files at once, the TCP protocols assign each with two different port numbers (1000, and 1001). These numbers also known as the source port, since we are sending the files. In addition, even though the source port is assigned to each conversation, but in fact, your TCP has to know the port number used by the other end as well to make these conversation compatibles. Below is a format of a TCP segment, also called "TCP Header":

As indicated, the source port is the port where you send data, and the destination port is the port that allocated at the other end user computer. This destination port field is at 16 bits.
Sequence number – identifies the data segment's position in the stream of data segments already sent. The sequence number field is at 32 bits.
Acknowledgment number – This confirms if the data being sends, and return message to the sender. This field is 32 bits long.
The Header length – indicates the length of the TCP header. This field is 4 bits long, and the Reserved field is reserved a space at 6 bits for the later use. This can be separated into six flags ("URG", "ACK", "PSH", "RST", "RYN", "FIN"), and each flag contained 1 bit.
- URG Flags, if set to "1," the Urgent pointer field contains information for the receiver.
- ACK Flags, if set to "1," the Acknowledgment field contains information for the receiver. However, if it is set to "0," then the receiver will ignore the Acknowledgment field.
- PSH Flags, if set to "1," it indicates that data should be sent out to an application without having to buffer it.
- RST Flags, if set to "1," the sender is requesting that the connection be reset.
- SYN Flags, if set to "1," this means that the sender is requesting a synchronization of the sequence numbers between the two nodes.
- FIN Flags, if set to "1," the segment is the last in a sequence and the connection should be closed.
Sliding window size – this indicate that how many bytes is the sender can issue to a receiver while acknowledgment for this segment. This field controlling the flow performance in case the receiver deluged with bytes. For example, suppose that a server indicates a sliding window size of 5000 bytes, and a client has already issued 1000 bytes, 300 of which have already received and acknowledged by the server. That means that the server is still buffering 700 bytes. Therefore, the client can only issue 4300 additional bytes before it receives acknowledgment from the server for the 700 bytes.
Checksum – this allows end user to determine whether the TCP segment is corrupted while transmitting it.
Urgent pointer – Indicates a location in the data field where urgent data is resides.
Options – This specifies special options to determine the sides of the segment over the network.
Padding – contains filler information to ensure that the size of the TCP header is a multiple of 32 bits.
Data – This is the original data sent by the source node. Data size can be varies to limited the segment to be fit in an IP datagram.
IP (Internet Protocol)
The IP is the Internet Protocol, which belongs to the OSI Network layer model. The IP handles all of the routing’s packets for the TCP. In this case, the packet is known as an IP datagram. The IP datagram act like an envelope for the data, it contained such of information for the routers to be transfer over the networks. However, the IP itself is an unreliable, connectionless protocol; it does not guarantee delivery of data. Higher level protocols of the TCP/IP suite, however, use IP to ensure that data packets are delivered to the right addresses. In addition, in order to allow a router to forward the datagram, it adds its own header to the packet.
I always think of the mail man as the IP and the Post Office as the TCP. This is because the Post Office processes the mail and assigns the mail man to delivery it.
Once IP has tacked on its header, here is what the message looks like:
IP datagram:

Version – Which identifies the version of the protocol, if the version is not knows by the receiver the connection will then terminated. Most networks today use IPv4 to transfers data. This field is 4 bits long.
Internet Header Length (IHL) – Identifies the number of 32bit blocks in the IP header. In addition, the most common header length is composed of five groupings, as the minimum length of an IP header is 20 4-byte blocks.
Differentiated Services – This field informs the routers what level of precedence they should apply when processing the incoming packet. This field is 8 bits long.
Total length – This identifies the total length of the IP datagram, including the header and data. This Total Length field is at 16 bits, and cannot exceed 65,535 bytes.
Identification – This field identifies the message and enables the receiving node to reassemble fragmented messages.
Flags – Indicate that whether a message is fragmented or is it fragmented.
Fragment offset – Identifies where the datagram fragment belongs in the incoming set of fragments.
Time to Live (TTL) – This indicates the maximum time for the datagram to remain on the network before it is closed.
Protocol – Identifies the type of Transport layer protocol that will receive the datagram.
Header checksum – This field allows end user node to calculate whether the IP header has been corrupted during transporting it.
Source IP address – Identifies the full IP address of the source node.
Destination IP address – Indicates the full IP address of the destination node.
Options – Also containing optional routing and timing information, depending on the types of data being transfers.
Padding – This contains the filler bits to ensure that the header is a multiple of 32 bits. The length of this field is varies.
Data – This is the original data send by the source node, and thus, it also containing information that was added by the TCP in the Transport layer.
March 28, 2009
By: William Nguyen
|
|


