Difference between revisions of "Set up FatClient Configuration"

From CDOT Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 39: Line 39:
 
# Open and terminal (shell) and login as root.
 
# Open and terminal (shell) and login as root.
 
# Edit the ''dhcpd.conf'' file by issuing the command: '''<tt>vi /etc/ltsp/dhcpd.conf</tt>'''  and ensure that the following command line exists, otherwise enter it: <br />'''<tt></tt>option routers 192.168.1.254;'''
 
# Edit the ''dhcpd.conf'' file by issuing the command: '''<tt>vi /etc/ltsp/dhcpd.conf</tt>'''  and ensure that the following command line exists, otherwise enter it: <br />'''<tt></tt>option routers 192.168.1.254;'''
# Save and exit the editor.
+
# Add the line: '''option domain-name-servers 192.168.0.1;'''
# Restart the dhcpd server by issuing the command: '''sudo /etc/init.d/dhcp3-server restart'''
+
# Refer below to our example of the dhcpd.conf file:
# Edit the ''<tt>sysctl.conf</tt>'' file by issuing the command: '''<tt>vi </tt><tt>gedit /etc/sysctl.conf</tt>'''
+
 
# Add the following line or uncomment (if it already exists):<br />'''net.ipv4.ip_forward=1'''
+
 
# Save and exit the editor.
+
#
# Run the command: '''sudo sysctl -w net.ipv4.ip_forward=1'''
+
# Default LTSP dhcpd.conf config file.
# Issue the following command:<br /><br />'''iptables --table nat --append POSTROUTING --jump MASQUERADE --source 192.168.1.0/24'''
+
#
# Run the following command to make the above setting permanent:<br /><br />'''sudo sh -c 'iptables-save > /etc/ltsp/nat''''
+
# Edit the ''interfaces'' file by issuing the command:<br /><br />'''vi <tt>/etc/network/interfaces</tt>'''
+
authoritative;
# Make changes to the file to add the line '''up iptables-restore < /etc/ltsp/na'''t to the existing file. See below for our example:
+
 +
subnet 192.168.1.0 netmask 255.255.255.0 {
 +
    range 192.168.1.20 192.168.1.250;
 +
#    option domain-name "example.com";
 +
    option domain-name-servers 192.168.0.1;
 +
    option broadcast-address 192.168.1.255;
 +
#    option routers 192.168.1.1;
 +
    option routers 192.168.1.254;
 +
#    next-server 192.168.0.1;
 +
#    get-lease-hostnames true;
 +
    option subnet-mask 255.255.255.0;
 +
#    option root-path "/opt/ltsp/i386";
 +
    option root-path "/opt/ltsp/amd64";
 +
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
 +
#        filename "/ltsp/i386/pxelinux.0";
 +
        filename "/ltsp/amd64/pxelinux.0";
 +
    } else {
 +
#        filename "/ltsp/i386/nbi.img";
 +
        filename "/ltsp/amd64/nbi.img";
 +
    }
 +
}
 +
 
 +
 
 +
<ol>
 +
<li value="5">Save and exit the editor.</li>
 +
<li>Restart the dhcpd server by issuing the command: '''sudo /etc/init.d/dhcp3-server restart'''</li>
 +
<li>Edit the ''<tt>sysctl.conf</tt>'' file by issuing the command: '''<tt>vi </tt><tt> /etc/sysctl.conf</tt>'''</li>
 +
<li>Add the following line or uncomment (if it already exists):<br />'''net.ipv4.ip_forward=1'''</li>
 +
<li>Save and exit the editor.</li>
 +
<li>Run the command: '''sudo sysctl -w net.ipv4.ip_forward=1'''</li>
 +
<li>Issue the following command:<br /><br />'''iptables --table nat --append POSTROUTING --jump MASQUERADE --source 192.168.1.0/24'''</li>
 +
<li>Run the following command to make the above setting permanent:<br /><br />'''sudo sh -c 'iptables-save > /etc/ltsp/nat''''</li>
 +
<li>Edit the ''interfaces'' file by issuing the command:<br /><br />'''vi <tt>/etc/network/interfaces</tt>'''</li>
 +
<li>Make changes to the file to add the line '''up iptables-restore < /etc/ltsp/na'''t to the existing file. See below for our example:</li>
 +
</ol>
  
 
  # This file describes the network interfaces available on your system
 
  # This file describes the network interfaces available on your system
Line 68: Line 102:
 
   up iptables-restore < /etc/ltsp/nat
 
   up iptables-restore < /etc/ltsp/nat
 
   broadcast 192.168.1.255
 
   broadcast 192.168.1.255
 +
 +
<ol>
 +
<li value="15">Restart the server.</li>
 +
<li>Your client should now be able to connect to the Internet. Test out your connection on your thin (fat) client.</li>
 +
</ol>

Latest revision as of 17:58, 26 April 2011


Attention

Fat Client configurations only apply to LTSP versions 5.2 and greater.

LTSP Fat Client - Definition / Purpose

Previous documentation indicated that LTSP lab consists of a server that supports thin (diskless clients). Therefore, then a workstation logs in and runs an application, that application is running from the server and displayed on the workstation. Although this has many advantages, due to network transports and server load, certain applications can run slow.

A fat client (in LTSP terms) is a computer lab setup whereby the application processing is performed by the client itself, thus better distributing the load.

The interesting point is that the client still does not require a hard disk.


TASK #1: How configure a FAT Client

STEPS:

  1. Perform the previous steps to perform an install from scratch.
  2. Open a terminal (shell) and login as root (eg. sudo su)
  3. Enter the following command to remove the current chroot configuration:

    rm -rf /opt/ltsp/amd64

  4. Issue the following command to rebuild the system using FAT Clients:

    ltsp-build-client --fat-client --fat-client-desktop edubuntu-desktop --arch amd64 --skipimage

  5. Once the image is rebuilt, issue the following commands:

    ltsp-update-sshkeys
    ltsp-update-image

  6. When completed, test out the system to ensure users can boot-up their workstations and login.


TASK #2: Configure System to Allow FAT Clients to Connect to Internet

Note: When running the computer lab configured for FAT Clients, the workstations will NOT be able to connect to the Internet. Perform the following steps to allow workstations to connect to the Internet:


STEPS:

  1. Open and terminal (shell) and login as root.
  2. Edit the dhcpd.conf file by issuing the command: vi /etc/ltsp/dhcpd.conf and ensure that the following command line exists, otherwise enter it:
    option routers 192.168.1.254;
  3. Add the line: option domain-name-servers 192.168.0.1;
  4. Refer below to our example of the dhcpd.conf file:


#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.20 192.168.1.250;
#    option domain-name "example.com";
    option domain-name-servers 192.168.0.1;
    option broadcast-address 192.168.1.255;
#    option routers 192.168.1.1;
    option routers 192.168.1.254;
#    next-server 192.168.0.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
#    option root-path "/opt/ltsp/i386";
    option root-path "/opt/ltsp/amd64";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
#        filename "/ltsp/i386/pxelinux.0";
        filename "/ltsp/amd64/pxelinux.0";
    } else {
#        filename "/ltsp/i386/nbi.img";
        filename "/ltsp/amd64/nbi.img";
    }
}


  1. Save and exit the editor.
  2. Restart the dhcpd server by issuing the command: sudo /etc/init.d/dhcp3-server restart
  3. Edit the sysctl.conf file by issuing the command: vi /etc/sysctl.conf
  4. Add the following line or uncomment (if it already exists):
    net.ipv4.ip_forward=1
  5. Save and exit the editor.
  6. Run the command: sudo sysctl -w net.ipv4.ip_forward=1
  7. Issue the following command:

    iptables --table nat --append POSTROUTING --jump MASQUERADE --source 192.168.1.0/24
  8. Run the following command to make the above setting permanent:

    sudo sh -c 'iptables-save > /etc/ltsp/nat'
  9. Edit the interfaces file by issuing the command:

    vi /etc/network/interfaces
  10. Make changes to the file to add the line up iptables-restore < /etc/ltsp/nat to the existing file. See below for our example:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp

auto eth1
iface eth1 inet static
  address 192.168.1.254
  netmask 255.255.255.0
  network 192.168.1.0
  up iptables-restore < /etc/ltsp/nat
  broadcast 192.168.1.255
  1. Restart the server.
  2. Your client should now be able to connect to the Internet. Test out your connection on your thin (fat) client.