29

So... I have studied for CCNA and such and been working with IP networking at the least the past 8 years or so. I have always seen and been told that the network address for a subnet is not a valid host address. Now first I will start by saying I know this is true. My question is more... is there a technical reason it can not be used or was it just arbitrarily agreed upon when the specification was designed? I understand why a broadcast address can not be used (because it is ACTUALLY used). The thing is when I see a network address used it is normally only in routing which is specifically using NETWORK addresses. This being the case, (network addresses being used only when you are expecting a network address) is there some technical reason that they could not have the network address be an actual valid host address?

7 Answers 7

23

As far as I understand, "network address" as a special address is an artifact from the classful IP networks from the past. Today, we use Classless Inter-domain Routing (CIDR) on the Internet, which does not have the concept of a network address (if you look at the RFC 4632 linked above, you'll see that it lists 256 possible IP addresses per legacy "C" block, e.g. no reserved addresses for either network or broadcast address (although broadcasts are defined as essential in other RFCs).

This being said, you still should not assign a network address to any specific host in a network: Network address is essential for routing. This concept is used extensively in RFCs (RFC 1812). Just look at the routing tables (route command), you'll see how your local network address is used to separate your local network traffic from what must go through the router. What if that local network address was assigned to some host?

Even worse: it is better not to assign IP addresses ending in zero even if this address is not a network address. E.g. if your network is 10.10.0.0/255.255.0.0, IP address 10.10.5.0 is not your network address, but you'd better not assign such IP even though it is completely valid even on classful IP networks. Some legacy software/IP stacks may have problems with it.

UPDATE: by goblinlord

According to RFC 1812 (Section 5.3.5.2) what we call a network address was originally used for "directed broadcasts" which would send a broadcast packet to the desired network. This function was made obsolete because of SMURF attacks. The function was officially changed in RFC 2644. Subsequently, further implementations should silently drop packets with a source address as described (the network address). While this is what should happen I am curious as to how many implementations actually do so.

This is further added to in RFC 3021 when /31 subnetting was addressed.

8
  • 6
    @grawity: Not always. Only In a network larger than /31. E.g. P2P can have two addresses and no broadcast address.
    – haimg
    Jan 17, 2012 at 17:08
  • 5
    Hmmm... i like the first part of the answer... that it is an artifact from classful IP networks. My issue again with the second part is routing tables are used specifically to route to a network. As I understand it, the routing table is only looked at to route to a network to which the receiver is not on (dest IP not part of your subnet/net). This being the case... when looking at a routing table it is clear the addresses in it are network addresses and not host addresses therefore seperating this from a host packet dest IP. In actual traffic, a dest IP of a net address is never used.
    – Goblinlord
    Jan 17, 2012 at 18:27
  • 1
    So... is there any reason to specifically reserve it if these 2 instances are already seperate (network address in routing table and dest IP when determining whether you need to look at a routing table).
    – Goblinlord
    Jan 17, 2012 at 18:32
  • 1
    @Goblinlord: No official reason that I could find (recent RFCs, etc.). However, so much software is built with the assumption that the network address is "special", that in practice you'd better not use it as a host IP address.
    – haimg
    Jan 17, 2012 at 18:42
  • 1
    There is a cisco config entry which allows the network address to also be a host, which has been around for at least 10 years... I never used it, or even tested it, and due to possible stack issues as mentioned, specifically didn't allow hosts to end in .0 or .255 on the networks for which I was responsible, though I hadn't come across other network or broadcast addresses in use for smaller than /24s, at @Home, and while CoreOS wanted to issue the middle .0 and .255 as hosts in sanbrunocable's /23's and /21s, I manually reserved them. May 25, 2013 at 8:05
5

So the practical answer is: It really depends. It depends on:

  • The exact address, and its meanings in the many RFC's
  • The version and revision of your operating system
  • ...And that of your router, and every other upstream router
  • ...And the intelligence and sophistication of all the network admins of those routers...

I have not run into any problems accessing any sites in testing this; it seems that ultimately it's all left up to the network administrators' whims. There is usually no way for an upstream device to tell whether an address is part of a network or broadcast address, or not, as it is simply an address in a bigger block to them... So no ISPs will block you from assigning and using your network address, unless they assigned it to you and their network administrator has explicitly blocked it.

I'm sure there are security analysts and hackers out there who have insanely detailed stats on exactly how many variants of TCP-IP stack implementations are out there and what the do and do not accommodate or allow and exactly how and where they miss their mark.

Matter of fact, I'm browsing and posting this from my network address.

Don't call me a bad netizen unless you have a better solution to fixing this house of cards: the reality is that if it's possible, it will happen. The reality is that nobody really smart enough sat down and thought this whole thing through in all its possible iterations in order to come up with a completely fool-proof design, before people started using it - as with most things in life. The result? Standards where a lot of things don't add up and/or get lost in translation.

Welcome to the real world. Don't let that dissuade you from chasing the ever elusive optimal ideals... Just don't expect support from the "official" channels or forums unless you are willing to get your hands dirty and dedicate your time and life to it, building the necessary consensus, and navigating the politics around that.

So, I think what the other posters were trying to say: If you want to make this official policy and use it in production, you're on your own. (But aren't you anyways?) Maybe we'll strike it lucky and have a computer intelligence design us an IPv8 that's backwards compatible with IPv4 and IPv6 and all their broken implementations.

1
  • Of course - when you're using your network address, the device it's assigned to may receive all kinds of broadcast traffic as some network stacks treat it as a broadcast. These however, generally do not interfere much as they're just silently dropped. I'm curious how many network exploits rely on the peculiarities surrounding this however...
    – Dagelf
    Jan 24, 2013 at 10:57
2

I'm new to network but I'll give my 2 cents as well.

If I have a /28 subnetwork from x.x.x.0 - x.x.x.15 According to the predefined rules we would have 14 usable hosts and 2 remaining. the remaining are for network and broadcast.

Lets, instead of following the rule above, actually use all 16 hosts. Then in that case all would be ok, no problems. But if communucation was needed outside the network then it would not be possible because of lack of resources to send or recieve the information.

I'm not great at explaining but to put it another way.

If I lived in a house on a street and the street contained 14 houses. A laneway in and out for access to the main road.

My mailing address would range from 1-14 Personal Street, Off Network Road.

That would be no problem for the mail man. Now lets assume the developers got greedy and added 2 more house and got rid of the laneways.

Then my new mailing address would range from 1-16 Personal Street

In this instance the mail man would be in trouble.

This is a guess, let me know if I'm talking bull.

0

The network address allows you to build route tables with fixed-size (4-bytes IPv4) destination column and fixed-size binary operations so that host routing and network routing is actually the same thing.

Imagine a routing table like this: (this PC has a parallel connection with another PC and a network card)

Dest           Mask    Dev
192.168.0.123  /32     plip0   # This is a single host
192.168.0.0    /24     eth0    # This is a network

The AND between the IP address and the netmask gives you exactly what you need, a 4 bytes number which can be compared against each line without further calculations.

So the host number zero is special in the sense that after the AND operation its address naturally represents the whole network.

If you decided to use the network number as a host number it would result in a table like this:

Dest           Mask    Dev
192.168.0.0    /32     eth0    # This is the host (it's a redundant line)
192.168.0.0    /24     eth0    # This is the network

This seems legit, so I suppose the concept of network address is used for routing reasons and thus it was decided arbitrarily to mark it as a special address and prohibit its use as a host address.

Well... actually it's not that simple. I decided to give it a try (!!!):

# route add -net 192.168.0.0/32 eth0
# ping 192.168.0.0
Do you want to ping broadcast? Then -b
# telnet 192.168.0.0
Trying 192.168.0.0...
telnet: connect to address 192.168.0.0: Network is unreachable

At present the network programs don't allow me to use a network number as a normal address.

2
  • Considering your first routing table example I think that is a really bad way to do things... if you have other hosts on your .0.0 subnet how do they communicate properly with each other as well as the .0.123 host without staticly setting routes on every single host? That really doesn't seem like the proper way to do things.
    – Goblinlord
    Jan 17, 2012 at 18:40
  • It's just a fictional example, I would never setup a table like that :-) The .123 host is connected with a point to point connection while the rest is the usual ethernet network. If you want other machines to access the .123 host you need to do additional work, but it's not impossible. Jan 18, 2012 at 11:41
0

Whilst searching for the answer to this question I came across this article from Cisco. The following quote from that article sums it up nicely I think.

[...] consider the IP address 172.16.1.10. If you calculate the subnet address corresponding to this IP address, the answer you arrive at is subnet 172.16.0.0 (subnet zero). Note that this subnet address is identical to network address 172.16.0.0, which was subnetted in the first place, so whenever you perform subnetting, you get a network and a subnet (subnet zero) with indistinguishable addresses. This was formerly a source of great confusion.

Avoiding confusion is a good enough reason for me.

1
  • I know this question was posed a long time ago but I was just reviewing this stuff. The article you quote is talking about "subnet zero" or the first subnet in a network address. This is something completely different and in any modern network I have worked on every switch has the feature "ip subnet-zero" enabled. It also mentions that these days it is enabled by default on all of their switches (as of version 12 which was released around 2003).
    – Goblinlord
    Feb 25, 2015 at 6:41
0

RFC 1122 ("Requirements for Internet Hosts -- Communication Layers") prohibits it:

IP addresses are not permitted to have the value 0 or -1 for any of the < Host-number>, < Network-number>, or < Subnet- number> fields

0
0

A network address is not considered a host address but it is just a number. In address limited areas such as point-to-point networks a /30 mask is used often, yet still utilizes the host addresses. A lesser practice, but achieves the same principle is to use a /31 mask and use one end as the network address and the other as the broadcast.

Ex.

Router(config)#int gi0/0
Router(config-if)#ip add 10.0.0.0 255.255.255.254
Router(config-if)#no shut


Router2(config)#int gi0/0
Router2(config-if)#ip add 10.0.0.1 255.255.255.254
Router2(config-if)#no shut


        .0        .1
[Router]-----------[Router2]
   network      broadcast

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .