Mailinglist Archive: opensuse (3254 mails)
| < Previous | Next > |
Re: IP Calculation
- From: prash_t@xxxxxxxxxxxx
- Date: Tue, 24 Sep 2002 23:55:43 -0600
- Message-id: <courier.3D914FDF.000069C5@xxxxxxxxxxxx>
Subnetting is a process of dividing the class-based network into
subnetworks. This process involves using some of the bits in the host part
of an IP address as the network part (partitioning the host address space).
In your case, given a class B address (N.N.H.H), you will be able to use
(2^16) hosts in each network (of 2^16) without subnetting. But if you have
a specific requirement of breaking your standard classB address into
subnetworks, some of the bits in last two bytes would be used.
In your case, you are utilizing only first 3 bits of third byte as network part and next 5 bits still remaining to be the host part. [The reason behind choosing the number of bits depends on how many subnetworks you need. For any 'n' number of subnetworks, you need x number of bits to such that 2^x=n]. By doing so, you will end up in 2^3 networks having:
[First 3 BITS [Network [Range of IPs [Broadcast add]
in third byte] address] in this n/w]
172.88. 000 172.88.0.0 172.88.0.1 to 172.88.31.254 172.88.31.255
172.88. 001 172.88.32.0 172.88.32.1 to 172.88.63.254 172.88.63.255
172.88. 010 172.88.64.0 172.88.64.1 to 172.88.97.254 172.88.97.255
172.88. 011 172.88.98.0 172.88.98.1 to 172.88.127.254 172.88.127.255
172.88. 100 172.88.128.0 172.88.128.1 to 172.88.159.254 172.88.159.255
172.88. 101 172.88.160.0 172.88.160.1 to 172.88.191.254 172.88.191.255
172.88. 110 172.88.192.0 172.88.192.1 to 172.88.223.254 172.88.223.255
172.88. 111 172.88.224.0 172.88.224.1 to 172.88.255.254 172.88.223.255
Since we are using first two bytes(16 bits) and first 3 bits of third byte, the network addresses with subnet would be represented as 172.88.0.0/19, 172.88.32.0/19 and so on. The subnet mask would be 255.255.224.0
With this subnetting you can group all the hosts into 8 networks and routers are to be used if communication is to take place between any two networks . Also the broadcast packets will be local only to that subnet (LAN) and not the whole network, thereby reducing the unnecessary traffic.
Ex: 1. Consider a ping packet from 172.88.32.4 (source) to 172.88.64.3 (destination).
The network id of the source is 172.88.32.0 and the subnet mask is 255.255.224.0.
The network id for the destination is obtained by ANDing the subnet mask with 172.88.64.3 resulting in 172.88.64.0. Since this n/w is different from the n/w of source, the router (used as default gateway) would be used sending the packet.
2. If the destination is say 172.88.32.10, this will be in the same n/w as source and hence a broadcast (requesting for arp address) is sent only to the network 172.88.32.0.
Here is a good URL for understanding IP addressing:
www.3com.com/other/pdfs/infra/ corpinfo/en_US/501302.pdf
Prashanth
In your case, you are utilizing only first 3 bits of third byte as network part and next 5 bits still remaining to be the host part. [The reason behind choosing the number of bits depends on how many subnetworks you need. For any 'n' number of subnetworks, you need x number of bits to such that 2^x=n]. By doing so, you will end up in 2^3 networks having:
[First 3 BITS [Network [Range of IPs [Broadcast add]
in third byte] address] in this n/w]
172.88. 000 172.88.0.0 172.88.0.1 to 172.88.31.254 172.88.31.255
172.88. 001 172.88.32.0 172.88.32.1 to 172.88.63.254 172.88.63.255
172.88. 010 172.88.64.0 172.88.64.1 to 172.88.97.254 172.88.97.255
172.88. 011 172.88.98.0 172.88.98.1 to 172.88.127.254 172.88.127.255
172.88. 100 172.88.128.0 172.88.128.1 to 172.88.159.254 172.88.159.255
172.88. 101 172.88.160.0 172.88.160.1 to 172.88.191.254 172.88.191.255
172.88. 110 172.88.192.0 172.88.192.1 to 172.88.223.254 172.88.223.255
172.88. 111 172.88.224.0 172.88.224.1 to 172.88.255.254 172.88.223.255
Since we are using first two bytes(16 bits) and first 3 bits of third byte, the network addresses with subnet would be represented as 172.88.0.0/19, 172.88.32.0/19 and so on. The subnet mask would be 255.255.224.0
With this subnetting you can group all the hosts into 8 networks and routers are to be used if communication is to take place between any two networks . Also the broadcast packets will be local only to that subnet (LAN) and not the whole network, thereby reducing the unnecessary traffic.
Ex: 1. Consider a ping packet from 172.88.32.4 (source) to 172.88.64.3 (destination).
The network id of the source is 172.88.32.0 and the subnet mask is 255.255.224.0.
The network id for the destination is obtained by ANDing the subnet mask with 172.88.64.3 resulting in 172.88.64.0. Since this n/w is different from the n/w of source, the router (used as default gateway) would be used sending the packet.
2. If the destination is say 172.88.32.10, this will be in the same n/w as source and hence a broadcast (requesting for arp address) is sent only to the network 172.88.32.0.
Here is a good URL for understanding IP addressing:
www.3com.com/other/pdfs/infra/ corpinfo/en_US/501302.pdf
Prashanth
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx
| < Previous | Next > |