NetLab-L2 3
NetLab-L2 3
Level: 4
Faculty of Engineering
Networks Lab
IPv4 Addressing
&
Network devices
Lect 2 & 3
Class A, B, C, D, and E. each class has a range of valid IP address. IP addresses from the first three classes
(A, B and C) can be used for host addresses, the other two classes are used for other purposes – class D for
multicast and class E for experimental purposes.
• Loopback addresses
127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
Commonly identified as only 127.0.0.1
Used on a host to test if TCP/IP is operational.
2
• Link-Local addresses
169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-assigned
addresses.
Used by Windows DHCP clients to self-configure when no DHCP servers are available.
Privet IP address
A private IP address is a range of non-internet facing IP addresses used in an internal network.
Notes:
❖ Subnet Mask
• The subnet mask is used in IPv4 and IPv6 to show what part of the address is the network portion
and what part of address is the host portion.
• It is a 32-bit number that distinguishes each octet in IP address.
• In IPv4 there are three default subnet masks corresponding to the three classes of IP address.
❖ Broadcast address
A broadcast address is an IP address that is used to target all systems on a specific subnet network instead of
single hosts. In other words, broadcast address allows information to be sent be all machines on a given
subnet rather than to a specific machine
3
IPv4 Subnetting
Subnetting is the strategy used to partition a single physical network into more than one smaller logical sub-
network into more than one smaller logical sub-networks (subnets). In other word, it is dividing a large
block of addresses into several contiguous sub-blocks and assigning these sub-blocks to different smaller
networks is called subnetting it is a practice that is widely used when classless addressing is done.
❖ Classful addressing
Classful addressing is a concept that divides the available address space of IPv4 into five classes namely A,
B, C, D & E. It concepts divide the address space into a fixed number of blocks and each block has a fixed
number of hosts.
IP = 192.168.0.0
Number of networks = 2N = 20 = 1
IP = 10.0.0.0/8
Number of networks = 2N = 20 = 1
4
❖ Classless addressing
Classless addressing is a concept of addressing the IPv4 addresses. It was adopted after the failure of
Classful addressing. The Classful addressing leads to wastage of addresses as it assigns a fixed-size block of
addresses to the customer. But, the classless addressing assigns a block of addresses to the customer
according to its requirement which prevents the wastage of addresses.
Classless Inter-Domain Routing, also called supernetting, is a way to more flexibly allocate IP addresses by
creating unique and more granular identifiers for networks and individual devices.
IP = 192.168.0.0
5
Ex 3: The IP address 192.168.0.0/27
IP = 192.168.0.0
IP = 192.168.0.109
Net ID = 192.168.0.96
6
Ex 5: IP address 172.16.0.0 /17
IP = 172.16 .0.0
IP = 172.16 .0.0
7
VLSM (Variable Length Subnet Mask)
A Variable Length Subnet Mask (VLSM) is a numerical masking sequence, or IP address subset, based on
overall network requirements. A VLSM allows a network administrator to use long masks for networks
with few hosts and short masks for networks with multiple hosts. In other word, VLSM is a technique that
allows network administrators to divide an IP address space into subnets of different sizes, unlike simple
same-size subnetting.
IP address 10.50.20.22
Step 3: Make And between the random IP and Mask to get the Net IP
10.50.20.22 = 00001010.00110010.00010100.00010110
And
255.255.254.0 = 11111111.11111111.11111110.00000000
=
00001010.00110010.00010100.00000000
10.50.20.0
Net ID =
255.255.254.0 = 11111111.11111111.11111110.00000000
10.50.20.22 = 00001010.00110010.00010100.00010110
broadcast IP = 00001010.00110010.00010101.11111111
= 10.50.21.255
8
Ex 2: hosts = 5000
Step 2: IP 110.50.30.10
Step 4:
255.255.224.0 = 11111111.11111111.11100000.00000000
110.50.30.10 = 01101110.00110010.00011110.00001010
broadcast IP = 01101110.00110010.00011111.11111111
= 110.50.31.255
Note:
Can get the broadcast IP by use the hops
hops = 2H = 25 = 32
9
192.168.1.0/24
100 hosts
Hops = 2h = 27 = 128
Net ID = 192.168.1.0 / 25
First IP = 192.168.1.1
Last IP = 192.168.1.126
Broadcast IP = 192.168.1.127
50 hosts
50 hosts = 2h – 2 = 26 – 2 = 64 – 2 = 62
Hops = 2h = 26 = 64
Net ID = 192.168.1.128 / 26
First IP = 192.168.1.129
Last IP = 192.168.1.190
Broadcast IP = 192.168.1.191
10
24 hosts
24 hosts = 2h – 2 = 25 – 2 = 32 – 2 = 30
Hops = 2h = 25 = 30
Net ID = 192.168.1.192 / 27
First IP = 192.168.1.193
Last IP = 192.168.1.222
Broadcast IP = 192.168.1.223
10 hosts
10 hosts = 2h – 2 = 24 – 2 = 16 – 2 = 14
Hops = 2h = 24 = 16
Net ID = 192.168.1.224 / 27
First IP = 192.168.1.225
Last IP = 192.168.1.238
Broadcast IP = 192.168.1.239
192.168.1.0 /24
55 hosts
55 hosts = 2h – 2 = 26 – 2 = 64 – 2 = 62
Hops = 2h = 26 = 64
11
Net ID = 192.168.1.0 / 26
First IP = 192.168.1.1
Last IP = 192.168.1.62
Broadcast IP = 192.168.1.63
26 hosts
55 hosts = 2h – 2 = 25 – 2 = 32 – 2 = 30
Hops = 2h = 25 = 32
Net ID = 192.168.1.64 / 27
First IP = 192.168.1.65
Last IP = 192.168.1.94
Broadcast IP = 192.168.1.95
12 hosts
12 hosts = 2h – 2 = 24 – 2 = 16 – 2 = 14
Hops = 2h = 24 = 16
First IP = 192.168.1.97
Last IP = 192.168.1.110
Broadcast IP = 192.168.1.111
2 hosts
2 hosts = 2h – 2 = 22 – 2 = 4 – 2 = 2
Hops = 2h = 22 = 4
12
Net ID = 192.168.1.112 / 30
First IP = 192.168.1.113
Last IP = 192.168.1.114
Broadcast IP = 192.168.1.115
2 hosts
2 hosts = 2h – 2 = 22 – 2 = 4 – 2 = 2
Hops = 2h = 22 = 4
Net ID = 192.168.1.116 / 30
First IP = 192.168.1.117
Last IP = 192.168.1.118
Broadcast IP = 192.168.1.119
Region 1
8000 hosts
Hops = 2h = 25 = 32
13
Net ID = 10.1.0.0 / 19
First IP = 10.1.0.1
Last IP = 10.1.31.254
Broadcast IP = 10.1.31.255
4000 hosts
Hops = 2h = 24 = 16
Net ID = 10.1.32.0 / 20
First IP = 10.1.32.1
Last IP = 10.1.47.254
Broadcast IP = 10.1.47.255
2000 hosts
Hops = 2h = 23= 16
Net ID = 10.1.48.0 / 20
First IP = 10.1.48.1
Last IP = 10.1.55.254
Broadcast IP = 10.1.55.255
Region 2
500 hosts
First IP = 172.20.0.1
Last IP = 172.20.1.254
Broadcast IP = 172.20.1.255
200 hosts
Hops = 2h = 20 = 1
First IP = 172.20.2.1
Last IP = 172.20.2.254
Broadcast IP = 172.20.2.255
100 hosts
Hops = 2h = 27 = 128
First IP = 172.20.3.1
Last IP = 172.20.3.126
Broadcast IP = 172.20.3.127
15
Network devices
Network devices are electronic devices which are required for communication and interaction between
devices on a computer network.
Repeater device
Repeater is an electronic device that receives a signal and retransmits it at a higher level or higher power,
so that the signal can cover longer distances
Hub Device
A Hub is a network hardware device for connecting multiple Ethernet devices together and making
them act as a single network segment.
If a hub receives a signal at any port, it resend it out of every port except that port.
A Hub works at the physical layer (layer 1).
A Hub transfers data at a maximum of 10 Mb/sec.
16
Switch Device
Ethernet Switch is a network hardware device for connecting multiple devices together.
Each port of the ethernet switch is considered as a segment.
A switch forwards the frame passed on the destination MAC address.
A switch works at the physical layer (layer 1) and the data link layer (layer 2).
A switch transfers data at a maximum of 10 Gb/sec.
Router device
A router is a networking device that forwards data packets between different networks.
Each port of the router is considered as a network.
A router forwards the packet passed on the destination IP address.
A router works at the physical layer (Layer 1), the data link layer (Layer 2) and the network layer
(Layer 3).
17
Server device
A Server is dedicated computer for a specific purpose, It provide services and functionality to other
computers.
A server has a motherboard that supports many processors and uses special RAMs called ECC rams
(Error correcting ram) for error checking and correction.
A Server has redundant power supply contains two (or more) power supply units inside it.
Firewall device
A firewall is a network security system that monitors and controls incoming and outgoing network traffic
based on predetermined security rules.
18
Icons Devices
19