Unit-3, BCS603, Computer Network
Unit-3, BCS603, Computer Network
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.
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.
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.
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: 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
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.
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).
HLEN: IP header length (4 bits), which is the number of 32 bit words in the header.
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)
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag (same
order)
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.
Header Checksum: 16 bits header checksum for checking errors in the datagram header
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).
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)
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.
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.
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.
DNS Types:
Forward Lookup - Forward lookup zones convert names to IP addresses.
www.facebook.com 68.63.68.69
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.
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).
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 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.
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:
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
Negative weights -6
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.
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
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.
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.
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.
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.
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.
Pruning
Grafting
Pruning: Router sends prune message when it is not interested to receive packets.
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
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).
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.
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
Use HTTP for regular, non-sensitive websites. (no padlocks, less secure)
Use HTTPS whenever you need security and privacy. (padlocks more secure)
Padlocks
Main Differences:
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.
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
/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)
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)
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)
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:
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:
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
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
Step-by-step:
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
Subnet Table:
Subnet No. Network Address Usable Host Range Broadcast Address
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:
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
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)
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:
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:
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.
Each station outputs a frame of 500 bits every 5000 ms, so the rate at which each station transmits
frames is:
The maximum number of stations N that can share the 100 Kbps slotted ALOHA channel without
exceeding the available bandwidth is N=1000.