Saturday, 3 August 2013

Networking Arithmetic



Example 14
Given the address 23.56.7.91 and the default class A mask, find the beginning address (network address).
Solution
The default mask is 255.0.0.0, which means that only the first byte is preserved
and the other 3 bytes are set to 0s. The network address is 23.0.0.0.

Example 15
Given the address 132.6.17.85 and the default class B mask, find the beginning address (network address).
Solution
The default mask is 255.255.0.0, which means that the first 2 bytes are preserved
 and the other 2 bytes are set to 0s. The network address is 132.6.0.0.

Example 16
Given the address 201.180.56.5 and the class C default mask, find the beginning address (network address).
Solution
The default mask is 255.255.255.0, which means that the first 3 bytes are
preserved and the last byte is set to 0. The network address is 201.180.56.0.

We must not apply the default mask of one class to an address belonging
to another class.


Network Addresses



Network  Addresses
The network address is the first address.
The network address defines the network to the rest of the Internet.
Given the network address, we can find the class of the address, the block, and the range of the addresses in the block

In Classful addressing, the network address (the first address in the block) is the one that is assigned to the organization.

Example 11
Given the network address 17.0.0.0, find the class, net id of the block, and the range of the addresses.
Solution
The class is A because the first byte is  between 0 and 127.
The block has a net id of 17.
The addresses range from 17.0.0.0 to 17.255.255.255.

Example 12
Given the network address 132.21.0.0, find the class, net id of the block, and the range of the addresses.
Solution
The class is B because the first byte is Between 128 and 191.
The block has a net id of 132.21.
The addresses range from 132.21.0.0 to 132.21.255.255.

Example 13
Given the network address 220.34.76.0, find the class, net id of the block, and the range of the addresses.

Solution
The class is C because the first byte is Between 192 and 223.
The block has a net id of 220.34.76.
The addresses range from 220.34.76.0 to 220.34.76.255.

Mask
•      A mask is a 32-bit binary number made of contiguous 1’s followed by contiguous 0’s.
•      It gives the first address in the block (the network address) when bitwise AND ed with an address in the block.
•      The concept does not apply for classes D and E.

Private IP address and Special addresses

What Private IP address Should I Use?
Ø  Should you use Class A, Class B, or even Class C private addressing when setting up your network?
Ø  The rule of thumb in the consulting world is, when you’re setting up a corporate network— regardless of how small it is—
Ø  you should use a Class A network address because it gives you the most flexibility and growth options.
Ø  But if you’re setting up a home network, you’d opt for a Class C address because it is the easiest for people to understand and configure. Using the default Class C mask gives you one network with 254 hosts—plenty for a home network.

Special addresses
•      When the host-id is cancelled, i.e. when the bits reserved for the machines on the network are replaced by zeros (for example 194.28.12.0), something called a network address is obtained. This address cannot be allocated to any of the computers on the network.
•      When the net id is cancelled, i.e. when the bits reserved for the network are replaced by zeros, a machine address is obtained. This address represents the machine specified by the host-ID which is found on the current network.

•      When all the bits of the host-id are at 1, the address obtained is called the broadcast address. This a specific address, enabling a message to be sent to all the machines on the network specified by the net id . Example: 73.255.255.255
•      Conversely, all the addresses of class D are multicast address.
•       A multicast address is a logical identifier for a group of hosts in a computer network.
•      A message sent to a broadcast address is typically received by all network-attached hosts, rather than by a specific host.

Private networks



The number of addresses in a class C block is smaller than the needs of most organizations.


Class D addresses are used for multicasting; there is only one block in this class.
Class E addresses are reserved for special purposes; most of the block is wasted.

Private networks
•      Of the approximately four billion addresses allowed in  IPv4, three ranges of address are reserved for use in private network.



The following are the three ranges reserved for private networks
Address Range
Number of addresses
Classful description
Largest CIDR block
10.0.0.0–10.255.255.255
16777216
Single Class A
10.0.0.0/8
172.16.0.0–172.31.255.255
1048576
Contiguous range of 16 Class B blocks
172.16.0.0/12
192.168.0.0–192.168.255.255
65536
Contiguous range of 256 Class C blocks
192.168.0.0/16