[Click] Generating packets in ns-3-click

Jesse Brown jbrown at atl.lmco.com
Wed Sep 26 14:41:15 EDT 2012


Lalith Suresh:

It turns out the error stemmed from my own ignorance.

I was sending out broadcast packets and was failing to apply my own 
Ethernet header. The ns-3 generated packet was properly handled by 
ArpQuerier but I was printing the packet contents before that point in 
the click graph leading to my confusion. By adding a proper Ethernet 
header I am able to properly pass packets from click to ns-3 without issue.

Sorry for the trouble.

Thank you,

Jesse


Lalith Suresh wrote:
> Hi,
>
> On Sat, Sep 22, 2012 at 12:52 AM, Jesse Brown <jbrown at atl.lmco.com> wrote:
>   
>> All:
>>
>> Note: I've also posted this to the ns-3-users list but I've got no
>> response so far.
>>
>>
>> I am running ns-3 with click integration and I'd like to generate
>> packets from within the click graph instead of from within ns-3
>> components. I'm having trouble, however, getting the packets to inject
>> properly into the simulation. Here is my approach:
>>
>>  From within a click element I create a new packet with Packet::make.
>> Source IP is assigned the node that is creating the packet and
>> destination is the broadcast address 10.1.255.255. If I place a Print
>> element in line after this in the router I see the following:
>>
>> ...:   36 | 45000024 00000000 40110000 0a010101 0a01ffff 02ba02ba
>> 00100000 31302e31 2e312e31
>>
>> which looks reasonable. I also have UDP traffic being generated from an
>> ns3::UdpSocketFactory. That traffic looks like
>>
>> ...:  540 | 4500021c 02610000 40110000 0a010101 0a010102 c001c350
>> 02080000 00000000 00000000
>>
>> So the format looks reasonable but the click packet hits the wire as
>> some LLC protocol (presumably from lack of proper header application)
>> while the ns-3 packet goes out as a proper UDP packet. Every packet
>> follows the same path out of the router.
>>
>> I tried to modify simclick_simpacketinfo within the packet to properly
>> represent the simulation id but with no luck.
>>
>> Is there some process by which packets generated within click can be
>> incorporated into a running simulation?
>>
>>     
>
> This is supposed to work out of the box. Can you please send me the
> simulation scripts and click files that you're using along with the
> ns-3 and click revision numbers?
>
> P.S: I'm travelling now and will be slow to respond
>
>   
>> Thank you,
>>
>>
>> Jesse
>>
>> _______________________________________________
>> click mailing list
>> click at amsterdam.lcs.mit.edu
>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>     
>
>
>
>   




More information about the click mailing list