LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ip routing table. getting network cards working (https://www.linuxquestions.org/questions/linux-networking-3/ip-routing-table-getting-network-cards-working-121324/)

hamish 11-30-2003 02:34 PM

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

Mara 11-30-2003 04:59 PM

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.

jcookeman 11-30-2003 05:58 PM

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


All times are GMT -5. The time now is 06:11 PM.