Cisco IPv4 Subnet – Invalid IP for Subnet Mask in Packet Tracer

ciscoipv4packet-tracersubnet

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?

Best Answer

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.

Related Topic