{"id":66,"date":"2015-01-22T09:25:35","date_gmt":"2015-01-22T09:25:35","guid":{"rendered":"https:\/\/edulab.unitn.it\/tecnici\/?p=66"},"modified":"2015-02-11T12:37:08","modified_gmt":"2015-02-11T12:37:08","slug":"dnsmasq-and-fog-configurazione-senza-modifiche-dhcp-e-con-due-sottoreti","status":"publish","type":"post","link":"https:\/\/edulab.unitn.it\/tecnici\/dnsmasq-and-fog-configurazione-senza-modifiche-dhcp-e-con-due-sottoreti\/","title":{"rendered":"Dnsmasq and fog: configurazione senza modifiche DHCP e con due sottoreti"},"content":{"rendered":"<p>Queste modifiche servono per far funzionare il boot da PXE di Fog quando non si vuole o non di pu\u00f2 modificare il dhcp.<\/p>\n<p>Inoltre le modifiche servono anche perch\u00e9 il boot funzioni su pi\u00f9 sottoreti.<\/p>\n<p>Ovviamente il server Fog\/DNSMASQ deve avere una scheda per ogni sottorete.<\/p>\n<p>Installare fog come con<a title=\"Install fog Parametri Ldss\" href=\"https:\/\/edulab.unitn.it\/tecnici\/install-fog-parametri-ldss\/\"> queste<\/a> opzioni.<\/p>\n<h4>DNSMASQ<\/h4>\n<p>Installare dnsmasq<\/p>\n<pre># apt-get install dnsmasq<\/pre>\n<p>creare il file <strong>\/etc\/dnsmasq.d\/ltsp.conf<\/strong>\u00a0 come <a title=\"Using FOG with an unmodifiable DHCP server\/ Using FOG with no DHCP server\" href=\"http:\/\/www.fogproject.org\/wiki\/index.php\/Using_FOG_with_an_unmodifiable_DHCP_server\/_Using_FOG_with_no_DHCP_server\">dal forum\u00a0 di Fog<\/a>\u00a0 e modificarlo come segue:<\/p>\n<pre>port=0\r\nlog-dhcp\r\ntftp-root=\/tftpboot\r\n<strong>dhcp-boot=net:eth0,undionly.kpxe,,192.168.2.7\r\ndhcp-boot=net:eth1,undionly.kpxe,,192.168.121.254<\/strong>\r\ndhcp-no-override\r\npxe-prompt=\"Press F8 for LDSS boot menu\", 1\r\npxe-service=X86PC, \"Boot from network\", undionly\r\npxe-service=X86PC, \"Boot from local hard disk\", 0\r\n<strong>dhcp-range=192.168.121.254,proxy\r\ndhcp-range=192.168.2.7,proxy\r\n<\/strong><\/pre>\n<p>Le modifiche in grassetto sono quelle importanti per far funzionare il boot da PXE su due o pi\u00f9 sottoreti.<\/p>\n<h5>TFTP<\/h5>\n<p>Le modifiche al servizio TFTP vanno fatte nel file <strong>\/tftpboot\/default.ipxe:<\/strong><\/p>\n<pre>#!ipxe\r\ncpuid --ext 29 &amp;&amp; set arch x86_64 || set arch i386\r\nparams\r\nparam mac0 ${net0\/mac}\r\nparam arch ${arch}\r\n\r\necho ****************************************************\r\nroute\r\nset gat ${net0\/gateway}\r\necho rete: ${gat} - Processore: ${arch}\r\necho ****************************************************\r\n\r\niseq ${gat} 192.168.2.1 &amp;&amp; goto rete1 ||\r\niseq ${gat} 192.168.121.1 &amp;&amp; goto rete2 ||\r\n\r\necho ******************************************\u00a0\u00a0\u00a0\u00a0 \u00a0\r\necho -n Sottorete sbagliata per il boot da rete \r\necho ******************************************\u00a0\u00a0\u00a0\u00a0 \u00a0\r\nread ciccio\r\n\r\n:rete1\r\necho rete1 ufficio\r\n#echo -n premi qualcosa per continuare:\r\n#read ciccio\r\nchain http:\/\/192.168.2.7\/fog\/service\/ipxe\/boot.php##params\r\ngoto end\r\n:rete2\r\necho rete2 lab\r\n#echo -n premi qualcosa per continuare:\r\n#read ciccio\r\nchain http:\/\/192.168.121.254\/fog\/service\/ipxe\/boot.php##params\r\ngoto end\r\n:end\r\n<\/pre>\n<p>Poi<\/p>\n<pre>\u00a0# service dnsmasq restart<\/pre>\n<p>Crea il Link simbolico seguente cos\u00ec dnsmasq pu\u00f2 trovare\u00a0undionly.kpxe:<\/p>\n<pre>cd \/tftpboot\r\nln -s undionly.kpxe undionly.0<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Queste modifiche servono per far funzionare il boot da PXE di Fog quando non si vuole o non di pu\u00f2 modificare il dhcp. Inoltre le modifiche servono anche perch\u00e9 il [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-fog"],"_links":{"self":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":17,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":148,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/66\/revisions\/148"}],"wp:attachment":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}