0% found this document useful (0 votes)
5 views15 pages

Advance Computer Network Unit-II Notes

The document provides an overview of TCP/IP protocol, focusing on IP addressing, types of IP addresses (IPv4, IPv6, public, private, static, dynamic), and their classifications. It explains the function of IP addresses in network communication, data routing, and the importance of subnetting for efficient network management. Additionally, it distinguishes between physical (MAC) and logical (IP) addresses, highlighting their roles, advantages, and disadvantages.

Uploaded by

aryansalve794
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)
5 views15 pages

Advance Computer Network Unit-II Notes

The document provides an overview of TCP/IP protocol, focusing on IP addressing, types of IP addresses (IPv4, IPv6, public, private, static, dynamic), and their classifications. It explains the function of IP addresses in network communication, data routing, and the importance of subnetting for efficient network management. Additionally, it distinguishes between physical (MAC) and logical (IP) addresses, highlighting their roles, advantages, and disadvantages.

Uploaded by

aryansalve794
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

Unit-2 TCP/IP Protocol Overview

2.1 Over of IP Addressing-Architecture


What is an IP Address?
An IP address, or Internet Protocol address, is a unique string of numbers
assigned to each device connected to a computer network that uses the Internet
Protocol for communication. It serves as an identifier that allows devices to send
and receive data over the network, ensuring that this data reaches the correct
destination.
 Types of IP Address-
IP addresses can be classified in several ways based on their structure, purpose,
and the type of network they are used in. Here’s a breakdown of the different
classifications of IP addresses:
1. Based on Addressing Scheme (IPv4 vs. IPv6)
IPv4:
This is the most common form of IP Address. It consists of four sets of numbers
separated by dots. For example, [Link]. Each set of numbers can range
from 0 to 255. This format can support over 4 billion unique addresses. Here’s
how the structure is broken down:
 Four Octets: Each octet represents eight bits, or a byte, and can take a value
from 0 to 255. This range is derived from the possible combinations of eight
bits (2^8 = 256 combinations).
 Example of IPv4 Address: [Link]
o 192 is the first octet
o 168 is the second octet
o 1 is the third octet
o 1 is the fourth octet
Each part of the IP address can indicate various aspects of the network
configuration, from the network itself to the specific device within that network.
In most cases, the network part of the address is represented by the first one to
three octets, while the remaining section identifies the host (device).
IPv6:
IPv6 addresses were created to deal with the shortage of IPv4 addresses. They use
128 bits instead of 32, offering a vastly greater number of possible addresses.
These addresses are expressed as eight groups of four hexadecimal digits, each
group representing 16 bits. The groups are separated by colons.
 Example of IPv6 Address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
o Each group (like 2001, 0db8, 85a3, etc.) represents a 16-bit block of
the address.
o
2. Based on Usage (Public vs. Private)
 Public IP Addresses -
A Public IP address is assigned to every device that directly accesses the internet.
This address is unique across the entire internet. Here are the key characteristics
and uses of public IP addresses:
 Uniqueness: Each public IP address is globally unique. No two devices on the
internet can have the same public IP address at the same time.
 Accessibility: Devices with a public IP address can be accessed directly from
anywhere on the internet, assuming no firewall or security settings block the
access.
 Assigned by ISPs: Public IP addresses are assigned by Internet Service
Providers (ISPs). When you connect to the internet through an ISP, your
device or router receives a public IP address.
 Types: Public IP addresses can be static (permanently assigned to a device) or
dynamic (temporarily assigned and can change over time).

 Private IP Addresses-
Private IP addresses are used within private networks (such as home networks,
office networks, etc.) and are not routable on the internet. This means that devices
with private IP addresses cannot directly communicate with devices on the
internet without a translating mechanism like a router performing Network
Address Translation (NAT). Key features include:
 Not globally unique: Private IP addresses are only required to be unique
within their own network. Different private networks can use the same range
of IP addresses without conflict.
 Local communication: These addresses are used for communication between
devices within the same network. They cannot be used to communicate
directly with devices on the internet.
 Defined ranges: The Internet Assigned Numbers Authority (IANA) has
reserved specific IP address ranges for private use:
o IPv4: [Link] to [Link], [Link] to [Link],
[Link] to [Link]
o IPv6: Addresses starting with FD or FC
3. Based on Assignment Method (Static vs. Dynamic)
 Static IP Addresses:
 These are permanently assigned to a device, typically important for servers or
devices that need a constant address.
 Reliable for network services that require regular access such as websites,
remote management.
 Dynamic IP Addresses:
 Temporarily assigned from a pool of available addresses by the Dynamic Host
Configuration Protocol (DHCP).
 Cost-effective and efficient for providers, perfect for consumer devices that do
not require permanent addresses.

How Do IP Addresses Work?


1. Unique Identification -
Every device connected to a network, such as computers, smartphones, and
servers, is assigned an IP address. This address is used to identify the device on
the network, similar to how a home address identifies a specific location.
2. Communication Protocol -
The Internet Protocol (IP), part of the broader suite of internet protocols, uses
these addresses to facilitate the routing of data packets between devices. Each
piece of data sent over a network is broken into smaller units called packets. Each
packet includes both the sender’s and the recipient’s IP addresses.
3. Data Routing -
When a device sends information to another device over the internet:
 The data is divided into packets.
 Each packet contains the IP address of the device it is destined for.
 Routers within the network read the destination IP address on each packet and
determine the best path for the packet to travel. Routers communicate with
each other to update and maintain records of the fastest, most efficient routes
for data.

4. Local Area Networks (LAN) and Wide Area Networks (WAN) -


 LAN: On local networks, IP addresses can be assigned manually by an
administrator (static IP) or automatically by a DHCP server. Devices within
the same network communicate directly using their local IP addresses.
 WAN: For devices on different networks, the data must travel through
multiple routers across the internet. Each router makes independent decisions
about the best route for the packets based on the destination IP address.

5. Network Address Translation (NAT) –


Most devices on a home or small business network share a single public IP
address when accessing the internet, even though each device has its own private
IP address within the local network. NAT is a process where multiple local IP
addresses are mapped to a single public IP address. This conserves IP addresses
and adds a layer of security by hiding internal IP addresses from the external
network.

2.2 Class of Address –


IP addresses are also classified into different classes based on their range and
intended use:

 Class A ([Link] to [Link]):


 Used for very large networks (like multinational companies).
 Supports up to 16 million hosts per network.
 Example: [Link] (Private IP in this class).
 Class B ([Link] to [Link]):
 Used for medium-sized networks, such as large organizations.
 Supports up to 65,000 hosts per network.
 Example: [Link] (Private IP in this class).
 Class C ([Link] to [Link]):
 Used for smaller networks, like small businesses or home networks.
 Supports up to 254 hosts per network.
 Example: [Link] (Private IP in this class).
 Class D ([Link] to [Link]):
 Reserved for multicast groups (used to send data to multiple devices
at once).
 Not used for traditional devices or networks.
 Class E ([Link] to [Link]):
 Reserved for experimental purposes and future use.

Class A
An IP address is assigned to those networks that include large number of hosts.
 The network ID consists of 8 bits.
 The host ID consists of 24 bits.
In Class A, the network ID is determined by the remaining 7 bits, while the first
bit in higher order bits of the first octet is always set to 0.
There are a total of 27 networks in Class A, which equals 128 network addresses.
224 – 2 = 16,777,214 host addresses make up the entire number of hosts in Class
A.

Class B
An IP address is assigned to networks range from small sized to large sized.
Class B networks are those that range in size from small to large networks and
are given an IP address.
 There are 16 bits in the Network ID.
 There are 16 bits in the host ID.
In Class B, the network ID is determined by the remaining 14 bits, with the
higher order bits of the first octet always set to 10. The Host ID is found in the
remaining 16 bits.
There are 214 networks in Class B, which equates to 16384 network addresses.
Class C
An IP address is assigned to networks that are small sized.
 There are 24 bits in the Network ID.
 The host ID consists of 8 bits.
In Class C, the network ID is determined by the final 21 bits, with the higher
order bits of the first octet always set to 110. The host in a network is identified
by its eight bits, or host ID.
There are 221 networks in all, which equals 2097152 network addresses.
There are a total of 28 – 2 = 254 host addresses.

Class D
IP address are reserved for multicast address and does not possess
subnetting. Multicast addresses are assigned a reserved IP address in Class D. It is
a empty part of subnetting. In every network, the host ID is determined by the
remaining bits, with the higher order bits of the first octet always set to 1110.

Class E
An IP address is used for the future use and for the research and development
purposes and does not possess any subnetting. An IP address is utilized in Class E
for research and development or future use. There is no subnetting on it. In every
network, the host ID is determined by the remaining bits, with the higher order
bits of the first octet always set to 1111.
An IP address is divided into two parts:
1. Net ID : represents the number of networks.
2. Host ID : represents the number of hosts.

 Need For Classful Addressing –

 Classful addressing provided a straightforward method to allocate and manage


IP addresses based on fixed classes, simplifying the administrative burden
associated with IP address distribution.
 Network equipment of the time, such as routers, could be more easily
programmed to handle a limited number of fixed classes, speeding up the
routing process because the class of an address could be quickly identified
from its first few bits.
 While it did have limitations, classful addressing allowed for scaling of
networks within the bounds of each class size. Larger networks could use a
Class A or B address, and smaller networks could operate efficiently within a
Class C subnet.
 By standardizing address ranges, classful addressing facilitated the
implementation of uniform network protocols, which was important for the
interoperability of network devices across different networks and platforms.
 Classful addressing was a cost-effective solution that supported the early
expansion of the Internet by avoiding the need for complex subnetting
schemes that require additional computing resources and more sophisticated
network management tools.
What is a Physical Address?
The physical address is also known as the MAC (Media Access Control) address
or link address. It is the address of a node which is defined by its LAN or WAN.
It is used by the data link layer and is the lowest level of addresses. MAC address
is the unique address of a device. The size of a physical address is 48 bits (6
bytes). Below is the format for representing a physical address:
XX : XX : XX : YY : YY : YY, where 1 octant = 8 bits.
Example:
16 : 1A : BB : 6F : 90 : E5
The first 24 bits of a MAC address XX: XX: XX is decided by OUI
(Organizationally Unique Identifier). It represents the identity of the
manufacturer. The next 24 bits of a MAC address YY: YY: YY represents the
unique identity of the device. It is assigned by the manufacturer. They
represent NIC (Network Interface Card).
Below is a diagram representing the working mechanism of a physical address.

Advantages-
 Physical address can uniquely identify devices and deliver data packets
accurately.
 We can restrict access to any network by allowing only those devices which
have the authorized MAC addresses to connect. Thus, it can also be used for
network security.
Disadvantages-
 MAC addresses can be easily spoofed. Thus, the devices can easily gain
unauthorized access to a network.
 As physical addresses cannot traverse through the routers therefore they can
only be used in local networks and not between different networks.
What is a Logical Address?
Logical address also referred to as IP (Internet Protocol) address is an universal
addressing system. It is used in the Network layer. This address facilitates
universal communication that are not dependent on the underlying physical
networks. There are two types of IP addresses - IPv4 and IPv6.
The size of IPv4 is 32 bits. For example,
192 : 180 : 210 where, 1 octant = 8 bits.
The size of IPv6 is 128 bits. For example,
1C18 : 1B32 : C450 : 62A5 : 34DC : AE24 : 15BC : 6A5D where , 1 octant = 16
bits.
Below is a diagram representing the working mechanism of Logical address?
In the above diagram, we can see that there are two networks - Network 1 and
Network 2. A1 is the sender and there are two receivers - D1 and D2. In case of
logical address, receiver D1 as well as D2 receives the data. This is because
logical address can be passed in different networks. The purpose of using logical
address is to send the data across networks.
Advantages-
 Logical address can be used in different networks because they can traverse
through routers.
 They can handle a number devices and networks. Even if the number of
devices and network increases, the logical address is able to handle all them
very easily. Thus, they are highly scalable.
Disadvantages-
 Internet Protocol is vulnerable to attacks such as hacking, phishing etc. and
there can be data loss.
 It lacks privacy. The data which is moving through the packets can be
intercepted, traced and monitored by unauthorized entities.
Differences between Physical Address and Logical Address
Physical Address Logical Address

Physical Address is the address of Logical address also referred to as IP


a node which is defined by its (Internet Protocol) address is an universal
LAN or WAN addressing system

Physical Address is computed bu


Logical Address is generated by CPU.
MMU.

Found on Data Link Layer. Found on Network Layer.

Format is 48-bit address in Format is IPv4: 32-bit


hexadecimal. IPv6: 128-bit

Physical address is not visible to


Logical address is visible to users.
users.

2.4 Introduction to Subnetting -


A subnet is like a smaller group within a large network. It is a way to split a large
network into smaller networks so that devices present in one network can
transmit data more easily. For example, in a company, different departments can
each have their own subnet, keeping their data traffic separate from others.
Subnet makes the network faster and easier to manage and also improves the
security of the network.

Why Subnetting is Important?


Let’s consider a company that follows classful addressing, it has a Class C
network ([Link]/24) with 256 IP addresses. It has three departments:
 Sales: 20 devices
 HR: 10 devices
 IT: 50 devices
Without subnetting, all departments share the same network, and all 256 IP
addresses are available to everyone, which leads to:
 IP Waste: Only 80 devices are needed (20 + 10 + 50), but all 256 addresses
are allocated, wasting 176 addresses.
 Performance Issues: Since all departments are on the same network, any data
sent between devices floods the entire network, slowing communication for
everyone. For example, heavy data transfer in IT can impact Sales and HR.
 Security Risks: Without subnets, anyone in Sales can access HR or IT devices,
exposing sensitive data like payroll systems.
With Subnetting, we split the network into three subnets, allocating just enough
IP addresses for each department:
 Sales: [Link]/27 → 32 IPs (for 20 devices, 12 spare)
 HR: [Link]/28 → 16 IPs (for 10 devices, 6 spare)
 IT: [Link]/26 → 64 IPs (for 50 devices, 14 spare)

By subnetting, we:
 Save IP addresses (Efficiency): Only 112 addresses are used (80 + some
spare), leaving 144 unused for future growth.
 Keep networks faster (Better Performance): Data within each department stays
in its subnet. For example, HR traffic stays in HR, reducing network
congestion for Sales and IT.
 Protect sensitive data (Improved Security): Each department is isolated. If
someone in Sales tries to access HR systems, subnet restrictions block them.

How Subnetting Works?


The working of subnets starts in such a way that firstly it divides the subnets into
smaller subnets. For communicating between subnets, routers are used. Each
subnet allows its linked devices to communicate with each other. Subnetting for a
network should be done in such a way that it does not affect the network bits.
In class C the first 3 octets are network bits so it remains as it is.
 For Subnet-1: The first bit which is chosen from the host id part is zero and
the range will be from (193.1.2.00000000 till you get all 1’s in the host ID part
i.e, 193.1.2.01111111) except for the first bit which is chosen zero for subnet
id part.
Thus, the range of subnet 1 is: [Link] to [Link]
Subnet id of Subnet-1 is : [Link]
The direct Broadcast id of Subnet-1 is: [Link]
The total number of hosts possible is: 126 (Out of 128, 2 id's are used for Subnet
id & Direct Broadcast id)
The subnet mask of Subnet- 1 is: [Link]
 For Subnet-2: The first bit chosen from the host id part is one and the range
will be from (193.1.2.100000000 till you get all 1’s in the host ID part i.e,
193.1.2.11111111).
Thus, the range of subnet-2 is: [Link] to [Link]
Subnet id of Subnet-2 is : [Link]
The direct Broadcast id of Subnet-2 is: [Link]
The total number of hosts possible is: 126 (Out of 128, 2 id's are used for Subnet
id & Direct Broadcast id)
The subnet mask of Subnet- 2 is: [Link]
The best way to find out the subnet mask of a subnet is to set the fixed bit of host-
id to 1 and the rest to 0.

 Advantages of Subnetting -
 It provides security to one network from another network. For example: In an
Organization, the code of the Developer department must not be accessed by
another department.
 It may be possible that a particular subnet might need higher network priority
than others. For example, a Sales department needs to host webcasts or video
conferences.
 In the case of Small networks, maintenance is easy.

 Disadvantages of Subnetting -
 In the case of a single network, only three steps are required to reach a Process
i.e Source Host to Destination Network, Destination Network to Destination
Host, and then Destination Host to Process.
 In the case of a Single Network only two IP addresses are wasted to represent
Network Id and Broadcast address but in the case of Subnetting two IP
addresses are wasted for each Subnet.
 The cost of the overall Network also increases. Subnetting requires
internal routers, Switches, Hubs, Bridges, etc. which are very costly.

 Introduction of Variable Length Subnet Mask (VLSM) -


Variable Length Subnet Mask (VLSM) is a technique used in IP network design
to create subnets with different subnet masks. VLSM allows network
administrators to allocate IP addresses more efficiently and effectively, by using
smaller subnet masks for subnets with fewer hosts and larger subnet masks for
subnets with more hosts.
In a traditional subnetting scheme, a fixed subnet mask is applied to all subnets in
the network, which can lead to inefficient use of IP addresses. For example, if a
network has two subnets, one with 10 hosts and another with 50 hosts, a
traditional subnet mask of [Link] would be used for both subnets, which
means that each subnet would have 254 available IP addresses. This would result
in wasted IP addresses for the smaller subnet.
VLSM allows network administrators to create subnets with different subnet
masks to more effectively utilize IP addresses. Using the example above, VLSM
could be used to assign a subnet mask of [Link] to the smaller subnet
with 10 hosts, which would provide 126 available IP addresses, and a subnet
mask of [Link] to the larger subnet with 50 hosts, which would provide
62 available IP addresses.
VLSM is widely used in modern networks to create subnets of different sizes and
to optimize the use of IP addresses.
VLSM stands for Variable Length Subnet Mask where the subnet design uses
more than one mask in the same network which means more than one mask is
used for different subnets of a single class A, B, C or a network. It is used to
increase the usability of subnets as they can be of variable size. It is also defined
as the process of subnetting of a subnet. Procedure of implementing VLSM – In
VLSM, subnets use block size based on requirement so subnetting is required
multiple times. Suppose there is an administrator that has four departments to
manage. These are sales and purchase department with 120 computers,
development department with 50 computers, accounts department with 26
computers and management department with 5 computers. If the administrator
has IP [Link]/24, department wise IPs can be allocated by following these
steps:
1. For each segment select the block size that is greater than or equal to the
actual requirement which is the sum of host addresses, broadcast addresses
and network addresses. Make a list of subnets possible:

1. table – possible subnets list


2. Arrange all the segments in descending order based on the block size that is
from highest to lowest requirement.
Sales and Purchase: 120
Development: 50
Accounts: 26
Management: 5

You might also like