0% found this document useful (0 votes)
2K views10 pages

Bcs 052 Notes

The document compares and contrasts the TCP/IP and OSI networking models. It explains: - The TCP/IP model has 4 layers (Application, Transport, Internet, Link) while OSI has 7 layers, separating presentation and session layers. - TCP/IP's network layer provides connectionless service while OSI's provides both connectionless and connection-oriented. - The document then describes each TCP/IP layer and the differences between TCP and UDP protocols. - Finally, it diagrams the TCP and UDP headers, labeling their components such as source/destination ports, sequence/acknowledgement numbers, flags, checksums, and data fields.

Uploaded by

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

Bcs 052 Notes

The document compares and contrasts the TCP/IP and OSI networking models. It explains: - The TCP/IP model has 4 layers (Application, Transport, Internet, Link) while OSI has 7 layers, separating presentation and session layers. - TCP/IP's network layer provides connectionless service while OSI's provides both connectionless and connection-oriented. - The document then describes each TCP/IP layer and the differences between TCP and UDP protocols. - Finally, it diagrams the TCP and UDP headers, labeling their components such as source/destination ports, sequence/acknowledgement numbers, flags, checksums, and data fields.

Uploaded by

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

BCA MCA BA MA BDP B.COM M.COM B.

SC
http://www.ignouassignmentguru.com

BCS-052 Networking programming and Administration


TCP/IP PROTOCOLS
Question1: - Explain TCP/IP layer and what is different between TCP/IP and OSI
layer.
OSI layer TCP/IP layer
Open System Interconnection. Transmission Control Protocol / Internet
Protocol.

OSI model has a separate Presentation layer TCP/IP does not have a separate Presentation
and Session layer. layer or Session layer.

Network layer of OSI model provides both The Network layer in TCP/IP model provides
connection oriented and connectionless connectionless service.
service.

It has 7 layers. It has 4 layers.

OSI model defines services, interfaces and In TCP/IP, services, interfaces and protocols
protocols very clearly and makes clear are not clearly separated.
distinction between them.

It is protocol independent. It is also protocol dependent.

Protocols are hidden in OSI model and are In TCP/IP replacing protocol is not easy.
easily replaced as the technology changes.

Application
Application
Presentation

Session

Transport Transport

Network Network 1
IGNOU ASSIGNMENT GURU Page-

Data link Interface


Physical

The TCP/IP network model breaks down into four (4) layers:
 Application Layer
 Transport Layer
 Network Layer
 Interface Layer
Application Layer: - The Application Layer provides the user with the interface to communication.
This could be your web browser, e-mail client or a file transfer client. The Application Layer sends to,
and receives data from, the Transport Layer. These application are File Transfer protocol (FTP), remote
login (TELNET), email (SMTP), WWW (HTTP).

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com
Transport Layer: - The Transport Layer provides the means for the transport of
data segments across the Internet Layer. The Transport Layer is concerned with end-to-end (host-to-
host) communication.
The Transport Layer sends data to the Internet layer when transmitting and sends data to
the Application Layer when receiving. At this layer supports two protocols: TCP, UDP.

Network Layer: - The Internet Layer provides connectionless communication across one or more
networks, a global logical addressing scheme and packetization of data. The Internet Layer is concerned
with network to network communication.
The Internet Layer is responsible for packetization, addressing and routing of data on the
network. The Internet Layer communicates with the Transport Layer when receiving and sends data to
the Network Access Layer when transmitting.

Interface Layer: - The Network Access Layer provides access to the physical network. The purpose
of a network interface is to allow your computer to access the wire, wireless or fiber optic network
infrastructure and send data to other computers.

Question2: - Different between TCP and UDP.


TCP UDP

Stands Means Transmission Control User Datagram Protocol or


Protocol Universal Datagram Protocol

Connection TCP is a connection-oriented UDP is a connectionless


protocol. protocol.

Use by other protocols HTTP, HTTPs, FTP, SMTP, DNS, DHCP, TFTP, SNMP,
Telnet RIP

Ordering of data packets TCP rearranges data packets UDP is no ordering of


in the order specified. messages.

Speed of transfer The speed for TCP is slower UDP is faster because error
than UDP. recovery is not attempted

Header Size TCP header size is 20 bytes UDP Header size is 8 bytes.

Weight TCP is heavy-weight. UDP is lightweight.

Acknowledgement Acknowledgement segments No Acknowledgment


2
IGNOU ASSIGNMENT GURU Page-

Handshake SYN, SYN-ACK, ACK No handshake


(connectionless protocol)

Reliability There is absolute guarantee There is no guarantee that


that the data transferred. the messages or packets
sent.

Question3: - Explain TCP header and UDP header with diagram?


TCP header: -

Source Port (16 bits) Destination Port (16 bits)

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

Sequence Number (32 bits)

Acknowledgement Number (32 bits)

HLEN Reserved Code Bits Window (32 bits)

Checksum Urgent Pointer


Data
Option
Padding

TCP segment format


TCP header consists of the following part.
1) Source Port and Destination port (16 bits): - Both source and destination ports are 16-bit
fields identify protocol ports of the sending and receiving applications.
2) Sequence Number (32 Bits): - Sequence number is a 32-bit wide field identifies the first
byte of data in the data area of the TCP segment. Or a number indicating the position of the
packet in the overall message.
3) Acknowledgement Number (32 bits): - Acknowledge number is also a 32-bit wide field
which identifies the next byte of data that the connection expects to receive from the data
stream. Or a number that indicates the next sequence number expected.
4) HLEN: - it is the length of header in 32 bit words.
5) Reserved (6 bits):- this is reserved for future use.
6) Code bits (6 bits): -
U A P R S F

R C S S Y I

o URG – URG flag G K H T N N tells the receiving TCP module as


it is urgent data.
o ACK – ACK tells the receiving TCP module that the acknowledgement number field
contains a valid acknowledgement number.
o PSH- if request that data in this segment be immediately pushed to on revising devices.
o RST – RST flag asks the receiving TCP module to reset the TCP connection.
o SYN – SYN flag tells the receiving TCP module to synchronize sequence number.
3
IGNOU ASSIGNMENT GURU Page-

o FIN – FIN flag tells the receiving TCP module that the sender has finished sending data.
7) Window size: - A number indicating how many blocks of data the receiving machine can
accept.
8) Checksum (16 bits): - it is needed for error checking.
9) Data (32 bits): - Hold the data that need to transmit over the network.
10) Options: - this field contains optional information such as routing details etc.

UDP header: -
Source Port number (16 bits) Destination Port number (16
bits)
Length (16 bits) Checksum (16 bits)

Data

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

UDP Header File


UDP header consists of the following part.
1) Source Port Number: - The first 16 bits of the UDP header contain the port number of the
application sending the data.
2) Destination Port Number: - The next 16 bits contain the port number of the application
that receives this data.
3) Length: The next 16 bits identify how long the datagram is in bits. It can range between 0 to
65,535 bytes.
4) Checksum (16 bits): - it is needed for error checking.
5) Data (32 bits): - Hold the data that need to transmit over the network.

Question 4: - what is IP address classes and explain Internet protocol header


field?
IP address: - the IP address space was divided into a few fixed length structures called
address classes. An IP address uniquely identifies a node or host connection to an IP network.
An IP address is a 32 bit binary number. These 32 bits are divided into four sections containing
four bytes each. There are private IP address, public IP address, static IP address, dynamic IP
address.
IP address are assigned according to the following classes of network.
Class A Address: - these are used for the systems with a small number of networks and a large
number of hosts. Class A address start with 0.

Class B Address: - these provide an equal number of networks and hosts by assigning the first
two bytes to the network and the last two bytes to the host. This class is most often assigned to
universities and organizations. Class B address start with 10.

Class C Address: - these classes use the first three bytes of the address to specify the network
and the last byte to specify the host. A class C network will only support a small number of
hosts. Because one byte available for host address. Class C address start with 110.
4
Class D Address: - Another class of network is class D whose range of addresses is used for
IGNOU ASSIGNMENT GURU Page-

multicast packet. Class D addresses start with 1110.

Class E Address: - these are reserved for future use. Class E addresses start with 1111.
IP address classes in dotted decimal format with their ranges.
IP High Format No of No Host Range Purpose
address Order Network Bits
Class bit(s) Bits

A 0 N.H.H.H 7 24 1.0.0.0 to Few large


126.0.0.0 organizations.

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

B 1,0 N.N.H.H 14 16 128.1.0.0 to Medium-size


191.254.0.0 organizations.

C 1,1,0 N.N.N.H 21 8 192.0.1.0 to Relatively


223.225.254.0 small
organization.

D 1,1,1,0 N/A N/A N/A 224.0.0.0 to Multicast


239.255.255.255 group

E 1,1,1,1 N/A N/A N/A 240.0.0.0 to Future use


254.255.255.255 and Research

A brief description of header fields in order is given below.


1) Version (4 bits): - it defines the version of IP protocol. Such as (IPv4), (Ipv6).
2) HLEN (4 bits): - it is the length of header in 32 bit words.
3) Service Type (8 bits): - it is define various type of service reliability, cost, delay etc.
4) Total Length (16 bits): - it defines the total length of IP datagram. The maximum value can
be 216 =65536 bytes.
5) Checksum (16 bits): - it is needed for error checking.
6) Source Address (32 bits): - it stores the IP address of the source.
7) Destination Address (32 bits): - it stores the IP address of the final destination.
8) Protocol (8 bits): -
9) Option: - this contains optional information such as routing details, timestamp etc.
10) Time to Live (8 bits): - A timer field used to track the lifetime of the datagram. When the
TTL field is decremented down to zero, the datagram is discarded.
11) Identification :- (16-bit number which together with the source address uniquely identifies
this packet - used during reassembly of fragmented datagrams)
12) Flags (3 bits): - this field is used to uniquely identify a datagram. It is useful to know the
fragments belonging to same datagram.
00 01 02
5
IGNOU ASSIGNMENT GURU Page-

R DF MF

o R, reserved (1 bit): - Should be cleared to 0.


o DF, don’t fragment. (1 bit): -Controls the fragmentation of the datagram.
o MF, more fragments.(1 bit): -Indicates if the datagram contains additional
fragments.
13) Fragmentation Offset (13 bits): -Used to direct the reassembly of a fragmented datagram.
14) Data (32 bits): - Hold the data that need to transmit over the network.

Flag & Fragmentation


Size of datagram to split large message
IP Header Length (32-
(header+data) into a series of packet.
bit words)

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

Version HLEN Service Type Total Length


4bits 4bits 4bits 16 bits
Identification (16 bits) Flags (3 bits) Fragment offset (13
bits)
Time to Live Protocol Header Checksum (16 bits)
(8 bits) (8 bits)

Source IP Address (32 bits)

Destination IP Address (32 bits)

Data

Options

Number of network Type of transport protocol to be used Checksum to detect any


hops Corruption of the IP
Address of sending Address of receiving header with in router.
Question 5:- Shortnode.Notes: - node.
(a) FTP (port 21):- File Transfer protocol is used to transfer data from one computer to another
over the internet or through a network.
o FTP user two TCP/IP connections. One connection is used for actual data transfer
and the other is used for control information.

Control Data
Connection Connection FTP Server
FTP Client Internet

6
IGNOU ASSIGNMENT GURU Page-

(b) SFTP (port 22): - a secure protocol that allows file transfers between computers.
(c) TFTP (port 69): - Trivial File Transfer protocol a connectionless, which allow file to transfer
quicker.
(d) SMTP (port 25): - Simple mail transfer protocol is the standard mechanism for electronic
mail in the internet. One of the most important network services is electronical mail
(email).
Electronical mail is used for sending a single message that include text, video or graphics to
one or more recipients.

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

Sender SMTP POP/IMAP


SMTP Internet server at server at
server receiver receiver
Sender computer

Recipient computer

(e) TELNET port (23): - terminal Network is a protocol that allows you to connect to remote
computers (called hosts) over a TCP/IP network (such as the Internet). Using telnet client
software on your computer, you can make a connection to a telnet server (i.e., the remote
host).

User input in client User input and client User input in server
Representation command in NVT Representation

Terminal Telnet Representations. Telnet Host


Operating Client Server Operating
Internet System
System

Host output in client Host output and server Host output in Server
Representation commands in NVT Representation
Representations.

(f) HTTP (port 80): - Hyper Text transfer protocol is the set of rules for transferring files (text,
7
IGNOU ASSIGNMENT GURU Page-

graphical, image, sound, Audio, video etc.) on the World Wide Web. HTTP is called to
stateless protocol because each command is executed independently.

Sample HTTP request and response transaction using various Method (GET, HEAD, POST,
PUT, TRACE, CONNECT, OPTION).
Diagram

Request

Response

Web Server
Web Browser

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

(g) ARP (Address Resolution Protocol): - The address resolution protocol (ARP) is a protocol
used by the Internet Protocol (IP) [RFC826], specifically IPv4, it maps an IP address to
Physical machine address.

IP address

ARP

Physical address

(h) RARP: - Reverse Address Resolution Protocol is a mapping a physical machine address to IP
address. RARP server after seeing the request look up the Ethernet address (MAC address)
in its configuration files and send back the corresponding IP address.
Physical address

RARP

IP address
8
IGNOU ASSIGNMENT GURU Page-

Question 6:- What is Different between POP3 and IMAP?


POP3 IMAP

Post office protocol Internet messaging Access protocol

You can use only one computer to check your You can use multiple computers and devices
email (no other devices) to check your email

Your mails are stored on the computer that Your mails are stored on the server
you use

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

Sent mail is stored locally on your PC, not on Sent mail stays on the server so you can see
a mail server it from any device.

Question 7:- what is different between ICMP and IGMP


ICMP IGMP

Internet control message protocol. Internet group message protocol.

unicast multicast

Generally used for reporting the state of Generally used to control multicast
network. communication.

ICMP protocol operator across layer 3 IGMP operator between the client computer
boundary and could be used between Host and a local multicast router.
to Host, Router to Router and Host to Router.

ICMP sends query and error reporting Single copy send from sender to router and
message. router further creates required number of
packets and send to recipients.

Question 8:- what is Routing algorithms. And what is different between


Distance-Vector and Link-State, Shortest Path First.
Routing algorithms: - The routing algorithm is a formula that is stored in
the router's memory. The purpose of the routing algorithm is to make decisions for the router
concerning the best paths for data.
Distance-Vector Shortest Path First

Distance vector protocols are used in small Link state protocol can be used in larger
networks, and it has a limited number of networks, and it has unlimited number of 9
hops (a hop is one portion of the path hops.
IGNOU ASSIGNMENT GURU Page-

between source and destination).

Distance vector protocol has a high Link state, convergence time is low.
convergence time.

Distance vector protocol advertises only the Link state protocols only advertise the
directly connected routers and full routing updates, and flood the advertisement.
tables.

Distance vector protocol periodically Link state advertises only new changes in a
advertise updates. network.

/IGNOUASSIGNMENTGURU
BCA MCA BA MA BDP B.COM M.COM B.SC
http://www.ignouassignmentguru.com

SET -1
Question 1: - Explain the various components of an URL using an example.
Question 2: - Why does lost acknowledgement not necessarily force the
retransmission of TCP segment?
Question 3: - Explain the Remote login process of TELNET.
Question 4:- Explain the purpose of the following fields of the TCP and IP :
(i) Urgent Pointer
(ii) Window Size
(iii) Sequence Number
(iv) Fragment Offset
Question 5:- What is ARP? How does it differ from RARP and BOOTP? Explain.
Question 6: - In electronic mail, what is MIME? Explain its purpose and
functionality.
Question 7: - How is checksum in TCP header computed? Give an example to
explain it.
Question 8:- Identify the class of the following IP addresses:
(i) 2.200.100.100
(ii) 130.10.120.240
(iii) 196.10.10.2
(iv) 208.10.18.203
Question 9: - The following is a dump of a TCP header in hexadecimal format.
10
05320017 00000001 00000000 500207FF 00000000
IGNOU ASSIGNMENT GURU Page-

a. What is the source port number?


b. What is the destination port number?
c. What is the sequence number?
d. What is the acknowledgment number?
e. What is the length of header?
f. What is the type of segment?
g. What is the window size?
Question 10: -What is subnet? Assume ip address and find out valid Hosts using
class A, B, C.

/IGNOUASSIGNMENTGURU

You might also like