0

I have some doubt in the problem which follows:

Suppose a host with IP address 19.121.202.123 wants to send a packet to all the hosts in the same network. Then, what destination address should it use?


I think it should be 19.255.255.255, but I am not getting the meaning of "same network" here?

Can anyone help?

Ron Maupin
  • 102,040
  • 26
  • 123
  • 202
Garrick
  • 103
  • 1
  • 4

1 Answers1

1

See this answer, and understand that you need both an address and mask to determine the network, then the broadcast address is the last address in the network.

Mask the address with the mask (logical AND) to get the network, and you set all the host bits to 1 to get the broadcast address. You need to convert the address and mask to binary, do your calculations, the convert it back to decimal. Not everything will line up nicely with the decimal points in a text representation of an IPv4 address, and not doing it in binary will cause you problems.

The network is any address with the same networks bits. Any combinations of host bits with the same network bits are in the same network.

Ron Maupin
  • 102,040
  • 26
  • 123
  • 202