Latest LQ Deal: Latest LQ Deals
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 08-03-2004, 03:14 AM   #1
Registered: Oct 2003
Posts: 31

Rep: Reputation: 15
Need help setting up routing tables with an adsl hub

I would appreciate any help setting up my home network on Mandrake 10.0

My network consists of the following. One computer with two ethernet cards ( PC A ) .
PCA connects to the internet via eth 1 and eth 0 connects to the adsl hub. The rest of my
machines us the hub ( set up with dhcp ).

How do I 1. Set up PCA as a gateway to the internet and not the adsl hub .
2. How do I set up the routing tables on PCA so that it can see the
network on the hub.
Old 08-03-2004, 06:21 AM   #2
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
It could be that you have more than one network, it depends on that ADSL hub.
If it really is functioning only as a hub, all you need to do is configure DHCP to assign PCA's eth0 as default gateway.
All computers in a local network can see each other without routing.
Old 08-03-2004, 06:52 AM   #3
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
In order to help you I need the following information:
from PCA the output of

from one of the machines on the hub the same
(if you are using windows use winipcfg for w98 and ipconfig /all for w2k xp here i want to know the default gateway)

PS I asume that the adsl hub was used to connect to the internet as a adsl router ?
and are you able to program that router ?
Old 08-03-2004, 09:33 AM   #4
Registered: Oct 2003
Posts: 31

Original Poster
Rep: Reputation: 15
More information : routing tables .

[ PC A : eth0 , eth1 ]

The routing table for PC A

Destination Gateway Genmask Flags Metric Ref Use Iface UG 0 0 0 eth0 U 0 0 0 eth0 U 0 0 0 eth1 U 0 0 0 lo UG 0 0 0 eth1 is gateway to the network that the hub is in charge of. is the internet gateway. I can see the internet from eth1 interface. from PC A

I can ping other machines on the 192.168.0.x network. and they can ping PC A. But they
cannot see which is my internet gateway. I want to use PC A to forward requests

I tried setting up routed but that changed my routing tables to unusable, I had to keep on changing
them by hand. I couldnt understand the /etc/gateways file to well.

Any further information needed will be promptly supplied.

Thank you ever so much for help.
Old 08-04-2004, 03:10 AM   #5
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
There are 2 things you need to do:
1. Enable forwarding on PCA:
# echo "1" >> /proc/sys/net/ipv4/ip_forward

2. Enable NAT/masquerading: Computers can't use internal IP's on internet, so PCA has to translate them. I think this is correct:
# iptables -t nat -o eth1 -j MASQUERADE
I'm not completely sure. Try it, or search for more advice.


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
routing tables props666999 Linux - Networking 1 10-14-2005 08:27 PM
IP Routing Tables collern2 Linux - Security 1 05-23-2005 10:48 AM
two routing tables fugzi Linux - Networking 7 12-03-2004 06:02 PM
routing tables help hadoque Linux - Networking 0 08-28-2004 09:10 AM
routing tables dunkyb Linux - Networking 3 05-25-2003 02:10 PM > Forums > Linux Forums > Linux - Networking

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

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