| Free Software at Schools: Installing and Maintaining a Skolelinux/Debian-edu Network; Based on Debian Sarge, prerelease pr05 | ||
|---|---|---|
| Prev | Chapter 9. Services Out-of-the-Box in Skolelinux/Debian-edu | Next |
![]() | After you have made any changes to /etc/dhcp3/dhcpd.conf, either by editing the file directly, or via Webmin, you need to restart the DHCP3-server for the changes to take affect. This is either done from the command line with /etc/init.d/dhcp3-server restart or in Webmin by pressing the button labeled 'Apply Changes'. |
All servers in Skolelinux/Debian-edu, mainserver and thinclientserver, run DHCP-servers. This means that any machine, workstation, thinclient and other machines (laptops, Windows, Mac machines) will get a dynamic IP address, that is, the IP address given to the individual machine is likely to be different every time that machine connects.
In order to make your life easier, you should make these machines have a static IP address. Add their MAC addresses to the right group in the DHCP-setup.
![]() | To reduce complexity the dhcp-configuration file /etc/dhcp3/dhcpd.conf is identical on both profiles that has a dhcp-server running, Main-server and Thinclient-server, and also therefor also on the Combi-server. Therefor make sure that you use the correct url for webmin when editing the different stanzas in /etc/dhcp3/dhcpd.conf. |
host ltsp010 {
hardware ethernet 00:00:00:00:00:00;
fixed-address ltsp010;
#filename "/tftpboot/lts/vmlinuz-2.4.26-ltsp-2";
filename "/tftpboot/lts/pxelinux.0";
#option option-128 e4:45:74:68:00:00;
#option option-129 "NIC=3c509";
}
There are already 100 places set aside for 100 thin clients in the file /etc/dhcp3/dhcpd.conf
![]() | Thinclients must be attached to the networkcard with the name eth1 It is defined in the configuration of bind and that the name ltsp010 translates to the ip-address 192.168.0.10, and same with the name ltsp011 translating to 192.168.0.11. |
If you want to edit any of the mac/ip-address for thinclients, then you must use the url https:://ip-of-thinclientserver:10000 if you have a dedicated Thinclient server, or use https://tjener.intern:10000 if you have a Combi-server
host static00 {
hardware ethernet 00:00:00:00:00:00;
fixed-address static00;
}
host static01 {
hardware ethernet 00:00:00:00:00:00;
fixed-address static01;
}
host static02 {
hardware ethernet 00:00:00:00:00:00;
fixed-address static02;
}
host static03 {
hardware ethernet 00:00:00:00:00:00;
fixed-address static03;
}
There is 4 places set aside for machines with a static IP address in the file /etc/dhcp3/dhcpd.conf. If you need more, then make more by using the ones provided there as a template.
The next one you make yourself will then look like this:
host static04 {
hardware ethernet 00:00:00:00:00:00;
fixed-address static04;
}
![]() | Workstation should be attached to the networkcard with the name eth0 if you have a combi-server, or to the same switch as other servers. It is defined in the configuration of bind and that the name static00 translates to the ip-address 10.0.2.50, and same with the name static01 translating to 10.0.2.51 |
If you want to edit any of the mac/ip-address for workstations, then you must use the url https://tjener.intern:10000
host printer00 {
hardware ethernet 00:00:00:00:00:00;
fixed-address printer00;
}
host printer01 {
hardware ethernet 00:00:00:00:00:00;
fixed-address printer01;
}
![]() | Printers should be attached to the networkcard with the name eth0 if you have a combi-server, or to the same switch as other servers. It is defined in the configuration of bind and that the name printer00 translates to the ip-address 10.0.2.30, and same with the name printer01 translating to 10.0.2.31. |
If you want to edit any of the mac/ip-address for printers, then you must use the url https://tjener.intern:10000
![]() | Obviously, if you must place your printer in a thinclient network, e.g ip-range 192.168.0.0/24, then you must add it's mac-address under the stanza belonging to the thinclients. |
group {
host ltspserver00 {
hardware ethernet 00:00:00:00:00:00;
fixed-address ltspserver00;
}
If you want to edit any of the mac/ip-address for thinclientserver, then you must use the url https://tjener.intern:10000
![]() | In this example the machine is a Combi-server, one with both the profiler Main-server and Thinclient-server installed, if you do this in a network with the profile installed in different machines, then you might have to edit some additional files, maybe not, I just haven't tested that. |
Sometimes, you need, due to the rest of your network, to change the ip-range that is used for the thinclients. The default ip-range is 192.168.0.0/24, which according to ipcalc gives this:
tjener:~# apt-get install ipcalc tjener:~# ipcalc 192.168.0.0/24 Address: 192.168.0.0 11000000.10101000.00000000. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.0.0/24 11000000.10101000.00000000. 00000000 HostMin: 192.168.0.1 11000000.10101000.00000000. 00000001 HostMax: 192.168.0.254 11000000.10101000.00000000. 11111110 Broadcast: 192.168.0.255 11000000.10101000.00000000. 11111111 Hosts/Net: 254 Class C, Private InternetSo you see, 192.168.0.1 upto 192.168.0.254
Lets assume you prefer to use 172.16.0.0/24 instead.
tjener:~# ipcalc 172.16.0.0/24 Address: 172.16.0.0 10101100.00010000.00000000. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 172.16.0.0/24 10101100.00010000.00000000. 00000000 HostMin: 172.16.0.1 10101100.00010000.00000000. 00000001 HostMax: 172.16.0.254 10101100.00010000.00000000. 11111110 Broadcast: 172.16.0.255 10101100.00010000.00000000. 11111111 Hosts/Net: 254 Class B, Private Internet
Achieving this goal is a simple matter of replacing all instances of 192.168 with 172.16 in the following files:
/opt/ltsp/i386/etc/lts.conf
/etc/dhcp3/dhcpd.conf
/etc/bind/debian-edu/db.intern
/etc/bind/debian-edu/named-bind9.conf
/etc/exports
/etc/init.d/enable-nat
/etc/network/interfaces
/etc/hosts.allow
/etc/squid/squid.conf
Users of the editor vi can use :%s/192.168/172.16/gc which will search and replace, asking for confirmation in the process.
Remember to take eth1 down/up
ifdown eth1
ifup eth1
Rename the file /etc/bind/debian-edu/db.192.168 to /etc/bind/debian-edu/db.172.16
This one is "funny", replace all instances of 168.192 with 16.172 in the file /etc/bind/debian-edu/named-bind9.conf
Then you must restart bind, enable-nat, dhcp, exports and possibly also squid
/etc/init.d/bind9 restart
/etc/init.d/enable-nat restart
/etc/init.d/dhcp3-server restart
exportfs -ra
/etc/init.d/squid restart