IP/Network

 

 

 

 

Addressing

 

In an IP network, addressing is used to uniquely identify each device on the network and to facilitate communication between devices (Examples of the devices is network card in your PC or WiFi module in your PC or Mobile phone). Each device on the network is assigned a unique IP address, which is a 32-bit number represented in dotted decimal notation (e.g. 192.168.1.1).

 

When we use mailing address to send post mails or packages to other person, internet is using IP address to send data to a specific locations (e.g, another network devices).

 

NOTE : The practical goal of this page is to get you to have understandings on the IP address information on your PC or mobile phone as shown below.

 

 

 

 

 

Two Types of IP address

 

 

There are two main types of IP addresses:

  • IPv4: This is the most common type of IP address and is composed of four decimal numbers separated by dots. Each decimal number represents 8 bits, which means that IPv4 addresses have a maximum value of 32 bits. IPv4 addresses are divided into two parts: the network part and the host part. The network part identifies the network to which the device is connected, while the host part identifies the individual device on that network.
  • IPv6: This is a newer type of IP address that uses 128 bits to represent the address. IPv6 addresses are represented using hexadecimal notation and are separated into eight groups of four hexadecimal digits. IPv6 addresses are designed to provide a larger address space and improved security compared to IPv4.

NOTE : Why we need IPv6 ? It is not mandatory for a network device to support IPv6 and still so many devices are based on IPv4, but there are some important reason why we introduced IPv6 as decribed below.

  • The main reason for the development of IPv6 is the exhaustion of IPv4 addresses.
  • IPv4 uses a 32-bit address space, which allows for approximately 4.3 billion unique IP addresses. With the growth of the Internet and the increasing number of devices connected to it, this limited address space is no longer sufficient.
  • IPv6 uses a 128-bit address space, which allows for approximately 3.4×10^38 unique IP addresses. This virtually unlimited address space ensures that every device connected to the Internet can be assigned a unique address, even as the number of connected devices continues to grow.
  • In addition to providing more address space, IPv6 also offers other advantages over IPv4, including improved security, better support for mobile devices, and simplified network management. IPv6 also allows for more efficient routing, which can improve the overall performance of the Internet

NOTE : The detailed concept and mechanism of IPv6 is pretty complicated and too much to be covered in this page. I wrote separate notes for IPv6. Check these notes if you are interested in the further details on IPv6.

 

 

 

Static vs Dynamic addressing

 

 

IP addressing is typically handled by a network administrator, who assigns IP addresses to devices on the network. There are two main methods for assigning IP addresses:

  • Static addressing: In this method, the network administrator manually assigns IP addresses to each device on the network. This method is simple and reliable but can be time-consuming for large networks.
  • Dynamic addressing: In this method, IP addresses are assigned automatically using a protocol such as Dynamic Host Configuration Protocol (DHCP). With dynamic addressing, devices can be added or removed from the network without the need for manual configuration, making it more scalable for larger networks.

NOTE : Why we introduce the concept of Dynamic Addressing ? Dynamic IP addressing was introduced to conserve the limited number of available IP addresses and to simplify the management of IP addresses.

  • In the early days of the Internet, IP addresses were assigned statically, meaning that each device was assigned a unique, fixed IP address. However, this approach became impractical as the number of devices connected to the Internet increased rapidly, and there were not enough IP addresses available to assign to all of them.
  • Dynamic IP addressing allows network administrators to allocate IP addresses only when they are needed, and then reclaim them when they are no longer in use. This ensures that IP addresses are used efficiently and not wasted, and it also simplifies the management of IP addresses.
  • In a dynamic IP addressing system, devices are assigned IP addresses temporarily, typically for a period of hours or days. When the period expires, the IP address is released back into the pool of available addresses, and can be reassigned to another device as needed. This approach allows a large number of devices to share a smaller pool of available IP addresses, and it also reduces the likelihood of conflicts or errors caused by multiple devices using the same IP address.

 

Overall, IP addressing is a critical component of IP networking, enabling devices to communicate with each other across a network and facilitating the transmission of data between devices.

 

 

 

How to check IP address of your device

 

Followings are some of the examples of IP address assigned to a device. If you are using a computer, you can get this information by runing the command ipconfig (Windows) or ifconfig (Linux).

 

 

 

 

Following is an example of IP address assigned to the WiFi on my mobile phone (Android)

 

 

NOTE : You may say 'How these IPs are assigned to my PC (or my phone) ?. I have never assigned these addresses myself.' It is because IP is dynamically (automatically) assigned to your PC when you connect LAN cable to your PC LAN card or turn on WiFi, or when you power on your mobile phone.

 

 

 

What is Subnet ?

 

A subnet, or subnetwork, is a portion of an IP network that shares a common network address. In other words, it is a way to divide a larger network into smaller, more manageable networks.

 

IP addresses consist of two parts: the network portion and the host portion. The network portion identifies the network to which the device is connected, while the host portion identifies the specific device on that network. Subnetting involves borrowing bits from the host portion of an IP address to create additional network addresses.

 

For example, if a network is assigned the IP address 192.168.1.0, subnetting can be used to divide this network into smaller subnetworks, each with its own network address. By borrowing bits from the host portion of the IP address, you can create additional network addresses, such as 192.168.1.64, 192.168.1.128, and so on. This can help to improve network performance, security, and manageability

 

NOTE : Even if you are not an expert in IP network, you may have some basic understandings on the concept of IP address or can learn relatively easily about it, but it may not easy to get the clear understandings on the concept of subnet. So don't be disappointed if you don't get understand this concept with the first reading.

 

Let's explain on the concept of the subnet in more casual way.

 

Imagine that you have a big neighborhood with lots of houses and people living in them. Sometimes it can be hard to keep track of who lives where and who needs what. To make things easier, you might divide the neighborhood into smaller parts, like streets or blocks.

 

Subnetting is kind of like that. Instead of a neighborhood, we have a big computer network with lots of devices, like computers and phones, all talking to each other. To make it easier to keep track of all these devices, we divide the network into smaller parts, like streets or blocks.

 

Each part, or subnet, has its own unique address, just like each house on a street has its own unique address. This makes it easier for devices on one subnet to talk to each other without getting mixed up with devices on another subnet.

 

Subnetting can also help make the network faster and more secure. By dividing it up into smaller parts, we can reduce the amount of traffic on each part, which makes everything run smoother. We can also put special protections around certain parts of the network to keep them safe from bad guys who might try to break in.

 

So, subnetting is a way to divide a big computer network into smaller parts, just like we divide a big neighborhood into smaller parts. This makes it easier to keep track of everything and keeps everything running smoothly and securely

 

 

 

Why we use the concept of subnet ?

 

As explained above, the main reason (motivation) of subnet is to simplify the management of networking. In addition to this, there are additional motivations as below.

  • Network segmentation: Subnetting allows us to break a large network into smaller, more manageable segments. By doing this, we can reduce network congestion, improve performance, and isolate problems when they occur.
  • Improved security: Subnetting can help improve network security by isolating different types of traffic on different subnets. For example, we might put sensitive data on one subnet and general Internet traffic on another. This way, if one subnet is compromised, it is less likely that the other subnets will be affected.
  • IP address conservation: Subnetting can help conserve IP addresses by allowing us to reuse addresses in different parts of the network. This is particularly important given the limited number of IPv4 addresses available.
  • Routing efficiency: Subnetting can improve routing efficiency by reducing the size of routing tables and limiting the scope of broadcasts and multicasts.

 

 

 

What is Subnet Mask ?

 

A subnet mask is a value used in computer networking to determine which part of an IP address represents the network portion and which part represents the host portion. In other words, it's a way to identify the boundaries between different subnets on a network.

 

A subnet mask is a 32-bit value that is typically expressed in dotted decimal notation, just like an IP address. It consists of a series of ones followed by a series of zeros, with the number of ones indicating the size of the network portion of the IP address.

 

For example, a subnet mask of 255.255.255.0 indicates that the first 24 bits of an IP address represent the network portion, while the remaining 8 bits represent the host portion. This means that there are 256 possible IP addresses on each subnet.

 

NOTE : What does the term 'host' mean ?  Simply put, a host indicates the individual device that are connected to a network. For example, each of LAN card or WiFi modules on your PC, WiFi module on your mobile phone can be examples of host.

 

Subnet masks are important because they allow devices on a network to determine whether a destination IP address is on the same subnet or a different subnet. If the destination IP address is on the same subnet, the device can send the data directly to the destination device. If the destination IP address is on a different subnet, the device needs to send the data to a router or other device that can forward the data to the correct subnet

 

As you can figure out the IP address assigned to your network device, you can figure out the subnet mask in the same way as shown below

 

 

 

 

 

Default Gateway

 

The last component you would see in your network address information is Default Gateway. I explained on the meaning and function of default gate in different note. Check out this note.

 

 

 

Reference