Options

Why can't 0' in the host portion of IP address be used for a host?

yrwinsyrwins Member Posts: 81 ■■□□□□□□□□
Why can't 0' in the host portion of IP address be used for a host?

Comments

  • Options
    clarsonclarson Member Posts: 903 ■■■■□□□□□□
    I would guess it is because that is the network address. And, routing protocols use network addresses to determine how to route the network traffic.
  • Options
    docricedocrice Member Posts: 1,706 ■■■■■■■■■■
    This depends on how large the network is. The last octet can be a 0 and be a host address. Take a /23 for example.
    Hopefully-useful stuff I've written: http://kimiushida.com/bitsandpieces/articles/
  • Options
    clarsonclarson Member Posts: 903 ■■■■□□□□□□
    I think he is talking about an ip address that has so many bits for the network and so many bits for the host. Such as in your /23 example, that is 23 bits for the network and 9 bits for the host. if the host bits are all zero, it is a network address. Doesn't matter if it is a /11 or a /22. if all the host bits are all 0's, then it is a network address. And, routing protocols use the network addresses to route the packets. So, I'm not sure what would happen if you had a 192.168.1.0 /24 host. it seems like the routers would route the packet right. And, a switch uses the mac address. So, that might not be the reason.
  • Options
    OctalDumpOctalDump Member Posts: 1,722
    If you are using CIDR, then normally it can be (except in the cases where it is invalid or a network address). Classful Addressing, however, can't ever use it for a host address since it is always a network (or invalid) address. So why do networks need their own addresses? Because that's how they made routing work - it makes a lot of sense with classfull addressing.

    There are, however, circumstances where modern devices can be confused and not let you use a host address ending in zero, even though it is perfectly legal/valid/acceptable. So some people just avoid them to be on the safe side.
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • Options
    dppagcdppagc Member Posts: 293
    all '0' = network address = to identify the subnet
    all '1' = broadcast address = for broadcasting
Sign In or Register to comment.