(N14) Networking Basics part6 IP Address ipv4, subnet mask, private ip address
20230109 165847
CLASS A:0-127 :N.H.H.H
CLASS B:128-191:N.N.H.H
CLASS C:192-223:N.N.N.H
IP ADDRESS : NETWORK PORTION + HOST PORTION
Device must be in same network to communicate each other
Devices IP Address’s network portion must be same
Or Network ID must be same
–
If you want make communication between two or more different networks (network id is different to each other) you have to use Router (internetworking device)
–
PC1: 172.16.10.230
PC2: 172.16.100.12
Class B – N-172.16, – both will comm
PC3: 172.16.100.34
PC4:172.17.10.165 – N- 172.17
-pc1,pc2,pc3 will comm – pc4 not -out
A-101.1.19.100
B-101.10.2.65
C-100.10.2.66 –X -A, B –correction – 101.10.2.66
A – 201.100.10.2
B – 201.100.10.3
C – 201.100.11.4 -x
D – 201.101.10.5 -x
E – 200.100.10.6 -x
172.168.10.11 – 172.16.10.11– 190.168.10.22 -192.168.10.11.
Subnet Mask – tells what is your network ID
Subnet mask divide ip address into network portion and host portion
Subnet mask -use AND Gate truth table -AND Operation
Default Subnet Mask
Class A :255.0.0.0
Class B:255.255.0.0
Class C:255.255.255.0
Network portion – 1’s Host portion – 0’s
PC1 – 192.168.10.20 –1100 0000 . 1010 1000. 0000 1010. 0001 0100
255.255.255.0–1111 1111 . 1111 1111. 1111 1111 . 0000 0000
NW id- 192.168.10.0 –1100 0000. 1010 1000. 0000 1010. 0000 0000
AND Gate operating on IP address and Subnet mask gives Network ID
Subnet masks can be changeable, but if you change the subnet mask , the network id changes.
*Subnetting – divide a single ip network into multiple sub networks by changing subnet mask
AND Gate
A B Y=A.B
/n – slash notation or CIDR method or prefix – represents Subnet Mask
n – no of 1’s in subnet mask
255.0.0.0 -/8 – 1111 1111.0000 0000.0000 0000.0000 0000
255.255.0.0 /16
255.255.255.0 /24
255.255.255.128 /25
255.255.240 /20
You can write ip address and subnet mask
→ 192.168.1.12 255.255.255.0 or 192.168.1.12/24
—–an ip network range—
192.168.10.0 – network id – can’t assign to any host
192.168.10.1 – 1st valid host ip address
192.168.10.2
..
192.168.10.254 – last valid host ip address
192.168.10.255 – broadcast id – can’t assign to any host
–
192.168.11.0 – network id
—-
CLASS A:0-127 :N.H.H.H:255.0.0.0:2^24-2=16777216-2=16777214
CLASS B:128-191:N.N.H.H:255.255.0.0:2^16-2=65536-2=65354
CLASS C:192-223:N.N.N.H:255.255.255.0:2^8-2=256-2=254
Private IP Address
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
Private ip address non-routable in public (internet), not work on the internet.
To communicate in public(internet) need public ip address,
Anyone can use private ip address without any license or cost
But for public ip address have to pay for use(monthly or yearly)
NAT and PAT
NAT – Network Address Translation
PAT – Port Address Translation (NAT Overload)
NAT and PAT techniques used to communicate from inside(LAN/Private) to outside(Internet)
NAT – one to one – 1 private to 1 public
10 private – 10 device – 10 publics
PAT – many to one – 10 private 10 device to 1 public
Using port address technique
Views : 26
ipv4