Connecting two machines with an ethernet bridge


 
Thread Tools Search this Thread
Special Forums IP Networking Connecting two machines with an ethernet bridge
# 1  
Old 11-03-2010
Question Connecting two machines with an ethernet bridge

Hello,

I want to connect 2 machines with a bridge between them to control the traffic i.e. delay, loss rate, etc.
I am using the following solution:
2 end machines with ip-adresses 192.168.0.8 and 192.168.0.16.
1 machine with 2 NIC interface cards: 192.168.0.40 and 192.168.0.41
I have directly connected 192.168.0.8 to 192.168.0.41 and 192.168.0.16 to 192.168.0.40 using cables.
I intend to use a bridge using brctl to relay the traffic between the 2 interfaces in the bridge machine.
Then, I want to use dummynet in the bridge machine to control the traffic flow between the 2 end machines.

Now, my question is whether my setup is correct to obtain my objective?
If NO, then how should I setup to achieve my requirements.

Another connectivity issue is:
192.168.0.8 is able to ping both 192.168.0.40 and 192.168.0.41. Why?
192.168.0.16 not able to ping 192.168.0.40 and neither 192.168.0.40 is able to ping 192.168.0.16 Why?
I have not set any bridge currently and all firewall options are disabled.
I am using Mandriva 2010 in all the machines.

Any help will be highly appreciated!
Thanks!
# 2  
Old 11-03-2010
Am I picturing this right:

Code:
0.16 <----> ( 0.40, 0.41 ) <----> 0.8

What you're trying to do should be possible, I think, at least in linux, which can do this odd kind of pseudo-routing. The finer details of it sometimes puzzle me.

I think you get ping responses because those interfaces are on the same subnet as far as that machine's concerned.
Quote:
192.168.0.16 not able to ping 192.168.0.40 and neither 192.168.0.40 is able to ping 192.168.0.16 Why?
Do their MAC addresses at least show up in your ARP tables when they try to ping each other?
# 3  
Old 11-03-2010
What is your default gateway on each host ? and is ip forwarding switched on or off on the router ?
# 4  
Old 11-04-2010
Default gateway isn't needed for hosts on the same subnet.
# 5  
Old 11-04-2010
true ... so next guess would be weird subnet masks ...
# 6  
Old 11-04-2010
Prob with connecting 2 machines with a bridge!

Thanks for replying!
I mentioned in my first post that I need to control traffic flowing between 2 machines using a bridge. All are in the same subnet with subnet mask of 255.255.255.0 in all interfaces in all machines.
I have connected the machines directly back to back with the configurations mentioned in my first post.
X.40/24 is eth1 and X.41/24 is eth0 in bridge machine.
Other 2 host machines are: X.8/24 and X.16/24 where X=192.168.0 in all the machines.
I have directly connected X.41->X.8 and X.40->X.16
Now my prob is I am able to ping X.41->X.8 both ways correctly.
But X.40->X.16 is not able to ping both ways. Moreover, X.8 is able to ping X.40 though not directly connected.

Latest observation is, when I disconnect X.41->X.8 connection then X.40->x.16 is able to ping both ways perfectly.
So the problem happens when both the cables are connected in the bridge machine interfaces X.40 and X.41
So, the problem is not related to ip/subnet addressing errors!

The arp tables look as follows:
At X.16-->arp- a gives ? (192.168.0.40) at <incomplete> on eth0
At X.40-->arp -a gives ? (192.168.0.16) at <incomplete> on eth1

So, it seems that the arp tables entries are missing.
But when I disconnect the connection of X.41->X.8 then the arp table entries show correctly in X.40 and X.16 and are also able to ping each other as already mentioned.

Any help will be highly appreciated!
Thanks!

---------- Post updated at 01:08 PM ---------- Previous update was at 12:53 PM ----------

The connection:
Quote:
X.8<------>(X.41 X.40)<------->X.16
is absolutely correct.
Not able to ping: X.40<------>X.16
Able to ping: X.41<--------->X.8
Removing the connection X.41<------->X.8 the ping works perfectly in X.40<------->X.16
# 7  
Old 11-04-2010
Ignoring the private network joining the two computers for the moment.
Are 192.168.0.8 and 192.168.0.16 plugged into the same physical network, or do you have two class C networks with the same IP address range?
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. OS X (Apple)

Hostroute => Bridge and IP-Forwardings

Hello unix community, Could anyone tell me what is the macosx command for: 1) ip hostroute to bridge: ip route add 188.40.1.40/32 dev br0 (linux command) /32 ist for netmask? Because I use /29. 2) and IP-Forwarding: net.ipv4.ip_forward = 1 (linux command) I hope anyone could... (1 Reply)
Discussion started by: girlusingunyx
1 Replies

2. IP Networking

Create a Bridge for Qemu using only loopback

hello networking folks, i have 3 virtual machines that need to talk to each other How can i create a bridge to loopback ? -net tap,vlan=0,ifname=tap1 where tap1 is connected to lo:1 , tap2 is connected to lo:2 etc thx (0 Replies)
Discussion started by: TwiceDone
0 Replies

3. Ubuntu

Wireless Bridge/Repeater ?

I have a laptop running Ubuntu Netbook Remix. What I want to do is use it to connect to my routers wifi, and then plug my desktop into the laptops ethernet port and be hooked to my routers network without any NAT or ICS. Desktop>>>>>>Laptop/Wired>>Laptop/Wireless>>>>>Router I want it to look... (6 Replies)
Discussion started by: schwasskin
6 Replies

4. AIX

vio server ethernet to vio client ethernet(concepts confusing)

Hi In the vio server when I do # lsattr -El hdisk*, I get a PVID. The same PVID is also seen when I put the lspv command on the vio client partition. This way Im able to confirm the lun using the PVID. Similarly how does the vio client partition gets the virtual ethernet scsi client adapter... (1 Reply)
Discussion started by: newtoaixos
1 Replies

5. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

6. IP Networking

SNMP in a Bridge device

Hello all, recently we've created a Bridge on a machine that was being used as an snmp, and we haven't assigned an IP for the bridge interface, instead we've used one extra NIC to make all the administrations, but SNMP is simply not working, any one have a clue on how to do this? Thanks. (0 Replies)
Discussion started by: Zarnick
0 Replies

7. UNIX for Dummies Questions & Answers

bridge on linux

Hello. I expirince some problems with bridging, i'm pretty new to that technology I've 2 nic's 1 - wireless rt2500 ra0 canyon cn511 card 2 - e100 intel, ifconfig ra0 up && iwconfig ra0 essid xxx channel x mode managed bring me wireless connection up then i do following: brctl addbr br0... (1 Reply)
Discussion started by: hachik
1 Replies
Login or Register to Ask a Question