Network layer
Sunday, March 23, 2025 9:18 PM
IP ( internet protocol )
Unique identifier for device in the network
Logical address
Contain 32 bit = 4 byte = 4 octet
01010100101001010101010100010111 >> Binary
192.168.1.5 >>>> decimal
10.0.0.1
172.16.1.1
Know IP
GUI
CLI
Lec 4 Page 1
Binary <<convert >> decimal
Sunday, March 23, 2025 9:28 PM
128 64 32 16 8 4 2 1 Decimal
0 0 0 0 0 1 0 1 5
0 0 0 0 1 0 0 0 8
0 0 1 0 0 0 1 1 35
0 0 0 0 1 0 1 0 10
1 0 0 0 0 0 0 0 128
128 64 32 16 8 4 2 1 Decimal
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 128
1 1 0 0 0 0 0 0 192
1 1 1 0 0 0 0 0 224
1 1 1 1 0 0 0 0 240
1 1 1 1 1 0 0 0 248
1 1 1 1 1 1 0 0 252
1 1 1 1 1 1 1 0 254
Lec 4 Page 2
1 1 1 1 1 1 1 0 254
1 1 1 1 1 1 1 1 255
x.x.x.x
(0-255)
300.1.2.3 xxxxx wrong ip
Lec 4 Page 3
IP Parts
Sunday, March 23, 2025 9:37 PM
Network part
Host part
IANA ( internet assigned number Authority )
0-127
Class A x.x.x.x >>> host = 2^24 -2 = 16,777,214 host
128-191
Class B X.X.X.X >>> host = 2^16 -2 = 65,534 host
192-223
Class C X.X.X.X >>> host = 2 ^8 -2 = 254 host
224-239
Class D X.X.X.X >> used for multicast address
240-255
Class E X.X.X.X >> experimental
No of host = 2^n -2 >>> n= host bits
200.1.1.5
160.1.2.2
10.0.0.1
Lec 4 Page 4
Ip address type
Sunday, March 23, 2025 10:11 PM
Network address
First ip in the network 192.168.1.0 >> network address
192.168.1.1
Broadcast address 192.168.1.2
Last ip in the network 192.168.1.3
192.168.1.4
Host address
Between network and BC address
192.168.1.254
192.168.1.255 >> BC address
172.16.0.0 >> net address
172.16.0.1
172.16.0.2
HMS 172.16.0.3
10 17 0
10 17 1
10 17 2 172.16.0.255
172.16.1.0
10 17 59 172.16.1.1
10 18 0 172.16.1.2
10 18 1 172.16.1.3
10 18 2
172.16.1.255
10 18 59 172.16.2.0
10 19 0
172.16.255.254
10 59 59 172.16.255.255 >> BC address
10.0.0.0 >> Network address
10.0.0.1
Lec 4 Page 5
10.0.0.0 >> Network address
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.255
10.0.1.0
10.0.1.1
10.0.1.2
10.0.1.255
10.0.2.0
10.0.2.1
10.0.2.255
10.0.3.0
10.0.255.255
10.1.0.0
10.255.255.254
10.255.255.255 >> BC address
Lec 4 Page 6
EX
Sunday, March 23, 2025 10:25 PM
192.168.1.5 192.168.1.0
192.168.1.1
Class = C
Network address =192.168.1.0 192.168.1.254
BC address = 192.168.1.255 192.168.1.255
First host = 192.168.1.1
Last host = 192.168.1.254
172.16.0.0
172.16.2.5 172.16.0.1
Class = B
Network address = 172.16.0.0 172.16.255.254
BC address = 172.16.255.255 172.16.255.255
First host = 172.16.0.1
Last host = 172.16.255.254
10.1.2.50 10.0.0.0
Class = A
Network address = 10.0.0.0 10.255.255.255
BC address = 10.255.255.255
First host = 10.0.0.1
Last host = 10.255.255.254
Lec 4 Page 7
Subnet Mask
Sunday, March 23, 2025 10:35 PM
Network bits = 1
Host bits = 0
10.0.0.0 /8 >> class A
1111 1111 . 0000 0000 .0000 0000 .0000 0000
255.0.0.0
172.16.0.0 /16 >> class B
11111111. 1111 1111 .0000 0000 .0000 0000
255.255.0.0
Net bits
192.168.1.0 /24 >> class C
1111 1111 .1111 1111 .1111 1111 . 0000 0000
255.255.255.0
Lec 4 Page 8
IPv4 problem
Sunday, March 23, 2025 11:14 PM
X.X.X.X / 32 bit
No of host = 2 ^ 32 -2 = 4 millar IP >> 2.7 millar ip
Short solution
Subnetting ( divide large network into smaller
net )
NAT ( network address translation )
Convert from many private ip to one public IP
private IP
class A >> 10.0.0.0 >> 10.255.255.255
class B >> 172.16.0.0 >> 172.31.255.255
class C >> 192.168.0.0 >> 192.168.255.255
Long solution
IPV6 128 bit
No of host = 2^128 -2 = 3E38
Lec 4 Page 9