Printer Friendly Version      Send     
Click to Rate and Give Feedback
 How IT Works: Decoding TCP/IP
Related Articles
Many organizations rely on ISA Server 2006 to secure their environment, but few take the important step of securing ISA Server itself. Here’s a guide to using the Security Configuration Wizard and Administrative roles to limit its attack surface and secure your ISA Server 2006 implementation.

By Alan Maddison (September 2008)
The recent update to the Windows Vista Firewall offers some impressive new features that make it a compelling choice for the corporate environment. Jesper M. Johansson gives a brief overview of the evolution of the Windows Firewall and delves into enhancements—such as new rules and profiles, domain isolation, and encryption—that will have administrators taking a closer look.

By Jesper M. Johansson (June 2008)
Troubleshooting enforcement behaviors in the Network Access Protection platform can be challenging. The Cable Guy explains how NAP health policy evaluation works and how you can troubleshoot the most common issues.

By Joseph Davies (April 2008)
How do you allow network access to those who need it without sacrificing security? See how new technologies in Windows Server 2008, such as Windows Firewall with Advanced Security and Network Access Protection, let you implement a policy-based approach to help you achieve this goal. Ian Hameroff and Amith Krishnan 62 Configuring Roles with Server Manager A DNS server need not be a print server. One approach Windows Server 2008 takes to improve security and manageability is to simplify server roles so you can easily install only the tools and services you need, and nothing more. Here's an introduction to using Server Manager for configuring roles and simplifying deployments.

By Ian Hameroff and Amith Krishnan (March 2008)
More ...
Popular Articles
Many mobile professionals today need the line of business applications they use in the office (CRM, ERP, and the like) to be accessible from a mobile device when they are in the field. See how Windows Mobile and Mobile Device Manager allow you to deploy rich mobile functionality for critical line of business applications.

By Matt Fontaine (September 2008)
The release of Internet Information Services 7.0 sets new standards, offers fundamental improvements, and brings new capabilities for consolidating Web environments. Explore the most important enhancements and get an in-depth guide to testing, staging, and migrating your Web apps to IIS 7.0.

By Fergus Strachan (July 2008)
Microsoft Office Communication Server brings important changes to enterprise telephony. Examine how voice calls are made layer by layer, learn how calls can be routed to various endpoints, and explore the importance of conversations in OCS communications.

By Rajesh Ramanathan (July 2008)
Users have complained for years that clustering in Windows Server is too complicated. With the release of Windows Server 2008, clustering received a complete facelift. Explore some of the most significant advancements found in the new Failover Clustering, and see how this new implementation makes clusters much easier to set up and maintain.

By Chuck Timon (July 2008)
More ...
Read the Blog
With SP1 installed, ConfigMgr works with Windows Server 2008 just as it does with other versions of Windows. The November 2008 issue of TechNet Magazine offers a quick overview ...
Read more!
The much-anticipated release of Windows Server 2008 introduced significant changes to the OS, adding powerful functionality such as server core, server roles,  read-only DCs, Hyper-V, Terminal Services Gateway, and enhancement support for Internet Protocol version 6 (IPv6). While these changes and new features are beneficial, they ...
Read more!
Virtualization is hot nowadays, but Terminal Services has been abstracting the presentation layer of remotely run applications and desktops for years. A lot has changed over the years, and with Windows Server 2008, Terminal Services has truly become a mature, robust presentation virtualization ...
Read more!
If you’re an OpsMgr 2007 administrator, chances are good that you’ll be creating custom monitoring objects (rules, groups, and so forth), and for each one you build, you have to decide what target to use. That’s a critical decision, but knowing how to go about choosing the correct target is not always clear. Steve ...
Read more!
The November 2008 issue of TechNet Magazine is now available online.   FEATURE ARTICLES                                                                   ...
Read more!
It's been about 8 years since Scott Culp published "The 10 Immutable Laws of Security." It is one of the best and most important essays on computer security ...
Read more!
More ...
New information has been added to this article since publication.
Refer to the Editor's Update below.


How IT Works Decoding TCP/IP
Don Parker


TCP/IP is comprised of a set of protocols including Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Internet Protocol (IP), and Internet Control Message Protocol (ICMP). Most IT professionals understand how these protocols work together to make network communication possible. They also know that IP is used for routing and that TCP is a transport protocol. However, it's not as well known what the various fields mean in a standard TCP/IP packet. Let's dive into the details.
A TCP/IP connection begins with a three-way handshake, used to initiate communications between computers, and is composed of three packets. This handshake usually begins with a synchronize (SYN) packet sent from a client to a server, followed by a synchronize/acknowledgement (SYN/ACK) packet from the server back to the client, and finally an acknowledgement (ACK) packet from the client back to the server. The final ACK packet is optional depending on the operating system you are using.
Let's look at and decipher an example TCP/IP packet, shown in the figure. This is the first step in the three-way TCP/IP handshake. A SYN packet like this is used to initiate communication and synchronize sequence numbers.
[Editor's Update - 5/5/2005:This was captured using the tool WinDump. Other utilities will most likely format and augment the results differently. For example, the timestamp discussed in the following section is inserted by WinDump and is not actually included in the data sent across the wire.]

09:09:52.283919
This is the time that my computer actually received the packet (not the time that it was sent). This time is accurate to the microsecond as represented by the six numbers after the last decimal point.

xxx.xxx.xxx.xxx.10459
Following the IP address 192.168.1.100 is the number 10459. This is the source port on the source computer that sent this packet.

>
The greater-than symbol shows the flow of communications, namely that the IP address to the left of the symbol is talking to the one on the right of the symbol.

192.168.1.200.80
This is the destination computer's IP address (192.168.1.200) as well as the destination port (80). You can infer that the client computer is trying to initiate communications with a Web server, since port 80 is the default used by HTTP servers such as IIS to listen for client connections.

S
The "S" that follows the IP address confirms this is a SYN packet.

[tcp sum ok]
This is also known as "TCP Checksum OK," and conveys that the checksum—as calculated by the source computer—is valid. When the source computer sends a packet, it adds to the packet the result of running a mathematical formula called a checksum over the contents of the packet, and it embeds the results into the packet's header. When the packet is received by the destination computer, the destination computer performs the same calculation on the received data. If the destination finds that its calculated checksum is the same as that embedded in the received packet's header, the packet will be processed.

3153110659:3153110659
This long string of numbers is the TCP sequence number. The number in parentheses that follows the sequence number represents the amount of data bytes sent. In this case, the value is zero as a SYN packet contains only a header and no data. In other words, no data has been sent as the two computers have not yet completed the three-way handshake.

win 32768
Window size is represented by win 32768, meaning the client computer has a window size of 32768 bytes. Also commonly known as the receive buffer, this metric is normally controlled by the application in use and indicates to the receiving computer the number of bytes that the client is willing to receive unacknowledged (once the source computer sends an acknowledgement to the destination computer, the destination can then send more data). In this case, we've surmised that the client is starting up communications with a Web server, so it is likely that this window size is that of Microsoft® Internet Explorer. If the server sends more information than the maximum allowed by the window size, the client may simply drop the extra packets due to a full buffer.

<mss 536>
Maximum segment size is represented by the number within the angle brackets. This value, as sent by the source computer, tells the destination to send no more than 536 bytes of data in any one packet. The Maximum Transmission Unit (MTU) for Ethernet is 1540.

(ttl 63, id 60989, len 44)
The value ttl 63 represents the packet's time-to-live, which defines the number of router hops that can be made before this packet will be dropped. In this example, 63 more router hops can be made before the packet will be dropped by the next router in line. When a router receives a packet with a ttl of 1, it will drop this packet and send an ICMP error message back to the originator. This prevents packets from flying around endlessly if they cannot reach their destination. I know that the source computer is running Windows® 2000 Professional, which has a default ttl of 128. That means that this packet went through quite a few hops before this capture was taken.
The TTL on the source computer had been changed from the default to a much lower number, meaning that the number of hops was significantly less than is implied.
Next is id 60989, the number assigned to the IP header. This number is used for packet fragmentation purposes. Should a packet need to be split into multiple pieces by a router, each fragment that is generated will have the same IP ID number assigned to it. The destination computer needs this to be able to reassemble them. Were this packet actually fragmented, there would also be a value called the fragmentation offset included (there's no use having fragments if you don't also know in what order they need to be reassembled).
Most current operating systems have the DF (don't fragment) bit set by default. If a router receives a packet with the DF bit set, and that packet is too big for the router to route, then the router will simply discard the packet, since the router would need to fragment it to pass it along. This will, in turn, cause the router to generate an ICMP error message, which it will send back to the originator of the packet to let it know.
Lastly, there is len 44, which represents the overall length of the packet. This includes not only the byte count of TCP and IP headers, but also the data sent, if any. Everything is measured in bytes.
At the end of the packet is a mass of hexadecimal values as well as some ASCII content. While this may seem cryptic, it actually isn't—all you are seeing is the TCP and IP header information of the packet that was just examined, but this time in a hexadecimal representation. You can, if you choose, decode these hexadecimal values yourself instead of letting the computer do it for you, but doing so is not for the faint of heart.

Don Parker works in a high-assurance environment where he is employed as a network security analyst. He has been a guest speaker at various computer security conferences, and holds the GCIA and GCIH certifications. His Web site is www.bridonsecurity.com.
© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.
Page view tracker