0% found this document useful (0 votes)
25 views40 pages

Unit-3, BCS603, Computer Network

The document provides detailed notes on the Network Layer of the OSI model, focusing on its functions such as routing and logical addressing (IP). It explains the differences between IPv4 and IPv6, subnetting, and supernetting, as well as various protocols like ARP, RARP, DHCP, and DNS. Additionally, it covers the structure of IP addresses and the process of DHCP address allocation.

Uploaded by

dss745147
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)
25 views40 pages

Unit-3, BCS603, Computer Network

The document provides detailed notes on the Network Layer of the OSI model, focusing on its functions such as routing and logical addressing (IP). It explains the differences between IPv4 and IPv6, subnetting, and supernetting, as well as various protocols like ARP, RARP, DHCP, and DNS. Additionally, it covers the structure of IP addresses and the process of DHCP address allocation.

Uploaded by

dss745147
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/ 40

Notes by Professor Tanya Shrivastava

UNIT – 3, Computer Network, BCS-603


 Network Layer (Layer 3):
 The lowest layer or third layer of the OSI reference model is Network Layer.
 Data link layer contains frames, when that data moves from data link layer to network layer that
frames converted into packet.
 Router, IP and Routing is done in this layer.
 Host-to-host Communication.
 Fragmentation – Divide the data into parts.
 Network layer is a hardware layer because it contains Router that performs routing.
 Contains packets.
 Contains IP.
The functions of the Network layer are:
1. Routing: The network layer protocols determine which route is suitable from source to destination.
This function of the network layer is known as routing. Routing can be done by using router.

2. Logical Addressing (IP): In order 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.

 Point-to-Point Networks

 A point-to-point network (P2P) establishes a direct, dedicated link between two devices.
 Point-to-point connections can utilize various technologies like cables, fiber optics, or even wireless
links.
 Two endpoints can be computers, switches, routers or servers etc.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 Logical Addressing (IP – Internet Protocol)


 Logical Addressing (IP): In order to identify each device on internetwork uniquely.
 A logical address is an address that is generated by the CPU during program execution. The logical
address is a virtual address as it does not exist physically, and therefore, it is also known as
a Virtual Address.
 Logical address is also known as IP address.
 Logical addressing is of 2 types – Classful addressing (IPv4) and Classless addressing (IPv6).
 An IP address is also known as a logical address and it can change over time as well as from
one network to another.
 An IP address is a unique address that identifies a device on the internet or a local network. IP
stands for "Internet Protocol," which is the set of rules to send data via the internet or local network.
 There are four types of IP addresses: public, private, static, and dynamic. And 2 versions of IP
address are IPv4 (Internet Protocol version 4) & IPv6 (Internet Protocol version 6).

Classful & Classless Addressing


 In classful routing, address is divided into three parts which are: Network, Subnet and Host. While
in classless routing, address is divided into two parts which are: Subnet and Host.
 IPv4 is a classful address, IPv6 is a classless addressing.
 Classful address is divided into 5 classes A, B, C, D, E. Classless address contains no classes.
 Classful address do not use hello message, Classless address use hello message to check the status
of neighbour router.
 Classful address consumes more network bandwidth; Classless address consumes less network
bandwidth.
 Classful address is less practical and useful, Classless address is more practical and useful.
 Example of Classful address is RIP; Example of Classless address is OSPF.

Difference Between IPv4 & IPv6 (Imp)

IPv4 (Classful Address) IPv6 (Classless Address)


1. IPv4 is a classful address. IPv6 is a classless address.
2. It contains A, B, C, D, E classes. No classes.
A  1 – 126 (0 and 127 reserved for itself &
loopback)
B  128 – 191
C  192 – 223
D  224 – 239 (reserved for scientific purpose)
E  240 - 255 (reserved for scientist)
3. Limited no. of computers is connected. Unlimited no. of computers can connect.
4. Use to create small networks. Use to create very large networks.
5. 32-bit ip address 128-bit ip address
6. Denoted as Numeric dotted decimal Denoted as Alphanumeric hexadecimal

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

7. Ex – 192.168.10.1 Ex – 0000:AB55:DDDD:F009:BC00:00AA:112A:77CD
Values: 0 to 9 & A to F.
8. Contains 4 blocks, each block is of 8 bits. Contains 8 blocks, each block is of 16 bits.
(32 bits IPv4) separated by dotted decimal. (128 bits IPv6) separated by colon (:).
(00000000.00000000.00000000.00000000) (0000000000000000: 0000000000000000:
0000000000000000: 0000000000000000:
0000000000000000: 0000000000000000:
0000000000000000: 0000000000000000 )
9. Abbreviated as Internet Protocol version four. Abbreviated as Internet Protocol version six.
10. Address must be reused. Every device can have Unique address.

Note: 0 and 127 IP address


0.0.0.0 ip address in which device sending data to itself.
127.0.0.0 ip address used for testing, troubleshooting, ping, and other network issues of device itself.

 Subnet Addressing/ Subnet Mask


Subnetting: Divides a larger into smaller sub-networks.

Subnet mask: When the IP address divided into two parts Network ID and Host ID is known as subnet
mask.
It is the technique for logically partitioning a single physical network into multiple smaller sub-networks or
subnets.

Subnetting is used to decrease the traffic in the network or decrease the load in the network.

The benefits of subnetting include:

 Reducing network traffic


 Enabling work from home
 Allowing organizations to better LAN controls such as maximum number of hosts

Subnet addressing allows an autonomous system made up of multiple networks to share the same Internet
address, also makes it possible to divide a single network into multiple logical networks (subnets).

A subnet mask is a 32-bit number created 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
Notes by Professor Tanya Shrivastava
Notes by Professor Tanya Shrivastava

Super netting – special case if ip addresses


Supernetting is the opposite of Subnetting. In subnetting, a single big network is divided into multiple
smaller subnetworks. In Supernetting, multiple networks are combined into a bigger network termed as a
Supernetwork or Supernet.

Supernetting is mainly used in Route Summarization, where routes to multiple networks with similar
network prefixes are combined into a single routing entry (multiple paths combine into single path). This
in turn significantly reduces the size of routing tables and also the size of routing updates exchanged by
routing protocols.

Difference between subnetting and supernetting. (Imp)

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 Basic Internetworking (IP, CIDR, ARP, RARP, DHCP, DNS, FTP, TFTP, Email-
SMTP, IMAP, POP3, SNMP, ICMP)

IP (Internet Protocol):
 Logical address is also known as IP address.
 Logical addressing is of 2 types – Classful addressing (IPv4) and Classless addressing (IPv6).
 An IP address is also known as a logical address and it can change over time as well as from
one network to another.
 An IP address is a unique address that identifies a device on the internet or a local network. IP
stands for "Internet Protocol," which is the set of rules to send data via the internet or local network.
 There are four types of IP addresses: public, private, static, and dynamic. And 2 versions of IP
address are IPv4 (Internet Protocol version 4) & IPv6 (Internet Protocol version 6).

IPv4 Header Format / IPv4 Datagrams/ IPv4 Datagram Header (Imp)

Size of the header is 20 to 60 bytes.

VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4

HLEN: IP header length (4 bits), which is the number of 32 bit words in the header.

Type of service: Low Delay, High Throughput, Reliability (8 bits).

Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the
maximum is 65,535 bytes.

Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits)

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag (same
order)

Fragment Offset: it is of 13 bits.

Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by
restricting the number of Hops taken by a Packet before delivering to the Destination.

Protocol: Name of the protocol to which the data is to be passed (8 bits)

Header Checksum: 16 bits header checksum for checking errors in the datagram header

Source IP address: 32 bits IP address of the sender

Destination IP address: 32 bits IP address of the receiver

Option: 0 – 40 bytes. Contains optional information such as source route, record route. Used by the
Network administrator to check whether a path is working or not.
(Due to the presence of options, the size of the datagram header can be of variable length (20 bytes to 60
bytes).

CIDR (Classless Inter-Domain Routing):

 Classless Inter-Domain Routing (CIDR): CIDR is the way to write and understand IP address and
their size in network.
 CIDR tells size of the network, total no. of networks (no. of subnets), total no. of IP address in
each networks, and no. of PC’s or host connected in each network.
 It is a method of IP address allocation and IP routing, that allows for more efficient use of IP
addresses. This approach, also known as supernetting.
 CIDR reduces the wastage of IP address in the network.
 CIDR allows multiple blocks to be aggregated into a single larger block, a process called
supernetting.
 For example, multiple small networks like 192.168. 0.0 / 24  CIDR prefix.

CIDR Notation:
CIDR addresses are written in a specific notation: IP address/prefix length.
For example, 192.168.1.0/24
/24 indicate that the first 24 bits (Starting 24 no. of 1’s) of the IP address are the network prefix.
00000000.00000000.00000000.00000000 (32 bits)
11111111.11111111.11111111.00000000 (Starting 24 no. of 1’s)

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Binding Protocol Address – ARP & RARP

In Address Resolution Protocol (ARP), Receiver’s MAC address is fetched. Through ARP, (32-bit) IP
address mapped into (48-bit) MAC address.

Whereas, In Reverse Address Resolution Protocol (RARP), IP address is fetched through server.
Through RARP, (48-bit) MAC address of 48 bits mapped into (32-bit) IP address.

Let us see that the difference between ARP and RARP that are as follows:
ARP RARP
ARP stands for Address Resolution Protocol. Whereas RARP stands for Reverse Address
Resolution Protocol.
Through ARP, (32-bit) IP address mapped into Whereas through RARP, (48-bit) MAC address
(48-bit) MAC address. mapped into (32-bit) IP address.
In ARP, broadcast MAC address is used. While in RARP, broadcast IP address is used.
In ARP, ARP table is managed or maintained While in RARP, RARP table is managed or
by local host. maintained by RARP server.
Maintained by local host. Maintained by server.
In Address Resolution Protocol, Receiver’s While in RARP, IP address is fetched.
MAC address is fetched.
To send data it needs receivers MAC address. To send data it needs sender IP address.
ARP is used in sender’s side to map the RARP is used in receiver’s side to map the sender’s
receiver’s MAC address. IP.

DHCP(Dynamic Host Configuration Protocol)


DHCP is an application layer protocol of OSI model. DHCP provides automatic IP, Subnet Mask and
Gateway in the network. DHCP is a client – server protocol.

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to dynamically
assign an IP address to the device, or node, on a network so they can communicate using IP (Internet
Protocol).

There is no need to manually assign IP addresses to every device. DHCP automatically gives an ip address
to every device connected in network.

DHCP helps to reduce the work of network administrator. Network Administrator does not assign an ip
address to each computer one by one, it’s just activate the dhcp protocol in the network and then
automatically all the computers get the ip.
Notes by Professor Tanya Shrivastava
Notes by Professor Tanya Shrivastava

DHCP provides Reliable IP address configuration means, DHCP minimizes errors caused by manual IP
address configuration, such as errors like assignment of an IP address to more than one computer at the same
time or to check the ip address is unique or not in the network.

DHCP: Address Allocation/ DHCP IP Address Allocation


Here is an overview of the DHCP process like how dhcp works:
DHCP IP Address Allocation process is known as DORA process
 D - Discover
 O - Offer
 R - Request
 A - Acknowledge

As you can see from the picture above, a DHCP client goes through the four-step process:
1. A DHCP client sends a broadcast packet (DHCPDiscover) to discover DHCP servers on the network.
2. The DHCP server receives the DHCPDiscover packet and respond with a DHCPOffer packet, offering
IP addressing information to the DHCP client.
3. If there is more than one DHCP server on the network segment and the DHCP client receives more than
one DHCPOffer packets, the client will accept the first DHCPOffer packet. The DHCP client responds by
broadcasting a DHCPRequest packet, requesting network parameters from the DHCP server.
4. The DHCP server approves the lease with a DHCPACK (Acknowledgement) packet. The packet
includes the lease duration and other configuration information.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

DNS(Domian Name System): Distribution of name spaces


DNS, or the Domain Name System, translates human readable domain names (for example,
www.amazon.com) to machine readable IP addresses (for example, 192.0.2.44).
DNS is use to convert numbers into names or names into numbers.

 Names like web address or website name: www.facebook.com or www.yahoo.com etc.


 Numbers like IP address: 192.168.10.10 or 192. 168.10.20 etc
DNS servers convert URLs and domain names into IP addresses that computers can understand and
use.
DNS resolves names to numbers, to be more specific it resolves domain names to IP addresses. So if you
type in a web address in your web browser like www.gmail.com, DNS will resolve the name to a number
because computers only understand the numbers.
For ex. – www.facebook.com convert into ip address 8.8.8.8
In frontend we write the name like www.facebook.com in browser but at backend computer
understand only numbers that is 8.8.8.8

DNS Types:
 Forward Lookup - Forward lookup zones convert names to IP addresses.
www.facebook.com  68.63.68.69

 Reverse Lookup - Reverse lookup zones convert IP addresses to names.


68.63.68.69  www.facebook.com
DNS (Domian Name System): DNS in the Internet

 Without internet DNS is not possible. To access the browser we need an internet connection.
 The Domain Name System (DNS) is the phonebook of the Internet. Humans access information
online through domain names, like facebook.com, youtube.com etc.
 Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP
addresses so browsers can load Internet resources.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 Each device connected to the Internet has a unique IP address which other machines use to find the
device.
 Because of DNS we do not need to learn the ip address of all the websites, just enter the name of the
website like facebook.com and youtube.com and DNS convert these names to numbers or IP address.
DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4),
or more complex newer alphanumeric IP addresses such as 24B0:c900: 2400:cb00: 24AC:cb00:
2400:cbF0 (in IPv6).

FTP (File Transfer Protocol)


 FTP stands for File Transfer Protocol. It is a protocol that is used for transforming a file from one
location to another, i.e. from one host to another host.
 FTP stands for File Transfer Protocol. This type of protocol is used to transfer or copies the file
from one host to another host. Port no. of FTP is 20 or 21.

 It uses TCP services. It needs two TCP connections. One is a Control connection, and another is a
Data connection. For control connection, it uses well-known port 21, and for data connection, it
uses well-known port 20.

TFTP (Trivial File Transfer Protocol)

 TFTP stands for Trivial File Transfer Protocol. TFTP is used to transfer a file either from client to
server or from server to client without the need of FTP feature. Software of TFTP is smaller than
FTP. TFTP works on 69 Port number and its service is provided by UDP.

Difference between FTP and TFTP:

S.No FTP TFTP


1. FTP stands for File Transfer Protocol. TFTP stands for Trivial File Transfer Protocol.
2. The software of FTP is larger than TFTP. While software of TFTP is smaller than FTP.
3. FTP works on two ports: 20 and 21. While TFTP works on 69 Port number.
4. FTP services are provided by TCP. While TFTP services are provided by UDP.
5. The complexity of FTP is higher than TFTP. While the complexity of TFTP is less than FTP.
6. There are many commands or messages in FTP. There are only 5 messages in TFTP.
While TFTP does not need authentication for
7. FTP need authentication for communication. communication.
FTP is generally suited for uploading and While TFTP is mainly used for transmission of
8. downloading of files by remote users. configurations to and from network devices.
9. FTP is a reliable transfer protocol. While; TFTP is an unreliable transfer protocol.
10. FTP is based on TCP. While; TFTP is based on UDP.
11. FTP is slower. TFTP is faster as compared to FTP.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

E-Mail: SMTP, POP, IMAP, SNMP


Email is an essential part of business and personal communication online. The email protocols define the
mechanism of the email exchange between servers and clients. This way, they allow us to send and receive
messages over the network correctly.

What is an Email protocol?

An email protocol is a group of rules which ensure that emails are properly transmitted over the Internet. In
fact, there is a list of email protocols that handle email transactions. Some protocols are: SMTP, POP3,
IMAP, SNMP.

What is SMTP?
SMTP stands for Simple Mail Transfer Protocol, and it is responsible for sending email messages. This
protocol is used by email clients and mail servers to exchange emails between computers.

o It is a program used for sending messages to other computer users based on e-mail addresses.
o It provides a mail exchange between users on the same or different computers, and it also supports:

 It can send a single message to one or more recipients.


 Sending message can include text, voice, video or graphics.
 It can also send the messages on networks outside the internet.

What is POP3?
 The POP3 abbreviation stands for Post Office Protocol version 3, which provides access to an inbox
stored in an email server.
 It executes the download and delete operations for messages. Thus, when a POP3 client connects to
the mail server, it retrieves all messages from the mailbox. Then it stores them on your local
computer and deletes them from the remote server.
 Thanks to this protocol, you are able to access the messages locally in offline mode as well.
 Modern POP3 clients allow you to keep a copy of your messages on the server if you explicitly
select this option.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

What is IMAP?
 The Internet Message Access Protocol (IMAP) allows you to access and manage your email
messages on the email server.
 This protocol permits you to manipulate folders, permanently delete and efficiently search through
messages.
 It also gives you the option to set or remove email flags, or fetch email attributes selectively. By
default, all messages remain on the server until the user specifically deletes them.
 IMAP supports the connection of multiple users to a single mail server.

Pop3 vs. IMAP: Which is better?


IMAP is better if you are going to be accessing your email from multiple devices, such as a work
computer and a smart phone. POP3 works better if you are only using one device, but have a very large
number of emails. It is also better if you have a poor internet connection and need to access
your emails offline. For most people, IMAP will suit their needs better.
Note: If emails start disappearing from your inbox without you deleting them, it almost always means
one of your devices is on POP3. Backing up the emails and then resetting up the email account as IMAP
will fix the problem.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

What is SNMP?

Simple Network Management Protocol (SNMP) is an internet standard protocol used to monitor and
manage network devices connected over an IP. Devices like routers, switches, firewalls, load balancers,
servers, CCTV cameras, and wireless devices communicate using SNMP.

SNMP collects data from these devices, organizes them, and sends them for network monitoring and
management, which helps with fault detection and isolation. SNMP is an integral part of both the
monitored endpoints and the monitoring system.

SNMP (Simple network Management Protocol) is a widely used protocol; you can find it in network
management for network monitoring. With this protocol you can manage and monitor network elements
(routers, switches, printers, IP telephones etc.), collect information about them. It's a part of the TCP/IP
protocol suite.

SNMP works like a client-server. It's consist of 4 elements (SNMP Manager/monitoring server, Managed
devices, SMNP Agent, MIB), with these elements, it's possible to achieve a fully functional SNMP
network.

 Agent is a network element, a software which runs on the managed device. It stores and retrieves
information about the device. It can also signal an event to the manager if something happens.
 Manager is the key element in SMNP, it's responsible to communicate with the agent(s). You can
query an agent to get information about a managed device, for example a status information. You
can also change settings in the managed device sending a 'set' command to the agent. The software,
which is called NMS (Network Management System), runs on the manager.
 Managed devices are part of the network that requires management and monitoring: printers,
routers, switches and so on. They report to the manager via SNMP, using agent software
component.
 Management Information database, in sort MIB. Every agent describing the managed device
parameters, using this MIB database. These MIBs have a set of unique addresses, OIDs, using these
OIDs (for example: 1.3.6.1.2.1.1.1.0), you can query different kind of information about the device.

Figure 1 - SNMP network: Monitoring server with large variety of devices

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

ICMP
The Internet Control Message Protocol (ICMP) is a network layer protocol used by network devices to
diagnose network communication issues. ICMP is mainly used to determine whether data is reaching to its
destination in a timely manner or not. Commonly, the ICMP protocol is used on network devices, such as
routers. ICMP is crucial for error reporting and testing.

What is ICMP used for?


The primary purpose of ICMP is for error reporting like destination unreachable, time exceeded etc. When
two devices connect over the Internet, the ICMP generates errors when data is not reaching to its
destination.

For example, if a packet of data is too large for a router, the router will drop the packet and send an ICMP
message back to the original source for the data.

A secondary use of ICMP protocol is to perform network diagnostics; the commonly used terminal utilities
Traceroute and Ping both operate using ICMP.

The Traceroute utility is used to display the routing path between two Internet devices. The journey
between one router and another is known as a hop, and a Traceroute also reports the time required for each
hop along the way. This can be useful for determining sources of network delay.

The ping utility is a simplified version of Traceroute. A ping will test the speed of the connection between
two devices and report exactly how long it takes a packet of data to reach its destination and come back to
the sender’s device.

The ICMP echo-request and echo-reply messages are commonly used for the purpose of performing a ping.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

ICMP Header Format

o Type: It is an 8-bit field. It defines the ICMP message type. For example ICMP Destination
Unreachable packets.
o Code: It is an 8-bit field that defines the subtype of the ICMP message.
o Checksum: It is a 16-bit field to detect whether the error exists in the message or not.
o Extended header: It is a 32-bit field.
o Data/Payload: It is a 32-bit field. Contains variable length data.

ICMP Message Types


Internet Control Message Protocol (ICMP) is a protocol used for error handling and debugging in the
network layer. It is mainly used in network devices such as routers.
ICMP messages are mainly divided into two categories:
 Error reporting messages
 Query messages

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

1. Error Reporting Messages

Used to report problems when delivering IP packets. Sent back to the source.

 Destination Unreachable:
Sent when the packet can’t reach its destination.
Example: Router can’t forward packet to B, so it informs A.
 Source Quench:
Sent if network is slow or when there's network congestion or the source is sending data too fast.
Example: Router tells A to slow down packet sending.
 Time Exceeded:
Sent when packet lifetime (TTL) runs out before reaching the destination.
Example: Packet takes too much time to reach, so packet is dropped and inform to the sender.
 Parameter Problem:
Sent when there is a problem in the packet header (like a wrong setting).
Example: Packet has incorrect info, so it’s rejected and source is notified.
 Redirection:
Sent to update the host’s routing info. Select more route of shortest path. Also it tells the direction
from source to destination.
Example: Router tells A to use a better route to reach B next time.

2. Query Messages

Used for troubleshooting and getting info from hosts/routers.

 Echo Request/Reply:
Used to check if a host is reachable (like the ping command).
Example: A sends echo request to B, B replies if it’s reachable.
 Timestamp Request/Reply:
Used to measure travel time of packets or sync clocks.
Example: A asks B for time to calculate delay or adjust its clock.
 Address Mask Request/Reply:
Used to find the subnet mask of the network. Used to find the address of source and destination.
Example: A asks the router for the network address of B.
 Router Solicitation/Advertisement:
Used to find routers on the network. Also it provides message that, network is busy, network is
switched off.
Example: A asks for routers, router replies with its IP and availability. Also when person make call
to another person in the network they get advertisement message like no. is not available, no. is
busy or switched off etc.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 Routing Forwarding and Delivery / Routing Algorithms and Protocols


Packet delivery or forwarding is the basic method for sharing information across systems on a network.
Packets are transferred between a source and a destination, usually on two different systems.

Delivery refers to the way a packet is handled by the networks under the control of the network
layer. Forwarding refers to the way a packet is delivered to the next station.

Delivery of packets to final destination is done it two ways.

1. Direct – when network is same, so packet sends directly from source to destination.
For example 2 computers are connected in same network.

2. Indirect – when network is not same, so packet sends indirectly from source to
destination. For example packet goes from router to router, as we know that we use
router when networks are different.

Forwarding packets techniques:

 Next Hop method vs. routing method


In this method, the routing table contains only address of next hop.

 Network specific method vs. Host specific method


In this method, we reduce the size of routing table by replacing every host address on the
same network by a single network address.

Unicast Routing Protocol (Imp)


 One-to-one communication or one-to-one transmission is known as unicast routing
protocol.
 Transfer message between only one sender and one receiver.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Intradomain and Interdomain

Intradomain – connection will be done within a network or domain.


Interdomain – connection between different networks or between different domains.

Distance Vector Routing (DVR) Protocol

 A Distance Vector Routing protocol in data networks determine the best route for data
packets based on distance.
 It is a Unicast Routing Protocol.
 It is an Intradomain network.
 The distance vector routing protocol is applied to assign the best and the shortest route for the data.
 DVR protocols measure the distance by the - no. of routers a packet has to pass; one router count as one
hop.
 Distance Vector Routing protocols use the Bellman Ford Algorithm to calculate the best and shortest route.
 In DVR, each router maintains a routing table.
 Tables are updated by exchanging the information with the neighbour table.
 Example – RIP (Routing Information Protocol).
 Distant vector routing protocol also called as Bellman-Ford algorithm or Ford Fulkerson
algorithm used to calculate shortest and best path.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

RIP (Routing information Protocol)

 RIP relies on no. of hops in order to determine the best route to a network.
 It is a Distance Vector Routing Protocol.
 It is an Intradomain network.
 It is a Unicast Routing Protocol.
 RIP metric is Hop Count. Maximum no. of hop count is 15.
 RIP only see the Distance.

Bellman Ford Algorithm

 It is a Distance Vector Routing Protocol.


 It is an Intradomain network.
 It is a Unicast Routing Protocol.
 Bellman ford algorithm is use to find shortest path in the network.
 Distance Vector Routing protocols use the Bellman Ford Algorithm to calculate the best and shortest route.
 The Graph contain both Negative and Positive weights.

Positive weights 2, 3, 4, 5

Negative weights  -6

 The graph can be directed or undirected.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Link State Routing (LSR) Protocol

 A Link State Routing (LSR) protocol provides ― links” to other router or network.
 LSR is a method which each router shares its neighborhood’s knowledge with every
other router in the network.
 It is a Unicast Routing Protocol.
 It is an Intradomain network.
 Example – OSPF (Open Shortest Path First).
 Make use of Dijkstra’s Algorithm.

OSPF (Open Shortest Path First)

 Open Shortest Path First (OSPF) is a link-state routing protocol that is used to find the best path
between the source and the destination router using its own Shortest Path First.
 It is a Unicast Routing Protocol.
 Based on Least Cost Tree. The data is travel from the path which contains least cost.
 It is an Intradomain protocol/network.
 Make use of Dijkstra’s Algorithm.

Dijkstra’s Algorithm

 It is a Link State Routing Protocol.


 It is an Intradomain network.
 It is a Unicast Routing Protocol.
 Dijkstra’s algorithm is use to find shortest path in the network.
 Link State Routing protocols use the Dijkstra’s Algorithm to calculate the best and shortest route.
 The Graph contains only Positive weights in case of Dijkstra’s algorithm.
 Contains Non–Negative Weights.
 Graph must be connected.
 Dijkstra’s algorithm works only for connected graphs.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 Dijkstra’s algorithm works only for those graphs that do not contain any negative weight edge.
 It only provides the value or cost of the shortest paths.
 By making minor modifications in the actual algorithm, the shortest paths can be easily obtained.
 Dijkstra’s algorithm works for directed as well as undirected graphs.
 Remove self-loop and parallel edges.

 The graph can be directed or undirected graph.

Multicast Routing Protocol

 One-to-Many or Many-to-Many communication is known as Multicast Routing Protocol.


 One-to-Many  communication between single sender and multiple receivers.
 Many-to-Many  Communication between multiple senders and multiple receivers.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Source Based Tree or Group Shared Tree

Source Based Tree

 Source Based Tree (SBT) is also known as Source Path Tree (SPT).
 Source host is located at the root of the tree and receivers are located at the end of the branches.
 No single common root.
 Different root/tree from each sender to receiver.
 Source Based Tree is Unidirectional.
 A non-shared multicast distribution tree is built for every (Source, Group) pair.
 Source Based Tree is a Multicast Routing Protocol.

Group Shared Tree

 In Group Shared Tree, root of the tree is common point known as RP (Rendezvous Point).
 Single common root.
 Same tree used by all group members.
 Group Shared Tree is Bidirectional.
 A multicast distribution tree shared by all group’s senders & receivers.
 Group Shared Tree is a Multicast Routing Protocol.

Distance Vector Multicasting Router Protocol (DVMRP)

The Distance Vector Multicast Routing Protocol (DVMRP) is the extension of the Routing Information
Protocol (RIP) which is used in unicast routing. It uses the source based tree approach to multicasting.

 DVMRP is a multicasting routing protocol.


 DVMRP is a Source Based Tree protocol.
 DVMRP takes routing decision based upon the source address of the packet.
 The DVMRP is based on the RIP protocol but more complicated than RIP.
 DVMRP must achieve following task:
 It must prevent the formation of loops in the network.
 Prevent from duplicates packets in the network.
 Always choose shortest path.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

DVMRP follow 3 decision making strategies:

 Reverse Path Forwarding (RPF)


 Reverse Path Broadcasting (RPB)
 Reverse Path Multicasting (RPM)

Reverse Path Forwarding (RPF)

 In this strategy router only forwards those packets that have traveled the shortest path from source
to destination. Source

RPF send
reply back to those packets
that comes from shortest
path.

Destination

 RPF does not guarantee that there would be no duplicate packets in the network. The network may
receive two or more copies. The reason for this is that, routing based on source address and not on
the destination address.

Reverse Path Broadcasting (RPB)

 In this method, one parent router is defined for each network.


 RPB allows router to broadcast the packet in the network.
 This created duplicate packets on the network and reduces the network efficiency.

Reverse Path Multicasting (RPM)

It uses two different methods:

 Pruning
 Grafting

Pruning: Router sends prune message when it is not interested to receive packets.

Grafting: Router sends graft message when it is interested to receive packets.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

MOSPF (Multicast Open Shortest Path First)

 It is an extension of OSPF.
 It is based on Least Cost Tree. Instead of shortest path. The data is travel from the path which
contains least cost.
 MOSPF is a Source Based Tree.
 MOSPF is a Multicast Routing Protocol.
2
2 3 Least Cost Path
2
1+1+1+1=4

1 1

1 1

Core Based Tree (CBT)

 Core Based Tree is a Multicast Routing Protocol.


 CBT is a Group Shared Tree Protocol.
 ―Core‖ also known as ―Centers‖.
 It is Bidirectional.
 If any router wants to add in a network it sends ―join” message to the core router.
 Receiver sends a ―join message‖ to core router to send packet in a network.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Protocol Independent Multicast (PIM)

 PIM is a multicast routing protocol.


 PIM is based on Source Based Tree as well as Group Shared Tree.
 PIM has two flavors:
 PIM-DM  Protocol Independent Multicast – Dense Mode. This mode use source based
tree. It is used in LAN (Local Area Network).
 PIM-SM  Protocol Independent Multicast – Sparse Mode. This mode use group shared
tree. It is used in WAN (Wide Area Network).

 Static and Dynamic Routing


Static Routing Dynamic Routing
Routes are set manually by the user. Routes are set automatically by the router.
Done by hand (manual). Done by router itself (automatic).
Must be updated manually. Router updates routes automatically.
Small networks Large or changing networks
Faster to set up in small networks. Takes more time to learn routes.
Needs more effort. Needs less effort.
Typing route manually in router. Using RIP, OSPF, or EIGRP protocols.
Static routing is also called non-adaptive routing. Dynamic routing is also called adaptive routing.
Requires less bandwidth. Requires more bandwidth.
Configuration is difficult. Configuration is easy.
More secure. Less secure.
Non Automatic routing technique. Automatic routing technique.

 Congestion Control Algorithms


Congestion in a network may occur when the load on the network (i.e. the number of packets sent to the
network) is greater than the capacity of the network (i.e. the number of packets a network can handle.)
The various causes of congestion in a subnet are:
 The input traffic rate exceeds the capacity of the output lines.
 The routers are too slow to perform
 Congestion in a subnet can occur so the processors are slow. Slow speed CPU at routers will
perform the routine tasks such as queuing buffers, updating table etc. slowly.
Congestion Control Algorithm refers to techniques and mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has happened. Congestion control mechanisms are divided
into two categories, one category prevents the congestion from happening and the other category removes
congestion after it has taken place.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

• These two categories are:

1. Open loop (used to prevent the congestion before it happens)


2. Closed loop (used to remove the congestion after it happens)

Open Loop Congestion Control


i. In this method, policies are used to prevent the congestion before it happens.
ii. Congestion control is handled either by the source or by the destination. The various methods used for
open loop congestion control are:
 Retransmission Policy: Avoids too many retransmissions to reduce traffic.
 Window Policy: Controls how much data is sent without waiting for an acknowledgment.
 Acknowledgment Policy: Sends fewer acknowledgments to reduce load.
 Discarding Policy: Drops less important packets when the load is high.
 Admission Policy: Limits new traffic if the network is already busy.

Closed Loop Congestion Control


i. Closed loop congestion control mechanisms try to remove the congestion after it happens.
ii. The various methods used for closed loop congestion control are:
 Backpressure: Slows down sender by telling previous nodes to stop sending.
 Choke Packet: Sends a warning message to the sender to reduce sending rate.
 Implicit Signaling: Sender guesses congestion from delays or lost packets.
 Explicit Signaling: Network clearly tells sender that there is congestion.

TELNET

TELNET is a way to connect to another computer over the internet or a network, and control it from
far away using a command-line interface (text-based screen).

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Imagine you are sitting at your computer, but you want to use another computer that’s far away — maybe
in a different room, city, or country. TELNET lets you open a window to that other computer and type
commands as if you were sitting in front of it.

The full form of TELNET is:


TELecommunication NETwork
It stands for a protocol that allows remote communication between computers over a network.

 It uses text commands, not a graphical interface (no windows, buttons, or mouse).
 Runs over the TCP/IP network.
 TELNET uses port number 23 by default.
 It was one of the first tools used for remote login.
 TELNET is not secure — it sends data (including passwords) in plain text, so it can be seen by
hackers.
 That's why it's been mostly replaced by SSH (Secure Shell), which is much safer.

HTTP / HTTPS

HTTP: HyperText Transfer Protocol


It is the rules (protocol) used by web browsers (like Chrome, Firefox) to talk to websites and load web
pages.
 When you type a website name like www.google.com, your browser uses HTTP to request the
page.
 The server sends back the page, and your browser shows it.

HTTPS: HyperText Transfer Protocol Secure


It's the secure version of HTTP. It does the same thing (loads web pages), but it also encrypts the data so
that:
 Hackers can't see what you're doing.
 Passwords, credit card numbers, and personal info stay safe.

 Use HTTP for regular, non-sensitive websites. (no padlocks, less secure)
 Use HTTPS whenever you need security and privacy. (padlocks more secure)

Padlocks

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Main Differences:

Feature HTTP HTTPS


Stands for HyperText Transfer Protocol HyperText Transfer Protocol Secure
Security Not secure (data is visible) Secure (data is encrypted)
Uses port 80 443
Padlock icon No padlock Padlock in browser
Best for Basic websites Login, banking, shopping, etc.

FDDI (Fiber Distributed Data Interface)

 FDDI (Fiber Distributed Data Interface) is a network standard that uses fiber optic connections
in a local area network (LAN) that can extend in range up to 200 kilometers (124 miles).
 Standard use fiber optic cable that is why it is known as FDDI. If standard use copper cable then it
is known as CDDI (Copper Distributed Data Interface).
 The FDDI protocol is based on the Token Ring Protocol.
 A FDDI LAN can support thousands of users.
 Operates over large distance up to 200 km (124 miles).
 The FDDI uses a dual counter-rotating ring topology based on Optical Fiber Links.
 FDDI has dual primary and secondary communications rings. One is transmitting clockwise
and the other transmitting anti-clockwise.
 Data is transfer clockwise as well as anti-clock wise in FDDI.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

 FDDI networks mostly used in WAN.


 A Token Ring network is a LAN in which all computers are connected in a ring or star topology
and pass one or more logical TOKENS from host to host.
 Only a host that holds a token can send data, and tokens are released when receipt of the data is
confirmed. (So when data is received, token is released).

Benefits or advantages of FDDI

Following are the benefits or advantages of FDDI:


➨It offers higher bandwidth (upto 250 Gbps). Hence it can handle data rates upto 100 Mbps.
➨It offers high security.
➨Fiber optic cable does not break as easily as other types of cables.
➨Fiber optic cables are not prone to EMI (Electromagnetic Interference).
➨Fiber optic cables transmit signals over greater distances of about 200 Kms.
➨Fiber optic cables is used to send data in a fast speed.
➨FDDI uses multiple tokens to improve network speed.

Drawbacks or disadvantages of FDDI

Following are the drawbacks or disadvantages of FDDI:


➨FDDI is complex. Hence installation and maintenance require great deal of expertize.
➨FDDI is costly. This is because fiber optic cables are very expensive.
➨If cable break connection is loss as well as token is loss.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Numerical
Q. 192.168.10.0/28
i. Find the subnet mask.
ii. Find the total no. of network can be created,
iii. Find the total no. of IP address in each network.
iv. Find the total no. of host on each network.
Solution:
i. Subnet mask:
192.168.10.0/28 is a class C IP address Network ID Host ID

Dafault subnet mask is: 255.255.255.0 – 11111111.11111111.11111111.00000000

/28 is CIDR prefix, means starting 28 bits are 1’s for the network, and the remaining 4 bits (out of 32) are
for hosts.

11111111.11111111.11111111.11110000  255.255.255.240
Because the last octet = 11110000 in
So, the subnet mask is:
28 ones in binary = 240)

255.255.255.240 starting

ii. Total no. of Networks = 2n , Here n indicate total no. of bits borrowed in host.
11111111.11111111.11111111.11110000

Host ID
n 4
2 = 2 = 16, (Hence, 16 Networks were their)

iii. Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11110000

Host ID
2n = 24 = 16, (Hence, 16 Ip address in each network)

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

iv. Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11110000

Host ID
n 4
2 - 2 = 2 - 2 = 16 – 2 = 14, (Hence, 14 hosts or pc’s connected in each network)

Subnet No. Network Address Usable IP Range Broadcast Address


1 192.168.10.0 192.168.10.1 – 192.168.10.14 192.168.10.15
2 192.168.10.16 192.168.10.17 – 192.168.10.30 192.168.10.31
3 192.168.10.32 192.168.10.33 – 192.168.10.46 192.168.10.47
4 192.168.10.48 192.168.10.49 – 192.168.10.62 192.168.10.63
5 192.168.10.64 192.168.10.65 – 192.168.10.78 192.168.10.79
6 192.168.10.80 192.168.10.81 – 192.168.10.94 192.168.10.95
7 192.168.10.96 192.168.10.97 – 192.168.10.110 192.168.10.111
8 192.168.10.112 192.168.10.113 – 192.168.10.126 192.168.10.127
9 192.168.10.128 192.168.10.129 – 192.168.10.142 192.168.10.143
10 192.168.10.144 192.168.10.145 – 192.168.10.158 192.168.10.159
11 192.168.10.160 192.168.10.161 – 192.168.10.174 192.168.10.175
12 192.168.10.176 192.168.10.177 – 192.168.10.190 192.168.10.191
13 192.168.10.192 192.168.10.193 – 192.168.10.206 192.168.10.207
14 192.168.10.208 192.168.10.209 – 192.168.10.222 192.168.10.223
15 192.168.10.224 192.168.10.225 – 192.168.10.238 192.168.10.239
16 192.168.10.240 192.168.10.241 – 192.168.10.254 192.168.10.255

Q. A subnet has been assigned a subnet mask of 255.255.255.192. What is the


maximum no. of host that can belong to this subnet?
Solution:
Network ID Host ID

Dafault subnet mask is: 255.255.255.0 – 11111111.11111111.11111111.00000000

Given subnet mask is 255.255.255.192 – 11111111.11111111.11111111.11000000

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

11111111.11111111.11111111.11000000  255.255.255.192
Because the last octet = 11000000 in
binary = 192)

i. Total no. of Networks = 2n , Here n indicate total no. of bits borrowed in host.
11111111.11111111.11111111.11000000

Host ID
2n = 22 = 4, (Hence, 4 Networks were their)

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11000000

Host ID
n 6
2 = 2 = 64, (Hence, 64 Ip address in each network)

Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11000000

Host ID
n 6
2 - 2 = 2 - 2 = 64 – 2 = 62, (Hence, 62 hosts or pc connected in each network)

Q. The IP network 200.198.160.0 is using subnet mask of 255.255.255.224


draw the subnets.
Solution:
Network ID Host ID

Dafault subnet mask is: 255.255.255.0 – 11111111.11111111.11111111.00000000

Given subnet mask is 255.255.255.224 – 11111111.11111111.11111111.11100000

Total no. of ones is 27  200.198.160.0/27  CIDR prefix

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

11111111.11111111.11111111.11100000  255.255.255.224
Because the last octet = 11100000 in
binary =224)

i. Total no. of Networks = 2n , Here n indicate total no. of bits borrowed in host.
11111111.11111111.11111111.11100000

Host ID
2n = 23 = 8, (Hence, 8 Networks were their)

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11100000

Host ID
n 5
2 = 2 = 32, (Hence, 32 Ip address in each network)

Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11100000

Host ID
n 5
2 - 2 = 2 - 2 = 32 – 2 = 30, (Hence, 30 hosts or pc connected in each network)
Draw the Subnets:

Subnet No. Network Address Usable IP Range Broadcast Address


1 200.198.160.0 200.198.160.1 – 200.198.160.30 200.198.160.31
2 200.198.160.32 200.198.160.33 – 200.198.160.62 200.198.160.63
3 200.198.160.64 200.198.160.65 – 200.198.160.94 200.198.160.95
4 200.198.160.96 200.198.160.97 – 200.198.160.126 200.198.160.127
5 200.198.160.128 200.198.160.129 – 200.198.160.158 200.198.160.159
6 200.198.160.160 200.198.160.161 – 200.198.160.190 200.198.160.191
7 200.198.160.192 200.198.160.193 – 200.198.160.222 200.198.160.223
8 200.198.160.224 200.198.160.225 – 200.198.160.254 200.198.160.255

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Q. Elaborate classful IP addressing. Divide the network with IP address 200.1.2.0 into 4 subnets
(Imp).
Solution:
In Classful IP addressing, IP addresses are divided into 5 classes (A, B, C, D, E). Each class has a default
subnet mask and a specific range of IPs.

IP Address Classes:

Class IP Range Default Subnet Mask Hosts per Network

255.0.0.0 (/8)
A 1.0.0.0 – 126.255.255.255 Because no. of ones is 8. ~16 million pc’s
11111111.00000000.00000000.00000000
255.255.0.0 (/16)
B 128.0.0.0 – 191.255.255.255 Because no. of ones is 16. ~65,000 pc’s
11111111.11111111.00000000.00000000
255.255.255.0 (/24)
C 192.0.0.0 – 223.255.255.255 Because no. of ones is 24. 254 pc’s only
11111111.11111111.11111111.00000000
D 224.0.0.0 – 239.255.255.255 (Multicast) N/A

E 240.0.0.0 – 255.255.255.255 (Reserved) N/A

 200.1.2.0 falls in the range of Class C


 Default Subnet Mask for Class C is: 255.255.255.0 /24 – 11111111.11111111.11111111.00000000

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.00000000

Host ID
2n = 28 = 256, (Hence, 256 Ip address in each network)
Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.00000000

Host ID
Notes by Professor Tanya Shrivastava
Notes by Professor Tanya Shrivastava

2n - 2 = 28 - 2 = 256 – 2 = 254, (Hence, 254 hosts or pc connected in each network)

 So, the total IPs = 2⁸ = 256


 Usable hosts = 256 - 2 = 254

Now Divide 200.1.2.0 into 4 Subnets

To divide a Class C network into 4 subnets, we need to borrow bits.

Step-by-step:

Step 1: Borrow Bits

 Divide 200.1.2.0 in to 4 subnets so we Need 4 subnets → 4 = 22 = 2 bits


 255.255.255.0 /24 - 11111111.11111111.11111111.00000000, HERE we need to borrow bits from
network part because host part is completely zero. Because this is the class C subnet mask, no. of 1’s is 24.
 So, new subnet mask = /26 (24 original + 2 borrowed) 11111111.11111111.11111111.11000000
 New Subnet Mask = 255.255.255.192 (11111111.11111111.11111111.11000000)

Step 2: Number of Hosts per Subnet

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11000000

Host ID
2n = 26 = 64, (Hence, 64 Ip address in each network)

Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11000000

Host ID
n 6
2 - 2 = 2 - 2 = 64 – 2 = 62, (Hence, 62 hosts or pc connected in each network)
 6 bits left for host = 2⁶ = 64 IPs
 Usable = 64 - 2 = 62 hosts per subnet

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Subnet Table:
Subnet No. Network Address Usable Host Range Broadcast Address

1 200.1.2.0 200.1.2.1 – 200.1.2.62 200.1.2.63

2 200.1.2.64 200.1.2.65 – 200.1.2.126 200.1.2.127

3 200.1.2.128 200.1.2.129 – 200.1.2.190 200.1.2.191

4 200.1.2.192 200.1.2.193 – 200.1.2.254 200.1.2.255

Q. Elaborate classful IP addressing. Divide the network with IP address 200.1.2.0 into 5 subnets.
Solution:
In Classful IP addressing, IP addresses are divided into 5 classes (A, B, C, D, E). Each class has a default
subnet mask and a specific range of IPs.

IP Address Classes:

Class IP Range Default Subnet Mask Hosts per Network

255.0.0.0 (/8)
A 1.0.0.0 – 126.255.255.255 Because no. of ones is 8. ~16 million pc’s
11111111.00000000.00000000.00000000
255.255.0.0 (/16)
B 128.0.0.0 – 191.255.255.255 Because no. of ones is 16. ~65,000 pc’s
11111111.11111111.00000000.00000000
255.255.255.0 (/24)
C 192.0.0.0 – 223.255.255.255 Because no. of ones is 24. 254 pc’s only
11111111.11111111.11111111.00000000
D 224.0.0.0 – 239.255.255.255 (Multicast) N/A

E 240.0.0.0 – 255.255.255.255 (Reserved) N/A

 200.1.2.0 falls in the range of Class C


 Default Subnet Mask for Class C is: 255.255.255.0 /24 – 11111111.11111111.11111111.00000000

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.00000000

Host ID
2n = 28 = 256, (Hence, 256 Ip address in each network)

Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.00000000

Host ID
n 8
2 - 2 = 2 - 2 = 256 – 2 = 254, (Hence, 254 hosts or pc connected in each network)

 So, the total IPs = 2⁸ = 256


 Usable hosts = 256 - 2 = 254

Now Divide 200.1.2.0 into 5 Subnets

 A Class C network has a default subnet mask of /24 (255.255.255.0).

 To create 5 subnets, we need to borrow enough bits to cover at least 5 subnets.

Since 2 bits can create 4 subnets (2² bits = 4 subnets) and 3 bits can create 8 subnets (2³bits = 8 subnets), we
borrow 3 bits.

Step-by-step:

Step 1: Borrow Bits

 Divide 200.1.2.0 in to 5 subnets so we Need 8 subnets → 8 = 23 = 3 bits


 255.255.255.0 /24 - 11111111.11111111.11111111.00000000, HERE we need to borrow bits from
network part because host part is completely zero. Because this is the class C subnet mask, no. of 1’s is 24.
 So, new subnet mask = /27 (24 original + 3 borrowed) 11111111.11111111.11111111.11100000
 New Subnet Mask = 255.255.255.224 (11111111.11111111.11111111.11100000)

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Step 2: Number of Hosts per Subnet

Total no. of IP address in each network = 2n , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11100000

Host ID
2n = 25 = 32, (Hence, 32 Ip address in each network)

Total no. of Hosts/PC’s in each network = 2n - 2 , Here n indicate total no. of bits
remaining in host.
11111111.11111111.11111111.11100000

Host ID
n 5
2 - 2 = 2 - 2 = 32 – 2 = 30, (Hence, 30 hosts or pc connected in each network)
Here’s how the network 200.1.2.0/27 divides into 5 subnets:

Subnet No. Network Address Usable IP Range Broadcast Address


1 200.1.2.0 200.1.2.1 – 200.1.2.30 200.1.2.31
2 200.1.2.32 200.1.2.33 – 200.1.2.62 200.1.2.63
3 200.1.2.64 200.1.2.65 – 200.1.2.94 200.1.2.95
4 200.1.2.96 200.1.2.97 – 200.1.2.126 200.1.2.127
5 200.1.2.128 200.1.2.129 – 200.1.2.158 200.1.2.159

Q. A group of N stations share 100 Kbps slotted ALOHA channel. Each station output a 500
bits’ frame on an average of 5000 ms even if previous one has not been sent. Find out the
required value of N. (imp)

Solution:
To determine the required value of N, we need to understand how the slotted ALOHA protocol works and
its efficiency

Key Information:

 The total bandwidth available for the system is 100 Kbps which is equivalent to
100,000 bits/sec.
 Each station transmits a frame of 500 bits every 5000 ms, i.e., 5 seconds.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

Now, let's break it down into steps:

1. Frame Transmission Rate per Station

Each station outputs a frame of 500 bits every 5000 ms, so the rate at which each station transmits
frames is:

So, each station transmits at a rate of 100 bits per second.

2. Total Bandwidth Required for N Stations


Since each station transmits at 100 bits per second, the total bandwidth required for N stations would be:

Total Bandwidth Required = N×100 bits/sec


But the total available bandwidth is 100 Kbps or 100,000 bits/sec.

3. Equating the Total Bandwidth


For the system to work, the total bandwidth required by all stations should not exceed the available
bandwidth:

N×100 bits/sec ≤ 100,000 bits/sec


Solving for N:

The maximum number of stations N that can share the 100 Kbps slotted ALOHA channel without
exceeding the available bandwidth is N=1000.

Notes by Professor Tanya Shrivastava


Notes by Professor Tanya Shrivastava

IMPORTANT QUESTIONS (UNIT-3)


 Define the functionalities of network layer. (imp)
 Explain subnetting with the suitable example. (imp)
 In a network 200.10.11.144/27 find out the IP of first host. (imp)
 Explain the drawbacks of classful network address. (imp)
Elaborate classful IP addressing. Divide the network with IP address 200.1.2.0 into 4 subnets. (imp)
Explain the function of ARP & RARP (imp)
Given the IP address 180.25.21.172 and the subnet mask 255.255.192.0. Find out the subnet address. (imp)
State the major difference between distance vector routing and link state routing. (imp)
A group of N stations share 100 Kbps slotted ALOHA channel. Each station output a 500 bits’ frame on an
average of 5000 ms even if previous one has not been sent. Find out the required value of N. (imp)
 Explain supernetting with the suitable example. (imp)
 State the major difference between IPV4 and IPV6. (imp)
 Illustrate unicast and multicast routing with suitable examples. (imp)
 Define delivery in network layer.
 IPv4 Header Format.
 Explain SNMP, DNS, ARP, SMTP in detail.
 Explain Random Access Protocol.
 Explain Interdomain and Intradomain Routing Protocols,
 Explain FTP and HTTP, HTTPS.
 Explain ICMP.
 Explain Congestion Control Mechanism.
 The IP network 200.198.160.0 is using subnet mask 255.255.255.224 draw the subnets.
 Role of Logical Addressing.
 Discuss about range of IP address of A, B, C, D, E class.
 Discuss ipconfig, netstat, ping, hostname, tracert
 Explain DVR, Distance Vector Routing.
 Divide the network with ip address 200.1.2.0 into 5 subnets.
 If a class B network on the internet has a subnet mask of 255.255.248.0, what is the maximum
number of hosts per subnet?
 TELNET, HTTP, FDDI.

Notes by Professor Tanya Shrivastava

You might also like