1

I have a cluster of three Ubuntu desktops. They're all plugged into a switch, and I have one cable running from the switch to the internet (it's on my schools network). One is set up as a DHCP to assign IP addresses to the others. I suppose I have two questions:

  1. Can I make it so the two clients get their IP from my DHCP before getting one from an external router somewhere. Currently I have to unplug the internet to get them to get their IP from my DHCP.

  2. None of my machines have access to the internet when I'm using my own DHCP. I can change some configuration files to switch the DHCP server from a DHCP address to a static, and vice versa, the other two I have to restart whenever I want to switch between the internet or my cluster.

So is there a way to have an internet connection and be a DHCP server? And can I get my other machines access to the internet through my DHCP?

Thanks in advance.

Thomas
  • 4,225
  • 5
  • 23
  • 28

4 Answers4

3

From what it sounds like, you're connecting your DHCP server directly to your internet connection. Not only is it unlikely that you have your DHCP server setup to give out correct IPs and network settings for your ISP, but this will likely conflict with your ISPs DHCP server, causing problems for other people using your ISP. Please don't do this.

The solution is to put 2 NICs into one of your machines (probably the one you're using as a DHCP server) and run it as a firewall, with one interface connected to your internal network (and running your DHCP server) and the other interface connected to your internet connection.

This is a somewhat non-trivial thing to implement if you're new to networking concepts, so it might be easier to just buy a cheap wireless router which provides this functionality out of the box. You can usually find a nice router capable of running some decent open firmware (like Tomato) for < $50.

Graeme
  • 343
  • 1
  • 6
2

"1) Can I make it so the two clients get their IP from my DHCP before getting one from an external router somewhere. Currently I have to unplug the internet to get them to get their IP from my DHCP."

If the switch is unmanaged, then probably no. DHCP operates on layer 2...which means a DHCPDISCOVER request will go out to everything on the layer 2 system. So unless your switch is smart enough to not broadcast that across its uplink then the answer is no.

I'd buy a cheap router (50 bucks or less). Configure your own DHCP on the inside switch side of it (on a network DIFFERENT than the school's network). Set up the DHCP so the gateway all points to the router (as well as DNS handouts, etc.). Then simply connect the uplink and you should be good to go.

user6373
  • 174
  • 4
0

You can set your DHCP server as the authoritative server for leasing but I highly doubt this will even work.

You can also put 2 ethernet interfaces on your DHCP server, one ethernet interface "uplink" is connected to the switch requesting IP from your school's DHCP server, masquerade that uplink interface, enable port forwarding, then setup the 2nd ethernet interface to lease IP addresses, connect another switch on the 2nd ethernet interface and then connect the two ubuntu desktops to it.

DHCP server has an IP with same subnet as the two other ubuntu desktop machines. You can then run MPI on those machines.

jerichorivera
  • 489
  • 1
  • 4
  • 12
0

You have a group of desktops, not a cluster. You also appear to have set up whet we call a rogue DHCP server, which most of would hunt down and disable. I doubt your system administrators will approve of you doing so. Please discuss this matter with the system administrators who are responsible for managing the network. If what you wish to do is acceptable they should be able to give you appropriate advice. However, I would be very surprised if that was the case.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
  • We're doing this for a class, and we have approval. It is a cluster because we have MPI running on it so we can run a distributed program on all three computers at once. This really had nothing to do with my question though. –  Nov 07 '09 at 00:02