wifi broadcast question 2: broadcast address

345 views
Skip to first unread message

Michael

unread,
Sep 1, 2009, 12:42:40 AM9/1/09
to ns-3-users
In the same simulation as the previous wifi broadcast question, I am
using the broadcast address (255.255.255.255) as the destination;
however, the trace shows that the destination is not 255.255.255.255,
but rather 10.1.3.255. Is there something else I need to set to have
it truly broadcast to 255.255.255.255?

pcap output:
0.000679 IP 10.1.3.1.49153 > 10.1.3.255.9: UDP, length 500
0.001606 IP 10.1.3.1.49153 > 10.1.3.255.9: UDP, length 500
0.002488 IP 10.1.3.1.49153 > 10.1.3.255.9: UDP, length 500

ascii output:
t 0.00067973 /NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/State/Tx
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0,
MoreData=0 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
BSSID=00:00:00:00:00:01, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
(type 0x800) ns3::Ipv4Header (tos 0x0 ttl 1 id 1 protocol 17 offset 0
flags [none] length: 528 10.1.3.1 > 10.1.3.255) ns3::UdpHeader
(length: 508 49153 > 9) Payload (size=500) ns3::WifiMacTrailer ()
t 0.00160673 /NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/State/Tx
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0,
MoreData=0 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
BSSID=00:00:00:00:00:01, FragNumber=0, SeqNumber=1) ns3::LlcSnapHeader
(type 0x800) ns3::Ipv4Header (tos 0x0 ttl 1 id 3 protocol 17 offset 0
flags [none] length: 528 10.1.3.1 > 10.1.3.255) ns3::UdpHeader
(length: 508 49153 > 9) Payload (size=500) ns3::WifiMacTrailer ()
t 0.00248873 /NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/State/Tx
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0,
MoreData=0 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
BSSID=00:00:00:00:00:01, FragNumber=0, SeqNumber=2) ns3::LlcSnapHeader
(type 0x800) ns3::Ipv4Header (tos 0x0 ttl 1 id 5 protocol 17 offset 0
flags [none] length: 528 10.1.3.1 > 10.1.3.255) ns3::UdpHeader
(length: 508 49153 > 9) Payload (size=500) ns3::WifiMacTrailer ()

HeX

unread,
Aug 1, 2012, 9:04:09 AM8/1/12
to ns-3-...@googlegroups.com
I have met the same problem. But I found this:

    address.SetBase ("10.1.3.0", "255.255.255.0");  

IF you change the mask of IP Address, such as

     address.SetBase ("10.0.0.0", "255.0.0.0"); 

it will broadcast to 10.255.255.255. 

Although it cannot truly broadcast to 255.255.255.255, I hope it is useful.

在 2009年9月1日星期二UTC+8上午8时42分40秒,Michael写道:
Reply all
Reply to author
Forward
0 new messages