LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-30-2003, 02:34 PM   #1
hamish
Member
 
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
172.24.15.224 0.0.0.0 255.255.255.240 U 0 0 0 eth1
172.24.15.224 0.0.0.0 255.255.255.240 U 0 0 0 eth2
0.0.0.0 172.24.15.225 0.0.0.0 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
Hamish
 
Old 11-30-2003, 04:59 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The two lines:
Quote:
172.24.15.224 0.0.0.0 255.255.255.240 U 0 0 0 eth1
172.24.15.224 0.0.0.0 255.255.255.240 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 192.168.0.1) to the second machine and second local IP (like 192.168.0.2; 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
jcookeman
Member
 
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.

http://www.tldp.org/HOWTO/Ethernet-B...ter-HOWTO.html

Or, do full NAT

http://www.tldp.org/HOWTO/IP-Masquer...WTO/index.html
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration