0% found this document useful (0 votes)
6 views

Assignment No 1

Uploaded by

Asma Sattar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment No 1

Uploaded by

Asma Sattar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Computer Communication and Networks

Assignment no: 1

Submitted to: Sir Fahad Khan

Submitted by: Asma Sattar


09-SE-03

Date of Submission: 20th Feb, 2012

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


SOFTWARE DEPARTMENT
Types Of Headers Used in data Communication:
UDP header
UDP is a simple to implement protocol because it does not require keeping track of every packet sent or
received and it does not need to initiate or end a transmission. Because of this it is mainly designed for
communications where you either don't care what the response will be or you pretty much know it. UDP
messages are generally faster than TCP provided that the communication link functions properly. UDP is
widely utilized to send DNS (Domain Name Search) requests, to exchange chat messages, or to access
telephone numbers via Internet.

Theoretically the minimum size of UDP header is 8 byte. Although this will not leave any space for data
in the message. In reality, no UDP message should ever be generated that does not contain at least
some data. We use the command prompt with two different application (sendudp1, sendudp1). Each
application create different UDP header. The UDP header is not a real one. The length of the header in
the simulation is determined by the size of the header plus 1 for each char you sent. The checksum
header is calculated on the entire header including the data and the header but it does not reflect the
reality

UDP Header does not provide any fields for source or destinations IP addresses, or for any other service
that are not specifically related to UDP. This is because those services are provided by lower layer (IP) or
by higher layer (Application).

TCP Headers:
TCP provides a connection oriented, reliable, byte stream service. The term connection-oriented means
the two applications using TCP must establish a TCP connection with each other before they can
exchange data. It is a full duplex protocol, meaning that each TCP connection supports a pair of byte
streams, one flowing in each direction. TCP includes a flow-control mechanism for each of these byte
streams that allows the receiver to limit how much data the sender can transmit. TCP also implements a
congestion-control mechanism.

TCP headers should perform various tasks. The tasks are performed by various ports as follows:

Source Port: On the sending system, a process is being bounded by the source port. A hash between the
IP addresses and destination and source ports is used for uniqueness for binding single application or
program.

Destination Port: Destination port was directly bounded to a process at the receiving system.

Sequence Number: A number on every packet of TCP which facilitates the TCP stream properly
sequenced. The port can then return an acknowledgement after the packet was properly received.

Acknowledge Number: This number is used when a packet at the host is received.

Data offset: The distance of the TCP header and the location of data part of the packet is indicated by
data offset.

Reserved bit: The reserved bits are reserved for future usage.

CWR bit: An added bit to RFC 3268 which is used by ECN. CWR bit is used for sending data to inform the
receiving part when the congestion window reduced.

ECE bit: An added bit to RFC 3268 which is used by ECN. TCP/IP stack uses this bit on the receiver host
for sending the host that is has received a CE packet.

URG bit: To determine the usage of Urgent Pointer Field, this bit is used. 1 is set as to use Urgent pointer
and 0 is set not to use Urgent pointer.

ACK bit: A packet is set by this bit that indicates the reply to another packet that data is received.

PSH bit: To communicate any intermediate hosts for sending data on to the actual user.

RST bit: To indicate to the other end for tearing down the TCP connection, Reset bit is used.
SYN bit: When the connection is initially established, SYN is used. The initial packet and the reply SYN
are the two instances of the connection.

FIN bit: The host sends FIN bit which indicates that no more data is left for sending. The other end will
respond a FIN when there is no data left.

Window bit: Window bit information is used by the host for informing the sender the volume of data
the receiver permits a given point of time.

Checksum bit: It is bit for performing checksum on the whole TCP header. It is a one’s complement of
the one’s complement sum of every 16 bit word available in the header. The checksum field is
set to zero.

Urgent Pointer bit: A pointer bit that point to the end of the data which is considered as urgent.

Options bit: A variable length field which contains optional headers which may be used. It contains an
initial field – the length of options field, second field - informs which options are used.

Padding bit: Until the header ends at a 32-bit boundary, the padding of TCP header takes place. The
padding always consists of only zeros to ensure the data part of the packet is not lost.

IP Header
Over the internet, data is send trough packets. Internet Protocol (IP) is the Internet layer protocol that
contains address information for routing packets in Network Layer of OSI model.
IP is for addressing and routing packets. It provides the mechanism to transport datagram across a large
network. In more detail, the main purpose of IP is to handle all the functions related to routing and to
provide a network interface to the upper-layer protocols, such as TCP from Transport Layer. Applications
use this single protocol in the layer for anything that requires networking access.
Voice over Internet Protocol (Voice over IP, VoIP) is one of a family of internet technologies,
communication protocols, and transmission technologies for delivery of voice communications and
multimedia sessions over Internet Protocol (IP) networks, such as the Internet. Other terms frequently
encountered and often used synonymously with VoIP are IP telephony, Internet telephony, voice over
broadband (VoBB), broadband telephony, and broadband phone.
The IPv4 packet header consists of 14 fields, of which 13 are required. The 14th field is optional (red
background in table) and aptly named: options. The fields in the header are packed with the most
significant byte first (big endian), and for the diagram and discussion, the most significant bits are
considered to come first (MSB 0 bit numbering). The most significant bit is numbered 0, so the version
field is actually found in the four most significant bits of the first byte, for example.

The fixed header of an IPv6 packet consists of its first 40 octets (320 bits).[1] It has the following format:
HTTP Header:
HTTP Headers are the request to a server for information and the resulting response. When you input an
address into your browser it sends a request to the server hosting the domain and the server responds.
You can see the request and response using our basic HTTP Header Viewer. The HTTP Header Viewer
can be used to view the Headers or Headers and Content of any valid http:// url. When HEAD is selected
the request is for the server to only send header information. A GET selection requests both headers
and file content just like a browser request. Information in response headers may include:

 Response status; 200 is a valid response from the server.


 Date of request.
 Server details; type, configuration and version numbers. For example the php version.
 Cookies; cookies set on your system for the domain.
 Last-Modified; this is only available if set on the server and is usually the time the requested file
was last modified
 Content-Type; text/html is a html web page, text/xml an xml file.

HTTP Request Format


request-line ( request request-URI HTTP-version)
headers (0 or more)
<blank line>
body (only for POST request)
HTTP Response Format
status-line(HTTP-version response-code response-phrase)
headers (0 or more)
<blank line>
body
Content of files that are not text based will be displayed in their encoded form. This means you will not
see an image for a gif file but the underlying encoding will be displayed. For text based files including
web pages (.html, .htm, .php .asp), Cascading Style Sheets (.css), JavaScript (.js), and XML files (.xml) the
file content will be displayed. The content displayed is the same as displayed when using View Source in
a browser.

You might also like