From 8081a5520a441b43a8a7a73f3a90c7aacfaa8e10 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 24 Feb 2019 21:05:27 +0100 Subject: Move everything one level up --- tasks/isc_dhcp_live_boot/howtos/en/index.html | 172 +++++++++++++++++++++ tasks/isc_dhcp_live_boot/howtos/en/indexEN.html | 172 +++++++++++++++++++++ .../isc_dhcp_live_boot/howtos/en/indexEN.html.save | 0 tasks/isc_dhcp_live_boot/howtos/images/01.png | Bin 0 -> 651056 bytes tasks/isc_dhcp_live_boot/howtos/images/02.png | Bin 0 -> 216256 bytes tasks/isc_dhcp_live_boot/howtos/images/03.png | Bin 0 -> 174489 bytes tasks/isc_dhcp_live_boot/howtos/images/04.png | Bin 0 -> 87256 bytes tasks/isc_dhcp_live_boot/howtos/images/05.png | Bin 0 -> 67924 bytes tasks/isc_dhcp_live_boot/howtos/images/06.png | Bin 0 -> 57607 bytes tasks/isc_dhcp_live_boot/howtos/images/07.png | Bin 0 -> 77169 bytes tasks/isc_dhcp_live_boot/howtos/images/08.png | Bin 0 -> 12705 bytes tasks/isc_dhcp_live_boot/howtos/images/09.png | Bin 0 -> 196595 bytes tasks/isc_dhcp_live_boot/howtos/images/10.png | Bin 0 -> 226002 bytes tasks/isc_dhcp_live_boot/howtos/images/11.png | Bin 0 -> 75165 bytes tasks/isc_dhcp_live_boot/howtos/images/12.png | Bin 0 -> 13295 bytes tasks/isc_dhcp_live_boot/howtos/images/13.png | Bin 0 -> 152206 bytes tasks/isc_dhcp_live_boot/howtos/images/14.png | Bin 0 -> 148800 bytes tasks/isc_dhcp_live_boot/howtos/images/15.png | Bin 0 -> 15686 bytes tasks/isc_dhcp_live_boot/howtos/images/16.png | Bin 0 -> 181602 bytes tasks/isc_dhcp_live_boot/howtos/images/17.png | Bin 0 -> 95401 bytes tasks/isc_dhcp_live_boot/howtos/images/18.png | Bin 0 -> 17634 bytes tasks/isc_dhcp_live_boot/howtos/images/19.png | Bin 0 -> 101570 bytes tasks/isc_dhcp_live_boot/howtos/images/20.png | Bin 0 -> 18593 bytes tasks/isc_dhcp_live_boot/howtos/images/21.png | Bin 0 -> 116971 bytes tasks/isc_dhcp_live_boot/howtos/images/22.png | Bin 0 -> 7869 bytes tasks/isc_dhcp_live_boot/howtos/images/23.png | Bin 0 -> 208008 bytes tasks/isc_dhcp_live_boot/howtos/images/24.png | Bin 0 -> 226191 bytes tasks/isc_dhcp_live_boot/howtos/images/25.png | Bin 0 -> 97681 bytes tasks/isc_dhcp_live_boot/howtos/images/26.png | Bin 0 -> 215513 bytes tasks/isc_dhcp_live_boot/howtos/images/27.png | Bin 0 -> 216817 bytes tasks/isc_dhcp_live_boot/howtos/images/28.png | Bin 0 -> 100288 bytes tasks/isc_dhcp_live_boot/howtos/si/index.html | 147 ++++++++++++++++++ 32 files changed, 491 insertions(+) create mode 100644 tasks/isc_dhcp_live_boot/howtos/en/index.html create mode 100644 tasks/isc_dhcp_live_boot/howtos/en/indexEN.html create mode 100644 tasks/isc_dhcp_live_boot/howtos/en/indexEN.html.save create mode 100644 tasks/isc_dhcp_live_boot/howtos/images/01.png create mode 100644 tasks/isc_dhcp_live_boot/howtos/images/02.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/03.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/04.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/05.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/06.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/07.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/08.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/09.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/10.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/11.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/12.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/13.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/14.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/15.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/16.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/17.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/18.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/19.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/20.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/21.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/22.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/23.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/24.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/25.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/26.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/27.png create mode 100755 tasks/isc_dhcp_live_boot/howtos/images/28.png create mode 100644 tasks/isc_dhcp_live_boot/howtos/si/index.html (limited to 'tasks/isc_dhcp_live_boot/howtos') diff --git a/tasks/isc_dhcp_live_boot/howtos/en/index.html b/tasks/isc_dhcp_live_boot/howtos/en/index.html new file mode 100644 index 0000000..63d2463 --- /dev/null +++ b/tasks/isc_dhcp_live_boot/howtos/en/index.html @@ -0,0 +1,172 @@ + + + + 06 - preparation (isc_dhcp_live_boot) + + + +

06 - preparation (isc_dhcp_live_boot)

+

Table of contents

+ + + +

Purpose of this exercise

+

How to perform live boot using a DHCP server.

+ + +

We need VirtualBox and the following 4 virtual +machines: +

+

+ +

Schematics of our subnet

+ slika-01 +

Our goal is to make BootableClient A get it's IP +through DHCP server and boot up using file +A, which is located on simpleArbiterGW,
If we run +BootableClient B machines, we would like it to retrieve it's IP +through DHCP server and boot from some live ISO which is also located on +SimpleArbiterGW. +

+ +

Setting up simpleArbiterGW

+

Download simpleArbiterGW.vdi +and then run VirtualBox. After the file is downloaded, choose the New +option in VirtualBoxu and set simpleArbiterGW in the Name +field.
Memory size, should be set accordingly (1gb will suffice). Then choose "Use an existing virtual hard drive file" and select simpleArbiterGW.vdi clicking Create.

+
+ slika-02 +

We start our virtual machines simpleArbiterGW using the +following login +credentials; username: "root", password: "kaboom".

+ At the start, the computer on NAt get's it's IP(in our case 10.0.2.15).
(to check this useifconfig) We now use this address and eth0 interface to access the internet.

+ slika-03 +

However, we would like this machine to have 2 +interfaces! One on NAT(we already have this one), and the other one on Internal Network,
throuh which we will communicate wiht the DHCP Server and other machines on our Internal Network.

+ We add a new interface, by turning off the virtual machine, +select our machine in VirtualBox and select +računalnik, ter v VirtualBoxu Settings -> Network
+ Adapter 1 is already set to NAT, we set Adapter +2 to +Internal Network

+ slika-04 +

So, now we have two network interfaces!
In VirtuaBox +we can define multiple Internal Networks, however, for our needs two +will suffice. We save the settings and restart simpleArbiterGW.

+ What we must do now, is to assign both interfaces IP addresses. We do this by setting theinterfacesfile + located at/etc/network.

+ slika-05 +

Eth0 was already handled by and integrated DHCP, so eth0 had been assigned an IP).
+ We have to set up the other network interface. If we don't know it's name, we find it out using ifconfig -a.

+ slika-06 +

We can conclude the interface names is set to Eth1. + Now we would like to assign an IP naslov to Eth1.
+ Ifconfig could be used, but rebooting the machine would reset the settings. Which is not ideal :)
+ So configuring /etc/network/interfaces would be a better idea.

+ Let's make up a random local network or a local area network or local area network address and assign it to eth1. +

+ slika-07 +

We save the config file. Our machine still has no IP on eth1 so we use the ifup eth1 command

+ slika-08
+

Now we use the ifconfig command, to see whether and ip is assigned to eth1 interface

+ slika-09 +

We can see the IP is set. Now let's set up the DHCP +Server!

+ +

Setting up DHCP Server

+

We download simpleArbiterDhcp.vdi and start VirtualBox. After the file had been dowloaded we select New in VirtualBoxu and unde rthe Name tag write DHCP Server.
We set the Memory size accordingly(1gb of memory should be sufficient). We also select "Use an existing virtual hard drive file" and select the simpleArbiterDhcp and press Create.

+
+ slika-10 +

We run DHCP Server virtual machine and login using "root" ad username and "kaboom" as password.

+

At first, our machine has no assigned IP, since none was set! Let+s configure it in /etc/network/interfaces.
But which interface should we configure? Using ifconfig -a command, we see it's eth0interface.
+ Again we select our IP address.

+ slika-11 +

We save the configuration file. Our computer still has no IP address assigned to eth0, so using ifdown eth0 and then ifup eth0we provide one.

+ slika-12 +

Now let us use ifconfig command, to check whether there is an IP assigned to interface eth0

+ slika-13 +

We got it! We install DHCP server using apt-get install isc-dhcp-server

+ slika-14 +

We see a bunch of errors. Why? Bacause, we have no internet access!
+ We need to specify the Gateway for our inteface. Our Gateway will be set as IP of our simpleArbiter virtual machine.
We do this using theroute add default gw 192.168.251.1 eth0 command

+ slika-15 +

Try pinging Google's DNS server at 8.8.8.8, to check if now have internet access.
+ We do this using the ping 8.8.8.8 command.

+ slika-16 +

Google's DNS server is responding. Great!
+ However, we still cannot run apt-get install isc-dhcp-server
+ Let's tempororly add another interface and set it to NAT, so we get internet access and install the DHCP server.

+ We add a new interface by turning off the virtual computer, in VirtualBox we select our virtual machine and then select Settings -> Network
+ Adapter 1 has already been set to Internal Network, we set Adapter 2 to NAT

+ slika-17 +

We run DHCP Server and in file/etc/network/interfaces at the end of the line add iface eth1 inet dhcp, then save the file and run ifup eth1.
+ Now we have access to the internet and can install our DHCP server with apt-get install isc-dhcp-server install command
+ slika-18
+

Let's see what's in/var/log/syslog, which is a file where our system information is stored in.

+ slika-19
+

Looks like we need to set up a DHCP server and specify where it should listen!
+ DHCP settings are stored in /etc/dhcp/dhcpd.conf. Let's set it!
+ First let's comment out option domain-name-servers to avoid having errors.

+ slika-20
+

Then we configure DHCP server, so it would serve IPs a a certain subnet. We add the following lines:

+ slika-21 +

(subnet) We set the subnet and the IP range, which the DHCP server should use, and which file it should serve.

Some PXEs are so unintelligent, that you should specify where they should get the files from and to do that you specify next-server
(IP from which it will be served from, in our case simpleArbiter), we also specify gateway, which, in our case is also simpleArbiter.

Since we would like, that in the case of BootableClient B another file to be served, we do it by defining a special host like this:
(host special) Under hardware ethernet we specifiy MAC address of our BootableClient B, we assign it a static ip and where the file live-ISO is located.

+

We save the settings and kill the process named dnsmasqusingkilall dnsmasq.

+ slika-22 +

We restart our DHCP server, to apply the new settings. This is done using service isc-dhcp-server restart
command. DHCP server is now ready! We supply BootableClientA and BootableClientB and test them!

+ + +

Setting up BootableClient A

+

We open VirtualBox and select New, for the +Name field we specify +BootableClient A and for the Hard drive we select Do not add a +virtual +hard drive (as we want diskless device),
and select Create. +We want the computer to be on Internal network so vse select our +Bootable Client +A and select
Settings->Network where we change Adapter +1 to Internal Network.

+ slika-23 +

We also want our computer to boot through the network, so +underBoot Ordertab select Network.
+ We save the setting by clicking OK

+ slika-24 +

We run our BootableClient-a A and it get's it's +IP(which is great), using the DHCP server and the simpleArbiter serves +it exactly the file we specified. A.0

+ slika-25 + + + +

Setting upBootableClient +B

+

We open virtual box and select New and under the Name tag write BootableClient B and under the Hard drivetab choose Do not add a virtual hard drive (since we want a diskless machine),
and then press the Create button, which will create a virtual machine. We want our machine to be connected to out Internal network so we select Bootable Client B and then select
Settings->Network and set the Adapter 1 to Internal Network.
+ Under MAC Address we specify the same MAC address that is specified in the (dhcpd.conf -> host special) file, since we want our machine to be an exception
and will be served a special file namedlive-ISO

+ slika-26 +

We want our machine to perform a netboot, so under the System

Boot Order tag specify only Network.
+ We save the setting by clicking the OK button

+ slika-27 +

We run our BootableClient-a A and it get's it's IP address using DHCP server and simpleArbiter serves it the file we selected called live-ISO

+ slika-28 + + + + + diff --git a/tasks/isc_dhcp_live_boot/howtos/en/indexEN.html b/tasks/isc_dhcp_live_boot/howtos/en/indexEN.html new file mode 100644 index 0000000..c83ed57 --- /dev/null +++ b/tasks/isc_dhcp_live_boot/howtos/en/indexEN.html @@ -0,0 +1,172 @@ + + + + 06 - preparation (isc_dhcp_live_boot) + + + +

06 - preparation (isc_dhcp_live_boot)

+

Table of contents

+ + + +

Purpose of this exercise

+

How to perform live boot using a DHCP server.

+ + +

We need VirtualBox and the following 4 virtual +machines: +

+

+ +

Schematics of our subnet

+ slika-01 +

Our goal is to make BootableClient A get it's IP +through DHCP server and boot up using file +A, which is located on simpleArbiterGW,
If we run +BootableClient B machines, we would like it to retrieve it's IP +through DHCP server and boot from some live ISO which is also located on +SimpleArbiterGW. +

+ +

Setting up simpleArbiterGW

+

Download simpleArbiterGW.vdi +and then run VirtualBox. After the file is downloaded, choose the New +option in VirtualBoxu and set simpleArbiterGW in the Name +field.
Memory size should be set accordingly (1gb will suffice). Then choose "Use an existing virtual hard drive file" and select simpleArbiterGW.vdi clicking Create.

+
+ slika-02 +

We start our virtual machines simpleArbiterGW using the +following login +credentials; username: "root", password: "kaboom".

+ At the start, the computer on NAt get's it's IP(in our case 10.0.2.15).
(to check this useifconfig) We now use this address and eth0 interface to access the internet.

+ slika-03 +

However, we would like this machine to have 2 +interfaces! One on NAT(we already have this one), and the other one on Internal Network,
throuh which we will communicate wiht the DHCP Server and other machines on our Internal Network.

+ We add a new interface, by turning off the virtual machine, +select our machine in VirtualBox and select +računalnik, ter v VirtualBoxu Settings -> Network
+ Adapter 1 is already set to NAT, we set Adapter +2 to +Internal Network

+ slika-04 +

So, now we have two network interfaces!
In VirtuaBox +we can define multiple Internal Networks, however, for our need's two +will suffice. We save the settings and restart simpleArbiterGW.

+ What we must do now, is to assign both interfaces IP addresses. We do this by setting theinterfacesfile + located at/etc/network.

+ slika-05 +

Eth0 was already handled by and integrated DHCP, so eth0 had been assigned an IP).
+ We have to set up the other network interface. If we don't know it's name, we find it out using ifconfig -a.

+ slika-06 +

We can conclude the interface names is set to Eth1. + Now we would like to assign an IP naslov to Eth1.
+ Ifconfig could be used, but rebooting the machine would reset the settings. Which is not ideal :)
+ So configuring /etc/network/interfaces would be a better idea.

+ Let's make up a random local network or a local area network or local area network address and assign it to eth1. +

+ slika-07 +

We save the config file. Our machine still has no IP on eth1 so we use the ifup eth1 command

+ slika-08
+

Now we use the ifconfig command, to see whether and ip is assigned to eth1 interface

+ slika-09 +

We can see the IP is set. Now let's set up the DHCP +Server!

+ +

Setting up DHCP Server

+

We download simpleArbiterDhcp.vdi ter zaženemo VirtualBox. Ko je datoteka prenesena v VirtualBoxu izberemo New ter v polje Name vpišemo DHCP Server.
Ustrezno nastavimo tudi Memory size (1gb pomnilnika nam bo zadostovalo). Spodaj izberemo še "Use an existing virtual hard drive file" ter izberemo naš simpleArbiterDhcp in pritisnimo Create.

+
+ slika-10 +

We run DHCP Server virtual machine and login using "root" ad username and "kaboom" as password.

+

At first, our machine has no assigned IP, since none was set! Let+s configure it in /etc/network/interfaces.
But which interface should we configure? Using ifconfig -a command, we see it's eth0interface.
+ Again we select our IP address.

+ slika-11 +

We save the configuration file. Our computer still has no IP address assigned to eth0, so using ifdown eth0 and then ifup eth0we provide one.

+ slika-12 +

Now let us use ifconfig command, to check whether there is an IP assigned to interface eth0

+ slika-13 +

We got it! We install DHCP server using apt-get install isc-dhcp-server

+ slika-14 +

We see a bunch of errors. Why? Bacause, we have no internet access!
+ We need to specify the Gateway for our inteface. Our Gateway bo seveda IP našega simpleArbiter navideznega računalnika.
To naredimo s pomočjo ukaza route add default gw 192.168.251.1 eth0

+ slika-15 +

Try pinging Google's DNS server at 8.8.8.8, to check if now have internet access.
+ We do this using the ping 8.8.8.8 command.

+ slika-16 +

Google's DNS server is responding. Great!
+ However, we still cannot run apt-get install isc-dhcp-server
+ Let's tempororly add another interface and set it to NAT, so we get internet access and install the DHCP server.

+ We add a new interface by turning off the virtual computer, in VirtualBox we select our virtual machine and then select Settings -> Network
+ Adapter 1 has already been set to Internal Network, we set Adapter 2 to NAT

+ slika-17 +

We run DHCP Server and in file/etc/network/interfaces at the end of the line add iface eth1 inet dhcp, then save the file and run ifup eth1.
+ Now we have access to the internet and can install our DHCP server with apt-get install isc-dhcp-server install command
+ slika-18
+

Let's see what's in/var/log/syslog, which is a file where our system information is stored in.

+ slika-19
+

Looks like we need to set up a DHCP server and specify where it should listen!
+ DHCP settings are stored in /etc/dhcp/dhcpd.conf. Let's set it!
+ First let's comment out option domain-name-servers to avoid having errors.

+ slika-20
+

Then we configure DHCP server, so it would serve IPs a a certain subnet. We add the following lines:

+ slika-21 +

(subnet) We set the subnet and the IP range, which the DHCP server should use, and which file it should serve.

Some PXEs are so unintelligent, that you should specify where they should get the files from and to do that you specify next-server
(IP from which it will be served from, in our case simpleArbiter), we also specify gateway, which, in our case is also simpleArbiter.

Ker bi radi, da v primeru zagona navideznega računalnika BootableClient B serviramo drugo datoteko, to naredimo tako da definiramo nek dodaten host na sledeč način:
(host special) Pod hardware ethernet zapišemo MAC naslov našega BootableClient B katerega bo imel, dodelimo mu nek statičen ip naslov ter povemo še iz kje se naj datoteka live-ISO zažene.

+

We save the settings and kill terthe process with ubijemo named dnsmasqusingkilall dnsmasq.

+ slika-22 +

Sledi restart našega DHCP strežnika, da bo deloval z novimi nastavitvami, to naredimo z ukazom service isc-dhcp-server restart
DHCP server is now ready! We supply BootableClientA and BootableClientB and test them!

+ + +

Postavitev BootableClient A

+

We open VirtualBox and select New, for the y +Name field we specify +BootableClient A and for the Hard drive we select Do not add a +virtual +hard drive (as we want diskless device),
and select Create. +We want the computer to be on Internal network so vse select our +Bootable Client +A and select
Settings->Network where we change Adapter +1 to Internal Network.

+ slika-23 +

We also wan our computer to boot through network, so +underBoot Ordertab select Network.
+ We save the setting by clicking OK

+ slika-24 +

We run our BootableClient-a A and it get's it's +IP(which is great), using the DHCP server and the simpleArbiter serves +it exactly the file we specified. A.0

+ slika-25 + + + +

Setting upBootableClient +B

+

Odpremo VirtualBox ter izberemo New in pod Name napišemo BootableClient B ter pod Hard drive izberemo Do not add a virtual hard drive (saj si želimo računalnik brez diska),
in pritisnemo na gump Create, da se nam ustvari navidezni računalnik. Želimo, da bo računalnik priklopljen na Internal network zato označimo naš Bootable Client B ter pritisnimo na
Settings->Network in prvi Adapter 1 spremenimo na Internal Network.
+ Poleg tega nastavimo še pod MAC Address takšen MAC naslov, kot ga imamo v nastavitvah DHCP strežnika (dhcpd.conf -> host special), saj želimo da bo ta naš računalnik izjema
in bo ob zagonu dobil drugo datoteko kot ostali in sicer live-ISO

+ slika-26 +

Želimo še, da se računalnik boot-a preko mreže, zato to nastavimo pod zavihkom System

tako, da pod Boot Order obkljukamo samo Network.
+ Nastavitve shranimo z pritiskom na gumb OK

+ slika-27 +

Poženemo našega BootableClient-a A in odličnoo, dobi ip naslov s pomočjo DHCP strežnika in simpleArbiter mu servira točno to datoteko katero si želimo live-ISO

+ slika-28 + + + + + diff --git a/tasks/isc_dhcp_live_boot/howtos/en/indexEN.html.save b/tasks/isc_dhcp_live_boot/howtos/en/indexEN.html.save new file mode 100644 index 0000000..e69de29 diff --git a/tasks/isc_dhcp_live_boot/howtos/images/01.png b/tasks/isc_dhcp_live_boot/howtos/images/01.png new file mode 100644 index 0000000..906135b Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/01.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/02.png b/tasks/isc_dhcp_live_boot/howtos/images/02.png new file mode 100644 index 0000000..545f630 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/02.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/03.png b/tasks/isc_dhcp_live_boot/howtos/images/03.png new file mode 100755 index 0000000..0b69590 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/03.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/04.png b/tasks/isc_dhcp_live_boot/howtos/images/04.png new file mode 100755 index 0000000..ce4dc18 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/04.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/05.png b/tasks/isc_dhcp_live_boot/howtos/images/05.png new file mode 100755 index 0000000..f343ec1 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/05.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/06.png b/tasks/isc_dhcp_live_boot/howtos/images/06.png new file mode 100755 index 0000000..b4fe8e1 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/06.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/07.png b/tasks/isc_dhcp_live_boot/howtos/images/07.png new file mode 100755 index 0000000..b6da6eb Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/07.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/08.png b/tasks/isc_dhcp_live_boot/howtos/images/08.png new file mode 100755 index 0000000..333fd7d Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/08.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/09.png b/tasks/isc_dhcp_live_boot/howtos/images/09.png new file mode 100755 index 0000000..c7cb8b8 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/09.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/10.png b/tasks/isc_dhcp_live_boot/howtos/images/10.png new file mode 100755 index 0000000..c7f9225 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/10.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/11.png b/tasks/isc_dhcp_live_boot/howtos/images/11.png new file mode 100755 index 0000000..e1192e9 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/11.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/12.png b/tasks/isc_dhcp_live_boot/howtos/images/12.png new file mode 100755 index 0000000..295b3c7 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/12.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/13.png b/tasks/isc_dhcp_live_boot/howtos/images/13.png new file mode 100755 index 0000000..8d3badc Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/13.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/14.png b/tasks/isc_dhcp_live_boot/howtos/images/14.png new file mode 100755 index 0000000..3009f41 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/14.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/15.png b/tasks/isc_dhcp_live_boot/howtos/images/15.png new file mode 100755 index 0000000..c4413e8 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/15.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/16.png b/tasks/isc_dhcp_live_boot/howtos/images/16.png new file mode 100755 index 0000000..a4de5a8 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/16.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/17.png b/tasks/isc_dhcp_live_boot/howtos/images/17.png new file mode 100755 index 0000000..0ab5c0f Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/17.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/18.png b/tasks/isc_dhcp_live_boot/howtos/images/18.png new file mode 100755 index 0000000..4e1e17a Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/18.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/19.png b/tasks/isc_dhcp_live_boot/howtos/images/19.png new file mode 100755 index 0000000..570f644 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/19.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/20.png b/tasks/isc_dhcp_live_boot/howtos/images/20.png new file mode 100755 index 0000000..ea67ce0 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/20.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/21.png b/tasks/isc_dhcp_live_boot/howtos/images/21.png new file mode 100755 index 0000000..428f92f Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/21.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/22.png b/tasks/isc_dhcp_live_boot/howtos/images/22.png new file mode 100755 index 0000000..7119fff Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/22.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/23.png b/tasks/isc_dhcp_live_boot/howtos/images/23.png new file mode 100755 index 0000000..68d0477 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/23.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/24.png b/tasks/isc_dhcp_live_boot/howtos/images/24.png new file mode 100755 index 0000000..4ab2dd2 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/24.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/25.png b/tasks/isc_dhcp_live_boot/howtos/images/25.png new file mode 100755 index 0000000..8823ac1 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/25.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/26.png b/tasks/isc_dhcp_live_boot/howtos/images/26.png new file mode 100755 index 0000000..09eb081 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/26.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/27.png b/tasks/isc_dhcp_live_boot/howtos/images/27.png new file mode 100755 index 0000000..9b867e1 Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/27.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/images/28.png b/tasks/isc_dhcp_live_boot/howtos/images/28.png new file mode 100755 index 0000000..5844b8a Binary files /dev/null and b/tasks/isc_dhcp_live_boot/howtos/images/28.png differ diff --git a/tasks/isc_dhcp_live_boot/howtos/si/index.html b/tasks/isc_dhcp_live_boot/howtos/si/index.html new file mode 100644 index 0000000..d83b934 --- /dev/null +++ b/tasks/isc_dhcp_live_boot/howtos/si/index.html @@ -0,0 +1,147 @@ + + + + 06 - preparation (isc_dhcp_live_boot) + + + +

06 - preparation (isc_dhcp_live_boot)

+

Kazalo

+ + + +

Namen vaje

+

Kako narediti live boot z DHCP strežnikom.

+ + +

Potrebujemo program VirtualBox ter naslednje 4 navidezne računalnike: +

+

+ +

Skica našega podomrežja

+ slika-01 +

Naš cilj je, da računalnik BootableClient A preko DHCP strežnika pridobil IP naslov ter se zažene z datoteko A, ki se nahaja na simpleArbiterGW,
če pa zaženemo računalnik BootableClient B pa si želimo, da ta preko DHCP strežnika pridobi IP naslov ter se zažene z nekim live ISO, ki se prav tako nahaja na simpleArbiterGW. +

+ +

Postavitev simpleArbiterGW

+

Prenesemo simpleArbiterGW.vdi ter zaženemo VirtualBox. Ko je datoteka prenesena v VirtualBoxu izberemo New ter v polje Name vpišemo simpleArbiterGW.
Ustrezno nastavimo tudi Memory size (1gb pomnilnika nam bo zadostovalo). Spodaj izberemo še "Use an existing virtual hard drive file" ter izberemo naš simpleArbiterGW.vdi in pritisnimo Create.

+
+ slika-02 +

Nato zaženemo virtualni računalnik simpleArbiterGW ter se z uporabniškim imenom "root" ter geslom "kaboom" vpišemo v naš sistem.

+ Prvo računalnik od NAT-a, kateri je vgrajen v VirtualBox dobi nek naslov (v našem primeru 10.0.2.15).
(Da to preverimo uporabimo ukaz ifconfig) Preko tega IP naslova in vmesnika eth0 smo povezani v internet.

+ slika-03 +

Mi pa si želimo 2 omrežna vmesnika na tem računalniku! Enega bi radi imeli na NAT (tega že imamo) drugega pa na Internal Network,
preko katerega bomo komunicirali z DHCP Strežnikom ter ostalimi računalniki, ki bodo v našem Internal Network-u.

+ Nov omrežni vmesnik dodamo tako, da ugasnemo naš virtualni računalnik, ter v VirtualBoxu označimo naš virtualni računalnik in pritisnemo na Settings -> Network
+ Adapter 1 imamo že nastavljeno na NAT, Adapter 2 pa nastavimo na Internal Network

+ slika-04 +

Tako, zdaj imamo nastavljena 2 vmesnika!
V VirtualBoxu lahko definiramo več Internal Networkov (notranjih omrežij) a za naše potrebe bo to dovolj. Shranimo nastavitve ter ponovno poženimo naš simpleArbiterGW.

+ Zdaj moramo oba omrežna vmesnika nastaviti tako, da bosta imela nek naslov. Uredimo datoteko interfaces v imeniku + /etc/network.

+ slika-05 +

Za eth0 je poskrbel že DHCP strežnik, ki je vgrajen v VirtualBox (na eth0 je določil nek IP).
+ Mi moramo nastaviti še drugi mrežni vmesnik. Kako se imenuje iz glave ne vemo zato s pomočjo ukaza ifconfig -a pogledamo.

+ slika-06 +

Ugotovimo da je ime vmesnika eth1. + Zdaj bi rad na eth1 nastavil en IP naslov.
+ Lahko bi nastavil z ifconfig, a ko rebootaš računalnik se nastavitve ne ohranijo. To nebi radi!
+ Pojdimo raje skonfigurirat nastavitve v /etc/network/interfaces

+ Izmislimo si eno naključno lokalno omrežje oz naslov lokalnega omrežja ter nastavimo eth1. +

+ slika-07 +

Shranimo konfiguracijsko datoteko. Moj računalnik še nima IP-ja na eth1 zato uporabim ukaz ifup eth1

+ slika-08
+

Sedaj uporabimo ukaz ifconfig, da vidimo če imamo slučajno ip na vmesniku eth1

+ slika-09 +

Vidim, da ip imam. Super! Gremo postavit DHCP Server!

+ +

Postavitev DHCP Server

+

Prenesemo simpleArbiterDhcp.vdi ter zaženemo VirtualBox. Ko je datoteka prenesena v VirtualBoxu izberemo New ter v polje Name vpišemo DHCP Server.
Ustrezno nastavimo tudi Memory size (1gb pomnilnika nam bo zadostovalo). Spodaj izberemo še "Use an existing virtual hard drive file" ter izberemo naš simpleArbiterDhcp in pritisnimo Create.
Ustrezno nastavimo tudi nastavitve mreže iz NAT na Internal Network

+
+ slika-10 +

Nato zaženemo virtualni računalnik DHCP Server ter se z uporabniškim imenom "root" ter geslom "kaboom" vpišemo v naš sistem.

+

Sprva naš računalnik nima nobenega ip-ja saj mu ga nismo nastavili! Pojdimo skonfigurirat nastavitve v /etc/network/interfaces.
Ampak kateri vmesnik sploh konfiguriramo? Z ukazom ifconfig -a ugotovimo da je to eth0.
+ Spet si izberemo nek svoj statičen ip naslov.

+ slika-11 +

Shranimo konfiguracijsko datoteko. Moj računalnik še nima IP-ja na eth0 zato uporabim ukaz ifdown eth0 ter nato še ifup eth0

+ slika-12 +

Sedaj uporabimo ukaz ifconfig, da vidimo če imamo slučajno ip na vmesniku eth0

+ slika-13 +

Hura imamo! Namestimo naš DHCP strežnik z ukazom apt-get install isc-dhcp-server

+ slika-14 +

Vidimo, da dobimo cel kup napak. Ampak zakaj? Zato, ker nimamo dostopa do interneta!
+ Vmesniku eth0 moramo seveda povedati Gateway. Naš Gateway bo seveda IP našega simpleArbiter navideznega računalnika.
To naredimo s pomočjo ukaza route add default gw 192.168.251.1 eth0

+ slika-15 +

Probajmo ping-ati Googlov DNS strežnik, da ugotovimo če imamo sedaj internet.
+ To naredimo z ukazom ping 8.8.8.8.

+ slika-16 +

Googlov DNS strežnik se odziva, super!
+ Ampak apt-get install isc-dhcp-server še vedno ne moremo naložiti.
+ Začasno dodajmo še en mrežni vmesnik ter ga nastavimo na NAT, nato bomo dobili dostop do interneta ter lahko namestimo naš DHCP strežnik.

+ Nov omrežni vmesnik dodamo tako, da ugasnemo naš virtualni računalnik, ter v VirtualBoxu označimo naš virtualni računalnik in pritisnemo na Settings -> Network
+ Adapter 1 imamo že nastavljeno na Internal Network, Adapter 2 pa nastavimo na NAT

+ slika-17 +

Zaženemo naš DHCP Server in v /etc/network/interfaces začasno na koncu dodamo vrstico iface eth1 inet dhcp,datoteko shranimo ter poženemo ukaz ifup eth1.
+ Sedaj imamo dostop do interneta in lahko namestimo naš DHCP strežnik z ukazom apt-get install isc-dhcp-server install
+ slika-18
+

Poglejmo kaj je v /var/log/syslog, to je datoteka kamor se shranjujejo sporočila kaj se dogaja v našem sistemu

+ slika-19
+

Očitno moramo nastaviti dhcp strežnik ter mu povedati tudi kam naj posluša!
+ Za nastavitve DHCP strežnika imamo /etc/dhcp/dhcpd.conf. Nastavimo jo!
+ Prvo zakomentiramo option domain-name-servers zaradi tega da nebo napak da jih ne najde.

+ slika-20
+

Nato skonfiguriramo dhcp strežnik, da bo serviral ip-je na nekem podomrežju. Dodamo naslednje zapise:

+ slika-21 +

(subnet) Nastavimo podomrežje ter območje naslovov od koder naj jih DHCP strežnik dodeli, katero datoteko naj servira,
poleg tega so eni PXE tako neumni, da če jim ti serviraš filename nevejo iz katerega serverja ga dobim, zato napišem še next-server
(ip od koder serviram, v našem primeru simpleArbiter), nastavim tudi gateway kateri je v našem primeru tudi simpleArbiter.

Ker bi radi, da v primeru zagona navideznega računalnika BootableClient B serviramo drugo datoteko, to naredimo tako da definiramo nek dodaten host na sledeč način:
(host special) Pod hardware ethernet zapišemo MAC naslov našega BootableClient B katerega bo imel, dodelimo mu nek statičen ip naslov ter povemo še iz kje se naj datoteka live-ISO zažene.

+

Spremembe shranimo, ter ubijemo proces z imenom dnsmasq z ukazom kilall dnsmasq.

+ slika-22 +

Sledi restart našega DHCP strežnika, da bo deloval z novimi nastavitvami, to naredimo z ukazom service isc-dhcp-server restart
DHCP Strežnik je pripravljen! Pripravimo BootableClientA ter BootableClientB ter testirajmo!

+ + +

Postavitev BootableClient A

+

Odpremo VirtualBox ter izberemo New in pod Name napišemo BootableClient A ter pod Hard drive izberemo Do not add a virtual hard drive (saj si želimo računalnik brez diska),
in pritisnemo na gump Create, da se nam ustvari navidezni računalnik. Želimo, da bo računalnik priklopljen na Internal network zato označimo naš Bootable Client A ter pritisnimo na
Settings->Network in prvi Adapter 1 spremenimo na Internal Network.

+ slika-23 +

Želimo še, da se računalnik boot-a preko mreže, zato to nastavimo pod zavihkom System

tako, da pod Boot Order obkljukamo samo Network.
+ Nastavitve shranimo z pritiskom na gumb OK

+ slika-24 +

Poženemo našega BootableClient-a A in odličnoo, dobi ip naslov s pomočjo DHCP strežnika in simpleArbiter mu servira točno to datoteko katero si želimo A.0

+ slika-25 + + + +

Postavitev BootableClient B

+

Odpremo VirtualBox ter izberemo New in pod Name napišemo BootableClient B ter pod Hard drive izberemo Do not add a virtual hard drive (saj si želimo računalnik brez diska),
in pritisnemo na gump Create, da se nam ustvari navidezni računalnik. Želimo, da bo računalnik priklopljen na Internal network zato označimo naš Bootable Client B ter pritisnimo na
Settings->Network in prvi Adapter 1 spremenimo na Internal Network.
+ Poleg tega nastavimo še pod MAC Address takšen MAC naslov, kot ga imamo v nastavitvah DHCP strežnika (dhcpd.conf -> host special), saj želimo da bo ta naš računalnik izjema
in bo ob zagonu dobil drugo datoteko kot ostali in sicer live-ISO

+ slika-26 +

Želimo še, da se računalnik boot-a preko mreže, zato to nastavimo pod zavihkom System

tako, da pod Boot Order obkljukamo samo Network.
+ Nastavitve shranimo z pritiskom na gumb OK

+ slika-27 +

Poženemo našega BootableClient-a A in odličnoo, dobi ip naslov s pomočjo DHCP strežnika in simpleArbiter mu servira točno to datoteko katero si želimo live-ISO

+ slika-28 +

Postavitev TFTP strežnika in zagonskih datotek

+ +

Na SimpleArbiter namestimo TFTP strežnik z ukazom apt-get install tftpd-hpa in spremenimo IP v "/etc/default/tftpd-hpa" pod TFTP_ADDRES na "192.168.251.1". +
Nato z ukazom apt-get install syslinux namestimo syslinux in skopiramo zagonsko datoteko iz "/usr/lib/syslinux/pxelinux.0" na "/srv/tftp/A.0.
Namestimo še NFS server z ukazom "apt-get install nfs-kernel-server" in v "/etc/exports" dodamo lokacijo mape, kjer se nahaja naša zagonska datoteka A.0, ter omogočimo branje ("/srv/tftp * (ro)"). +
V imeniku /srv/tftp ustvarimo mapo "pxelinux.cfg" in v njej ustvarimo datoteko z imenom default. Vanjo vpišemo : +
DEFAULT vesamenu.c32 +
PROMPT 0 +
MENU TITLE isc-dhcp-live +
LABEL iso +
menu label Run +
kernel vmlinuz +
APPEND boot=casper netboot=nfs nfsroot=192.168.251.1:/srv/tftp/boot/ initrd=initrd.gz

+ + + -- cgit v1.2.1