cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
26660
Views
11
Helpful
11
Replies

Why is the first address on a subnet reserved?

wags
Level 1
Level 1

Based on subnetting, the "all 1s" or last address in a subnet is the broadcast address.  Why is the "all 0s" or first address reserved?  About all I can find on the web is that "way back in time" it was also a broadcast address of some type.  Is there current programmatic reasons, or just convention to reserve the first address of a subnet?  Is there something I can see with a wireshark trace?  I happen to run into a situation recently where a host was in fact using the resevered first address both on net and across the router, apparently without issues.  Links to documentation appreciated.  Thanks.

1 Accepted Solution

Accepted Solutions

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I'll try again - maybe this time I'll be helpful.

Beginning with very early RFCs, all zeros was recommended to represent "this".  So an IP address with an all-zeros host bits, such as this Class C, 192.168.1.0 would mean "this network", 192.168.1.

Hosts were not to be assigned all zeros as a host number so they wouldn't be confused with a (sub)network number.  I.e., if you use 192.168.1.0 as either a source or destination IP it could have special meaning (just as the all ones host is used for broadcasts).  As far as I can tell, little if anything used this special designation (except for some old Unix implementations that could use all zeros as the broadcast address).

However, with RFC 3021, allowing for /31s for P2P links, the all zeros and all one host bits denote hosts.  This RFC does has some interesting things to say about how all zero host IPs should be treated:

(h)  { , , 0 }

         Subnetwork number.  SHOULD NOT be used as a source address,
         except when the originator is one of the endpoints of a point-
         to-point link with a 31-bit mask.  For other types of links, a
         packet with such a destination SHOULD be silently discarded.
         If these packets are not silently discarded, they MUST be treated
         as IP broadcasts [RFC1812].

(f)  { , , 0 }

         Subnetwork number.  SHOULD NOT be used as a source address,
         except when the originator is one of the endpoints of a point-
         to-point link with a 31-bit mask.  For other types of links, a
         packet with such a destination SHOULD be silently discarded.
         If these packets are not silently discarded, they MUST be
         treated as IP broadcasts.

      (2) SHOULD silently discard on receipt (i.e., do not even deliver
      to applications in the router) any packet addressed to 0.0.0.0 or
      { , 0 }.  If these packets are not silently
      discarded, they MUST be treated as IP broadcasts (see Section
      [5.3.5]).  There MAY be a configuration option to allow receipt of
      these packets.  This option SHOULD default to discarding them.

      In a point-to-point link with a 31-bit mask, a packet addressed to
      { , 0 } corresponds to one of the endpoints of
      such link, it MUST be treated as directed to the router on which
      the address is applied.

      (4) SHOULD NOT originate datagrams addressed to 0.0.0.0 or {
      , 0 }.  There MAY be a configuration option to
      allow generation of these packets (instead of using the relevant
      1s format broadcast).  This option SHOULD default to not
      generating them.

      In a point-to-point link with a 31-bit mask, the configuration of
      such a mask SHOULD allow for the generation of datagrams addressed
      to { , 0 }.

With RFC 3021 (if I'm reading the above correctly), except for /31 P2P IPs, this shouldn't work, but the fact you've found it does, is likely due to most IP implementations not treating the all zeros host bits IP address as directed, above, but just as like another host IP.  Again, if nothing really has used this special case, it simplifies the IP implementation.

In the above, technically, changing destination {, 0} as a MUST broadcast, should allow destination host to receive packet anyway.

Rule 4 is also interesting, as it assumes only /31 hosts can send to all zero hosts.  This would be impossible to control if you don't know what the destination network-prefix is, and often only the destination truly knows.

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

I'll try again

View solution in original post

11 Replies 11

nkarpysh
Cisco Employee
Cisco Employee

Hello,

That is so called subnet address or network prefix. That is used by routers to undertstand what netwroks they are running and if particular host with particular ip belongs tot his network. So that is borrowed for administartive purposes.

easy read can be found here:

http://en.wikipedia.org/wiki/Subnetwork

more detailed in RFCs

e.g.

RFC 1812 Requirements for IPv4 Routers

RFC 917 Utility of subnets of Internet networks

RFC 1101 DNS Encodings of Network Names and Other Type

Hope that helps,

Nik

HTH,
Niko

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The     Author of this posting offers the information contained within this     posting without consideration and with the reader's understanding  that    there's no implied or expressed suitability or fitness for any   purpose.   Information provided is for informational purposes only and   should not   be construed as rendering professional advice of any kind.   Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In     no event shall Author be liable for any damages whatsoever   (including,   without limitation, damages for loss of use, data or   profit) arising  out  of the use or inability to use the posting's   information even if  Author  has been advised of the possibility of  such  damage.

Posting

As long as nothing confuses the (sub)network address with the host address, it should work.  Only exception that I found mentioned was for 0.0.0.0/8.  A similar question can be found here: http://stackoverflow.com/questions/6824715/0s-in-ip-addresses

Seriously, that dislaimer is one mile long and confusing !

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

zoltanszasz wrote:

Seriously, that dislaimer is one mile long and confusing !

Hmm, I guess the Cisco user agreement you agreed to must have seamed a zillion miles long and even more confusing.

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I'll try again - maybe this time I'll be helpful.

Beginning with very early RFCs, all zeros was recommended to represent "this".  So an IP address with an all-zeros host bits, such as this Class C, 192.168.1.0 would mean "this network", 192.168.1.

Hosts were not to be assigned all zeros as a host number so they wouldn't be confused with a (sub)network number.  I.e., if you use 192.168.1.0 as either a source or destination IP it could have special meaning (just as the all ones host is used for broadcasts).  As far as I can tell, little if anything used this special designation (except for some old Unix implementations that could use all zeros as the broadcast address).

However, with RFC 3021, allowing for /31s for P2P links, the all zeros and all one host bits denote hosts.  This RFC does has some interesting things to say about how all zero host IPs should be treated:

(h)  { , , 0 }

         Subnetwork number.  SHOULD NOT be used as a source address,
         except when the originator is one of the endpoints of a point-
         to-point link with a 31-bit mask.  For other types of links, a
         packet with such a destination SHOULD be silently discarded.
         If these packets are not silently discarded, they MUST be treated
         as IP broadcasts [RFC1812].

(f)  { , , 0 }

         Subnetwork number.  SHOULD NOT be used as a source address,
         except when the originator is one of the endpoints of a point-
         to-point link with a 31-bit mask.  For other types of links, a
         packet with such a destination SHOULD be silently discarded.
         If these packets are not silently discarded, they MUST be
         treated as IP broadcasts.

      (2) SHOULD silently discard on receipt (i.e., do not even deliver
      to applications in the router) any packet addressed to 0.0.0.0 or
      { , 0 }.  If these packets are not silently
      discarded, they MUST be treated as IP broadcasts (see Section
      [5.3.5]).  There MAY be a configuration option to allow receipt of
      these packets.  This option SHOULD default to discarding them.

      In a point-to-point link with a 31-bit mask, a packet addressed to
      { , 0 } corresponds to one of the endpoints of
      such link, it MUST be treated as directed to the router on which
      the address is applied.

      (4) SHOULD NOT originate datagrams addressed to 0.0.0.0 or {
      , 0 }.  There MAY be a configuration option to
      allow generation of these packets (instead of using the relevant
      1s format broadcast).  This option SHOULD default to not
      generating them.

      In a point-to-point link with a 31-bit mask, the configuration of
      such a mask SHOULD allow for the generation of datagrams addressed
      to { , 0 }.

With RFC 3021 (if I'm reading the above correctly), except for /31 P2P IPs, this shouldn't work, but the fact you've found it does, is likely due to most IP implementations not treating the all zeros host bits IP address as directed, above, but just as like another host IP.  Again, if nothing really has used this special case, it simplifies the IP implementation.

In the above, technically, changing destination {, 0} as a MUST broadcast, should allow destination host to receive packet anyway.

Rule 4 is also interesting, as it assumes only /31 hosts can send to all zero hosts.  This would be impossible to control if you don't know what the destination network-prefix is, and often only the destination truly knows.

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

I'll try again

Good one Joseph, Thx.

HTH,
Niko

zoltanszasz
Level 1
Level 1

Broadcast is used to send out message to all computers in a network (inside communication), network address is used between routers so they know to what subnet to send the message  (outside communication - WAN more).

wags
Level 1
Level 1

Joseph, thanks for the RFC reference.

I wished I had gotten more information about the PC and router configs.  We were working on readdressing when we found it.  We were confused as to why it worked at all.  It was a printer with "address 0" being printed to by Win Vista and 7 machines. Also do not know specifics of the hosts configuration for printing other than the PC tech comment about "direct printing, not via MS domain print server".   NB and other bridging protocols were disabled on the printer, so it was not bridging that we could tell.

nkarpysh
Cisco Employee
Cisco Employee

Hi

What was the mask of that subnet? I mean that using this subnet for example 192.168.1.0 255.255.254.0 you will be able to use 192.168.2.0 as a host address as the network prefix here is 192.168.1.0.

Just quick guess shooting in dark if that was a case or smth else was there.

From what Joseph was refering to above the point was that RFC just derecting on how it should be used - but it is all up to vendor to decide on if they are going to implement same way or differently.

Nik

HTH,
Niko

Well Nik, that was not this situation.  In this case it looked more like this:  printer 192.168.1.8 mask 255.255.255.248.  They had run out of addresses and grabbed "address 0" for this printer, not a 0 digit address.  I know the router was only running IP, but what I didn't get was the model or IOS version as it was not relevant to the task of documenting readdressing.  I tried to recreate in a lab running IOS 12, and it just doesn't seem to work.  Makes you wonder if you really saw what you know you did 

nkarpysh
Cisco Employee
Cisco Employee

Basically it might depend on user PC realization of this subnetting feature. As I guess all users and printer were connected to same VLAN/domain. Thus they all communicated in L2 - so router can drop whatever packets sent to 192.168.1.8 (printer) withut breaking that communication. As all PC needs is just to send broadcast ARP asking for MAC corresponding to this IP. If PC protocls allow it - it will send and broadcast indeed will be delivered to printer in the same VLAn which will answer with it's MAC thus communication will continue in L2.

So router is not needed in this communication. So if PC allowed subnet address to be used as host and printer as well - then they can easily communicate.

Nik

HTH,
Niko
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