Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-03-2005, 11:19 PM
|
#1
|
|
LQ Newbie
Registered: Sep 2005
Location: India
Posts: 2
Rep:
|
How to capture & reorder the packets between two PC's
Hi Everybody,
For a testing purpose in my company,I have to introduce reordering,burstiness & error packets between two PC's in the network.i.e My Linux PC should activate as a switch.The packets should be captured and reorderd before forwarding to destination.How can I program to this situation with respect to OSI layers.
Please help me !
Thanks & Regards,
Janarthanan.S
|
|
|
|
09-04-2005, 01:22 AM
|
#2
|
|
Member
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568
Rep:
|
I would use the net modules in Perl to receive them, and then based on the sequence number of the packet, reorder them, and send.
I'm curious, why would you want to do this? Depending on the number of packets being sent, you are talking about a huge lag here. Not to mention, you would also have to code the ability to negotiate with the server machine as though you were the client. This would basically be a man in the middle spoof, to reorder packets?
Functioning as a switch, a Linux machine will forward the packets as any other switch would.
It should be up to the receiving machine to reorder/request retransmission of packets.
Last edited by PenguinPwrdBox; 09-04-2005 at 01:24 AM.
|
|
|
|
09-04-2005, 02:25 AM
|
#3
|
|
LQ Newbie
Registered: Sep 2005
Location: India
Posts: 2
Original Poster
Rep:
|
Hi Penguin...!
Thanks for replying me. What my actual need is,I have a testing tool( software in Linux ) in my Linux PC which acts as router between two PC's. Actually it can drop,duplicate,can delay the incoming packets since it act in IP layer.Now the need is to add some options like reordering of packets, changing the fields of packets,introducing packets in bursty nature to destination. What my question is how can i capture all the incoming packets regardless of TCP,UDP,ICMP or any more with respect to Linux programming. Some told to use raw sockets,where i came to know that only a copy of packets is sent to raw sockets & we can't avoid sending packets to kernel. If i reorder the copy of packets how can i send my reorderd packets instead of kernel forwarding packets.I have to finish within this week.
Please reply me with linux programming concepts !
Thanks in advance,
Janarthanan.S
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:19 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|