Re: Some questions on networking gateways

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-06-09 at 00:54 +0100, Timothy Murphy 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.

If you *don't* configure a gateway address on the clients, then the DHCP
server can supply them with the information.  If you do configure a
gateway on the clients, then it can override a DHCP supplied address.

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

Which port do they connect to?  If they're on the same network as eth1
(192.168.2.2), then that's their gateway (the address they go /through/
to get elsewhere).

A client's gateway is the thing *they* have to go through, to get
outside.  It's the bit in-between one network and another, hence the
nickname.

And the gateway for 192.168.2.2. is 192.168.1.254.

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

Is it old information, still kept?  Or is it recently discovered?

If it's recently discovered, is your network actually set up as you
think it is.  If you have something else with its own DHCP server doling
out information, it can clash.  Having two DHCP servers on a LAN can be
a real problem.

> 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.
> 
> I'm running shorewall, but there is no mention of 192.168.1.254 there.
> 
> Any enlightenment gratefully received.

You've checked that your new gateway isn't firewalling off your LAN?
That your gateway has IP-forwaring set?

-- 
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux