LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Networking - Linux Hub thang (https://www.linuxquestions.org/questions/linux-networking-3/networking-linux-hub-thang-6407/)

Nokon 09-10-2001 09:34 AM

Networking - Linux Hub thang
 
Problem: 1 linux box 2 ethernet cards (1x SMC EZ 10/100, 1x 3Com Etherlink XL Combi) -The machine sees the ethernet cards, or at least seems to.

What I want to do is link the two cards together so that I can connect a thin ethernet (BNC adaptor) to the existing twisted pair network. Alternatively you might say that I want a hub with a BNC adapter - but I'm too cheap to buy one.

The other machines on the network are Macs, but this shouldn't be a problem as I just want to route data via the linux box. (Or am I totally mistaken here?)

I've tried a few things but nothing seems to work.

Is there a web page with this kind of problem covered? I've read through the ethernet howtos, but I'm not really sure what I'm looking for.

Any help greatfully received.

fishfork 09-10-2001 06:22 PM

Hi,

I'm new to linux too, so you might have to flesh out my answer from man pages and howtos a bit!

Lets call the BNC card eth0 and give it address 192.168.0.1

Similarly, the other interface can be known as eth1 and have address 192.168.1.1

(I won't go into IP addresses, its all in the HOWTOs)

The problem now is to get the linux box to examine packets from both of the networks and push them onto the other if necessary.

This is done using the route command.
I think the commands you need are
route add -net 192.168.0.1 dev eth0
route add -net 192.168.1.1 dev eth1

Of course, it would be nice if these were run automatically at startup. I have posted a question about doing this kind of thing myself!

Hope this helps,
Richard.

Mr Smith 09-10-2001 11:25 PM

What you are trying to do is technically called a bridge. You want to bridge two networks together. One network is on eth0 and the other is on eth1. There are a couple bridging how-to's at www.linuxdoc.org

http://linuxdoc.org/HOWTO/HOWTO-INDE...html#NETBRIDGE

I currently run a linux box with three NIC's (eth0, eth1, and eth2). Only my goal was a little different. I had one network on eth1 and a different network on eth2. I didn't want them to be able to talk to each other, but I wanted both of them to be able to go through eth0 to access the internet. I used ipchains and masquerading to do it.

HTH

Ript 09-15-2001 08:37 AM

router/nat firewall
 
If what you want is a Router/NAT firewall for sharing an internet connection, then try LRP (linux router project) or the canned distros like Coyote Linux, or BBIagent...

http://www.coyotelinux.com/

http://www.bbiagent.net/


All times are GMT -5. The time now is 04:46 PM.