Can NS3 achieve simulation like file transmission?

677 views
Skip to first unread message

dea...@gmail.com

unread,
Jan 4, 2016, 6:12:50 AM1/4/16
to ns-3-users
Hello everyone!

I'm a fresh new student in NS3, and I'm working on something related to file transmission, so I'm curious if NS3 can be used to simulate the real file transmission(use TCP or UDP)?
I mean, the file is sent from one node to another node, and the other node can decode the file, or print it out?

Thanks!
Best regards!

Dean


Konstantinos

unread,
Jan 4, 2016, 7:43:28 AM1/4/16
to ns-3-users
Hi Dean,

Yes you can do such a transmission. 
Packets generated in NS-3 may be 'dummy' meaning that they only have a predefined size but no actual payload, or 'real' where the payload is generated from some buffer. 
You can create a custom application (client/server) to read a file to a buffer, generate packets from that buffer, send them using TCP or UDP sockets, and then at the server side read the buffers, append the content to a buffer and hence reconstructing the original file.
Some useful information from NS-3 documentation about creating packets with real data and creating new applications.

Regards,
K.

Dean Chen

unread,
Jan 4, 2016, 8:33:28 AM1/4/16
to ns-3-...@googlegroups.com
Many thanks! I may read these documents first and try to implement them myself : )

Best regards!

Dean

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/iG4_IohYWXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Matt Anonyme

unread,
Jan 5, 2016, 8:00:02 AM1/5/16
to ns-3-users
You can also load some real programs (for instnace iperf2) via the DCE extension of ns3: https://www.nsnam.org/overview/projects/direct-code-execution/

Christian Kreuzberger

unread,
Jan 7, 2016, 8:41:06 AM1/7/16
to ns-3-users
Yes, it is absolutely possible, though you will come across some smaller issues that you need to bypass. 
From that, you work your way around with the link from Konstantinos (Putting real bytes in the payload). 
.

Dean Chen

unread,
Jan 7, 2016, 9:15:59 AM1/7/16
to ns-3-...@googlegroups.com
Thanks! I shall try it all :)

Dean
Reply all
Reply to author
Forward
0 new messages