Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-30-2003, 02:34 PM   #1
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
ip routing table. getting network cards working

Dear all,

I have two PCI cards (eth1 and eth2) and a wireless card (eth0) in my Box. The wireless one isn't working yet.

At the moment eth1 is connected to the Internet, via a hub.

I would like to connect a second computer to my Box and let that computer access the hub via the Box. However, I cannot get this working.

My route -n looks like this:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface U 0 0 0 eth1 U 0 0 0 eth2 UG 0 0 0 eth1

I have no idea where to start with the IP routing table, frankly it just confuses me

Can you please help me and tell me what i need to do in order to get this setup working.

thank a lot
Old 11-30-2003, 04:59 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
The two lines:
Quote: U 0 0 0 eth1 U 0 0 0 eth2
are wrong. You redirect the same subnet to two different interfaces.
If I understand you correctly, you can assign local IP address (like to the second machine and second local IP (like; make sure they're differnet, but should be similar, like in the example above) to eth2. The you need to run masquerading on the machine. For masquerading you need a script. I recommend you to search this forum for 'iptables+masquerading'. You'll get hundreds of differnet scripts, for different security levels and different configurations. Choose the one that fits you best.
Old 11-30-2003, 05:58 PM   #3
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
You should be able to get this to work. It's called a bridge. This will be the easiest setup for you, probably.

Or, do full NAT


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
Need help routing traffic on 2 network cards dan6767 Linux - Networking 13 11-19-2004 09:40 AM
2 network cards, 2 network connections - routing problem tvojvodi Linux - Networking 4 02-24-2004 03:26 PM
Routing Problem with two network cards a.tangemann Linux - Networking 0 02-23-2004 04:07 AM
Adding network to routing table daveb93 Linux - Networking 8 10-10-2003 02:53 AM
What wireless network cards are working? raylpc Linux - General 7 08-12-2003 02:43 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration