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