Unit-1 NP MN
Unit-1 NP MN
Simply we can say that how computers are organized and how tasks are
allocated to the computer.
o Peer-To-Peer network
o Client/Server network
Peer-To-Peer network
o Peer-To-Peer network is a network in which all the computers are
linked together with equal privilege and responsibilities for
processing the data.
o Peer-To-Peer network is useful for small environments, usually up
to 10 computers.
o Peer-To-Peer network has no dedicated server.
o Special permissions are assigned to each computer for sharing the
resources, but this can lead to a problem if the computer with the
resource is down.
AD
Client/Server Network
o Client/Server network is a network model designed for the end
users called clients, to access the resources such as songs, video,
etc. from a central computer known as Server.
o The central controller is known as a server while all other
computers in the network are called clients.
o A server performs all the major operations such as security and
network management.
o A server is responsible for managing all the resources such as files,
directories, printer, etc.
o All the clients communicate with each other through a server. For
example, if client1 wants to send some data to client 2, then it first
sends the request to the server for the permission. The server
sends the response to the client 1 to initiate its communication
with the client 2.
OSI Model
OSI stands for Open Systems Interconnection. It has been developed by ISO –
‘International Organization for Standardization‘, in the year 1984. It is a 7-
layer architecture with each layer having specific functionality to perform. All
these 7 layers work collaboratively to transmit the data from one person to
another across the globe.
Note: 1. Hub, Repeater, Modem, and Cables are Physical Layer devices.
2. Network Layer, Data Link Layer, and Physical Layer are also known
as Lower Layers or Hardware Layers.
Function of DLL
Note: 1. Packet in the Data Link layer is referred to as Frame.
2. Data Link layer is handled by the NIC (Network Interface Card) and
device drivers of host machines.
At the sender’s side: The transport layer receives the formatted data from the
upper layers, performs Segmentation, and also implements Flow & Error
control to ensure proper data transmission. It also adds Source and Destination
port numbers in its header and forwards the segmented data to the Network
Layer.
Note: The sender needs to know the port number associated with the receiver’s
application.
At the receiver’s side: Transport Layer reads the port number from its header
and forwards the Data which it has received to the respective application. It also
performs sequencing and reassembling of the segmented data.
1. Connection-Oriented Service
2. Connectionless Service
Connection Establishment
Data Transfer
Termination/disconnection
OSI model acts as a reference model and is not implemented on the Internet
because of its late invention. The current model being used is the TCP/IP
model.
Unix-to-unix copy program (UUCP):
UUCP is the generic name used to describe a set of programs that
can be used to copy files between different systems and to execute
commands on other systems. Today, there are two major flavors
of UUCP in use, the version distributes with 4.3BSD, which is
derived from the Version 7 software, and a version known as
Honey DanBer UUCP.
UUCP is the collection of programs. The main uucp commands
are:
uucp:
This program can be invoked by users to copy a file from one system
to another.Use the term uucp to refer to this specific program, and the
term uucp to refer to the collection of programs, uucp is patterned
after the Unix cp command, which copies one or more files.
uux:
which sends a unix command to another system , where it is queue for
execution.
uucico:
uucico, which runs on a UNIX system as the program that carries out
the copying and initiates execution of the commands that have been
sent. Typically, this program is run at various times of day;
meanwhile, the copy (uucp) and command (uux) requests are queued
until the uucico program is run.
uuxqt:
Executes files that were generated by uux. Normally uuxqt is invoked
by uux or it is spawned by uucico to process execution files that have
been received from another system.
The 't protocol assumes that the communication channel is error-
free and no checksums are used. This protocol is typically used with
TCP links.
Xerox Network System is the network architecture developed by Xerox Corporation. XNS is
an open system, in that Xerox has published and made available the protocols used by XNS.
The XNS protocols were designed to be used across a variety of communication media,
processors, and office applications.
Because of its availability and early entry into the market, XNS was adopted by
most of the early LAN companies, including Novell Inc. Each of these
companies has since made various changes to the XNS protocols.
Although the XNS design objectives are the same as that of the OSI reference
model, the XNS concept of a protocol hierarchy is somewhat different from
that provided by the OSI reference model.
Xerox provided a five-level model of packet communications:
1. Level 0 corresponds to OSI Layers 1 and 2, handling link access and bit-
stream manipulation.
2. Level 1 corresponds to the portion of OSI Layer 3 that pertains to network
traffic.
3. Level 2 corresponds to the portion of OSI Layer 3 that pertains to
internetwork routing, and to OSI Layer 4, which handles inter process
communication.
4. Levels 3 and 4 correspond to the upper layers of the OSI model, handling
data structuring, process-to-process interaction, and applications. XNS has no
protocol corresponding to OSI Layer 5.
The arrangement of the layers and the XNS protocol suite, and their
approximatio mapping into the OSI model can be shown as:
1. ECHO (Echo Protocol):
A simple protocol that causes a host to echo the packe that it receives. Most
XNS implementations support this protocol.
2. RIP (Routing Information Protocol):
A protocol that is used to maintain th routing database for use on a host in the
forwarding of IDP packets to anothe host. Typically a routing process exists on
the host, and this process uses RTF maintain the database.
3.PEX (Packet Exchange Protocol):
An unreliable, connectionless, datagram protocol for user processes. Although,
PEX is not a reliable protocol, it does retransmission but does not perform
duplicate detection.
4. SPP (Sequenced Packet Protocol):
Connection-oriented, reliable protocol, for user processes. It provides a byte
stream for the user process with optional message boundaries. SPP is the most
commonly used protocol, in the XNS suite, similar to the TCP in the Internet
suite.
5. ERROR (Error Protocol):
A protocol that can be used by any process to report that it has discovered an
error and therefore discarded a packet.
6. IDP (Internet Datagram Protocol):
IDP is the connectionless, unreliable datagram protocol that provides the
packet delivery service for all the above protocols.
XNS Address:
An XNS address occupies 12 bytes and is comprised of three parts: 1. A 16-bit
port number: The XNS literature calls the 16-bit port number a socket. To
avoid confusion with the term socket, we call this XNS field a port.
TCP/IP model
The TCP/IP model was developed prior to the OSI model.
The TCP/IP model is not exactly similar to the OSI model.
The TCP/IP model consists of five layers: the application layer, transport layer,
network layer, data link layer and physical layer.
The first four layers provide physical standards, network interface, internetworking,
and transport functions that correspond to the first four layers of the OSI model and
these four layers are represented in TCP/IP model by a single layer called the
application layer.
TCP/IP is a hierarchical protocol made up of interactive modules, and each of them
provides specific functionality.
Host-to- Network Layer −It is the lowest layer that is concerned with the physical
transmission of data. TCP/IP does not specifically define any protocol here but supports all
the standard protocols.
Internet Layer −It defines the protocols for logical transmission of data over the network.
The main protocol in this layer is Internet Protocol (IP) and it is supported by the protocols
ICMP, IGMP, RARP, and ARP.
Transport Layer − It is responsible for error-free end-to-end delivery of data. The protocols
defined here are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
Application Layer − This is the topmost layer and defines the interface of host programs with
the transport layer services. This layer includes all high-level protocols like Telnet, DNS,
HTTP, FTP, SMTP, etc.
The following diagram shows the layers and the protocols in each of the layers −
Internet Protocol Version 4-
IPv4 short for Internet Protocol Version 4 is the fourth version of the Internet
Protocol (IP).
IP is responsible to deliver data packets from the source host to the destination
host.
This delivery is solely based on the IP Addresses in the packet headers.
IPv4 is the first major version of IP.
IPv4 is a connectionless protocol for use on packet-switched networks.
IPv4 Header-
The following diagram represents the IPv4 header-
1. Version-
Version is a 4 bit field that indicates the IP version used.
The most popularly used IP versions are version-4 (IPv4) and version-6 (IPv6).
Only IPv4 uses the above header.
So, this field always contains the decimal value 4.
2. Header Length-
Header length is a 4 bit field that contains the length of the IP header.
It helps in knowing from where the actual data begins.
Minimum And Maximum Header Length-
4. Total Length-
Total length is a 16 bit field that contains the total length of the datagram (in
bytes).
Minimum total length of datagram = 20 bytes (20 bytes header + 0 bytes data)
Maximum total length of datagram = Maximum value of 16 bit word = 65535
bytes
5. Identification-
When an IP datagram is fragmented,
Each fragmented datagram is assigned the same identification number.
This number is useful during the re assembly of fragmented datagrams.
It helps to identify to which IP datagram, the fragmented datagram belongs to.
6. DF Bit-
DF bit stands for Do Not Fragment bit.
Its value may be 0 or 1.
When DF bit is set to 0,
It grants the permission to the intermediate devices to fragment the datagram if
required.
When DF bit is set to 1,
It indicates the intermediate devices not to fragment the IP datagram at any cost.
If network requires the datagram to be fragmented to travel further but settings
does not allow its fragmentation, then it is discarded.
An error message is sent to the sender saying that the datagram has been
discarded due to its settings.
7. MF Bit-
MF bit stands for More Fragments bit.
Its value may be 0 or 1.
When MF bit is set to 0,
It indicates to the receiver that the current datagram is either the last fragment in
the set or that it is the only fragment.
When MF bit is set to 1,
It indicates to the receiver that the current datagram is a fragment of some larger
datagram.
More fragments are following.
MF bit is set to 1 on all the fragments except the last one.
8. Fragment Offset-
Fragment Offset is a 13 bit field.
It indicates the position of a fragmented datagram in the original unfragmented IP
datagram.
The first fragmented datagram has a fragment offset of zero.
9. Time To Live-
Time to live (TTL) is a 8 bit field.
It indicates the maximum number of hops a datagram can take to reach the
destination.
The main purpose of TTL is to prevent the IP datagrams from looping around
forever in a routing loop.
The value of TTL is decremented by 1 when-
Datagram takes a hop to any intermediate device having network layer.
Datagram takes a hop to the destination.
If the value of TTL becomes zero before reaching the destination, then datagram is
discarded.
10. Protocol-
Protocol is a 8 bit field.
It tells the network layer at the destination host to which protocol the IP datagram
belongs to.
In other words, it tells the next level protocol to the network layer at the
destination side.
Protocol number of ICMP is 1, IGMP is 2, TCP is 6 and UDP is 17.
11. Header Checksum-
Header checksum is a 16 bit field.
It contains the checksum value of the entire header.
The checksum value is used for error checking of the header.
14. Options-
Options is a field whose size vary from 0 bytes to 40 bytes.
This field is used for several purposes such as-
1. Record route
2. Source routing
3. Padding
IPv6 - Headers
The wonder of IPv6 lies in its header. An IPv6 address is 4 times larger than IPv4, but
surprisingly, the header of an IPv6 address is only 2 times larger than that of IPv4. IPv6
headers have one Fixed Header and zero or more Optional (Extension) Headers. All the
necessary information that is essential for a router is kept in the Fixed Header. The Extension
Header contains optional information that helps routers to understand how to handle a
packet/flow.
[Image: IPv6 Fixed Header]
IPv6 fixed header is 40 bytes long and contains the following information.
IP Address Format
IP address is a short form of "Internet Protocol Address." It is a unique number provided to
every device connected to the internet network, such as Android phone, laptop, Mac, etc. An
IP address is represented in an integer number separated by a dot (.), for example,
192.167.12.46.
Types of IP Address
An IP address is categorized into two different types based on the number of IP address it
contains. These are:
What is IPv4?
IPv4 is version 4 of IP. It is a current version and the most commonly used IP address. It is a
32-bit address written in four numbers separated by a dot (.), i.e., periods. This address is
unique for each device. For example, 66.94.29.13
What is IPv6?
IPv4 produces 4 billion addresses, and the developers think that these addresses are enough,
but they were wrong. IPv6 is the next generation of IP addresses. The main difference
between IPv4 and IPv6 is the address size of IP addresses. The IPv4 is a 32-bit address,
whereas IPv6 is a 128-bit hexadecimal address. IPv6 provides a large address space, and it
contains a simple header as compared to IPv4.
To know more about the difference between IPv4 and IPv6, look at our article ipv4 vs. ipv6.
IP Address Format
Originally IP addresses were divided into five different categories called classes. These
divided IP classes are class A, class B, class C, class D, and class E. Out of these, classes A,
B, and C are most important. Each address class defines a different number of bits for its
network prefix (network address) and host number (host address). The starting address
bits decide from which class an address belongs.
Network Address: The network address specifies the unique number which is assigned to
your network. In the above figure, the network address takes two bytes of IP address.
Host Address: A host address is a specific address number assigned to each host machine.
With the help of the host address, each machine is identified in your network. The network
address will be the same for each host in a network, but they must vary in host address.
Address Format IPv4
The address format of IPv4 is represented into 4-octets (32-bit), which is divided into three
different classes, namely class A, class B, and class C.
The above diagram shows the address format of IPv4. An IPv4 is a 32-bit decimal address. It
contains four octets or fields separated by 'dot,' and each field is 8-bit in size. The number
that each field contains should be in the range of 0-255.
Class A
Class A address uses only first higher order octet (byte) to identify the network prefix, and
remaining three octets (bytes) are used to define the individual host addresses. The class A
address ranges between 0.0.0.0 to 127.255.255.255. The first bit of the first octet is always set
to 0 (zero), and next 7 bits determine network address, and the remaining 24 bits determine
host address. So the first octet ranges from 0 to 127 (00000000 to 01111111).
Class B
Class B addresses use the initial two octets (two bytes) to identify the network prefix, and the
remaining two octets (two bytes) define host addresses. The class B addresses are range
between 128.0.0.0 to 191.255.255.255. The first two bits of the first higher octet is always set
to 10 (one and zero bit), and next 14 bits determines the network address and remaining 16
bits determines the host address. So the first octet ranges from 128 to 191 (10000000 to
10111111).
Class C
Class C addresses use the first three octets (three bytes) to identify the network prefix, and
the remaining last octet (one byte) defines the host address. The class C address ranges
between 192.0.0.0 to 223.255.255.255. The first three bit of the first octet is always set to
110, and next 21 bits specify network address and remaining 8 bits specify the host address.
Its first octet ranges from 192 to 223 (11000000 to 11011111).
Class D
Class D IP address is reserved for multicast addresses. Its first four bits of the first octet are
always set to 1110, and the remaining bits determine the host address in any IP address. The
first higher octet bits are always set to 1110, and the remaining bits specify the host address.
The class D address ranges between 224.0.0.0 to 239.255.255.255. In multicasting, data is not
assigned to any particular host machine, so it is not require to find the host address from the
IP address, and also, there is no subnet mask present in class D.
Class E
Class E IP address is reserved for experimental purposes and future use. It does not contain
any subnet mask in it. The first higher octet bits are always set to 1111, and next remaining
bits specify the host address. Class E address ranges between 240.0.0.0 to 255.255.255.255.
All IPv6 addresses are 128-bit hexadecimal addresses, written in 8 separate sections having
each of them have 16 bits. As the IPv6 addresses are represented in a hexadecimal format,
their sections range from 0 to FFFF. Each section is separated by colons (:). It also allows to
removes the starting zeros (0) of each 16-bit section. If two or more consecutive sections 16-
bit contains all zeros (0 : 0), they can be compressed using double colons (::).
IPv6 addresses are consist of 8 different sections, each section has a 16-bit hexadecimal
values separated by colon (:). IPv6 addresses are represented as following format:
Each "xxxx" group contains a 16-bit hexadecimal value, and each "x" is a 4-bit hexadecimal
value. For example:
You can also remove the starting zeros (0) of each 16-bit section. For example, the above
IPv6 can be rewritten by omitting starting zeros (0) as follow:
You can also compress the consecutive sections 16-bit zeros (0 : 0) using double colons (::).
But keep in mind that you can do it only once per IP address.
It allows communicating with people all over the world without bothering them. In 1971, a test
email sent Ray Tomlinson to himself containing text.
Ipv4 Ipv6
Classes IPv4 has 5 different classes of IP address IPv6 does not contain classes of IP
that includes Class A, Class B, Class C, addresses.
Class D, and Class E.
Number of IP IPv4 has a limited number of IP IPv6 has a large number of IP
address addresses. addresses.
VLSM It supports VLSM (Virtual Length Subnet It does not support VLSM.
Mask). Here, VLSM means that Ipv4
converts IP addresses into a subnet of
different sizes.
Address space It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.
Security features In IPv4, security depends on the In IPv6, IPSEC is developed for
application. This IP address is not security purposes.
developed in keeping the security
feature in mind.
Packet flow It does not provide any mechanism for It uses flow label field in the
identification packet flow identification. header for the packet flow
identification.
Checksum field The checksum field is available in IPv4. The checksum field is not available
in IPv6.