Pages

Thursday, 15 August 2024

Subnetting


 
Question: How many networks and valid hosts for the given IP 192.168.10.0/25
Given IP :11000000.10101000.00001010.00000000
Subnet   :11111111.11111111.11111111.10000000
-----------------------------------------------------------
Network ID
NID : 192.168.10.0

Broadcast ID
BID : 192.168.10.127

Valid Host ID
VHID : 192.168.10.1 to 192.168.10.126

To Find the Number of Bits in 
Network ID :24
Subnet ID :1
Host ID :7

Number of Networks = 2^n where n no of network bits
                               =2^1
                               =2

Number of Valid Hosts = 2^h - 2 where h no of host bits
                                 =2^7 - 2
                                 =128 - 2
                                 =126

N/w NO

NETWORK ID

HOST ADDRESS

BROADCAST ID

1

192.168.10.0

192.168.10.1 - 192.168.10.126

192.168.10.127

2

192.168.10.128

192.168.10.129 - 192.168.10.254

192.168.10.255

Experimental set up of subnetting using Cisco Packet Racer:

Question: How many networks and valid hosts for the given IP 172.16.0.0/19
Given IP :10101100.00010000.00000000.00000000
Subnet   :11111111.11111111.11100000.00000000
-----------------------------------------------------------
Network ID
NID : 172.16.0.0

Broadcast ID
BID : 172.16.31.255

Valid Host ID
VHID : 172.16.0.1 to 172.16.31.254

To Find the Number of Bits in 
Network ID :16
Subnet ID :3
Host ID :13

Number of Networks = 2^n
                               =2^3
                               =8

Number of Valid Hosts = 2^h - 2
                                 =2^13 - 2
                                 =8192 - 2
                                 =8190

N/w NO

NETWORK ID

HOST ADDRESS

BROADCAST ID

1

172.16.0.0

172.16.0.0 - 172.16.31.254

172.16.31.255

2

172.16.32.0

172.16.32.1 - 172.16.63.254

172.16.63.255

3

172.16.64.0

172.16.64.1 - 172.16.95.254

172.16.95.255

4

172.16.96.0

172.16.96.1 – 172.16.127.254

172.16.127.255

5

172.16.128.0

172.16.128.1 – 172.16.159.254

172.16.159.255

6

172.16.160.0

172.16.160.1 – 172.16.191.254

172.16.191.255

7

172.16.192.0

172.16.192.1 – 172.16.223.254

172.16.223.255

8

172.16.224.0

172.16.224.1 – 172.16.255.254

172.16.255.255


Practice Questions
Question #1
What is the range of assignable IP addresses for a subnet containing an IP
address of 172.16.1.10 /19?
a. 172.16.0.1 – 172.16.31.254
b. 172.16.0.1 – 172.16.63.254
c. 172.16.0.0 – 172.16.31.255
d. 172.16.0.1 – 172.16.31.255
e. 172.16.0.0 – 172.16.63.254
Answer: a
To determine the subnets, assignable IP address ranges, and directed broadcast
addresses created by the 19-bit subnet mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask).In this question, we have a 19-bit subnet mask, which is written in binary as:
11111111 11111111 11100000 00000000
The interesting octet is the third octet, because the third octet (i.e. 11100000) is the first octet to contain a 0 in the binary.

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 19-bit subnet mask can be written in dotted decimal notation as: 255.255.224.0 Since the third octet is the interesting octet, the decimal value in the interesting octet is 224.

Step #3: Determine the block size by subtracting the decimal value of the interesting octet from 256. Block Size = 256 – 224 = 32

Step #4: Determine the subnets by counting by the block size in the interesting octet, starting at 0. Placing a zero in the first interesting octet identifies the first subnet as: 172.16.0.0 /19
We then count by the block size (of 32) in the interesting octet (the third octet in
this question) to determine the remaining subnets:
172.16.32.0 /19
172.16.64.0 /19
172.16.96.0 /19
172.16.128.0 /19
172.16.160.0 /19
172.16.192.0 /19
172.16.224.0 /19

Step #5: Identify the subnet address, the directed broadcast address, and the
usable range of addresses. Looking through the subnets created by the 19-bit subnet mask reveals that the IP address of 172.16.1.10 resides in the 172.16.0.0 /19 subnet. The directed broadcast address, where all host bits are set to a 1, is 1 less than the next subnet address. The next subnet address is 172.16.32.0. So, the directed broadcast address for the 172.16.0.0 /19 subnet is 1 less than 172.16.32.0, which is:172.16.31.255 The usable IP addresses are all the IP addresses between the subnet address and the directed broadcast address. Therefore, in this example, the assignable IP address range for the 172.16.0.0 /19 network is: 172.16.0.1 – 172.16.31.254

Question #2
You are assigning IP addresses to hosts in the 192.168.4.0 /26 subnet. Which two of the following IP addresses are assignable IP addresses that reside in that subnet?
a. 192.168.4.0
b. 192.168.4.63
c. 192.168.4.62
d. 192.168.4.32
e. 192.168.4.64
Answer: c and d
To determine subnets and usable address ranges created by the 26-bit subnet
mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask).In this question, we have a 26-bit subnet mask, which is written in binary as:
11111111 11111111 11111111 11000000
The interesting octet is the forth octet, because the forth octet (i.e. 11000000) is
the first octet to contain a 0 in the binary.

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 26-bit subnet mask can be written in dotted decimal notation as:
255.255.255.192
Since the forth octet is the interesting octet, the decimal value in the interesting
octet is 192.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256.
Block Size = 256 – 192 = 64

Step #4: Determine the subnets by counting by the block size in the interesting
octet, starting at 0.
Placing a zero in the first interesting octet identifies the first subnet as:
192.168.4.0 /26
We then count by the block size (of 64) in the interesting octet (the forth octet in
this question) to determine the remaining subnets:
192.168.4.64 /26
192.168.4.128 /26
192.168.4.192 /26

Step #5:
This question is asking about the 192.168.4.0 /26 subnet. From the above list of
subnets, we can determine that the assignable range of IP addresses for this subnet is 192.168.4.1 – 192.168.4.62. We can also determine that 192.168.4.0 is the network address, and 192.168.4.63 is the directed broadcast address. From the assignable range of IP addresses we have calculated, we can determine that the two assignable IP addresses given as options in this question are: 192.168.4.62 and 192.168.4.32.

Question #3
A host in your network has been assigned an IP address of 192.168.181.182 /25.
What is the subnet to which the host belongs?
a. 192.168.181.128 /25
b. 192.168.181.0 /25
c. 192.168.181.176 /25
d. 192.168.181.192 /25
e. 192.168.181.160 /25
Answer: a
To determine subnets and usable address ranges created by the 25-bit subnet
mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask). In this question, we have a 25-bit subnet mask, which is written in binary as: 11111111 11111111 11111111 10000000
The interesting octet is the forth octet, because the forth octet (i.e. 10000000) is the first octet to contain a 0 in the binary.

Step #2: Identify the decimal value in the interesting octet of the subnet mask. A 25-bit subnet mask can be written in dotted decimal notation as:
255.255.255.128 Since the forth octet is the interesting octet, the decimal value in the interesting octet is 128.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256. Block Size = 256 – 128 = 128

Step #4: Determine the subnets by counting by the block size in the interesting octet, starting at 0. Placing a zero in the first interesting octet identifies the first subnet as:192.168.181.0 /25 We then count by the block size (of 128) in the interesting octet (the forth octet in this question) to determine the remaining subnets, or in this case just a single additional subnet. 192.168.181.128 /25 Now that we have our two subnets identified, we can determine the subnet in which the IP address of 192.168.181.182 resides. Since the usable range of IP addresses for the 192.168.181.128 /25 network is 192.168.181.129 – 192.168.181.254 (because 192.168.181.128 is the network address, and 192.168.181.255 is the directed broadcast address), and since 192.168.181.182 is in that range, the subnet to which 192.168.181.182 /25 belongs is: 192.168.181.128 /25

Question #4
You are working with a Class B network with the private IP address of 172.16.0.0 /16. You need to maximize the number of broadcast domains, where each broadcast domain can accommodate 1000 hosts. What subnet mask should you use?
a. /22
b. /23
c. /24
d. /25
e. /26
Answer: a
In addition to testing your knowledge of subnetting, this question is also making sure you understand that a subnet is a broadcast domain. This should not be confused with a collision domain (i.e. each port on a switch is in its own collision domain). To determine how many host bits are required to support 1000 hosts, we can create a table from the following formula:
Number of Hosts = 2h – 2, where h is the number of host bits
From this formula, we can create the following table:
1 Host Bit => 0 Hosts
2 Host Bits => 2 Hosts
3 Host Bits => 6 Hosts
4 Host Bits => 14 Hosts
5 Host Bits => 30 Hosts
6 Host Bits => 62 Hosts
7 Host Bits => 126 Hosts
8 Host Bits => 254 Hosts
9 Host Bits => 510 Hosts
10 Host Bits => 1022 Hosts
This table tells us that a subnet with 10 host bits will accommodate the requirement of 1000 hosts. If we have 10 host bits, then we have a 22-bit subnet mask (i.e. 32 – 10 = 22). Also, by not using more host bits than we need, we are maximizing the number of subnets that can be created.

Question #5
What is the directed broadcast address of a subnet containing an IP address of
172.16.1.10 /19?
a. 172.16.15.255
b. 172.16.31.255
c. 172.16.255.255
d. 172.16.95.255
e. 172.16.0.255
Answer: b
To determine the subnets, assignable IP address ranges, and directed broadcast addresses created by the 19-bit subnet mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask). In this question, we have a 19-bit subnet mask, which is written in binary as:
11111111 11111111 11100000 00000000 The interesting octet is the third octet, because the third octet (i.e. 11100000) is the first octet to contain a 0 in the binary. 

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 19-bit subnet mask can be written in dotted decimal notation as: 255.255.224.0
Since the third octet is the interesting octet, the decimal value in the interesting
octet is 224.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256.
Block Size = 256 – 224 = 32

Step #4: Determine the subnets by counting by the block size in the interesting
octet, starting at 0. Placing a zero in the first interesting octet identifies the first subnet as:172.16.0.0 /19 We then count by the block size (of 32) in the interesting octet (the third octet in this question) to determine the remaining subnets:
172.16.32.0 /19
172.16.64.0 /19
172.16.96.0 /19
172.16.128.0 /19
172.16.160.0 /19
172.16.192.0 /19
172.16.224.0 /19

Step #5: Identify the subnet address, the directed broadcast address, and the
usable range of addresses. Looking through the subnets created by the 19-bit subnet mask reveals that the IP address of 172.16.1.10 resides in the 172.16.0.0 /19 subnet. The directed broadcast address, where all host bits are set to a 1, is 1 less than the next subnet address.The next subnet address is 172.16.32.0. So, the directed broadcast address for the 172.16.0.0 /19 subnet is 1 less than 172.16.32.0, which is: 172.16.31.255
The usable IP addresses are all the IP addresses between the subnet address and the directed broadcast address. Therefore, in this example, the assignable IP address range for the 172.16.0.0 /19 network is:
172.16.0.1 – 172.16.31.254

Question #6
A customer is using a Class C network of 192.168.10.0 subnetted with a 28-bit
subnet mask. How many subnets can be created by using this subnet mask?
a. 32
b. 16
c. 30
d. 8
e. 14
Answer: b
The subnet in this question is a Class C network, because there is a 192 in the first octet. A class C network has a natural mask of 24 bits. However, this network has a 28-bit subnet mask. Therefore, we have 4 borrowed bits, which are network bits added to a network’s natural mask (i.e. 28 – 24 = 4).
The number of subnets can be calculated as follows:
Number of Subnets = 2s, where s is the number of borrowed bits.
Therefore, in this question, the number of created subnets is 16:
Number of Subnets = 2^4 = 16

Question #7
Given a subnet of 172.16.56.0 /21, identify which of the following IP addresses
belong to this subnet. (Select 2.)
a. 172.16.54.129
b. 172.16.62.255
c. 172.16.61.0
d. 172.16.65.255
e. 172.16.64.1
Answer: b, c
To determine subnets and usable address ranges created by the 21-bit subnet
mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask).In this question, we have a 21-bit subnet mask, which is written in binary as:
11111111 11111111 11111000 00000000
The interesting octet is the third octet, because the third octet (i.e. 11111000) is
the first octet to contain a 0 in the binary subnet mask.

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 21-bit subnet mask can be written in dotted decimal notation as: 255.255.248.0
Since the third octet is the interesting octet, the decimal value in the interesting
octet is 248.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256.
Block Size = 256 – 248 = 8

Step #4: Determine the subnets by counting by the block size in the interesting
octet, starting at 0.Placing a zero in the first interesting octet identifies the first subnet as: 172.16.0.0 /21
We then count by the block size (of 8) in the interesting octet (the third octet in
this question) to determine the remaining subnets:
172.16.8.0 /21
172.16.16.0 /21
172.16.24.0 /21
172.16.32.0 /21
172.16.40.0 /21
172.16.48.0 /21
172.16.56.0 /21
172.16.64.0 /21
... SUBNETS OMITTED ...
We can stop counting after we pass the subnet we are being asked about.
Specifically, in this question, we’re being asked about 172.16.56.0 /21.
Step #5: Identify the subnet address, the directed broadcast address, and the
usable range of addresses.
The subnet address, where all host bits are set to a 0, is given:
172.16.56.0 /24
The directed broadcast address, where all host bits are set to a 1, is 1 less than
the next subnet address.
The next subnet address is 172.16.64.0. So, the directed broadcast address for
the 172.16.54.0 /21 subnet is 1 less than 172.16.64.0, which is:
172.16.63.255
The usable IP addresses are all the IP addresses between the subnet address
and the directed broadcast address. Therefore, in this example, the usable IP
address range for the 172.16.56.0 /21 network is:
172.16.56.1 – 172.16.63.254
The only IP addresses in this question that reside in this range are:
172.16.62.255
172.16.61.0
WARNING: Many CCNA R&S candidates look at IP addresses like these and
immediately assume they are not usable IP addresses, because they have a 0 or
a 255 in the forth octet. They argue that 172.16.61.0 is a subnet address and that
172.16.62.255 is a directed broadcast address.
While that would only be true of the subnet mask were 24-bits, remember that, by
definition, a subnet address has all of its host bits set to a 0, and a directed
broadcast address has all of its host bits set to a 1. In this question, we have 11
host bits (i.e. 32 – 21 = 11), not 8 host bits. So, 172.16.62.255 and 172.16.61.0
are actually usable IP addresses.

Question #8
What is the subnet address of the IP address 192.168.5.55 with a subnet mask
of 255.255.255.224?
a. 192.168.5.0 /27
b. 192.168.5.16 /27
c. 192.168.5.32 /27
d. 192.168.5.48 /27
e. 192.168.5.64 /27
Answer: c
To determine subnets and usable address ranges created by the 27-bit subnet
mask we perform the following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask). In this question, we have a 27-bit subnet mask, which is written in binary as:11111111 11111111 11111111 11100000
The interesting octet is the forth octet, because the forth octet (i.e. 11100000) is
the first octet to contain a 0 in the binary.

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 27-bit subnet mask can be written in dotted decimal notation as: 255.255.255.224 Since the forth octet is the interesting octet, the decimal value in the interesting octet is 224.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256.
Block Size = 256 – 224 = 32

Step #4: Determine the subnets by counting by the block size in the interesting
octet, starting at 0.
Placing a zero in the first interesting octet identifies the first subnet as:
192.168.5.0 /27
We then count by the block size (of 32) in the interesting octet (the forth octet in
this question) to determine the remaining subnets:
192.168.5.32 /27
192.168.5.64 /27
192.168.5.96 /27
192.168.5.128 /27
192.168.5.160 /27
192.168.5.192 /27
192.168.5.224 /27
Now that we have all of our subnets identified, we can determine the subnet in
which the IP address of 192.168.5.55 resides.
Since the usable range of IP addresses for the 192.168.5.32 /27 network is
192.168.5.33 – 192.168.5.62 (because 192.168.5.32 is the network address, and
192.168.5.63 is the directed broadcast address), and since 192.168.5.55 is in
that range, the subnet to which 192.168.5.55 /27 belongs is:
192.168.5.32 /27

Question #9
You are working for a company that will be using the 192.168.1.0 /24 private IP
address space for IP addressing inside their organization.
They have multiple geographical locations and want to carve up the 192.168.1.0
/24 address space into subnets. Their largest subnet will need 13 hosts.
What subnet mask should you use to accommodate at least 13 hosts per subnet,
while maximizing the number of subnets that can be created?
a. 255.255.255.248
b. 255.255.255.224
c. 255.255.255.252
d. 255.255.255.192
e. 255.255.255.240
Answer: e
We can determine the maximum number of hosts allowed in a subnet by raising
the number 2 to the power of the number of host bits and then subtracting 2. So,
the formula looks like this:
Maximum Number of Hosts per Subnet = 2h – 2, where h is the number of
host bits.
Why are we subtracting two? Well, there are two IP addresses in the subnet that
cannot be assigned. These addresses are: (1) the network address, where all of
the host bits are set to a 0 and (2) the directed broadcast address, where all of
the host bits are set to a 1.
In the actual exam, if you are given scratch paper or access to a note taking
application, you might want to write out a table such as the following for your
reference:
1 Host Bit: 21 – 2 = 0
2 Host Bits: 22 – 2 = 2
3 Host Bits: 23 – 2 = 6
4 Host Bits: 24 – 2 = 14
5 Host Bits: 25 – 2 = 30
6 Host Bits: 26 – 2 = 62
7 Host Bits: 27 – 2 = 126
8 Host Bits: 28 – 2 = 254
In this question, we’re asked to determine a subnet mask that accommodates at
least 13 hosts per subnet. By looking at the reference table we created, we can
see that 4 host bits (which support 14 hosts) would work, while 3 host bits (which
supports only 6 hosts) would not be enough.
So, we need a subnet with 4 host bits, which are enough host bits to meet the
design goal, but not more than we need. Using more host bits than we need
would violate the requirement to maximize the number of subnets.
A subnet mask with 4 host bits has 28 network bits (i.e. 32 – 4 = 28), and
therefore a 28-bit subnet mask. A 28-bit subnet mask can be written as:
255.255.255.240

Question #10
A customer is using a Class C network of 192.168.10.0 subnetted with a 28-bit
subnet mask. How many assignable addresses are available in each of the
subnets?
a. 32
b. 16
c. 30
d. 8
e. 14
Answer: e
An IPv4 address contains a total of 32 bits. Since, in this question, we have 28
subnet bits, the number of host bits is 4 (i.e. 32 – 28 = 4). The number of
assignable IP addresses in a subnet can be calculated as follows:

Number of Assignable IP Addresses = 2h – 2, where h is the number of host
bits.Therefore, in this question, each subnet has 14 assignable IP addresses:
Number of Assignable IP Addresses = 2^4 – 2 = 16 – 2 = 14

Question #11
An IP address of 192.168.0.100 /27 belongs to which of the following subnets?
a. 192.168.0.92
b. 192.168.0.128
c. 192.168.0.64
d. 192.168.0.96
e. 192.168.0.32
Answer: d
To determine the subnets created by the 27-bit subnet mask we perform the
following steps:

Step #1: Identify the interesting octet (i.e. the octet that contains the first zero in
the binary subnet mask).
In this question, we have a 19-bit subnet mask, which is written in binary as:
11111111 11111111 11111111 11100000
The interesting octet is the forth octet, because the forth octet (i.e. 11100000) is
the first octet to contain a 0 in the binary.

Step #2: Identify the decimal value in the interesting octet of the subnet mask.
A 27-bit subnet mask can be written in dotted decimal notation as:
255.255.255.224
Since the forth octet is the interesting octet, the decimal value in the interesting
octet is 224.

Step #3: Determine the block size by subtracting the decimal value of the
interesting octet from 256.
Block Size = 256 – 224 = 32

Step #4: Determine the subnets by counting by the block size in the interesting
octet, starting at 0.
Placing a zero in the first interesting octet identifies the first subnet as:
192.168.0.0 /27
We then count by the block size (of 32) in the interesting octet (the forth octet in
this question) to determine the remaining subnets:
192.168.0.32 /27
192.168.0.64 /27
192.168.0.96 /27
192.168.0.128 /27
192.168.0.160 /27
192.168.0.192 /27
192.168.0.224 /27

Step #5: Identify the subnet address of the IP address 192.168.0.100 /27.Looking through the subnets created by the 27-bit subnet mask reveals that the IP address of 192.168.0.100 resides in the 192.168.0.96 subnet.

Question #12
What subnet mask should be used to subnet the 192.168.10.0 network to support the number of subnets and IP addresses per subnet shown in the following topology?
a. 255.255.255.0
b. 255.255.255.128
c. 255.255.255.192
d. 255.255.255.224
e. 255.255.255.240
Answer: c
To meet the design requirements, four subnets must be created, and each
subnet must accommodate a maximum of 50 IP addresses. We can begin by creating a listing of how many subnets are created from different numbers of borrowed bits, using the formula:
Number of Subnets Created = 2n, where n is the number of borrowed bits
1 borrowed bits => 2 subnets
2 borrowed bits => 4 subnets
3 borrowed bits => 8 subnets
4 borrowed bits => 16 subnets
5 borrowed bits => 32 subnets
6 borrowed bits => 64 subnets
7 borrowed bits => 128 subnets
From this, we can see we need at least 2 borrowed bits to accommodate 4 subnets. However, we need to make sure the subnet will accommodate 50 IP
addresses.  To determine this, we can use the formula:
Number of IP Addresses = 2h – 2, where h is the number of host bits

If we have 2 borrowed bits (i.e. the minimum number of borrowed bits required
for 4 subnets), we have 6 host bits (i.e. 8 – 2 = 6). From the above formula, we
can determine the number of IP addresses supported by 6 host bits.
Number of IP Addresses = 26 – 2 = 62
Since 6 host bits meet our requirement of at least 50 IP addresses per subnet,
we can use a 26-bit subnet mask (i.e. 2 bits added to the Class C default mask
(also known as the natural mask) of 24 bits). A 26-bit subnet mask can be written
as: 255.255.255.192

Tuesday, 13 August 2024

Network Devices

Network devices are physical hardware components that link computers, printers, fax machines, and other electronic devices to a network. These devices quickly, securely, and accurately transfer data over the same or separate networks. Network equipment can be either intra or inter-networked. 

A NIC card or RJ45 connection is an installed device, whereas a router, switch, or another network device is a network component. 


Modem
A computer may send and receive data through phone or cable lines with the help of a modem. In contrast to a telephone line or cable wire, which can only carry analog data, the data saved on a computer is digital.

The modem’s primary job is to transform digital signals between analog and digital and vice versa. Combining a modulator and a demodulator creates a modem. When digital data is sent by the computer, the modulator turns it into analog data. When analog data signals are received by the computer, they are demodulated into digital data.

Types of Modem
There are several different types of modems depending on the direction of data transmission:
Simplex − Using a simplex modem, data can only be transferred from a digital device to a network (modulator) or from a network to a digital device in one direction (demodulator).
Half duplex − While a half-duplex modem can transport data in both ways, it can do so only in one direction at a time.
Full duplex − A full duplex modem may simultaneously send data in both directions.

Hub:
Hubs work in the physical layer of the OSI model. A hub is a device for connecting multiple Ethernet devices and making them act as a single network segment. It has multiple inputs and output ports in which a signal introduced at the input of any port appears at the output of every port except the original incoming port.

A hub can be used with both digital and analog data. Hubs do not perform packet filtering or addressing function, they send the data packets to all the connected devices.

Demonstrate the functionality of a hub using Cisco Packet Tracer (CPT)

1. Open Cisco Packet Tracer
Launch Cisco Packet Tracer on your computer.

2. Create a New Project
Go to File > New to start a new project.

3. Add Devices to Your Workspace
From the bottom device toolbar, choose the following devices:
Hub: You can find this under the Network Devices tab > Hubs.
PCs: Select End Devices > PC.
Drag and drop one Hub and at least two PCs onto the workspace.

4. Connect the Devices
Choose the Connections icon (it looks like a lightning bolt).
Select the Copper Straight-Through cable.

5. Click on the first PC, choose the FastEthernet0 interface.
Connect it to one of the ports on the Hub.
Repeat this process for the second PC, connecting it to a different port on the Hub.

6. Configure IP Addresses for the PCs
Click on the first PC and then on the Desktop tab.

Select IP Configuration.
Assign an IP address and subnet mask (e.g., IP: 192.168.1.1, Subnet Mask: 255.255.255.0).
Repeat this for the second PC, assigning a different IP address but the same subnet mask (e.g., IP: 192.168.1.2, Subnet Mask: 255.255.255.0).

7. Verify Connectivity
On the first PC, go to Command Prompt under the Desktop tab.
Type ping 192.168.1.2 and press Enter.
You should see replies from the second PC if everything is set up correctly.

8. Observe the Hub’s Operation
To observe how the hub works, click on the Hub.
Go to the Physical tab and then select Power to turn it on.

Note that a hub is a Layer 1 device and doesn’t have advanced configuration options. It simply forwards packets to all connected devices.

9. Use Simulation Mode for Detailed Analysis
Switch to Simulation Mode by clicking the Simulation tab.
Set up a simple Ping simulation by adding an Event to the network.
Observe how the hub broadcasts the frame to all ports and how only the intended recipient responds.

10. Verify Frames Being Broadcast
In Simulation Mode, add the PCs and use the Add Simple PDU tool to send a message from one PC to another.
Watch how the hub sends the frame out of all ports, but only the destination PC will respond.

11. Save Your Project
Go to File > Save and choose a location to save your Packet Tracer file for future reference.

Repeater:
A repeater operates at the physical layer of the OSI model.A Repeater connects two segments of a network cable.Sometimes it regenerates the signals to proper amplitudes and sends them to the other segment.If the signal becomes weak, it can copy the signal bit by bit and regenerate it at the original strength.It is a 2-port device.

Demonstrate the functionality of a Repeater using Cisco Packet Tracer (CPT):
A repeater is used to extend the range of a network by amplifying signals, so this exercise will help you understand how a repeater works to maintain connectivity over greater distances.

1. Open Cisco Packet Tracer
Launch Cisco Packet Tracer on your computer.

2. Create a New Project
Go to File > New to start a new project.

3. Add Devices to Your Workspace
From the bottom device toolbar, choose the following devices:

Repeater: You can find this under the Network Devices tab > Hubs.
PCs: Select End Devices > PC.
Drag and drop one Repeater and at least two PCs onto the workspace.

4. Connect the Devices
Choose the Connections icon (it looks like a lightning bolt).
Select the Copper Straight-Through cable.
Connect one PC to the first port of the Repeater.
Connect the Repeater’s second port to another PC.
Note: Ensure the distance between the PCs is sufficient to show the benefit of the repeater. You may want to place the repeater in between to visually represent its function.

5. Configure IP Addresses for the PCs
Click on the first PC and then on the Desktop tab.

Select IP Configuration.

Assign an IP address and subnet mask (e.g., IP: 192.168.1.1, Subnet Mask: 255.255.255.0).

Repeat this for the second PC, assigning a different IP address but the same subnet mask (e.g., IP: 192.168.1.2, Subnet Mask: 255.255.255.0).

6. Verify Connectivity
On the first PC, go to Command Prompt under the Desktop tab.
Type ping 192.168.1.2 and press Enter.
You should see replies from the second PC if everything is set up correctly.

7. Observe the Repeater’s Operation
To observe the repeater's operation, you can use the Physical tab to view the repeater's connections and ensure it’s powered on.
The repeater doesn’t have advanced settings; it simply forwards electrical signals to extend the network range.

8. Use Simulation Mode for Detailed Analysis
Switch to Simulation Mode by clicking the Simulation tab.
Set up a simple Ping simulation by adding an Event to the network.
Observe how the signal from one PC travels through the repeater to the other PC.

9. Verify Signal Transmission
In Simulation Mode, add the PCs and use the Add Simple PDU tool to send a message from one PC to another.
Watch how the repeater amplifies the signal to ensure it reaches the other PC.

10. Save Your Project
Go to File > Save and choose a location to save your Packet Tracer file for future reference.

Switch
Switches may operate at one or more layers of the OSI model. They may operate in the data link layer and network layer; a device that operates simultaneously at more than one of these layers is known as a multilayer switch.

A Switch can check the errors before forwarding the data, which makes it more efficient and improves its performance. A switch is the better version of a hub. It is a multi-port bridge device.


Demonstrate the functionality of a switch using Cisco Packet Tracer (CPT): Fundamental role of a switch in forwarding traffic efficiently within a network. Here’s a step-by-step guide to illustrate the operation of a switch:
1. Open Cisco Packet Tracer
Launch Cisco Packet Tracer on your computer.

2. Create a New Project
Go to File > New to start a new project.

3. Add Devices to Your Workspace
From the bottom device toolbar, choose the following devices:
Switch: You can find this under the Network Devices tab > Switches.
PCs: Select End Devices > PC.
Drag and drop one Switch and at least two PCs onto the workspace.

4. Connect the Devices
Choose the Connections icon (it looks like a lightning bolt).
Select the Copper Straight-Through cable.
Connect one PC to one of the ports on the Switch.
Connect the second PC to another port on the Switch.
Repeat this process if you want to add more PCs to the Switch.

5. Configure IP Addresses for the PCs
Click on the first PC and then on the Desktop tab.
Select IP Configuration.
Assign an IP address and subnet mask (e.g., IP: 192.168.1.1, Subnet Mask: 255.255.255.0).
Repeat this for the second PC, assigning a different IP address but within the same subnet (e.g., IP: 192.168.1.2, Subnet Mask: 255.255.255.0).

6. Verify Connectivity
On the first PC, go to Command Prompt under the Desktop tab.
Type ping 192.168.1.2 and press Enter.
You should see replies from the second PC if everything is set up correctly.

7. Observe the Switch’s Operation
To observe the switch’s operation, click on the Switch.
Go to the CLI tab to access the command-line interface.
Use basic commands like show mac address-table to view the MAC address table of the switch.
Example CLI Commands:
show mac address-table: Displays the MAC address table, showing which MAC addresses are associated with which switch ports.

commands to show MAC address using CLI

Switch>enable

Switch#show mac-address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----

   1    0000.0cc0.6a7d    DYNAMIC     Fa0/2
   1    0002.4ab0.2786    DYNAMIC     Fa0/1
   1    0004.9ab0.85da    DYNAMIC     Fa0/3

8. Use Simulation Mode for Detailed Analysis
Switch to Simulation Mode by clicking the Simulation tab.
Add a simple Ping simulation by using the Add Simple PDU tool to send a message from one PC to another.
Observe how the switch learns the MAC addresses and forwards the frame only to the port where the destination PC is connected.

9. Verify Frame Forwarding
In Simulation Mode, observe how the switch uses its MAC address table to forward the frame from one PC to another.
Note that the switch only sends the frame to the port associated with the destination MAC address, unlike a hub, which would broadcast the frame to all ports.

10. Save Your Project
Go to File > Save and choose a location to save your Packet Tracer file for future reference.

Bridge
A bridge operates at the data link layer of the OSI model. It can read only the outmost hardware address of the packet but cannot read the IP address. It reads the outmost section of the data packet to tell where the message is going. It reduces the traffic on other network segments. It does not send all the packets. So, a bridge can be programmed to reject packets from a particular network.

Note:
1. Bridge is a layer 2 device which is used to connect the same protocols used for  2 different  LANS

2. Router is a layer 3 device which is used to connect the Different protocols used for 2 different  LANS

Steps to Observe MAC Address Functionality:
Setup a Simple Network:
Create a basic network topology with devices such as PCs, switches (bridges), and routers.
For example, connect two PCs (PC1 and PC2) to a switch.

Configure IP Addresses:
Assign IP addresses to the PCs to ensure they can communicate with each other.
E.g., assign 192.168.1.1/24 to PC1 and 192.168.1.2/24 to PC2.

Access the Switch (Bridge):
Click on the switch in the Packet Tracer workspace to open the switch's configuration menu.

Access the CLI (Command Line Interface) of the switch.
Send Traffic Between PCs:

Use one of the PCs (e.g., PC1) to send a ping to the other PC (e.g., PC2).
This will generate traffic that the switch needs to forward, prompting it to learn the MAC addresses.
View the MAC Address Table:

On the switch's CLI, enter the command show mac address-table or show mac-address-table.
This command will display the MAC addresses that the switch has learned and the corresponding ports.

Switch> enable
Switch# show mac-address-table
Analyze the MAC Address Table:

The MAC address table will show you the MAC addresses of the devices connected to the switch and the port numbers they are associated with.
Each entry in the MAC address table indicates that the switch has learned the MAC address of a device on a specific port.

Router
Routers are small physical devices that operate at the network layer to join multiple networks together.A router is a device like a switch that routes data packets based on their IP addresses.
Routers normally connect LANs and WANs and have a dynamically updating routing table based on which they make decisions on routing the data packets.
A Router divides the broadcast domains of hosts connected through it.

Routers perform the traffic directing functions on the Internet. A data packet is typically forwarded from one router to another through the networks that constitute the internetwork until it reaches its destination code.

Routers may also be used to connect two or more logical groups of computer devices known as subnets, each with a different subnetwork address. The subnet addresses recorded in a router do not necessarily map directly to the physical interface connections.

Demonstrate the functionality of a Router using Cisco Packet Tracer (CPT):
1: Setup the Network Topology
Open Cisco Packet Tracer.

Add Devices to the Workspace:

Drag and drop the following devices onto the workspace:
1 Router (e.g., Router0)
2 Switches (e.g., Switch0, Switch1)
4 PCs (e.g., PC0, PC1, PC2, PC3)
Connect Devices:

Use the Copper Straight-Through cable to connect:
PC0 to Switch0
PC1 to Switch0
PC2 to Switch1
PC3 to Switch1
Use the Copper Straight-Through cable to connect:
Switch0 to Router0 on the GigabitEthernet 0/0 interface
Switch1 to Router0 on the GigabitEthernet 0/1 interface

2: Configure IP Addresses on PCs
Configure PC0 and PC1 (Subnet 1):
Click on PC0, go to the Desktop tab, and select IP Configuration.

Assign the following IP details:
IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

Repeat the same for PC1, but with an IP Address of 192.168.1.3.
Configure PC2 and PC3 (Subnet 2):
Click on PC2, go to the Desktop tab, and select IP Configuration.

Assign the following IP details:
IP Address: 192.168.2.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.2.1
Repeat the same for PC3, but with an IP Address of 192.168.2.3.

3: Configure IP Addresses on Router Interfaces
Access Router CLI:
Click on the Router0 and go to the CLI tab.
Configure Router Interfaces:
Enter the following commands to configure the IP addresses for the router’s interfaces:
shell
Copy code
Router> enable
Router# configure terminal
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip address 192.168.2.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# end
Router# write memory
This sets up the router to be in the same subnet as the PCs on their respective networks.

4: Test Connectivity Between PCs
Ping within the Same Subnet:

Go to PC0, open the Command Prompt, and type the following command:
shell
Copy code
ping 192.168.1.3
This tests connectivity between PC0 and PC1 on the same subnet.
Ping Across Different Subnets:

From PC0, ping PC2 using the command:
shell
Copy code
ping 192.168.2.2
If successful, this shows that the router is correctly routing packets between different subnets.

Two types of routers −
Static routers – Static routers are configured manually and route data packets based on the information in a router table.

Dynamic routers – Dynamic routers use adaptive routing which is a process where a router can forward data by a different route

Gateway
A gateway is an internetworking capable of joining together two networks that use different base protocols.

A network gateway can be implemented completely in software, hardware, or a combination of both, depending on the types of protocols they support.

A network gateway can operate at any level of the OSI model. A broadband router typically serves as the network gateway, although ordinary computers can also be configured to perform equivalent functions.

A gateway is a router or proxy server that routes between networks.
A gateway belongs to the same subnet to which the PC belongs.

Steps to Configure and Use a Gateway in Cisco Packet Tracer
Create a Basic Network Topology:

Place at least one PC, one switch, and one router on the workspace.
Connect the PC to the switch using a copper straight-through cable.
Connect the switch to the router using another copper straight-through cable.
Assign IP Addresses:

Assign an IP address to the PC.
Click on the PC, go to the Desktop tab, and select IP Configuration.
Assign an IP address (e.g., 192.168.1.2) and a subnet mask (e.g., 255.255.255.0).
Set the default gateway to the router's IP address on the same network (e.g., 192.168.1.1).
Configure the router's interface:

Click on the router, go to the CLI or Config tab.
Select the interface connected to the switch (e.g., GigabitEthernet0/0).
Assign an IP address (e.g., 192.168.1.1) and subnet mask (255.255.255.0) to the router's interface.
Enable the interface with the no shutdown command if using the CLI.

Example configuration for the router:
Router> enable
Router# configure terminal
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown

Configure the PC's Default Gateway:
The PC's default gateway should be the IP address of the router's interface connected to the switch (e.g., 192.168.1.1).
This tells the PC where to send packets destined for outside the local network.
Test Connectivity:

You can test connectivity by pinging the router's IP address from the PC.
Open the command prompt on the PC (Desktop > Command Prompt) and type:
ping 192.168.1.1
If everything is configured correctly, you should receive replies, indicating that the PC can communicate with the router (gateway).
Routing Beyond the Gateway (Optional):

If your router is connected to another network (e.g., a simulated internet), you can configure routing on the router to forward traffic to that network.
For example, you can set up a static route or use a dynamic routing protocol to enable communication between different networks.




Networking Basic Commands

color

help color

ipconfig

ipconfig/all

nslookup

1. IPCONFIG

The IPCONFIG network command provides a comprehensive view of information regarding the IP address configuration of the device we are currently working on.

The IPConfig command also provides us with some variation in the primary command that targets specific system settings or data, which are:

IPConfig/all - Provides primary output with additional information about network adapters.

IPConfig/renew - Used to renew the system’s IP address.

IPConfig/release - Removes the system’s current IP address.

Command to enter in Prompt - ipconfig


2. NSLOOKUP

The NSLOOKUP command is used to troubleshoot network connectivity issues in the system. Using the nslookup command, we can access the information related to our system’s DNS server, i.e., domain name and IP address.

Command to enter in Prompt - nslookup

3. HOSTNAME

The HOSTNAME command displays the hostname of the system. The hostname command is much easier to use than going into the system settings to search for it.

Command to enter in Prompt - hostname

4. PING

The Ping command is one of the most widely used commands in the prompt tool, as it allows the user to check the connectivity of our system to another host.

This command sends four experimental packets to the destination host to check whether it receives them successfully, if so, then, we can communicate with the destination host. But in case the packets have not been received, that means, no communication can be established with the destination host.

Command to enter in Prompt - ping www.destination_host_name.com

5. TRACERT

The TRACERT command is used to trace the route during the transmission of the data packet over to the destination host and also provides us with the “hop” count during transmission.

Using the number of hops and the hop IP address, we can troubleshoot network issues and identify the point of the problem during the transmission of the data packet.

Command to enter in Prompt- tracert IP-address OR tracert www.destination_host_name.com

6. NETSTAT

The Netstat command as the name suggests displays an overview of all the network connections in the device. The table shows detail about the connection protocol, address, and the current state of the network.

Command to enter in Prompt - netstat

7. ARP(Address Resolution Protocol)

The ARP command is used to access the mapping structure of IP addresses to the MAC address. This provides us with a better understanding of the transmission of packets in the network channel.

Command to enter in Prompt - arp

8.SYSTEMINFO

Using the SYSTEMINFO command, we can access the system’s hardware and software details, such as processor data, booting data, Windows version, etc.

Command to enter in Prompt - systeminfo

Peer-to-Peer Networks

  Peer-to-Peer (P2P) networks are a decentralized type of network architecture where each device (or node) on the network can act as both a...