LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-15-2009, 11:52 AM   #1
farkeu
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
How to copy packet to another network card?


Hi!

Is there any way that can copy packets from a network card to another network card in a PC? Don't tell me use a hub, I need to this in software way in a PC!

For example, when wlan0 received a packet, how to copy that packet to wlan1, pretends it's wlan1 received that packet???

I already wrote a TARGET module for iptables to change IP destination.
For example, if wlan0 is 192.168.0.1, wlan1 is 192.168.1.1, I change every packets' (arrive at wlan0) IP destination to 192.168.1.1, but it's not working!! wlan1 didn't receive anything(checksum is correct). I check /proc/sys/net/ipv4/ip_forward is 1.

Could someone give me a hand? Thanks!
 
Old 08-16-2009, 09:51 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Do you have two or more computers, one with wireless, and want to give the others wireless access by routing the traffic on the first computer?
Could you please give a more general description on what you are trying to accomplish.
 
Old 08-17-2009, 02:09 AM   #3
farkeu
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for your respond

What I doing is: I split a video stream into 2 path(load sharing), 1st path end at wlan0, 2nd end at wlan1, wlan0 and wlan1 are in the same PC. But I can't combine these 2 stream together, because the video looks not smooth.

So, I try to copy wlan1's packet to wlan0, is there any way can do that?

Thank for help!

Last edited by farkeu; 08-17-2009 at 02:11 AM.
 
Old 08-18-2009, 07:34 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Look up bonding on Google. Both ends need to be configured for it and any switches & routers in between. You would be better off using gigabit NICs & switch. The CPU playing the stream may simply not be able to handle the video, in which case, bonding won't help.

I don't know if a bonded interface would split the traffic for a single connection or equalize different connections.
 
Old 08-20-2009, 04:39 AM   #5
farkeu
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hey! You inspire me! Thanks to you all!
I find out iptables extensions ROUTE target patch can do this job!
Now everything works perfect now!
Thanks~
 
Old 08-20-2009, 04:47 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Thank you for the feedback.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a packet sniffer program for a network card gauthamk Programming 1 09-18-2007 03:19 AM
linux shuts down built in network card then windows tells me network card is unplugge lesmoxhaybaker SUSE / openSUSE 8 08-29-2006 05:10 PM
send packet at network Jamesminh Programming 1 10-01-2004 10:04 AM
network packet size PTBmilo Linux - Networking 0 02-20-2003 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration