• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using the broadcast address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the broadcast address


  • Subject: Re: Using the broadcast address
  • From: Joel Bender <email@hidden>
  • Date: Thu, 16 May 2002 12:07:16 -0400

It *appears* from what I have been able to gather that there is a broadcast address that I can send to, consisting of the highest IP number in the allowable range, ie, 192.168.1.255 for that ip range.

You may recall that IP addresses are split into two parts, the 'network' and the 'host' and the split between the two is determined by the network 'mask'.

The host number can be zero or all 1's, both are valid broadcast addresses, but zero is no longer used (very old BSD thing I understand).

Does anyone know of any documentation I can get to find out more about this?

<http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc0950.html>

Specifically, how do I connect and send to the broadcast address, and how can I receive packets addressed to the same.

Open a datagram socket, using the port number that will be shared by all of the cooperating applications.

Take your network mask and invert it. This is the host number. Or it with your IP address and you'll get the destination address for your broadcast.

Alternatively, just send your messages to 255.255.255.255, which will also get to everybody.

Note that UDP broadcasts are not forwarded by routers. They may also be blocked by other intervening equipment like cable modems. You could 'flood' the network by sending your message to every valid host in the range, but that it not recommended (network traffic analyzers will flag this as a 'service scan attack' and you'll get some angry calls from network admins).


Joel

--
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Using the broadcast address
      • From: Joshua Graessley <email@hidden>
    • Re: Using the broadcast address
      • From: "Marc Epard" <email@hidden>
References: 
 >Using the broadcast address (From: Andrew <email@hidden>)

  • Prev by Date: Re: Using the broadcast address
  • Next by Date: Re: Quinn's ICconfig: setting News Server
  • Previous by thread: Re: Using the broadcast address
  • Next by thread: Re: Using the broadcast address
  • Index(es):
    • Date
    • Thread