PDA

View Full Version : subnetting



Maximus
October 30, 2004, 11:13 AM
hey any of you guys know how to subnet. Im actually do a network switching course and learning how to subnet but heres my problem i was given a question with a class B adress to generate 500 hosts just for praactice but i wasnt told how many subnets were needed so hers what i did so far

converted the ip address to binary 182.10.0.0(dec)
10110110 . 00001010 . 00000000 . 00000000(bin)
(3rd octet)
11111110 . 00000000

i used the first seven bits of the of the third octet and used the formual 2^n-2. 2 to the power of n minus two n being the number of bits used which would give me 128-2 subnet ids and a total 0f 512-2 host ids which actually makes 510 usable host ids i then need to determine the subnet mask as the default subnet mask would be 255.255.0.0 i determined the subnet mask by counting all the used bits in the third octet this would give me a masks of 255.255.254.0

i determined the netid multiplyer by subtracting the interesting octet which is the 3rd in this case from the total amount of bit in any given octet which is 256. so 256-254= 2

now that i have the id multipyer my ids would start from

2
4
6
8
10
to253

my problem is how do i display the net work ids after all of this im a bit confused right now i gave it a shot though
tell mi if these are correct hear are the first three

182.10.2.0
182.10.4.0
182.10.6.0
or should the ids in between these be shown to
thanks in advance for your assistance

xplayaa
November 1, 2004, 02:41 PM
Maximus,

You are on the right track.
I've included the first 5 for you.

Network ................... Hosts ...................... Broadcast
182.10.0.0 ... 182.10.0.1 -> 182.10.1.254 ... 182.10.1.255
182.10.2.0 ... 182.10.2.1 -> 182.10.3.254 ... 182.10.3.255
182.10.4.0 ... 182.10.4.1 -> 182.10.5.254 ... 182.10.5.255
182.10.6.0 ... 182.10.6.1 -> 182.10.7.254 ... 182.10.7.255
182.10.8.0 ... 182.10.8.1 -> 182.10.9.254 ... 182.10.9.255

Maximus
November 1, 2004, 08:08 PM
hey Xplayaa thanks man you hit the nail on the head dude thats exactly the problem i have been having, listing the ips. another thing where woould the net work ids stop

jyannaccone
November 4, 2004, 04:38 PM
There are two common ways to efficiently document a network address.

=====

The first is to write out the subnet mask following the IP address. The subnet mask is a 4-byte value that identifies which bits are assigned to the network portion of the address and which bits are assigned to the host portion of the address. Basically, every bit-position that is assigned to the network portion is set to one while every bit that is assigned to the host portion is set to zero. The subnet mask is written in dotted decimal format just like an IP address. For example:

IP Address in dotted decimal: 182.10.2.0
IP Address in binary: 10110110 00001010 00000010 00000000

If the first 23 bits are assigned to the network portion and the remaining 9 bits are assigned to the host portion, the subnet mask would be written as follows:

Subnet mask in dotted decimal: 255.255.254.0
Subnet mask in binary: 11111111 11111111 11111110 00000000

Generally you would find the network address written as:

Network address: 182.10.2.0 255.255.254.0

Making the assumption that the second dotted decimal value represented the subnet mask.

This means of documenting an IP address is referred to as subnet mask.

=====

The second method is an abbreviated version of the first method. A subnet mask value is still calculated using the binary format, but instead of writing out the full dotted decimal subnet mask you simply follow the IP address with a slash and the number of bits in the subnet mask that were set to one. For example:

IP Address in dotted decimal: 182.10.2.0
Subnet mask in binary: 11111111 11111111 11111110 00000000

Network address: 182.10.2.0/23

The 23 comes from the number of bits in the binary subnet mask representation that were set to one. This works because the bits assigned to the network portion of the address must always be contiguous. This means we assign from left to right and there cannot be any host bits between any pair of network bits (i.e. 11111011 11110111 00000000 00000000 would be an invalid subnet mask because the ones must start from the left and be all together).

This means of documenting a network address is referred to as network prefix. The number following the slash (23 from our example above) is referred to as the prefix.

xplayaa
November 5, 2004, 11:53 AM
Maximus,

Below is the last 5 subnetworks.

Network .......................... Hosts ......................... Broadcast
182.10.246.0 ... 182.10.246.1 -> 182.10.247.254 ... 182.10.247.255
182.10.248.0 ... 182.10.248.1 -> 182.10.249.254 ... 182.10.249.255
182.10.250.0 ... 182.10.250.1 -> 182.10.251.254 ... 182.10.251.255
182.10.252.0 ... 182.10.252.1 -> 182.10.253.254 ... 182.10.253.255
182.10.254.0 ... 182.10.254.1 -> 182.10.255.254 ... 182.10.255.255