Skip to contentSkip to conversation

Software bridge problem

LARTC Henrik Ramberg 3 participants 3 messages May 17, 2003

lore
Share & tools
lore
#0 lore raw

Dear list.

I have a problem I hope someone can help me with. I am currently developing a "transparent" software bridge that connects a local area network to the Internet. eth0 is connected to the "Internet" and eth1 is connected to the LAN. The program is working just fine and packets are routed perfectly through the box. However my problems goes as follows: eht0 has got an IP stack so that the box can surf around on Internet (this is an necessity), while eth1 is protocol less. I want the clients in the LAN to reach the IP stack on eth0 via eth1 in order to recieve stats on whats been downloaded etc. In this situation packets for eth0 would be recieved on eth1 and the go through my bridge and then sent out on eth0 as every other packet. Then when eth0 has sent the packets it would recieve the newly sent packets in normal manner. However this does not seem to work. I have used pktdump to verify that packets are recieved on eth1 and sent out on eth0. The problem is that the IP stack will not accept the packets it sends out itself and just drops them. WHY? Is there a remedy to my problem?? I am currently running Linux 2.2.22-compact kernel.

All replies will be deeply appreciated.

Regards,
Henrik Ramberg

#1 lore raw
Quoted 19 lines · Henrik Ramberg

Dear list.

I have a problem I hope someone can help me with. I am currently developing a "transparent" software bridge that connects a local area network to the Internet. eth0 is connected to the "Internet" and eth1 is connected to the LAN. The program is working just fine and packets are routed perfectly through the box. However my problems goes as follows: eht0 has got an IP stack so that the box can surf around on Internet (this is an necessity), while eth1 is protocol less. I want the clients in the LAN to reach the IP stack on eth0 via eth1 in order to recieve stats on whats been downloaded etc. In this situation packets for eth0 would be recieved on eth1 and the go through my bridge and then sent out on eth0 as every other packet. Then when eth0 has sent the packets it would recieve the newly sent packets in normal manner. However this does not seem to work. I have used pktdump to verify that packets are recieved on eth1 and sent out on eth0. The problem is that the IP stack will not accept the packets it sends out itself and just drops them. WHY? Is there a remedy to my problem?? I am currently running Linux 2.2.22-compact kernel.

Quoted 1 line

All replies will be deeply appreciated.

I'm not such a bridge specialist, but I suppose that adding a stack means adding an ip-address. If you do so, why don't you add an other (or even the same) ip-address to the NIC connected to the LAN ?

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Henrik Ramberg

I think you need to assing your ip on the bridge
/sbin/ip addr add 10.10.10.2/24 brd + dev br0
/sbin/ip route add default via 10.10.10.1

Markske
http://www.linux-network.be/knowledge/bridge.php
----- Original Message -----
From: Henrik Ramberg
To: [email protected]
Sent: Saturday, May 17, 2003 2:11 PM
Subject: [LARTC] Software bridge problem

Dear list.

I have a problem I hope someone can help me with. I am currently developing a "transparent" software bridge that connects a local area network to the Internet. eth0 is connected to the "Internet" and eth1 is connected to the LAN. The program is working just fine and packets are routed perfectly through the box. However my problems goes as follows: eht0 has got an IP stack so that the box can surf around on Internet (this is an necessity), while eth1 is protocol less. I want the clients in the LAN to reach the IP stack on eth0 via eth1 in order to recieve stats on whats been downloaded etc. In this situation packets for eth0 would be recieved on eth1 and the go through my bridge and then sent out on eth0 as every other packet. Then when eth0 has sent the packets it would recieve the newly sent packets in normal manner. However this does not seem to work. I have used pktdump to verify that packets are recieved on eth1 and sent out on eth0. The problem is that the IP stack will not accept the packets it sends out itself and just drops them. WHY? Is there a remedy to my problem?? I am currently running Linux 2.2.22-compact kernel.

All replies will be deeply appreciated.

Regards,
Henrik Ramberg