bridge
i have 2 NICs(TRL8139) eth0(192.168.0.2) and eth1(192.168.0.4) and i want to birdge them. how can i do this?
... if i initalize eth0 the the ping works with the computers connected to it but doesn't work with those connected to eth1 and reverse! any ideea, hint? |
If it's my understanding, you have 2 subnets. One for each card.
In that case (also assuming that your running a class C network) you will want the cards on diffrent subnets (ie eth0 - 192.168.0.2 and eth1 - 192.168.1.4) Then you will just have to setup your routing table so the two subnets can talk. If your trying to bridge two diferent topologies (like ethernet and token ring) then it will still be pretty much the same setup. |
If you want to turn 2 interfaces into 1 you need to use teql
modprobe sch_teql Setup queueing disciplines on each wan interface using iproute2 utility called 'tc'. tc qdisc add dev eth0 root teql0 tc qdisc add dev eth1 root teql0 The device teql0 is basically a round-robbin distributor over eth0 and eth1, for sending packets. No data ever comes in over an teql device, that just appears on the 'raw' eth0 and eth1. Set the ip address of teql interface. Note, the ip address used is fake The reason for this is that packets will be forwarded through this ROUTER, thus packets will never originate from this box. This means, however, that pinging from this machine will not be possible (your local address if fake). ip addr add dev teql0 192.168.0.0/31 ip link set teql0 up ip route del 192.168.0.0/31 ip route add default dev teql0 The default route must be on teql0 device. This is by no means a how to just some information to look at. You will need to do some research to find out what you need for your machine. |
The advanced routing howto has a section on building bridges:
http://tldp.org/HOWTO/Adv-Routing-HO....bridging.html naz |
ok, krunkwick, i see what you mean, i thought so but i think there is a solution so i keep 192.168.0. on both subnets... something with aliases maybe??? in order to be more specific i'll put a scheme:
192.168.0.3 ^ | | |eth1 my linux box |----->192.168.0.4 eth0 192.168.0.2 <------> [switch] ^ ^ ^ | | | | | | 192.168.0.1 <--------| | | | | 192.168.0.17 <----------| | | 192.168.0.27 <-------------| |
this is a big stupidity(not my fault - entirely) i'll make an image and i'll put it on soon!
|
Quote:
Hi! Tip; use the "[ code]" tags when drawing ascii art. :) RefriedBean |
thanks for the tip... ;)
again... the map in ascii version... Code:
192.168.0.3 LAN.bmp so... is there any solution so i keep the IPs??? |
from the advanced routing howto, what you want is a Pseudo-bridge, this is explained:
http://www.tldp.org/HOWTO/Adv-Routin...proxy-arp.html Step by step, quoted from the Adv-Routing-HOWTO: 1. Assign an IP address to both interfaces, the 'left' and the 'right' one 2. Create routes so your machine knows which hosts reside on the left, and which on the right 3. Turn on proxy-ARP on both interfaces, echo 1 > /proc/sys/net/ipv4/conf/ethL/proxy_arp, echo 1 > /proc/sys/net/ipv4/conf/ethR/proxy_arp, where L and R stand for the numbers of your interfaces on the left and on the right side For further information, please read the Net-HOWTO for information on how to setup network interfaces. |
could you be more specific at point 2?
here is what i get at route: Code:
Kernel IP routing table |
All times are GMT -5. The time now is 06:41 AM. |