1

I'm using Cisco Package Tracer Student to test some networks. But I'm getting the error "Invalid IP for this subnet mask" when I try to set the IP of a PC as 10.1.1.255 OR 10.1.2.0 and the mask as 255.255.254.0, this network is supposed to be an /23 so the valid range should be from 10.1.1.1 to 10.1.2.254.

If I set the PC's IP as 10.1.0.255/23 it works, just as 10.1.1.0/23. Why can't I use those I need?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 4:25
1

It's because those are invalid host addresses for your network. You are trying to straddle the boundary between two different networks for that network mask.

Address 10.1.1.255    = 00001010000000010000000111111111
Mask    255.255.254.0 = 11111111111111111111111000000000
                  AND   ================================
Network               = 00001010000000010000000000000000 = 10.1.0.0

The broadcast address for your network, 10.1.0.0/23, is 10.1.1.255, which is the address you are trying to use.

Address 10.1.2.0      = 00001010000000010000001000000000
Mask    255.255.254.0 = 11111111111111111111111000000000
                  AND   ================================
Network               = 00001010000000010000001000000000 = 10.1.2.0

The network address for your network, 10.1.2.0/23, is 10.1.2.0, which is the address you are trying to use.

You could use the addresses you want to use if you use a shorter network mask, e.g. /22.

6
  • The idea is to have a bigger network, so it needs to be /23. What do I have to do for my network be from 10.1.1.1 to 10.1.2.254 so?? – Mateus Barbosa Jun 1 '17 at 23:22
  • If you must have a /23 network, then you cannot use those addresses because they are not usable addresses, and they are in two separate networks. If you shorten the mask length (smaller network, but more network hosts), then you can use those addresses. For that network mask, or any longer network mask (larger network, fewer hosts), you simply cannot use those two addresses because they will be the broadcast and network addresses of different networks. – Ron Maupin Jun 1 '17 at 23:25
  • The ranges are 10.1.0.0-10.1.1.255 and 10.1.2.0-10.1.3.255. The range you request (10.1.1.0-10.1.2.255) does not exist because there is no binary prefix that matches it. – Sander Steffann Jun 1 '17 at 23:28
  • @MateusBarbosa, I don't think you really understand subnetting. If you read and understand the excellent answer to this question, you will understand how this works. It is really a prerequisite to know how to do this before you start assigning networks and addresses. – Ron Maupin Jun 1 '17 at 23:35
  • 2
    @MateusBarbosa, it may be that your teacher wanted you to discover and figure this out on your own. I know some teachers that do something very similar to this. It proves that you understand subnetting if you can discover that this is a problem and define a solution. It could also be that the teacher doesn't really understand it himself. – Ron Maupin Jun 1 '17 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.