Welcome to the Linux Foundation Forum!

LFS201 Knowledge Check Question 34.3

Question: 192.168.128.255 is a valid IP address for a host on a local network if the mask is configured to 255.255.255.0. True or False?

The answer is given as false, but no further explanation is provided. After googling for more info, I found out that routers use a form of classless IPv4 addressing called CIDR, with the same dotted-decimal notation but followed by forward slash and bit mask. My conclusion is the host IP address in the question above does not conform to the correct format of 192.168.128.255/24 given the bit mask of 255.255.255.0

Please kindly correct me if I am wrong. Thank you

Reference:
Cisco Press - https://www.ciscopress.com/articles/article.asp?p=330807
OpenLearn - https://www.open.edu/openlearn/science-maths-technology/computing-ict/protocols-multi-service-networks/content-section-3.5.1

Answers

  • nghuipen72
    nghuipen72 Posts: 2
    edited November 2021

    I just found out that the IPv4 address range from 192.168.0.0 to 192.168.255.255 are reserved for private or internal network addresses. Therefore 192.168.128.255 is a private address and not a public address, so obviously the answer should be false

    Reading:
    Opensource.com - https://opensource.com/article/16/12/cidr-network-notation-configuration-linux
    IBM - https://www.ibm.com/docs/en/networkmanager/4.2.0?topic=translation-private-address-ranges

  • luisviveropena
    luisviveropena Posts: 1,142
    edited November 2021

    Hi @nghuipen72 ,

    I just found out that the IPv4 address range from 192.168.0.0 to 192.168.255.255 are reserved for >private or internal network addresses. Therefore 192.168.128.255 is a private address and not a public >address, so obviously the answer should be false

    Yep, that's right. Also you can take a look to RFC1918, which refers to "Address Allocation for Private Internets":

    https://datatracker.ietf.org/doc/html/rfc1918

    Regards,
    Luis.

  • @luisviveropena said:
    Hi @nghuipen72 ,

    I just found out that the IPv4 address range from 192.168.0.0 to 192.168.255.255 are reserved for >private or internal network addresses. Therefore 192.168.128.255 is a private address and not a public >address, so obviously the answer should be false

    Yep, that's right. Also you can take a look to RFC1918, which refers to "Address Allocation for Private Internets":

    https://datatracker.ietf.org/doc/html/rfc1918

    Regards,
    Luis.

    well the question is if it was a correct address on the local network. And local network should imply private ip addressing.

    It is not a correct host address because it is broadcast ip address.

    When subneting first (network) and the last (broadcast) addresses can't be used for hosts.

    For example you can see broadcast as bdr field in ip a output:
    wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
    ...
    inet 192.168.0.11/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp0s20f3

    Some more details on subneting
    https://en.wikipedia.org/wiki/Subnetwork

    And an interactive subnet calculator with binary AND to have how different netmasks work
    http://jodies.de/ipcalc

  • Hi @ddespa, yep, we are not supposed to assign the broadcast IP to a host (technically you can do it, but it can/will generate issues on the network). In the same way, we don't use the network address for a host.

    Regards,
    Luis.

Categories

Upcoming Training