IP Address is a unique number assigned to a device in a network - these devices can be a computer, a router, a network printer (network printer with a Network Card), etc. etc. This type of address is called a Software Address - it is different from the Address Address Hardware Address - or we know as the MAC Address of the Network Card or hard-code in some network devices - Please say a little about this address - Every network card manufacturer in the world before production must apply for a batch of MAC addresses from InterNIC => each MAC address is unique in the world and never have the same addresses at anywhere.
IP Address is a 32-bit number - and is divided into 4 sections of 8 bits each and separated by dots (.). There are 3 ways to represent an IP address:
Decimal form: 130.57.30.56
Binary form: 10000010. 00111001.00011110.00111000
Halogen Form: 82 39 1E 38
We often use addresses as decimal numbers, but computers often use IP addresses as binary numbers
An IP address always has two parts: Network Address (Network Address) and Address (Node Address).
Network Address is a unique number used to identify a network. Every computer in a network always has the same network address.
Node Address is a unique number assigned to a computer in a network
Some special IP addresses
1- If Network Address's address is all 0s, it represents the network (this network).
2- If Network Address's address is full of Bit 1s, it represents all networks
3- Network address is 127 - called LoopBack address - Designed for each machine (local node) - often used for self-inspection without affecting the above transaction, for example ping 127.0.0.1
4 - All Node Address Bits are 0 - this node
5 - All Node Address Bits are 1 - All machines in a network
6 - All IP addresses are full 0 bits - Used by RIP protocol
7 - All IP addresses are Full Bit 1 - Communication address (Broadcast) for all machines in a network
IP Address is divided into 5 classes A, B, C, D, E - two classes D and E are in reserve - only 3 classes A, B, C are in use
Class: A
Format: Network .Node.Node.Node
First bit: 0
Here we see that the first bit of the IP address is 0 - used to determine the class A network, the remaining 7 Bit can receive the values of 1 or 0 => the combination of 2 short-term 7-pin position => there are 128 networks for class A. But as a rule, if all the bits of the network address are 0 will not be used => there are 127 networks for Class A - But the 127 address is the address with the entire Bit 1 in Network Address => and not used. get this address => Class A has only 126 network layers starting from 1 -126 => When looking at an IP address we just need to enter the first Bit if performing in binary form is 0, that is Class A network, if it is in the decimal format it is in the range of 1 to 126.
What is the number of computers in each class A network? We can also calculate 2 caps 24 - 2 = 16,777,214 internal devices
Class: B
Format: Network . Network .Node.Node
The first two bits: 10
Similar to the calculation with class A, we also have the network number of class B will be 2 caps 14 = 16384 class B network - equivalent to the decimal number is 128 - 191.
and the number of machines in each class A network is 2 caps 16 -2 = 65,534 machines
=> An IP address where the first two bits are 10 or in decimal, but 128 - 191 is the computer in the class B network
Class: C
Format: Network. Network. Network .Node
The first three bits: 110
=> Class C network number will be 2,097,152 networks and 254 computers in a network
=> An IP address where the first Bit is 110 or in decimal form which is 192 - 223, it is a computer in the C class network
InterNIC and IANA have introduced a number of IP address ranges - called private addresses to set up local networks that are not connected to the Internet. According to RFC 1597, those three bands are:
10.0.0.0 with Subnet mask is 255.0.0.0
172.16.0.0 with Subnet mask is 255.255.0.0
192.168.0.0 with Subnet mask is 255.255.255.0
=> you can use any address in this range to set up for your network
Starting from win98 onwards Microsoft introduced a mechanism called Automatic private IP Addressing (APIPA) - On a small network without DHCP or on a network that DHCP is Down, the Client DHCP server can use the NetBIOS name resolution button. B to grant its network card a unique IP address from a special address space 169.254.0.1 - to 169.254.255.254. This machine can then use TCP / IP to communicate with any other machine that is connected to the LAN's Hub and also use the APIPA => mechanism later if you see the IP as 169.254.xx then the meaning Your DHCP Server is Down already
What is a subnet
Often, each organization, company or country is granted a certain number of IP addresses and it has computers located in different regions - the best way to manage is to split up into small networks and links. Connected by the router. Such small networks are called Subnets. When divided into subnets to do:
1- Reduce transactions on the network: at this time the router will control the packets on the network - only packets with external destination addresses will be transferred.
2 - Management is simpler and if there is a problem, it is easier to check and identify the cause of the error than in a large network.
It is also important to remember that each Subnet is still part of the network but it also needs to be classified with other Subnets by adding a certain name. This identifier is called a Subnet addess. Before dividing the network into Subnets we need to determine the Subnet number for the network and the number of hosts in each Subnet, and the router on each subnet only need to know the information:
The address of each machine on a Subnet that it manages
Address of other Subnet
We already know that each computer on a particular network must have the same network address => the network address cannot be changed => only a part of the Node Address address can be assigned to each Subnet. => This can be done by assigning each computer a Subnet mask. The subnet mask is a 32 Bit number of Bits 1 and 0 - Bits 1 in the locations of Network Address or Subnet mask and the Bit 0 in the Node Address location.
Not all networks need Subnet and therefore no need to use Subnet - In this case it is said to use the default Subnet mask.
Class A Subnet mask is 255.0.0.0
Class B Subnet mask is 255.255.0.0
Class C Subnet mask is 255.255.255.0
The formula used to calculate the maximum number of subnets and the largest number of Hosts possible in a Subnet will be:
Maximum number of subnets (in a network) = 2 ^ Bit 1 (in the subset mask) - 2
The largest Host Number (in a Subnet) = 2 ^ 0 bit (in the subet mask) - 2
For ease of understanding, please illustrate the following example: Suppose we have an IP address for our entire network system is 132.8.18.60 => This is a class B address and we have its representation in the form of
network address. network address. Host address. Host address
1000 0100. 0000 1000. 0001 0010. 0011 1100
=> It has 16 Bit for Network address and 16 Bit for Host address => We can get some Bit in Host address to make Subnet Mask
Suppose we need to divide our network into 14 subnets => we need to determine the number of bits of the Host address as Sub net mask: 14 + 2 = 16 = 2 ^ 4 => need 4 Bit
We have Subnet Mask: 1111 1111. 1111 1111. 1111 0000 0000 0000
And we also calculate the number of Hosts in each Subnet is 2 ^ 12 -2 = 4094