cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2320
Views
45
Helpful
20
Replies

IP Address Rejection

AthertonB9
Level 1
Level 1

Hi, there I am currently studying CCNA 200-301, I would like to know what makes a valid/invalid (accepted/rejected) ipv4 address. In the scenario below the first address is accepted and the last two are rejected and described as having a bad mask. Along with this reference "because the subnet broadcast address cannot be used as an interface IPv4 address". Can someone explain to me what this means?

 

[Excerpt from CCNA 200-301 Network Simulator]

In this exercise, you begin by examining three IPv4 addresses and masks. Each pair is a candidate to be configured on Router R1's GigabitEthernet0/0 interface. The question: Will R1 reject the IPv4 address/mask combination as invalid for some reason? If rejected, what is the reason?

After you make your prediction in each case, you will configure the three IPv4 addresses to see how the router reacts. The IPv4 addresses to consider for this lab are as follows in Table 1:

 

10.100.2.255
255.255.254.0
10.100.2.255
255.255.255.0
10.100.2.255
255.255.255.128

Examine the three IPv4 addresses and masks in Table 1. Consider whether it is a valid unicast IPv4 address and therefore will not be rejected when configured on a router interface. Steps 3-5 will allow you to select whether each row of Table 1 will be Accepted or Rejected; when complete click the Submit button.

 

10.100.2.255
255.255.254.0
  • The number 10.100.2.255, with mask 255.255.254.0, is a valid IPv4 address. It is in a subnet whose subnet ID is 10.100.2.0 with subnet broadcast address 10.100.3.255 (Accepted)
10.100.2.255
255.255.255.0
  • Use the   
    IP address 10.100.2.255 255.255.255.0 interface 
    subcommand. In this case, the number 10.100.2.255, when using mask 255.255.255.0, is a subnet broadcast address in a subnet with subnet ID 10.100.2.0. Router R1 rejects this 
    IP address 
    command because the subnet broadcast address cannot be used as an interface IPv4 address. (Rejected)
10.100.2.255
255.255.255.128 
  • Use the
    IP
     address 10.100.2.255 255.255.255.128 interface 
    subcommand. In this case, the number 10.100.2.255, when using mask 255.255.255.128, is a subnet broadcast address in a subnet with subnet ID 10.100.2.128. Router R1 rejects this 
    IP address 
    command because the subnet broadcast address cannot be used as an interface IPv4 address. (Rejected)
3 Accepted Solutions

Accepted Solutions

Hi Atherton , 

- 10.100.2.255 is the ip with a mask of 255.255.254.0 ( /23) 

using the mask , Block size can be calculated : 256-254 = 2  

Each network has 2 reserved Ip's 1) Network ID (First IP of the Network)  2) Broadcast ID ( Last Ip of the Network )  , and they both are  Reserved IP's ( not VALID ) , as they are not assigned to a  host . 

Keep Adding two in the last Octet , This way we will get our Networks , 

1) 10.100.0.0 ( Network 1) 

so for network 1 ,   Network ID : 10.100.0.0 

                             First Valid Host or Acceptable IP :  10.100.0.1

                             Last Valid Host : 10.100.1.254

                             Broadcast ID : 10.100.1.255

2) 10.100.2.0 (Network 2) 

                            Network ID : 10.100.2.0

                           FVH : 10.100.2.1

                          LVH : 10.100.3.255

Note :  Now our desired IP 10.100.2.255 would be somewhere in the Network 2 and it is not the Network id nor it is the Broadcast ID therefore it'll be a VALID ip .

3) 10.100.4.0 ( Network 3 )

------------------------------------------------

- Now we have 10.100.2.255 at /24

The Block size become : 256-0 =256

/24 means we've three fixed octets  therefore : 10.100.2.0 becomes our Network ID for Network 1

                                                                         FVH : 10.100.2.1 

                                                                         LVH : 10.100.2.254

                                                                        Broadcast ID : 10.100.2.255 ( Now as this is Broadcast , therefore it is not Valid and can't be assigned to a host ) 

 

 

Spooster IT Services Team

View solution in original post

If you mean by "to be valid address", a host address, correct.  But every IP is valid, you need to further add, valid for what.

For example, you correctly dissected 192.168.1.5/30, but if you do the same for 192.168.1.5/28, not only do you have more host IPs, but 192.168.1.4 and 192.168.1.7 are now part of those valid host IPs, i.e. no longer the network number or network broadcast IPs.  If you do 192.168.1.5/29, the network IP changes, but the network broadcast is the same as for 192.168.1.5/30.

You have it right when you figure out what the total IP range is, then set aside the first and last IPs of that range.

View solution in original post

"are all devices on a network workstations, switches, printers, laptops, routers given  host ip addresses out of the range  ?"

Generally, yes.  However, keep in mind, range sizes can vary much based on number of host IPs you need for your purpose.

"Also is a bad mask  or invalid address any address that falls outside of the available host Ip address?"

First, keep in mind, it's generally not the mask that's invalid, but the IP with that mask.  Again, in the example above, some IP addresses vary in their possible uses by what mask is being used.  (The issue presented in your OP, i.e. how the same IP was, or was not, valid [as a host IP] based on the mask [which determines the address range].)

On some devices, you can get same or similar errors based on conflicts on address ranges on interfaces they overlap.  For example, consider how ranges of addresses can overlap, e.g. 192.168.1.1/24 address range overlaps with 192.168.1.128/30.  This also holds for such an overlap anywhere in the "same" overall network, although if overlap not assigned on the same device, device will likely NOT provide an error.

However, in networks, we often "advertise" summary address ranges where overlap is permitted.  I.e. within the same overall network, as just mentioned, you cannot have the individual networks 192.168.1.0/24 and 192.168.1.128/30 but you can have the network 192.168.1.128/30 and the summary or aggregate 192.168.1.0/24.  (If all of this is last information is new, it can be confusing, but eventually you'll want to understand it too.  It's also extremely powerful/necessary.)

View solution in original post

20 Replies 20

Joseph W. Doherty
Hall of Fame
Hall of Fame

"because the subnet broadcast address cannot be used as an interface IPv4 address".

It means exactly what it says, so I'm guessing you're not familiar with what a subnet broadcast address is.

Every IPv4 address block provides a range of numbers, for example 10.100.2.x/24's range is: 10.100.2.0 to 10.100.2.255.

Every IPv4 address block (except /31s) sets aside the first and last numbers in the address block range.  The former is used to identify the network number, and the latter is the broadcast address (that goes to all other numbers, except the first) in the address block.  So, for 10.100.2.x/24 we set aside 10.100.2.0 and 10.100.2.255, the first and last values, neither can be used for host IPs in that range.

AthertonB9
Level 1
Level 1

 I am sorry I need more clarity as to why the first address is accepted and the last two are rejected? I am not sure I completely understand.

Sure . . .

The mask 255.255.254.0 is a /23, so for the IP 10.100.2.255, the range is 10.100.2.0 to 10.100.3.255.  10.100.2.255 is neither the first or last number of that address block.

The second case, using a /24, 10.100.2.255 is the broadcast address for for the /24. (as explained in prior post).

In the third case, the mask 255.255.255.128 is for a /25, and for the IP 10.100.2.255, the range is 10.100.2.128 to 10.100.2.255; again, 10.100.2.255 is the subnet broadcast address for this /25 (like it is, also, for the /24).

What's likely confusing, is how the same IPv4 address of 10.100.2.255 can be, or not be, a subnet broadcast address.  It depends on the address block being used.

For example, if we split the /25 into two /26s, the higher one would be the range 10.100.2.192 to (again) 10.100.2.255, the latter (again) being that /26's subnet broadcast address.

Conversely, though, if we look at 10.100.2.255 in a /22 the address range would be 10.100.0.0 to 10.100.3.255, and 10.100.2.255 would not be the subnet broadcast address (as it would be 10.100.3.255).

If you're a "beginner" often dotted decimal representation of IPv4 IPs can easily lead us into assuming x.x.x.0 is a network address and x.x.x.255 is a broadcast address; not so!  What kind of address it is depends on the address block the address is found within.

AthertonB9
Level 1
Level 1

Okay so, are you saying the last two addresses 

10.100.2.255-255.255.255.0 /24

10.100.2.255 -255.255.255.128 /25

with a prefix mask of /24 and /25 were rejected by the router because their Ip address range?

 

Correct.

Also true for 10.100.2.255 /26, /27, /28, /29 and /30.  All have the same network broadcast address, i.e. 10.100.2.255

NOT true for 10.100.2.255 /23, /22, /21 . . . 

Hi Atherton , 

- 10.100.2.255 is the ip with a mask of 255.255.254.0 ( /23) 

using the mask , Block size can be calculated : 256-254 = 2  

Each network has 2 reserved Ip's 1) Network ID (First IP of the Network)  2) Broadcast ID ( Last Ip of the Network )  , and they both are  Reserved IP's ( not VALID ) , as they are not assigned to a  host . 

Keep Adding two in the last Octet , This way we will get our Networks , 

1) 10.100.0.0 ( Network 1) 

so for network 1 ,   Network ID : 10.100.0.0 

                             First Valid Host or Acceptable IP :  10.100.0.1

                             Last Valid Host : 10.100.1.254

                             Broadcast ID : 10.100.1.255

2) 10.100.2.0 (Network 2) 

                            Network ID : 10.100.2.0

                           FVH : 10.100.2.1

                          LVH : 10.100.3.255

Note :  Now our desired IP 10.100.2.255 would be somewhere in the Network 2 and it is not the Network id nor it is the Broadcast ID therefore it'll be a VALID ip .

3) 10.100.4.0 ( Network 3 )

------------------------------------------------

- Now we have 10.100.2.255 at /24

The Block size become : 256-0 =256

/24 means we've three fixed octets  therefore : 10.100.2.0 becomes our Network ID for Network 1

                                                                         FVH : 10.100.2.1 

                                                                         LVH : 10.100.2.254

                                                                        Broadcast ID : 10.100.2.255 ( Now as this is Broadcast , therefore it is not Valid and can't be assigned to a host ) 

 

 

Spooster IT Services Team

AthertonB9
Level 1
Level 1

I would say, with practice I understand now, the host portion must be within 1-254. In other words it must be within the given calculated ip-range 

"1-254"

Only for a /24.

First IP is set aside for network number.

Last IP is used for network broadcast.

Exceptions /31 and /32.

AthertonB9
Level 1
Level 1

I Think i understand  what you mean here,(Only for a 24) but explain on ?

A /24 had a host address range of 256, i.e. 0 to 255.  As we exclude the first and last host numbers, leaving your 1-254.

Also, in dotted decimal, the last octet would, for those usable hosts, would be 1-254.

If you think you understand this, what would be the network number, hosts IPs, and network broadcast number for an IP of 192.168.1.5/30?

AthertonB9
Level 1
Level 1

I like Q&A

AthertonB9
Level 1
Level 1

192.168.1.5 / 30  255.255.255.252   (255 = 8 bits 252 = 6 bits)

 256- 252 = 4

4 (5)  (7) 8 12...  4 is nearest multiple to 5

Subnet ID 192.168.1.4

First Usable Address: 192. 168.1.5 (+ 1 subnet ID)

Last Usable Address: 192.168.1.6(-1 Broadcast Address)

Broadcast 192.168.1.7  ( - 1  of next multiple  of 4 which is

IP range: 192.168.1.5 - 192.168.1.6 

corrected my mistake i forgot to subtract fourth octet by 256 or  (256 - 252 ) almost fell into the trap

A+

And if you like Q&A, what about for 192.168.1.5/29?

192.168.1.5 / 29 255.255.255.248 ( 255 = 8 bits 248 = 5)

256- 248 = 8 

0  ----------- (5) ------------8

0 is nearest 5 than 8

Subnet ID: 192.168.1.0

First Usable Address: 192.168. 1.1 (+1 of subnet id)

Last Usable Address: 192.168.1.6 (-1 broadcast address)

Broadcast Address: 192.168.1.7  ( -1 of next multiple  which is 

IP range: 192.168.1.1 - 192.168.1.6

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card