LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-03-2004, 03:14 AM   #1
AntWarrior
Member
 
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
pingu
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
arno
Member
 
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
ifconfig
route

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
AntWarrior
Member
 
Registered: Oct 2003
Posts: 31

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

[ PC A : eth0 192.168.0.1 , eth1 172.16.48.107 ]

The routing table for PC A

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.48.0 0.0.0.0 255.255.248.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.16.48.1 0.0.0.0 UG 0 0 0 eth1

192.168.0.1 is gateway to the network that the hub is in charge of.
172.16.48.1 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 172.16.48.1 which is my internet gateway. I want to use PC A to forward requests
to 172.16.48.1

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
pingu
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.
 
  


Reply


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

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration