There are some similarities in the IP and TCP headers, but in general, the
headers are very different.
When a frame arrives at a network interface card (NIC), the NIC strips the
data-link-layer header and passes the remaining packet to the appropriate
network-layer protocol. The network layer is usually implemented in
software. The network layer takes what it needs and passes the rest to the
appropriate process on the machine, usually a transport layer, such as TCP
or UDP. The transport layer takes what it needs and passes what's left to
the appropriate application.
Each OSI layer processes the header formed by its peer on the remote
station. Each layer also passes data to the layer above. So, since these
functions are present in each layer, there are some similarities:
SIMILARITIES
Most protocols have a way of identifying the next layer.
Ethernet has the EtherType field.
IEEE 802.2 has a Service Access Point (SAP) field.
IP has the Protocol field.
TCP has port numbers.
Most protocols have a way of specifying who is sending a message and who it
is destined to.
Ethernet and IEEE 802.3 have the destination and source MAC addresses.
IP has the source and destination IP addresses.
TCP has the source and destination port numbers.
Most protocols have a way of checking whether the message is valid.
Ethernet and IEEE 802.3 have a Frame Check Sequence (FCS)
IP has a checksum.
TCP has a checksum.
All this checksumming might seem redundant, but they have different
purposes. Ethernet makes sure a frame that was damaged in transit gets
trashed. IP and TCP have checksums in case a software glitch on the
receiving station causes the packet to get damaged.
Most protocols have a way of identifying the length of the header and/or data.
With that, the similarities in IP and TCP end.
Now Chuck said that nobody could rattle off header contents off the top of
their head. I'm going to see if I can. &;-)
IP
Version
Header Length
Type of Service -- precedence, etc.
Length of Packet
ID -- all fragments have the same ID
Flags -- don't fragment, more fragments
Fragment Offset -- indicates the position of this data relative to the
beginning of a fragmented message
Time to Live -- decremented by each router until it reaches 0, in which
case the packet is trashed
Protocol -- next layer up, for example, UDP, TCP, EIGRP, OSPF, ICMP, etc.
Header checksum
Source IP Address
Destination IP Address
Options -- record route, source routing, etc.
Padding if necessary -- must end on a 32-bit boundary
TCP
Source Port
Destination Port
Sequence Number -- each BYTE is sequenced. This field specifies the seq #
of the first byte in this message
ACK Number
Header Length
Flags - Urgent, ACK, PUSH, RESET, SYN, FIN
Window Size
Checksum - checksum of header and data
Urgent Pointer -- points to any urgent data in the message
Options
Whew! Did it! &;-)
Priscilla
At 03:59 AM 8/20/00, Derek CHUNG wrote:
>Is a TCP packet (layer 4) encapsulated by a IP packet (layer 3) which is
>inside a Layer 2 frame?
>If so, why the headers of a IP packet and TCP packet look so similar and
>redundant?
>
>
>___________________________________
>UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
>FAQ, list archives, and subscription info: http://www.groupstudy.com
>Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]
________________________
Priscilla Oppenheimer
http://www.priscilla.com
___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]