[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Two questions about wireless broadcasting



[email protected] wrote:

> Hi everyone,
>
>   I have two questions about wireless model in ns.
>
>   1.If I want to send a broadcast packet only to my neighbors at network
>     layer, can I set destination ip address = IP_broadcast and ttl=1?
>

Yes, this exactly the way how it is done e.g. by the AODV routingagent
in the first step of the expanding ring routerequest broadcast.

>
>   2.The same situation as question 1 but at link layer,
>     is it right that only setting MAC address = MAC_broadcast?
>     Should I set ip address at link layer?
>

If a packet with a dest.-IP-address set to IP-BROADCAST arrives at the
LL, it's MAC-dest-addr. is in fact set to MAC-BROADCAST.
Why do you want to set the IP address manually in the LL at all?

>
>     Thanks.
>
> zoe