Results 1 to 10 of 10
Hi All.
Help me, please, i have the situation:
there is real physical interface eth1, and i have my drive, wich create myeth0 and myeth1.
I need, that packets, which ...
- 05-17-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 20
"bridge" between network interfaces
Hi All.
Help me, please, i have the situation:
there is real physical interface eth1, and i have my drive, wich create myeth0 and myeth1.
I need, that packets, which kernel send to myeth0 and myeth1, really will be sended throw eth1, and packets, received from eth1, passed to kernel throw myeth0 and myeth1.
Thank you.
- 05-17-2007 #2
I don't know how those myeth? would like in ifconfig.
I presume they will have their own IP addresses and I don't know if it makes any difference if they have the same or a different MAC adddress from eth1.
I always worked only with real physical devices and they surely had always a different MAC address.
On a PC, there is a configuration feature to setup a network bridge. I have never done this, but there must be some Linux HOWTOs on the Internet.
I you for any reason you don't want or can't do this, you can write a small user application which reads in an endless loop from those network sockets and writes to them, simply by doing a recv() into a buffer and take the same buffer and do a send() with it.
In this case you can also manipulate the Ethernet packet in every unusual way you wish to.
A little bit more info is here
http://www.linuxforums.org/forum/lin...lp-server.htmlBus Error: Passengers dumped. Hech gap yo'q.
- 05-17-2007 #3Just Joined!
- Join Date
- May 2007
- Posts
- 20
there is a bridge utility "brctl" - may be, it can help me?
- 05-17-2007 #4
Maybe, depends on your setup and requirements.
http://www.faqs.org/docs/Linux-HOWTO...STP-HOWTO.htmlBus Error: Passengers dumped. Hech gap yo'q.
- 05-17-2007 #5Just Joined!
- Join Date
- May 2007
- Posts
- 20
How can i create in Linux virtual interfaces?
And than i will add them and eth1 in bridge (brctl addif ...)
- 05-21-2007 #6Just Joined!
- Join Date
- May 2007
- Posts
- 20
Îê, i have written a small application "net_bridge" and a my network driver "myeth".
Appication recvfrom "myeth0" (socket PF_PACKET) and send it to socket "eth1". Packet is really transmitted from eth1.
When packet is arrived from ethernet to eth1, eth1 driver is process it and pass (or not pass) to kernel.
My Question: must i readfrom "eth1" and sendo "myeth0" in net_bridge application?
- 05-21-2007 #7
- 05-21-2007 #8Just Joined!
- Join Date
- May 2007
- Posts
- 20
i don't use UDP or TCP, i send packets raw, throw PF_PACKET socket.
but how send packet to "myeth0"?
when i sendo(socket_myeth0), the function hard_start_transmit is called, but i dont want to transmit this packet, because i have already receive it from eth1 and must pass it throw myeth0 to kernel.
- 05-21-2007 #9
Can't you simply receive in your user application from all sockets and what you don't want to forward to other sockets you simply don't send it, i.e. you don't call send() and let the received packet simply get overwritten by the next received one?
Bus Error: Passengers dumped. Hech gap yo'q.
- 05-23-2007 #10Just Joined!
- Join Date
- May 2007
- Posts
- 20
I have found a method for my problem:
i create with vconfig two VLANs: eth1.0 and eth1.1


Reply With Quote
