# IP Addressing and Subnet Masks

Page 1 of 1

## 3 Replies - 6185 Views - Last Post: 27 March 2013 - 07:49 PM

### #1 Tesio

• New D.I.C Head

Reputation: 0
• Posts: 7
• Joined: 01-October 12

# IP Addressing and Subnet Masks

Posted 07 March 2013 - 11:41 AM

Hello!

So, I'm trying to learn about IP addressing and subnet masks, but it is really hard for me to understand how to calculate the different things, and how this works generally. I was wondering if anyone could help me explaining how to solve these problems, and maybe the theory behind this, just short?

Say I have this block: 45.4.10.0/26

- How can I find out what the subnet mask for this block?
- How many bits are reservated for the hosts in this block?
- How many IP addresses does this block contain?
- How can I find the all IP addresses in this network? For example, 192.168.0.0/24 ----> 192.168.0.0 to 192.168.0.255

Well, I read about that an IP address is a 32-bit number that identifies a host. In my case, 45.4.10.0. The 26 is called a prefix, not sure what it is, but my network has 26 bits allocated. The remaining is for the host or something.
What I did was to to write up this 32-bit number, and put 26 1s and 6 0s, like this:

11111111.11111111.11111111.11000000

This would give me 255.255.255.194, which I believe is the subnet mask.

I'm not sure about the rest. A friend told me to do this: 26, which is the answer for both 2nd and 3rd problem. Why is it like this?
How can I solve the last problem?

Is This A Good Question/Topic? 0

## Replies To: IP Addressing and Subnet Masks

### #2 RandomlyKnighted

• D.I.C Lover

Reputation: 118
• Posts: 1,380
• Joined: 14-January 10

## Re: IP Addressing and Subnet Masks

Posted 10 March 2013 - 03:17 PM

I'm not entirely sure about the theory of everything, but where I work the first 50 IP addresses (i.e. 10.12.x.1 through 10.12.x.50) are reserved to be Static IPs in case we need them. Note, we have 12 sites so the x is different depending on which sire you are at. Our IP address has a large range. For example, at one site the IP range is 10.12.159.51 through 10.12.162.254. Your IP address range varies based on your configuration. Generally, for a home setup if you will look at your router configuration you should find the IP address range. If you don't have a router, then check your modem configuration.
Was This Post Helpful? 0

### #3 Lemur

• Pragmatism over Dogma

Reputation: 1439
• Posts: 3,609
• Joined: 28-November 09

## Re: IP Addressing and Subnet Masks

Posted 10 March 2013 - 09:53 PM

Tesio, on 07 March 2013 - 01:41 PM, said:

Hello!

So, I'm trying to learn about IP addressing and subnet masks, but it is really hard for me to understand how to calculate the different things, and how this works generally. I was wondering if anyone could help me explaining how to solve these problems, and maybe the theory behind this, just short?

Say I have this block: 45.4.10.0/26

- How can I find out what the subnet mask for this block?
- How many bits are reservated for the hosts in this block?
- How many IP addresses does this block contain?
- How can I find the all IP addresses in this network? For example, 192.168.0.0/24 ----> 192.168.0.0 to 192.168.0.255

Well, I read about that an IP address is a 32-bit number that identifies a host. In my case, 45.4.10.0. The 26 is called a prefix, not sure what it is, but my network has 26 bits allocated. The remaining is for the host or something.
What I did was to to write up this 32-bit number, and put 26 1s and 6 0s, like this:

11111111.11111111.11111111.11000000

This would give me 255.255.255.194, which I believe is the subnet mask.

I'm not sure about the rest. A friend told me to do this: 26, which is the answer for both 2nd and 3rd problem. Why is it like this?
How can I solve the last problem?

IP octets. Divide it into groups of 8 binary digits, 11111111 == 255. You NEED to know binary. The /26 is how many bits are on in the mask.

/24 is a class C range, and has the mask 255.255.255.0 or 11111111.11111111.11111111.00000000 . Now count how many ones there are in that. 8 x 3 = ?.

Read and meditate on the following: Broadcast Addresses, IP Reserved Addresses, Subnetting, IP Classes, and Google. Yes, Google. This is far too much like a homework question, and any amount of simple research would have turned this up. Get on google, and read. If you can't do that you're hosed for the rest of your career or college life.
Was This Post Helpful? 1

### #4 lmendoza

• New D.I.C Head

Reputation: 2
• Posts: 9
• Joined: 27-March 13

## Re: IP Addressing and Subnet Masks

Posted 27 March 2013 - 07:49 PM

1- How can I find out what the subnet mask for this block?
You are given the network prefix /26, this number represents how many bits are used as network bits, IPv4 addresses are 32 bits directions so the subnet mask for /26 is:
11111111.11111111.11111111.11000000

2 - How many bits are reservated for the hosts in this block?
Since the prefix tells you how many bits are used for the network address, the bits left are used for hosts, so 32-26=6.
Now, if you are asking about how many hosts you can connect to this network, this is the formula.
(2^host bits)-2 = 2^6-2=62.

3- How many IP addresses does this block contain?
It contains 64 addresses (2^6).

4- How can I find the all IP addresses in this network? For example, 192.168.0.0/24 ----> 192.168.0.0 to 192.168.0.255
45.4.10.0/26 is the network addres of the given network, so that is the first address on your network, since you have a block of 64 addresses (2^6) the range is 45.4.10.0 ----> 45.4.10.63.

If you have any further doubt, I'll be pleased to help you.
Was This Post Helpful? 0

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }