Showing posts with label introduction to ip address. Show all posts

What is subnet mask?


Subnet mask

A network mask is used when a network is not sub netted. The subnet mask is used to find the first address in the block. However when a mask is sub netted, the situation is different. We must have a subnet mask. The subnet has more 1s.
Subnetting increases the length of the netid and decrease the length of hostid. When we divide a network to s number of subnetworks, each of number of hosts, we can calculate the subnetid for each subnetwork as in which n is the length of netid,.

Subnet Address

When a network is subnetted, the first address in the subnet is the identifier of the subnet and is used by the router to route the packets destined for that subnet works. Given any address in the subnet, the router can find the subnet mask using the same procedure we discussed to find the subnetwork mask. ANDing the given address with the subnet mask.

Super netting

Subnetting couldn’t completely solve address depletion problems in classful addreeing, because most organization did not want to share their granted blocks with others. since class C blocks were still available but the size of block did not meet the requirement of new organization that wanted to join the internet, one solution was super netting . in super netting, an organization can combine several class C block to create a larger range of addresses. In other, words several networks are combined to create a supernet work. By doing this, an organizarion can apply for several class C blocks instead of just one. For example, an organization that needs 1000 addresses can be granted four class C blocks.

What is subnetmask?


Subnetting

In subnetting, a network divides into several smaller networks with each subnetwork  having its own subnetworks. A portion of IP address is indicating the network (netid), and a portion indicates the network hostid. This means that there is a sense of hierarchy in IP addressing. To each a host on the internet, we must first reach the network using the first portion of the address. Then we must reach the host itself using the second portion. In the other word, IP address is designed with two level of hierarchy. However in many cases two levels of hierarchy are not enough. For example, imagine an organization with the network address 141.14.0.0 (a class B address). The organization has two hierarchical addressing, but cannot have more than one physical network. One solution of this problem is subnetting. Further division of a network into smaller networks is called subnetting.

Three level of hierarchy

Adding subnetworks an intermediate level of hierarchy in the IP addressing system. Now we have three levels; site, subnet and host. The site is the first level. The second level is subnet and the tird level is host of hierarchy, it defines the connection of the host to the subnetwork.
The routing of an IP datagram now involves steps: delivery to site, delivery to subnet work and delivery to the host

Introduction to IP address


Classes and Blocks

One problem with the classfull addressing is that each class is dividing into a fixed number of blocks with each block having the fixed size. Let’s look
Class A
Class A is divided into 128 blocks with each block having a different net id. First block covers address from 0.0.0.0 to 0.255.255.255 (net id 0). The second block covers address 1.0.0.0 to 1.255.255.255 (net id 1). The last block covers address form 127.0.0.0 to 127.255.255.255 (net id 127).
Note: each block of addresses the first byte (net id) is the same, but the other three bytes (host id) can take any value in the given range.
The first and last block in this are reserved for special purpose as we will discuss shortly. In addition one block is used for private address. The remaining 125 blocks can be assigned to organization. This means that the total number of organization that can have class A address is only 125. However, each block in this class contains 16,777,216 addresses. This address is called network address. It defines the network of the organization, not individual hosts. The organization is not allowed to use last address; it is reserved for a special purpose. Class A address is design for large organization with a large number of hosts or routers attached t their network.
Class B
Class B is divided into 16,384 blocks with each block having a different net id. Sixteen blocks are reserved for private addresses, leaving it 16,368 blocks for assignment to organization. The first block covers address form 128.0.0.0 to 128.0.255.255 (net id 128.0). the last block covers address from 191.255.0.0 to 191.255.255.255 (net id 191.255).
Note: each block of address the first 2 bytes net ID are same but other 2 bytes are host ID can take any value in the given range.
There are 16,368 blocks that can be assigned. This means that the total number of organization that can have class B address is 16,368. However, each block in this class contain 65,536 addresses, the organization should be large enough to use all of these addresses.
Class B was designed for mid size organization that many have tens of thousands of hosts or routers attached to their network. However, the number of addresses in each block 65,536 is larger than the needs of most midsize organizations.
Class C
Class C is divided into 2097152 blocks with each block having a net ID. 256 blocks are used for private addresses, leaving 2,096,896 blocks for assignment to organization. The first block covers address from 192.0.0.0 to 192.0.0.255 (net id 192.0.0). the last address covers address from 223.255.255.0 to 223.255.255.255 (net id 223.255.255).
Note: the each block of address the first 3 bytes are the same but last one byte can take any value in the given range. There are 2096902 blocks that can be assigned have a class C address is 2096902. However, each block in this class contains 256 addresses, which means the organization should be small enough to need less than 256 addresses.
Class C was designed for small size organization with a small number of hosts or routers attached to their network.

Class D
There just one block of class D addresses. It designed for multicasting. Each address in this class is used to define one group of hosts on the internet. When a group is assigned an address in this class, every host that is member of this group will have a multicast address in addition to its normal (unicast) address.
Class E
There is just one block also in class E address. It was designed for used as reserved address. The last address in this class 255.255.255.255 is used for a special address.
Network Addresses
Network addresses play a very important role in classfull addressing. A classful address has several properties:
1-      The network address is the first address in the block
2-      The network address defines the network to the rest of internet.
3-      Given the network address, we can find the class of the address, the block and the range of the addresses in the block.
We try to understand with the example:
Given the network address 132.210.0.0, class is B  because the first byte is between the 128 to 191. The block has net id of 132.21, the address range from 132.21.0.0 to 132.21.255.255.

Introduction to IP address

Class full IP Addressing

IP addressing, when started a few decades ago, used the concept of classes. This architecture is called class full IP addressing. In the mid of 1990s, a new architecture, Called classless IP addressing was introduced that will eventually supersede the original architecture. However, most of the internet is still using calssfull addressing and the migration is slow. To understand the classfull IP addressing it is important to understand classless addressing.
In classfull IP addressing, the IP address is divided into five classes A,B,C,D and E. each class is occupies some part of the whole address space, see below the table mansion the class occupation of the address space (approximate).
A
B
C
D
E

We can see that the class A covers the half of the address space, a serious design flow. Class B cover ¼ of the whole address space, another design flow. Class C is cover the 1/8 of the address, and class D and E each cover the 1/16 of the address space.

Recognize the classes

We can find the class of an address when the address is given in binary notation or in dotted decimal notation.
Find the class in binary notation
If the address is given in binary notation, the first bits can immediately tell us the class of the address.
Find the class in dotted decimal notation
When the address is given in dotted decimal notation, then we need to look only at the first byte to determining the class of the address. Each class has a specific range of number.
Net ID and Host ID
In classfull addressing an IP in classes A,B and C is divided into net id and host id.
Note: Class D and E are not divided into net id and host id.
A
Net ID
Host ID
B
Net ID
Host ID
C
Net ID
Host ID
D
Reserved For Multicast
E
Reserved For future use

Intriduction to IP address

Classes of IP address

Sr. #
Class
Range
Bits
Network/host
Subnet mask
01
A
1-126
0000
8/24
255.0.0.0
02
B
128-191
1000
16/16
255.255.0.0
03
C
192-223
1100
24/8
255.255.255.0
04
D
224-239
1110
N/A
N/A
05
E
240-254
N/A
N/A
N/A
01. 0 is represent the network
02. 127 is reserved for testing
03. 255 is reserved for broadcast

Introduction to IP address


IP Address

At the network layer, we need to uniquely identify each device on the internet to allow global communication between all devices. This is analogous to the telephone system where each telephone subscriber has a unique telephone number. If we consider the country code and the area code as part of the identifying scheme
                The identifying used in IP layer of the TCP/IP protocol suit to identify each device connected to the internet is called the internet address or IP address. An IP address is a 32 bit binary address that uniquely and universally defines the connection of a host or a router to the internet. Two devices cannot have the same IP address on the internet, it is unique address. However if a device has two connection to the internet via two networks, it has two IP addresses