Hi Timothy,
On Wed, Jun 8, 2011 at 5:31 AM, Timothy Murphy <gayleard(a)eircom.net> wrote:
I have a home LAN on network 192.168.2.0,
with a server at 192.168.2.2,
and various other laptops, iphones, etc on the LAN,
eg I am currently on laptop 192.168.2.7 .
There seem to be 3 places where gateways are specified:
1. In /etc/dhcpd.conf on the server, under "option routers";
2. In /etc/sysconfig/network-scripts/ifcfg-*
on the client machines;
3. In /etc/network on these machines.
I've read that the entries in ifcfg-* are ignored?
I haven't actually given gateways in /etc/network anywhere.
Perhaps I should?
My server has address 192.168.2.2 on eth1,
and address 192.168.1.2 on eth0, which is
connected to my ADSL modem with address 192.168.1.254 .
Now I'm wondering if I should give
GATEWAY=192.168.2.2 or GATEWAY=192.168.1.254
on client machines?
The default gateway on your clients should be 192.168.2.2
route -n on the server gives
------------------------------
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.5.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.5.0 192.168.5.2 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
------------------------------
I'm not sure how it found the (correct) default gateway 192.168.1.254 ?
These questions arise because I tried changing my server
to machine 192.168.1.5, connected to the modem.
Everything worked fine on the new server,
but I could not access the ethernet on other machines,
even after modifying the route tables on these machines
to have default gateway 192.168.2.5 (the new server).
I tried both with NetworkManager and with the network service,
but neither worked satisfactorily.
Any enlightenment gratefully received.
To get Internet on your client machines, you
need to enable IP
forwarding on server (I am not sure whether its enabled by default or
not) and then you need to add a SNAT rule with the IP address
'192.168.1.254' (your server's WAN side IP)
Hope this helps.
Thanks,
Anoop
--
Timothy Murphy
e-mail: gayleard /at/
eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
_______________________________________________
kde mailing list
kde(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kde
New to KDE4? - get help from
http://userbase.kde.org