0% found this document useful (0 votes)
80 views31 pages

Unit-1 NP MN

The document discusses computer network architecture and the OSI model. It provides details on peer-to-peer and client-server network architectures, describing their advantages and disadvantages. It also describes the seven layers of the OSI model, focusing on the physical layer, data link layer, network layer, and transport layer. Key functions of each layer are defined.
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)
80 views31 pages

Unit-1 NP MN

The document discusses computer network architecture and the OSI model. It provides details on peer-to-peer and client-server network architectures, describing their advantages and disadvantages. It also describes the seven layers of the OSI model, focusing on the physical layer, data link layer, network layer, and transport layer. Key functions of each layer are defined.
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/ 31

UNIT-1

Networking & TCP/IP: Communication protocols, Network


architecture, UUCP, XNS, IPX/SPX for LANs, TCP & IP headers,
IPv4 & v6 address structures,
Programming Applications: Time & date routines, Internet
protocols: Application layer, Transport layer, Network layer,
Datalink layer protocols, Chat, Email, Web server working
method & programming.

Computer Network Architecture


Network architecture is the logical and structural layout of a network. 

Computer Network Architecture is defined as the physical and logical


design of the software, hardware, protocols, and media of the
transmission of data.

Simply we can say that how computers are organized and how tasks are
allocated to the computer.

The two types of network architectures are used:

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

Advantages Of Peer-To-Peer Network:


o It is less costly as it does not contain any dedicated server.
o If one computer stops working but, other computers will not stop
working.
o It is easy to set up and maintain as each computer manages itself.

Disadvantages Of Peer-To-Peer Network:


o In the case of Peer-To-Peer network, it does not contain the
centralized system . Therefore, it cannot back up the data as the
data is different in different locations.
o It has a security issue as the device is managed itself.

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.

Advantages Of Client/Server network:


o A Client/Server network contains the centralized system. Therefore
we can back up the data easily.
o A Client/Server network has a dedicated server that improves the
overall performance of the whole system.
o Security is better in Client/Server network as a single server
administers the shared resources.
o It also increases the speed of the sharing resources.

Disadvantages Of Client/Server network:


o Client/Server network is expensive as it requires the server with
large memory.
o A server has a Network Operating System(NOS) to provide the
resources to the clients, but the cost of NOS is very high.
o It requires a dedicated network administrator to manage all the
resources.

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.
 

Layers of OSI Model


1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

Layer 1- Physical Layer


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 Bits in the Physical Layer

The Functions of the Physical Layer


 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 the bit level.
 Bit rate control: The Physical layer also defines the transmission rate i.e.
the number of bits sent per second.
 Physical topologies: Physical layer specifies how the different,
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
 Transmission mode: Physical layer also defines how the data flows
between the two connected devices. The various transmission modes
possible are Simplex, half-duplex and full-duplex.

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.

Layer 2- Data Link Layer (DLL)


The data link layer is responsible for the node-to-node delivery of the message.
The main function of this layer is to make sure data transfer is error-free from
one node to another, over the physical layer. When a packet arrives in a
network, it is the responsibility of the DLL to transmit it to the Host using its
MAC address. 
The Data Link Layer is divided into two sublayers:  

1. Logical Link Control (LLC)


2. Media Access Control (MAC)
The packet received from the Network layer is further divided into frames
depending on the frame size of the NIC(Network Interface Card). DLL also
encapsulates Sender and Receiver’s MAC address in the header. 

The Receiver’s MAC address is obtained by placing an ARP(Address


Resolution Protocol) request onto the wire asking “Who has that IP address?”
and the destination host will reply with its MAC address.  

The Functions of the Data Link Layer


 Framing: Framing is a function of the data link layer. It provides a way
for a sender to transmit a set of bits that are meaningful to the receiver.
This can be accomplished by attaching special bit patterns to the
beginning and end of the frame.
 Physical addressing: After creating frames, the Data link layer adds
physical addresses (MAC addresses) of the sender and/or receiver in the
header of each frame.
 Error control: The data link layer provides the mechanism of error
control in which it detects and retransmits damaged or lost frames.
 Flow Control: The data rate must be constant on both sides else the
data may get corrupted thus, flow control coordinates the amount of
data that can be sent before receiving an acknowledgment.
 Access control: When a single communication channel is shared by
multiple devices, the MAC sub-layer of the data link layer helps to
determine which device has control over the channel at a given time.

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. 

           3. Switch & Bridge are Data Link Layer devices.

Layer 3- Network Layer


The network layer works for the transmission of data from one host to the other
located in different networks. It also takes care of packet routing i.e. selection of
the shortest path to transmit the packet, from the number of routes available.
The sender & receiver’s IP addresses are placed in the header by the network
layer. 

The Functions of the Network Layer 


 Routing: The network layer protocols determine which route is suitable
from source to destination. This function of the network layer is known
as routing.
 Logical Addressing: To identify each device on Internetwork uniquely,
the network layer defines an addressing scheme. The sender &
receiver’s IP addresses are placed in the header by the network layer.
Such an address distinguishes each device uniquely and universally.

Note: 1. Segment in the Network layer is referred to as Packet. 

          2. Network layer is implemented by networking devices such as routers.  

Layer 4- Transport Layer


The transport layer provides services to the application layer and takes services
from the network layer. The data in the transport layer is referred to as
Segments. It is responsible for the End to End Delivery of the complete
message. The transport layer also provides the acknowledgment of the
successful data transmission and re-transmits the data if an error is found.

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. 

Generally, this destination port number is configured, either by default or


manually. For example, when a web application requests a web server, it
typically uses port number 80, because this is the default port assigned to web
applications. Many applications have default ports assigned. 

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. 

The Functions of the Transport Layer 


 Segmentation and Reassembly: This layer accepts the message from the
(session) layer, and breaks the message into smaller units. Each of the
segments produced has a header associated with it. The transport layer
at the destination station reassembles the message.
 Service Point Addressing: To deliver the message to the correct process,
the transport layer header includes a type of address called service point
address or port address. Thus by specifying this address, the transport
layer makes sure that the message is delivered to the correct process.

Services Provided by Transport Layer 

1. Connection-Oriented Service
2. Connectionless Service

1. Connection-Oriented Service: It is a three-phase process that includes

 Connection Establishment
 Data Transfer
 Termination/disconnection

In this type of transmission, the receiving device sends an acknowledgment,


back to the source after a packet or group of packets is received. This type of
transmission is reliable and secure.

2. Connectionless service: It is a one-phase process and includes Data


Transfer. In this type of transmission, the receiver does not acknowledge receipt
of a packet. This approach allows for much faster communication between
devices. Connection-oriented service is more reliable than connectionless
Service.
Note: 1. Data in the Transport Layer is called Segments. 

         2. Transport layer is operated by the Operating System. It is a part of the


OS and communicates with the Application Layer by making system calls. 
           3. The transport layer is called as Heart of the OSI model. 

Layer 5- Session Layer


This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.

The Functions of the Session Layer


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

Note: 1. All the below 3 layers(including Session Layer) are integrated as a


single layer in the TCP/IP model as the “Application Layer”. 

           2. Implementation of these 3 layers is done by the network application


itself. These are also known as Upper Layers or Software Layers. 

Layer 6- Presentation Layer


The presentation layer is also called the Translation layer. The data from the
application layer is extracted here and manipulated as per the required format to
transmit over the network. 

The Functions of the Presentation Layer are 


 Translation: For example, ASCII to EBCDIC.
 Encryption/ Decryption: Data encryption translates the data into
another form or code. The encrypted data is known as the ciphertext
and the decrypted data is known as plain text. A key value is used for
encrypting as well as decrypting data.
 Compression: Reduces the number of bits that need to be transmitted
on the network.

Layer 7- Application Layer


At the very top of the OSI Reference Model stack of layers, we find the
Application layer which is implemented by the network applications. These
applications produce the data, which has to be transferred over the network.
This layer also serves as a window for the application services to access the
network and for displaying the received information to the user. 

Example: Application – Browsers, Skype Messenger, etc. 

Note: The application Layer is also called Desktop Layer.  

The Functions of the Application Layer are

 Network Virtual Terminal


 FTAM- File transfer access and management
 Mail Services
 Directory Services

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 (CNS):

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.

2. A 48-bit Most ID:


The host ID is an absolute number that must be unique across all XNS
internets. Typically the 48-bit host ID is set to the 48-bit Ethernet address, as
most Xerox internets are built using internets.

3. A 32-bit network ID:


Like the host ID, the network ID must also be unique across all XNS internets.
Both host Ids and Network Ids are assigned by Xerox Corp. to guarantee their
uniqueness.

Internetwork packet exchange/sequence packet exchange (IPX/SPX):


IPX and SPX are derived from Xerox Network Services IDP and SPP protocols,
respectively. IPX is at network layer protocol, while SPX is a transport layer
protocol. The SPX layer sits on top of the IPX layer and provides connection-
oriented services between two nodes on the network. SPX is used primarily by
client/server applications.
Networking & TCP/IP
IPX and SPX both provide connection services similar to TCP/IP, with the IPX
protocol having similarities to IP, and SPX having similarities to TCP. IPX/SPX
was primarily designed for local area networks (LANS), and is a very efficient
protocol for this purpose. TCP/IP has, however, become the de facto standard
protocol. This is in part due to its superior performance over wide area
networks and the Internet, and also because TCP/IP is a more mature protocol,
designed specifically with this purpose in mind.
Novell adapted IPX from the Xerox Network System (XNS) Internet Datagram
Protocol (IDP). IPX is a connectionless datagram protocol. Connectionless
means that when a process running on a particular node uses IPX to
communicate with a process on another node, no connection between the two
nodes is established. Thus, IPX packets are addressed and sent to their
destinations, but' there is no guarantee or verification of successful delivery.
Any packet acknowledgment or connection control is provided by protocols
above IPX, such as SPX. Datagram means that each packet is treated as an
individual entity, having no logical or sequential relation to any other packet.

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.

The four layers in the TCP/IP protocol suite are −

 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-

The length of IP header always lies in the range-


[20 bytes , 60 bytes]
3. Type Of Service-
 Type of service is a 8 bit field that is used for Quality of Service (QoS).
 The datagram is marked for giving a certain treatment using this field.

4. Total Length-
 Total length is a 16 bit field that contains the total length of the datagram (in
bytes).

Total length = Header length + Payload length

 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.
 

Fragment offset for a given fragmented datagram


= Number of data bytes ahead of it in the original unfragmented datagram

Concept Of Scaling Factor-


 We use a scaling factor of 8 for the fragment offset.
 Fragment offset field value = Fragment Offset / 8

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.

12. Source IP Address-


 Source IP Address is a 32 bit field.
 It contains the logical address of the sender of the datagram.

13. Destination IP Address-


 Destination IP Address is a 32 bit field.
 It contains the logical address of the receiver of the datagram. 

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.

S.N. Field & Description


1 Version (4-bits): It represents the version of Internet Protocol, i.e. 0110.
Traffic Class (8-bits): These 8 bits are divided into two parts. The most significant 6
bits are used for Type of Service to let the Router Known what services should be
2
provided to this packet. The least significant 2 bits are used for Explicit Congestion
Notification (ECN).
Flow Label (20-bits): This label is used to maintain the sequential flow of the packets
belonging to a communication. The source labels the sequence to help the router
3
identify that a particular packet belongs to a specific flow of information. This field
helps avoid re-ordering of data packets. It is designed for streaming/real-time media.
Payload Length (16-bits): This field is used to tell the routers how much information a
particular packet contains in its payload. Payload is composed of Extension Headers
4 and Upper Layer data. With 16 bits, up to 65535 bytes can be indicated; but if the
Extension Headers contain Hop-by-Hop Extension Header, then the payload may
exceed 65535 bytes and this field is set to 0.
Next Header (8-bits): This field is used to indicate either the type of Extension Header,
5 or if the Extension Header is not present then it indicates the Upper Layer PDU. The
values for the type of Upper Layer PDU are same as IPv4’s.
Hop Limit (8-bits): This field is used to stop packet to loop in the network infinitely.
6 This is same as TTL in IPv4. The value of Hop Limit field is decremented by 1 as it
passes a link (router/hop). When the field reaches 0 the packet is discarded.
7 Source Address (128-bits): This field indicates the address of originator of the packet.
Destination Address (128-bits): This field provides the address of intended recipient of
8
the packet.

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:

 IPv4 (Internet Protocol version 4)


 IPv6 (Internet Protocol version 6)

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.

IP Address Format IPv6

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:

xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx

Each "xxxx" group contains a 16-bit hexadecimal value, and each "x" is a 4-bit hexadecimal
value. For example:

FDEC : BA98 : 0000 : 0000 : 0600 : BDFF : 0004 : FFFF

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:

FDEC : BA98 : 0 : 0 : 600 : BDFF : 4 : FFFF

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.

FDEC : BA98 : : 600 : BDFF : 4 : FFFF


What is an Email?
Email stands for Electronic Mail. It is a method to sends messages from one computer to another
computer through the internet.

It is mostly used in business, education, technical communication, document interactions.

It allows communicating with people all over the world without bothering them. In 1971, a test
email sent Ray Tomlinson to himself containing text. 

Email messages include three components, which are as follows:

 Message envelope: It depicts the email's electronic format.


 Message header: It contains email subject line and sender/recipient information.
 Message body: It comprises images, text, and other file attachments.

Differences between IPv4 and IPv6

Ipv4 Ipv6

Address length IPv4 is a 32-bit address. IPv6 is a 128-bit address.

Fields IPv4 is a numeric address that consists of IPv6 is an alphanumeric address


4 fields which are separated by dot (.). that consists of 8 fields, which are
separated by colon.

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 It supports manual and DHCP It supports manual, DHCP, auto-


configuration configuration. configuration, and renumbering.

Address space It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.

End-to-end In IPv4, end-to-end connection integrity In the case of IPv6, end-to-end


connection is unachievable. connection integrity is achievable.
integrity

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.

Address In IPv4, the IP address is represented in In IPv6, the representation of the IP


representation decimal. address in hexadecimal.

Fragmentation Fragmentation is done by the senders Fragmentation is done by the


and the forwarding routers. senders only.

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.

Transmission IPv4 is broadcasting. On the other hand, IPv6 is


scheme multicasting, which provides
efficient network operations.
Encryption and It does not provide encryption and It provides encryption and
Authentication authentication. authentication.

Number of octets It consists of 4 octets. It consists of 8 fields, and each


field contains 2 octets. Therefore,
the total number of octets in IPv6
is 16.

You might also like