DEV Community

Santhosh V
Santhosh V

Posted on • Edited on

CA 25 - IP address and Subnet

IP (internet protocol):

It is a unique number assigned to every device on a network by a router. Its like a home address and computers communicate to other devices using ip.

for example:
Think of a single computer as a house and every house has a unique address and just like that computer has a unique address called ip.

The computer or a device connected to a network in a router uses its ip address to
Identify itself
Find the destination device
Communicate over the network

Example: 192.168.29.144
         10.1.34.224
Enter fullscreen mode Exit fullscreen mode

Types of IP address:

It has two types called public and private ip

public ip: It is assigned by the ISP which is used on the internet

Example: 49.43.249.95
Enter fullscreen mode Exit fullscreen mode

private ip: It is used locally inside the router that u are connected which is also called as LAN.

Example: 192.168.29.144
Enter fullscreen mode Exit fullscreen mode

IPv4: This type is most commonly used which contain 32bits and divided into 4 octets, 8 bits each. Range of the each octets will be upto 0-255

Example: 192.168.29.144
Enter fullscreen mode Exit fullscreen mode

IPv6: It is a new version which is longer and supports more devices but its not used commonly

Example:2405:201:e045:50d8:603c:7024:a411:4263
Enter fullscreen mode Exit fullscreen mode

Parts of IP address:
IP Address has 2 parts namely Network and Host part.

Network part: defines the network (router)
Host part: defined the device in network (Hotspot)

Subnets:
A subnet is simply a smaller division of a larger network.

Instead of having one big network with many devices, It split it into smaller networks.

It is used because of Better performance (less traffic), Improved security and Easier to manage

Example: 
IP Address:   192.168.29.145
Subnet Mask:  255.255.255.0
Enter fullscreen mode Exit fullscreen mode

Top comments (0)