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. |
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. |
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 ? |
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. |
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. |
All times are GMT -5. The time now is 11:54 AM. |