fays
fays

Reputation: 73

Send the same message to several hosts (Broadcast in Ethernet LAN)

I'm trying to understand how Omnet++ works since a couple of months and I'm facing a problem.

I'm working with the INET framework, more particullary with the Networks NED file (examples/ethernet/lans/networks.ned).

In a given simulation, I want to send the same packet at the same time, for all neighbouring hosts. But I don't have any idea of how can I do. I only know how to specify a unique destination address.

Does anyone have any idea ?

Thanks for your answers

Upvotes: 0

Views: 1587

Answers (2)

fays
fays

Reputation: 73

My solution:

It only needs to specify **.hostA.cli.destAddress = "FF:FF:FF:FF:FF:FF".

I couldn't figure out what if the MAC broadcast address was configured in the model.

Thank you user4786271 for your help, you weren't so far from the solution.

Upvotes: 1

user4786271
user4786271

Reputation: 1565

I can think of two possible ways to achieve broadcast:

  1. Broadcast functionality offered by the module you are using
  2. Broadcast as given in the OMNeT++ manual

For the first one, if I assume that you are simulating a network, there is usually a broadcast IP in real networks. Maybe that is implemented in the module you are using. For example 255.255.255.255 might be the broadcast IP for your network. You will have to know the IP address range of your LAN, and somehow infer the broadcast IP from there, by analysing the model.

The second option would be using the description for broadcasting from the OMNeT++ user manual. Where a broadcast is hardcoded to the behaviour of the module/node, excluding the concept of IP etc.

Upvotes: 0

Related Questions