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

Unit 4

The document provides an overview of the OSI and TCP/IP models, detailing their respective layers and functions. It explains the encapsulation process, the roles of each layer from physical to application, and the specific functions of protocols like ARP and RARP. Additionally, it highlights the importance of addressing, routing, and error control in network communication.

Uploaded by

omdhamne1
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)
3 views

Unit 4

The document provides an overview of the OSI and TCP/IP models, detailing their respective layers and functions. It explains the encapsulation process, the roles of each layer from physical to application, and the specific functions of protocols like ARP and RARP. Additionally, it highlights the importance of addressing, routing, and error control in network communication.

Uploaded by

omdhamne1
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/ 22

UNIT 4

NETWORK COMMUNICATION MODEL


OSI Model
OSI model (Open System Interconnection) model was developed by ISO (International standard
organization) which provides way to understand how internetwork operates.
It gives guidelines for creating network standard.
OSI model has 7 layers as shown in the figure.
Application Layer, Presentation Layer ,Session Layer, Transport Layer, Network Layer ,Data link
Layer and Physical Layer

Physical (Layer 1)
The lowest layer of the OSI reference model is the physical layer.
It is responsible for the actual physical connection between the devices.
The physical layer contains information in the form of bits.
It is responsible for transmitting individual bits from one node to the next.
When receiving data, this layer will get the signal received and convert it into 0s and 1s and
send them to the Data Link layer, which will put the frame back together.

Data Link (Layer 2)


At OSI Model, Layer 2, data packets are encoded and decoded into bits.
It handles errors in the physical layer, flow control and frame synchronization.
The data link layer is divided into two sub layers:
 Media Access Control (MAC) layer
 Logical Link Control (LLC) layer.
The MAC sub layer controls how a computer on the network gains access to the data and
permission to transmit it.
The LLC layer controls frame synchronization, flow control and error checking.

Network (Layer 3)
Layer 3 provides switching and routing technologies, creating logical paths, known as virtual
circuits, for transmitting data from node to node.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Routing and forwarding are functions of this layer, as well as addressing, internetworking,
error handling, congestion control and packet sequencing.
Transport (Layer 4)
Layer 4, provides transparent transfer of data between end systems, or hosts, and is responsible
for end-to-end error recovery and flow control.
It ensures complete data transfer from source to destination.

Session (Layer 5)
This layer establishes, manages and terminates connections between applications.
The session layer sets up, coordinates, and terminates conversations.
It deals with session and connection coordination.

Presentation (Layer 6)
This layer provides independence from differences in data representation (e.g., encryption) by
translating from application to network format, and vice versa.
The presentation layer works to transform data into the form that the application layer can
accept.

Application (Layer 7)
OSI Model, Layer 7, supports application and end-user processes.
Everything at this layer is application-specific.
This layer provides application services for file.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Encapsulation Process
Explain Encapsulation.

The process of adding its header and trailer information at each layer of sending computer,
in the form of metadata to the actual payload (data) is called Encapsulation.
At layer 1 the entire package is converted to a form that can be transferred to the receiving machine.
At the receiving machine, the message is unwrapped layer by layer, with each process receiving and
removing the data meant for it.

Step 1:
The Application, Presentation, and Session layer in the OSI model, or the Application layer in
the TCP/IP model takes the user data in the form of data streams, encapsulates it and
forwards the data to the Transport layer.
It does not necessarily add any header or footer to the data.
But it is application-specific and can add the header if needed.

Step 2:
The protocol at the transport layer has its own packet structure, which is known as a protocol
data unit (PDU).
The Transport layer (in the OSI or TCP/IP model) takes the data stream from the upper
layers, and divide it into multiple pieces.
The Transport layer encapsulates the data by adding the appropriate header to each piece.
These data pieces are now called as data segments.
The header contains the sequencing information so that the data segments can be
reassembled at the receiver’s end.

Step 3:
The Network layer (in the OSI model) or the Internet layer (in the TCP/IP model) takes the data
segments from the Transport layer and encapsulate it by adding an additional header to the
data segment.
This data header contains all the routing information for the proper delivery of the data.
Here, the encapsulated data is termed as a data packet or datagram.

Step 4:
The Data-Link layer (in the OSI or TCP/IP model) takes the data packet or datagram from the
Network layer and encapsulate it by adding an additional header and footer to the data packet
or datagram.
The header contains all the switching information for the proper delivery of the data to the
appropriate hardware components, and the trailer contains all the information related to error
detection and control.
Here, the encapsulated data is termed as a data frame.

Step 5:
The Physical layer (in the OSI or TCP/IP model) takes the data frames from the Data-Link layer
and encapsulate it by converting it to appropriate data signals or bits (corresponding to the
physical medium).

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Q) State the functions of any two layers of OSI Model

The functions of the physical layer are :

1. Bit synchronization:
The physical layer provides the synchronization of the bits by providing a clock.
This clock controls both sender and receiver thus providing synchronization at bit level.

2. Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits
sent per second.

3. Physical Topologies: Physical layer specifies the way in which the different devices/nodes are
arranged in a network i.e. bus, star or mesh topology.

4. Transmission mode: Physical layer also defines the way in which the data flows between the
two connected devices. The various transmission modes possible are: Simplex, half-duplex and full-
duplex.

Functions of data link layer:

Framing: Data-link layer takes packets from Network Layer and encapsulates them into
Frames. Then, it sends each frame bit-by-bit on the hardware. At receiver’ end, data link layer
picks up signals from hardware and assembles them into frames.

Addressing: Data-link layer provides layer-2 hardware addressing mechanism.


Hardware address is assumed to be unique on the link. It is encoded into hardware at the time
of manufacturing.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Synchronization: When data frames are sent on the link, both machines must be synchronized in
order to transfer to be taken place.

Error Control: Sometimes signals may have encountered problem in transition and the bits are
flipped. These errors are detected and attempted to recover actual data bits. It also provides
error reporting mechanism to the sender.

Flow Control: Stations on same link may have different speed or capacity. Data-link layer ensures
flow control that enables both machines to exchange data on same speed.

Multi-Access: When host on the shared link tries to transfer the data, it has a high probability of
collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of accessing a
shared media among multiple Systems.

Functions of the Network layer are as follows:

It is responsible for routing packets from the source host to the destination host. The routes can be
based upon static tables that are rarely changed, or they can be automatically updated depending
upon network conditions.

The data link layer assigns the physical address locally.


When the data packets are routed to remote locations, a logical addressing scheme is required to
differentiate between the source system and the destination system. This is provided by the
network layer.

This layer also provides mechanisms for congestion control.

The network layer tackles issues like transmission delays, transmission time, avoidance of
jitters, etc.

Functions of Transport Layer


Service Point Addressing: Transport Layer header includes service point address which is port
address.

Segmentation and Reassembling: A message is divided into segments; each segment contains
sequence number, which enables this layer in reassembling the message. Message is reassembled
correctly upon arrival at the destination.

Connection Control: It includes 2 types:

Connectionless Transport Layer: Each segment is considered as an independent packet and


delivered to the transport layer at the destination machine.
Connection Oriented Transport Layer: Before delivering packets, connection is made with
transport layer at the destination machine.

Flow Control: In this layer, flow control is performed end to end.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Error Control: Error Control is performed end to end in this layer to ensure that the complete
message arrives at the receiving transport layer without any error. Error Correction is done
through retransmission.

The functions of the Session layer are :

1. Session establishment, maintenance and termination: The layer allows the two processes to
establish, use and terminate a connection.
2. Synchronization: This layer allows a process to add checkpoints which are considered as
synchronization points into the data. These synchronization point help to identify the error so
that the data is resynchronized properly, and ends of the messages are not cut prematurely
and data loss is avoided.
3. Dialog Controller: The session layer allows two systems to start communication with each
other in half-duplex or full-duplex.

The functions of the presentation layer are :

1. Translation: For example, ASCII to EBCDIC.

2. Encryption/ Decryption: Data encryption translates the data into another form or code. The
encrypted data is known as the cipher text and the decrypted data is known as plain text. A key
value is used for encrypting as well as decrypting data.

3. Compression: Reduces the number of bits that need to be transmitted on the network.

The functions of the Application layer are :

1. Network Virtual Terminal


2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


TCP/IP Model
TCP/IP Model helps you to determine how a specific computer should be connected to the
internet and how data should be transmitted between them.
It helps you to create a virtual network when multiple computer networks are connected
together. The purpose of TCP/IP model is to allow communication over large distances.

Features
 Support for a flexible architecture. Adding more machines to a network was easy.
 The network is robust, and connections remained intact until the source and destination
machines were functioning. The main idea was to allow one application on one computer to
talk to (send data packets) another application running on different computer.

Different Layers of TCP/IP Reference Model Below:

Fig: TCP/IP reference model

Layer 1: Host-to-network Layer


Lowest layer of the all.
Protocol is used to connect to the host, so that the packets can be sent over it.
This layer corresponds to the combination of Data Link Layer and Physical Layer of the OSI
model.
It looks out for hardware addressing and the protocols present in this layer allows for the
physical transmission of data.
This layer is responsible for the transmission of the data between two devices on the same
network.

Layer 2: Internet layer


It is the second layer of the TCP/IP model and this layer is parallel to the Network Layer of the OSI
Model, in terms of the structure.
It defines the protocols which are responsible for logical transmission of data over the entire
network.
Selection of a packet switching network which is based on a connectionless internetwork layer
is defined in internet layer.
It is the layer which holds the whole architecture together.
Sending the data packets to their destination network is the main function of the Internet layer.
It helps the packet to travel independently to the destination.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Order in which packets are received is different from the way they are sent.

The various functions performed by the Internet Layer are:


 Delivering IP packets
 Performing routing
 Avoiding congestion

There are three different protocols used in this layer. These include:

IP: One of the most important protocols as it detects the IP address of a device which is later used
for internetwork connections. Using this protocol, the path with which the data shall be
transmitted is decided. There are two common IP versions which are used, IPv4 and IPv6.

ARP: It stands for Address Resolution Protocol. The physical address from the IP address can be
determined using ARP.

ICMP: It stands for Internet Control Message Protocol and notification regarding datagram
problems can be sent back to the user using this.

Any issue with the network is immediately notified to the user by ICMP. It can only inform the user
about the errors and cannot rectify the problem

Describe the major functions of network layer in TCP/IP protocol suite

Internetworking: This is the main duty of network layer. It provides the logical connection
between different types of networks.

Addressing: Addressing is necessary to identify each device on the internet uniquely. This is
similar to telephone system. The address used in the network layer should uniquely and
universally define the connection of a computer.

Routing: In a network, there are multiple routes available from a source to a destination and one of
them is to be chosen. The network layer decides the route to be taken. This is called as routing.

Packetizing: The network layer encapsulates the packets received from upper layer protocol and
makes new packets. This is called as packetizing. It is done by a network layer protocol called IP
(Internetworking Protocol).

Layer 3: Transport Layer


1. It decides if data transmission should be on parallel path or single path.
2. Functions such as multiplexing, segmenting or splitting on the data is done by transport layer.
3. The applications can read and write to the transport layer.
4. Transport layer adds header information to the data.
5. Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
6. Transport layer also arrange the packets to be sent, in sequence

There are two main protocols present in this layer:

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


TCP: Another integral part, the Transmission Control Protocol is a reliable communication
protocol. It manage the flow of data, i.e. the sequence and segmentation of the data

UDP: It is a connection-free protocol which makes it cost-effective but less reliable.

Layer 4: Application Layer


The top three layers of the OSI Model: Application, Presentation and Sessions, when combined
together, they perform similar functions as the Application Layer of the TCP/IP model
Node-to-node communication based on the user-interface occurs here.
Protocols present in this layer:
HTTP: Hypertext Transfer Protocol is used to manage the communication between the server
and web browsers.
NTP: Network Time Protocol can set one standard time source in our computer, which enables
sync between the server and the user
TELNET: Telecommunication Network is used to have access to files present of the Telnet
network and manage them on internet
FTP (File Transfer Protocol) is protocol that allows File transfer amongst computer users
connected over a network. It is reliable, simple and efficient.
SMTP (Simple Mail Transport Protocol) is a protocol, which is used to transport electronic mail
between a source and destination, directed via a route.
DNS (Domain Name Server) resolves an IP address into a textual address for Hosts connected
over a network.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


ARP (Address Resolution Protocol)

ARP stands for Address Resolution Protocol. ARP converts an Internet Protocol address to its
physical network address (MAC). It operates at layer 2 of the TCP/IP model.

Functions:
 Local host maintains the ARP Table. ARP maps the Internet Protocol address (IP) to a
physical machine address.
 It provides the interface between the IP addressing system used by IP and the Hardware
addresses used by the data link layer protocol.
 ARP broadcasts an IP address in an effort to discover its equivalent hardware address.

1. When a source device want to communicate with another device, source device checks its Address
Resolution Protocol (ARP) cache to find it already has a MAC Address entry of the destination
device. If entry is in the cache table, it will use that MAC Address and will not issue ARP request.
2. If ARP entry is not seen in the cache, the source will generate an Address Resolution Protocol
(ARP) request message.
3. The source broadcast the Address Resolution Protocol (ARP) request frame on the LAN.
4. The message is received by each device on the LAN since it is a broadcast. Each device
compares the Target Protocol Address with its own Protocol Address (IPv4 Address). Those
who do not match will drop the packet.
5. When the targeted device checks the Target Protocol Address, it will find a match and will
generate an Address Resolution Protocol (ARP) reply frame. The destination device will
update its Address Resolution Protocol (ARP) cache, since it need to contact the sending device.
6. Destination device sends the Address Resolution Protocol (ARP) reply frame which will be
unicast.
7. The source device will process the Address Resolution Protocol (ARP) reply from destination,
store the Sender Hardware Address as the layer 2 address of the destination.
8. The source device will update its Address Resolution Protocol (ARP) cache with the Sender
Hardware Address and Sender Protocol Address from the Address Resolution Protocol
(ARP) reply frame.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


RARP (Reverse Address Resolution Protocol):
RARP is an abbreviation for Reverse Address Resolution Protocol. RARP is a TCP/IP protocol that is
responsible for the translation of Physical Address (e.g. – Ethernet address) to be translated into
an IP address.
This is used to obtain the IP address of a host based on its physical address.
This performs the job exactly opposite to that of ARP (Address Resolution Protocol)

Steps to Achieve the IP Address from RARP Server:


Below is the step by step procedure how RARP is responsible for the transaction of achieving the IP
address from RARP server –

1. Source Device “Generates RARP Request Message” – The source device generates a RARP
Request message. The Source puts its own data link-layer address (Hardware Address) as
both the Sender Hardware Address and also the Target Hardware Address. It leaves both
the Sender Protocol Address (IP) and the Target Protocol Address (IP) blank.
2. Source Device “Broadcasts RARP Request Message” – The source broadcasts the RARP
Request message on the local network.
3. Local Devices “Process RARP Request Message” – The message is received by each device
on the local network and processed. Devices that are not configured to act as RARP servers
ignore the message.
4. RARP Server Generates RARP Reply Message: Any device on the network that is a RARP
server responds to the broadcast from the source device. It generates a RARP Reply and sets
the Sender Hardware Address and Sender Protocol Address to its own hardware and IP
address of course. It then sets the Target Hardware Address to the hardware address of the
original source device. It looks up in a table the hardware address of the source, determines
that device’s IP address assignment, and puts it into the Target Protocol Address field.
5. RARP Server Sends RARP Reply Message: The RARP server sends the RARP Reply message
unicast to the device looking to be configured.
6. Source Device Processes RARP Reply Message: The source device processes the reply from
the RARP server. It then configures itself using the IP address in the Target Protocol Address
supplied by the RARP server.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


DHCP (Dynamic Host Configuration Protocol) is a client-server protocol that uses DHCP servers
and DHCP clients.
A DHCP server is a machine that runs a service that can lease out IP addresses and other TCP/IP
information to any client that requests them.
The DHCP server typically has a pool of IP addresses that it is allowed to distribute to clients,
and these clients lease an IP address from the pool for a specific period of time, usually several
days.
Once the lease is ready to expire, the client contacts the server to arrange for renewal.
DHCP clients are client machines that run special DHCP client software enabling them to
communicate with DHCP server.

DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and various DHCP options
from DHCP servers in a four-step process:

DHCP DISCOVER: When we start a device, it checks whether a valid IP configuration is available or
not. If the valid IP configuration is not available, the device generates a special message known as
the DHCPDISCOVER message and broadcasts this message on the local LAN segment.

DHCPOFFER:
If multiple DHCP servers are available, based on their configuration, one of them or all of them can
reply to the DHCPDISCOVER message. In reply to the DHCPDISCOVER message, a DHCP server sends
a DHCPOFFER message to the client.
Since the client does not have an IP address, the DHCP server cannot send the DHCPOFFER message
directly to the client. Because of this, the server also broadcasts the DHCPOFFER message to the
local network.

DHCPREQUEST: All hosts in the local network receive the DHCPOFFER message. The host that sent
the DHCPDISCOVER message accepts the DHCPOFFER message. Except the original host, all other
hosts ignore the DHCPOFFER.
If a host receives multiple DHCPOFFER messages, it accepts only one message and tells the
corresponding server with a DHCPREQUEST message that it wants to use the offered IP
configuration.

DHCPACK: DHCP acknowledgment


When the DHCP server receives a DHCPREQUEST message from the client, the configuration process
enters its final stage. In this stage, the server sends a DHCPACK message to the client. The DHCPACK
message is an acknowledgment to the client indicating that the DHCP server has received the
DHCPREQUEST message of the client, and the client can use the offered IP configuration.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


The Internet Control Message Protocol (ICMP):
 ICMP is a error reporting protocol.
 This protocol is responsible for providing diagnostic functions and reporting errors due to the
unsuccessful delivery of IP packets.
 It is used by network devices, like routers, to send error messages indicating, for example, that
a requested service is not available or that a host or router could not be reached.
 ICMP can also be used to relay query messages.
 ICMP enables the detection and reporting of problems in the Internet.

Addressing Mechanism in the Internet


An IP address is an address used in order to uniquely identify a device on an IP network.
The address is made up of 32 binary bits, which can be divisible into a network portion and
host portion with the help of a subnet mask.
The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to
decimal and separated by a period (dot).
For this reason, an IP address is said to be expressed in dotted decimal format (for example,
172.16.81.100).
The value in each octet ranges from 0 to 255 decimal, or 00000000 − 11111111 binary.

IPV4
IPv4 addresses are unique.
 They are unique in the sense that each address defines one, and only one, connection to the
Internet.
 Two devices on the Internet can never have the same address at the same time.

Address Space:
 IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more
than 4 billion).
 This means that, theoretically, if there were no restrictions, more than 4 billion devices could be
connected to the Internet.

Notations
There are two prevalent notations to show an IPv4 address: Binary notation and Dotted decimal
notation.

1. Binary Notation:
 In binary notation, the IPv4 address is displayed as 32 bits.
 Each octet is often referred to as a byte.
 So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-byte address.
 The following is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010

Dotted-Decimal Notation:
 To make the IPv4 address more compact and easier to read, Internet addresses are usually
written in decimal form with a decimal point (dot) separating the bytes.
 Each byte is identified by a decimal number in the range [0..255].
 The following is the dotted decimal notation of the above address: 117.149.29.2

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


IP Address classes
 IPv4 addressing, use the concept of classes.
 This architecture is called classful addressing.
 In classful addressing, the address space is divided into five classes: A, B, C, D, and E.
 Each class occupies some part of the address space.
 We can find the class of an address when given the address in binary notation or dotted-
decimal notation.
 If the address is given in binary notation, the first few bits can immediately tell us the class of
the address.

Describe types of IP address classes. 4 M


Class A range for first byte is 0-127. Class A type of IP addresses have First byte consisting of
Network address with first bit as 0 and the next 3 bytes with host id.
Hence, number of hosts are more when compared to number of networks.
The default subnet masks for class A networks is 255.0.0.0.
There are 128 possible Class A networks.
However, any address that begins with 127. is considered a loopback address.
Host Ranges from:-

0.0.0.0 to 127.255.255.255
Example
2.134.213.2

Class B: Class B range for first byte is 128-191.


This type has first two bytes specifying network ID with starting two bits as 10 and last two bytes
referring to host ID.
The default subnet masks for class B is 255.255.0.0.
Host Ranges from
128.0.0.0 to 191.255.255.255

Example

135.58.24.17

Class C: Class C range for first byte is 192-223.


This class has first three bytes referring to network with starting bits as 110 and last byte
signifies Host ID. Here, number of networks is more when compared to number of hosts in each
network.
The default subnet masks for class C is 255.255.255.0
Host Ranges from
192.0.0.0 to 223.255.255.255.
Example
192.168.178.1

Class D: Class D range for first byte is 224-239 Class D is used for multicasting and its starting bits
are 1110

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Class E: Class E range for first byte is 240-255 .Class E is reserved for future use and its starting bits
are 1111

Class A

0000 0000 (0) 0000 0000 (0) 0000 0000 (0) 0000 0000 (0)
0111 1111 (127) 1111 1111 (255) 1111 1111 (255) 1111 1111 (255)

Class B

1000 0000 (128) 0000 0000 (0) 0000 0000 (0) 0000 0000 (0)
1011 1111 (191) 1111 1111 (255) 1111 1111 (255) 1111 1111 (255)

Class C

1100 0000 (192) 0000 0000 (0) 0000 0000 (0) 0000 0000 (0)
1101 1111 (223) 1111 1111 (255) 1111 1111 (255) 1111 1111 (255)

Class D

1110 0000 (224) 0000 0000 (0) 0000 0000 (0) 0000 0000 (0)
1110 1111 (239) 1111 1111 (255) 1111 1111 (255) 1111 1111 (255)

Class E

1111 0000 (240) 0000 0000 (0) 0000 0000 (0) 0000 0000 (0)
1111 1111 (255) 1111 1111 (255) 1111 1111 (255) 1111 1111 (255)

List classes of IP addressing with their IP address range.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


An IP address is an address used to uniquely identify a device on an IP network.

IPV4 vs IPV6

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


IPv4 header: The IP datagram contains header and data. The header consists of around 20 to
60bytes consists of information about routing and delivery. The header is like an envelope i.e., it
contains information about the data. The structure of the standard format is as shown below.

The various fields are as described below:


1. Version: This field identifies the version of IP, which contains a value 4, which indicates IP
version 4. It may contain 6 for IPv6
2. Header length (HLEN): This indicates the size of the header in a multiple of 4 byte words.
When the header size is 20 bytes, HLEN = 5, and HLEN = 15 when maximum size (60 bytes).
3. Service Type (Type of Service): This field is used to define service parameters such as the
priority of the datagram and the level of reliability desired.

4. Total Length: This field contains the total length of the IP datagram. IP datagram cannot be
more than 65,536 since this filed size is 2 bytes or 16 (216 = 65,536).
5. Identification: This field is used in the situations when a datagram is fragmented. The sub
datagram are sequenced using identification field so that later it can be used to reconstruct the
original datagram.
6. Flags: This field corresponds to identification field. It indicates whether a datagram can be
fragmented and if fragmented, the position of the fragment (first, last or middle).
7. Fragmentation Offset: If a datagram is fragmented, this field indicates the offset of the data in
the original datagram before segmentation. This is used while reconstructing.
8. Time to Live (TTL): This filed is initialized by some value and decremented each time it passes
through routers. If the value becomes zero or negative, the data is not forwarded. Thus it decides the
lifetime of the data.
9. Protocol: This field identifies the transport protocol running on top of IP. The upper layer
software piece can be TCP or UDP. This field specifies which piece of software at the destination
node the datagram should be passed on to.
10. Source address: This field contains the 32 bit IP address of the sender.
11. Destination address: This field contains the 32 bit IP address of the final destination.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Explain configuration of TCP/IP protocol in network.
Before beginning this procedure, make sure that the following prerequisites are true:
1. Network hardware is installed and cabled.
2. TCP/IP software is installed.

To configure your TCP/IP network, use the following steps:


1. Read TCP/IP protocols for the basic organization of TCP/IP.
You should understand:
o the layered nature of TCP/IP (that is, different protocols reside at different layers)
o how data flows through the layers
2. Minimally configure each host machine on the network.
This means adding a network adapter, assigning an IP address, and assigning a host name to
each host, as well as defining a default route to your network.
3. Configure and start the inetd daemon on each host machine on the network.
4. Configure each host machine to perform either local name resolution or to use a name server.
If you are setting up a hierarchical Domain Name network, configure at least one host to function
as a name server.
5. If your network will communicate with any remote networks, configure at least one host to
function as a gateway. The gateway can use static routes or a routing daemon to perform
internetwork routing.
6. Decide which services each host machine on the network will use.
By default, all services are available.
7. Decide which hosts on the network will be servers, and which services a particular server will
provide.
8. Configure any remote print servers you will need.
9. Optional: If desired, configure a host to use or to serve as the master time server for the network

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


What is the MAC protocol used in TOKEN ring LAN’s? What happens if the token is lost? 6M
Token ring local area network (LAN) network is a communication protocol for local area
networks.
It uses special three-byte frame called a “token” that travels around a logical ring of
workstations or servers.
This token passing is a channel access method providing fair access for all stations, and
eliminating the collision of contention-based access methods.

The IEEE 802.5 Token ring technology provides for data transfer rates of either 4 or 16 Mbps.

It works in the following manner:

1. Empty information frames are continuously circulated on the ring.


2. When a computer has a message to send, it inserts a token in an empty frame
(simply changing a 0 to a 1 in the token bit part of the frame) and a message and a destination
identifier in the frame.
3. The frame is the examined by each successive workstation. If workstation sees that it is the
destination of the message, it copies the message from the frame and changes the token back
to 0.
4. When the frame gets back to originator, it sees that message has been copied and received.

If one device does not receive a token within a specified period, it can issue an alarm. The alarm
alerts the network administrator the problem and its location.
Then, network administrator generates a new , free token

OR

There are two error conditions that could cause the token ring to break down.
 One is the lost token in which case there is no token in the ring.
 Other is the busy token that circulates endlessly.
To overcome these problems, the IEEE 802 standard specifies that one of the stations must be
designated as “active monitor”. The monitor detects the lost condition using a timer by time-
out mechanism and recovers by using a new free token

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Default Mask or Network Mask
A default mask in Classful Addressing defined as is a 32-bit number obtained by setting host bits to
all 0s and setting network bits to all 1s.
In this way, the subnet mask separates the IP address into the network and host addresses.
Class A, B, and C networks have natural masks, or default subnet masks:

 Class A: 255.0.0.0
 Class B: 255.255.0.0
 Class C: 255.255.255.0

Sub netting

 Subnetting is a technique of partitioning an individual physical network into several small-


sized logical sub-networks. These subnetworks are known as subnets.
 An IP address is made up of the combination of the network segment and a host segment.
A subnet is constructed by accepting the bits from the IP address host portion which are then
used to assign a number of small-sized sub-networks in the original network.
 The Subnetting basically converts the host bits into the network bits.

Supernetting
Supernetting is inverse process of subnetting, in which several networks are merged into a single
network.
While performing supernetting, the mask bits are moved toward the left of the default mask.
The supernetting is also known as router summarization and aggregation.
It results in the creation of more host addresses at the expense of network addresses, where
basically the network bits are converted into host bits.
The supernetting is performed by internet service provider rather than the normal users, to
achieve the most efficient IP address allocation.

Finding The Subnet Address:


We use binary notation for both the address and the mask and then apply the AND operation to find
the subnet address.
Example: What is the subnetwork address if the destination address is 200.45.34.56 and the subnet
mask is 255.255.240.0?
Solution :
Step 1: Convert given IP and Subnet mask to Binary

Step 2: Perform AND Operation on these two.

11001000 00101101 00100010 00111000 Binary 200.45.34.56


11111111 11111111 11110000 00000000 Subnet Mask 255.255.240.0
11001000 00101101 00100000 00000000

The subnetwork address is 200.45.32.0.

Step 3: Convert the result of AND operation to Dotted Decimal format which is Subnet mask.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Example 2: (VIMP)
A company is granted the site address 201.70.64.0 (class C). The company needs six subnets.
Design the subnets.
Solution:
 The number of 1s in the default mask is 24 (class C).
 The company needs six subnets.
 This number 6 is not a power of 2.
 The next number that is a power of 2 is 8 (23).
 We need 3 more 1’s in the subnet mask.
 The total number of 1’s in the subnet mask is 27 (24 + 3).
 The total number of 0’s is 5 (32 - 27).
 The mask is

11111111 11111111 11111111 11100000


or
255.255.255.224
 The number of subnets is 8.
 The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.

Example 3:
A company is granted the site address 181.56.0.0 (class B). The company needs 1000 subnets.
Design the subnets.
Solution:
 The number of 1s in the default mask is 16 (class B).
 The company needs 1000 subnets.
 This number is not a power of 2.
 The next number that is a power of 2 is 1024 (210).
 We need 10 more 1’s in the subnet mask.
 The total number of 1’s in the subnet mask is 26 (16 + 10).
 The total number of 0’s is 6 (32 - 26).

The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192 8
 The number of subnets is 1024.
 The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)


Q] Your company has the network id 165.130.0.0. You are responsible for creating subnets
on the network, and each subnet must provide at least 1000 host ids. What subnet mask
meets the requirement for the minimum number of host ids and provides the highest
number of subnets?

The given network id 165.130.0.0 is class B (Range of class B is 128.0.0.0 to 191.255.255.255)


Default mask of Class B: 255.255.0.0
The number of 1s in the default mask is 16 (class B).

Find Number of Host Bits :-


Formula for finding hosts is 2n -2 where n is no of host bits.
The company needs 1000 hosts.
This number is not a power of 2.
The next number that is a power of 2 is 1024 (210).
We need 10 0’s in the Host
Hence total no of Hosts we get is 210-2 = 1022

Find Number of Subnets:-

No of Subnets is 2n where n is number of bits borrowed from host.


From host id (16 bits ), we have used 10 bits for hosts and borrowed remaining 6 bits for subnet.
Hence no of Subnets = 26 -2=62

Find Subnet Mask :-

11111111 . 11111111 . 11111100 . 00000000


255 . 255 . 252 . 0

Subnet mask 255.255.252.0


In Classless Inter-Domain Routing (CIDR) fornmat :- 165.130.0.0/22

Data Communication and Comp. Networks Arrow Computer Academy (8788335443)

You might also like