LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-02-2002, 04:34 PM   #1
Cubiq
Member
 
Registered: Jan 2002
Location: Europe, Romania
Distribution: Slackware 9.1
Posts: 81

Rep: Reputation: 15
Question 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?
 
Old 08-02-2002, 05:08 PM   #2
krunkwick
Member
 
Registered: Jun 2002
Location: Memphis
Distribution: Suse 8.0 Pro
Posts: 45

Rep: Reputation: 15
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.
 
Old 08-02-2002, 11:01 PM   #3
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
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.
 
Old 08-03-2002, 02:30 AM   #4
naz
Member
 
Registered: Aug 2002
Location: Malaysia
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
The advanced routing howto has a section on building bridges:

http://tldp.org/HOWTO/Adv-Routing-HO....bridging.html

naz
 
Old 08-03-2002, 04:47 AM   #5
Cubiq
Member
 
Registered: Jan 2002
Location: Europe, Romania
Distribution: Slackware 9.1
Posts: 81

Original Poster
Rep: Reputation: 15
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 <-------------|
 
Old 08-03-2002, 04:48 AM   #6
Cubiq
Member
 
Registered: Jan 2002
Location: Europe, Romania
Distribution: Slackware 9.1
Posts: 81

Original Poster
Rep: Reputation: 15
this is a big stupidity(not my fault - entirely) i'll make an image and i'll put it on soon!
 
Old 08-03-2002, 05:38 AM   #7
RefriedBean
Member
 
Registered: Jun 2002
Location: N 37 33.327 E 126 55.650
Distribution: Gentoo, Slackware, OpenZaurus
Posts: 186

Rep: Reputation: 30
Quote:
Originally posted by Cubiq
this is a big stupidity(not my fault - entirely) i'll make an image and i'll put it on soon!
3
Hi!

Tip; use the "[ code]" tags when drawing ascii art.

RefriedBean
 
Old 08-03-2002, 08:10 AM   #8
Cubiq
Member
 
Registered: Jan 2002
Location: Europe, Romania
Distribution: Slackware 9.1
Posts: 81

Original Poster
Rep: Reputation: 15
thanks for the tip...
again... the map in ascii version...
Code:
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 <-------------|
and i made an image also...

LAN.bmp

so... is there any solution so i keep the IPs???

Last edited by Cubiq; 08-03-2002 at 08:22 AM.
 
Old 08-04-2002, 07:28 AM   #9
naz
Member
 
Registered: Aug 2002
Location: Malaysia
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
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.
 
Old 08-10-2002, 12:13 PM   #10
Cubiq
Member
 
Registered: Jan 2002
Location: Europe, Romania
Distribution: Slackware 9.1
Posts: 81

Original Poster
Rep: Reputation: 15
could you be more specific at point 2?
here is what i get at route:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet              *         255.255.255.0     U     0      0        0   eth1
localnet             *           255.255.255.0     U     0      0        0   eth0
loopback           *             255.0.0.0           U     0      0        0     lo
where localnet is 192.168.0.0/255.255.255.0
 
  


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
ipmi bridge? Thinking Linux - Software 0 08-18-2005 06:57 AM
DHCP over bridge thinkninja Linux - Networking 1 03-02-2005 02:01 PM
AP, Bridge or Router? bigearsbilly Linux - Wireless Networking 10 02-15-2005 10:05 AM
How to set up a bridge? Royle Linux - Networking 10 10-30-2004 09:26 PM
What exactly is a bridge. zaicheke Linux - Networking 7 10-23-2004 07:12 PM


All times are GMT -5. The time now is 07:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration