Problem with multiple default gateways

We have a customer that has Netware with multiple DHCP servers but no internal DNS. They are using hard coded external DNS server IPs. The customer has multiple default gateways, one for each building/vlan.

ex.
10.2.x.x default gateway 10.2.x.1
10.3.x.x default gateway 10.3.x.1
172.2.x.x. default gateway 172.2.x.1

Our current project involves creating a single DHCP and DNS server for the entire WAN & LAN.

After creating the new DHCP and DNS servers in Suse we found that once the network properties of all the machines were changed to obtain IPs and DNS information automatically;

  1. PCs and servers on the same subnet as the DNS, DHCP and default gateway were able to go to the internet.
  2. PCs and servers in other buildings were not able to go to the internet. They can ping the hosts.

Before we got this to work we made changes on the Nortel switch to use DHCP relay agent. However for some reason the internet connection does not work for machines which are in a different subnet and use a default gateway other than the default gateway of the DNS DHCP server.

Since all the PCs are getting the correct IP, the correct default gateway and the correct DNS server IPs as defined in the DNS and DHCP servers I am assuming that the setup is correct but I am not sure if something special has to be done to get these machines (with different default gateways) to go out to the internet.

Any suggestions?

It is not clear to me if each of these three routers (used as default gateway by the three LANs) can route to the internet.

I mean, when I send my packages to a router (being it by pointing direct to it, or by using the default) in the assumption that that router knows where to route to to get the package nearer to it’s destination and the router can’t, I am stuck.

I assume that you have checked that systems in each LAN get the appropriate default router served and that it is in the router table of those systems as such (well, you said that, but you realy did netstat -rn).

I am not sure if you mention the word DNS here and there to clarify the whole picture, or if you think that it has anything to do with your problem. It should not. When testing your routing you should connect using IP addresses to avoid your testing being spoiled by a name serving problem.

I’m not sure if this is related, but I will mention it.

My work desktop computer uses DHCP, which goes through a DHCP relay. The main DHCP server is on a different subnet.

This works fine at present. When I first installed 11.3, I was noticing that while it worked, it never was able to renew its DHCP lease. It would log attempts to renew, but didn’t succeed. When the lease ran out, it reset the network as was able to again re-establish connectivity. I was using “ifup”. It was my impression that the firewall might have been interfering, but I’m not sure of that.

I switched to using “dhclient” rather than “dhcpcd” as the dhcp client. And that completely fixed the problem.

If your computers are using “ifup” for network setup, you might try switching to “dhclient”. If they are using “NetworkManager” then they are already using “dhclient”.

There is no such thing as “multiple default gateways”. A network has exactly one default route.

Before you had 3 different networks (10.2.x.x, 10.3.x.x, 172.2.x.x) and each one had it’s own default gateway (just one!). Now you have one single DHCP server for 3 local networks. It must be the default GW for each network and route to one single GW in the outside world.

Yes, that’s ok as far as it goes, although I would call them subnets.

Before you had 3 different networks (10.2.x.x, 10.3.x.x, 172.2.x.x) and each one had it’s own default gateway (just one!). Now you have one single DHCP server for 3 local networks. It must be the default GW for each network and route to one single GW in the outside world.

No, that’s not true. Each of the subnets has a gateway. Those gateways must know how to take the packets closer to the destination as hcvv was explaining. It’s just a routing hierarchy.

And a gateway doesn’t necessarily have to be a DHCP server. That function can be undertaken by some other host, or hosts, perhaps with the assistance of DHCP relays. Have a look at the ISC dhcpd documentation. You can set up different client configurations for different subnets. So each of his 3 subnets would be informed of their own gateway.

I also started reading this thread from it’s strange title with the wording “multiple default gateways”. But reading it, I got the impression that the OP does not mean multiple within the same LAN, but multple as different GW for each LAN (given by the same DHCP server).

I am not with you where you say that the DHCP server must be the same as the default gateway. That is definitely not true. A DHCP (or bootp) server can be a system in the LAN having that server function and the default gateway in that LAN can be a router in that LAN. Also the server could serve different default gateways to different systems according to the systems need (and of course there should then be different routers in the LAN, where some systems benefit from using router A as default and others from router B).

For me the OP still fails to report if he checked with netstat -rn that every system has the correct default GW and the assurance that those three gateways lead to the Internet.

I am not with you where you say that the DHCP server must be the same as the default gateway.

I agree. Probably I was mislead by this remark in the original post:

PCs and servers on the same subnet as the DNS, DHCP and default gateway …

This indicates that the host providing DHCP and DNS (and GW?) is within one of the local networks. There is no information how the other networks are connected to it. Well, I will lean back and wait to see if the OP cares to explain how all of this is connected. My crystal ball is on annual maintenance.

same here lol!