Skip to content

Instantly share code, notes, and snippets.

@aatishnn
Created July 16, 2016 11:51
Show Gist options
  • Save aatishnn/8aa4db07aa5eec3296edcd0856653dcf to your computer and use it in GitHub Desktop.
Save aatishnn/8aa4db07aa5eec3296edcd0856653dcf to your computer and use it in GitHub Desktop.

Configure internet on existing HeNN LTSP systems

Collect following variables from the main LTSP server's /etc/ltsp/dhcpd.conf .

  • client_ip_range
  • dns_server
  • broadcast_address
  • routers
  • subnet_mask

For example, if the file has contents something like this:

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.20 192.168.0.250;
  option domain-name "example.com";   
  option domain-name-servers 192.168.0.1;
  option broadcast-address 192.168.0.255;
  option routers 192.168.0.1;
  option subnet-mask 255.255.255.0;

  filename "/ltsp/pxelinux.0";
  option root-path "/opt/ltsp/i386";
}

our values will be:

  • client_ip_range 192.168.0.20 192.168.0.250
  • dns_server 192.168.0.1
  • broadcast_address 192.168.0.255
  • routers 192.168.0.1
  • subnet_mask 255.255.255.0

While following steps mentioned below, use these collected values or change them if mentioned.

Steps

  • Disable DHCP on router connected to the internet
  • Set router's primary IP/router IP to any IP address not in client_ip_range and not broadcast_address. You can reduce the client_ip_range to, for eg, 192.168.0.20 192.168.0.150 and set router's IP to 192.168.0.151 as like in this file's case.
  • In etc/ltsp/dhcpd.conf, replace routers with the IP you set for the router in the earlier step.
  • Replace dns_server with 8.8.8.8 8.8.4.4
  • Connect a LAN cable from one of the router's LAN port to an empty port in the switch.
  • Restart the server and reboot all clients.
  • Enjoy!!!

My final configuration will now look like:

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.20 192.168.0.150;
  option domain-name "example.com";   
  option domain-name-servers 8.8.8.8 8.8.4.4;
  option broadcast-address 192.168.0.255;
  option routers 192.168.0.151;
  option subnet-mask 255.255.255.0;

  filename "/ltsp/pxelinux.0";
  option root-path "/opt/ltsp/i386";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment