|
|
|
|
Strumenti |
16-12-2011, 02:37 | #1 |
Member
Iscritto dal: Mar 2006
Città: Molfetta
Messaggi: 234
|
[dhcp server] options non inviate
Sto configurando un server dhcp su ubuntu. Ho aggiunto alcune option personalizzate, tuttavia analizzando il traffico nel pacchetto DHCP OFFER c'è solo l'opzione 166, tutte le altre vengono ignorate.
Qualche idea? Il mio dhcp.conf è: Codice:
ddns-update-style none; option domain-name "qualcosa.org"; option domain-name-servers 192.168.2.1; option option-160 code 160 = ip-address; option option-161 code 161 = ip-address; option option-162 code 162 = ip-address; option option-163 code 163 = ip-address; option option-164 code 164 = ip-address; option option-165 code 165 = ip-address; option option-166 code 166 = ip-address; default-lease-time 600; max-lease-time 7200; log-facility local7; subnet 192.168.2.0 netmask 255.255.255.0 { range 192.168.2.4 192.168.2.10; option routers 192.168.2.1; } host videostation { hardware ethernet 00:60:3B:09:CC:C7; fixed-address 192.168.2.2; option option-160 239.0.0.0; option option-161 113.113.113.0; option option-162 254.254.0.0; option option-163 6.6.2.5; option option-164 0.0.0.0; option option-165 239.0.0.0; option option-166 192.168.2.111; }
__________________
|
16-12-2011, 12:24 | #2 |
Senior Member
Iscritto dal: Feb 2002
Messaggi: 2511
|
Dovresti dirci anche che dhcp server stai usando, se sei su una lan medio piccola ti consiglierei di guardare dnsmasq.
|
16-12-2011, 15:35 | #3 |
Member
Iscritto dal: Mar 2006
Città: Molfetta
Messaggi: 234
|
Era il solito ISC dhcp v3, comunque ho scoperto il problema: semplicemente il client non richiedeva le opzioni, e quindi il server semplicemente non le inviava.
Tutto nelle specifiche dhcp. Per essere inviata l'opzione deve essere richiesta. Grazie, eaman, ah e già che ci sei, potresti dirmi sinteticamente i vantaggi di dnsmasq rispetto a dhcpd?
__________________
Ultima modifica di whiles_ : 16-12-2011 alle 15:44. |
16-12-2011, 17:17 | #4 |
Senior Member
Iscritto dal: Feb 2002
Messaggi: 2511
|
Dnsmasq e' una figata per le piccole reti:
- ovviamente fa da dns cache, adattandosi automaticamente al dns che piglia l'eventuale ppp di una adsl o simile - e' facile molto da configurare - ti propaga il suo file /etc/host - ovviamente e' anche un dhcp server, solo che e' piu' facile da configurare - ti fa da server per il boot da rete: pxe - ti permette ti 'truccare' tutti i tipi di record del dns: ad esempio gli puoi far propagare con una sola riga di codice un record MX per la posta. Metti caso che domani vuoi imparare a configurare i server di posta e non sai come propagare i record MX nella LAN... es: Codice:
# Uncomment this to enable the integrated DHCP server, you need # to supply the range of addresses available for lease and optionally # a lease time. If you have more than one network, you will need to # repeat this for each network on which you want to supply DHCP # service. dhcp-range=192.168.0.1,192.168.0.38,255.255.255.0,12h # il routing e' automatico, propaga quello dal server # IP fissi dhcp-host=00:11:2f:c6:ee:af,ice,192.168.0.4,infinite # Interface MTU Option # # This option specifies the MTU to use on this interface. The MTU is # specified as a 16-bit unsigned integer. The minimum legal value for # the MTU is 68. # # The code for this option is 26, and its length is 2. # # Code Len MTU # +-----+-----+-----+-----+ # | 26 | 2 | m1 | m2 | # +-----+-----+-----+-----+ dhcp-option=lan,26,7000 # Set the boot filename and tftpd server name and address # for BOOTP. You will only need this is you want to # boot machines over the network. #dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 # debian etch one dhcp-boot=/var/lib/tftpboot/pxelinux.cfg/pxelinux.0,lu,192.168.0.254 enable-tftp tftp-root=/var/lib/tftpboot # Fine, 3 righe per impostare un server boot pxe # Change these lines if you want dnsmasq to serve MX records. # Return an MX record named "maildomain.com" with target # servermachine.com and preference 50 mx-host=maildomain.com,servermachine.com,50 |
16-12-2011, 22:40 | #5 |
Bannato
Iscritto dal: Mar 2009
Messaggi: 105
|
se ti piace lavorare con i server. prova clearOS!
|
17-12-2011, 14:41 | #6 |
Member
Iscritto dal: Mar 2006
Città: Molfetta
Messaggi: 234
|
Configurato dnsmasq, funziona a meraviglia.
Mi serviva anche il server TFTP, e quindi mi risparmierà un altro bel po' di fatica! Grazie mille eaman, sei stato gentilissimo e disponibile. Terrò a mente anche clearOS! Anzi, guardacaso a prima vista è proprio quello che mi serve. L'unica cosa è che devo prima stabilire la connessione ethernet, infatti se collego solo il cavo ethernet dnsmasq si accorge dell'arrivo del pacchetto DHCPDISCOVER ma non gli risponde. Un peccato, perchè stabilendo la connessione si generano un sacco di richieste indesiderate (immagino per scoprire le porte aperte e vedere se è disponibile la connessione ad internet). Sarebbe invece molto meglio se le comunicazioni si limitassero strettamente alla connessione DHCP .
__________________
Ultima modifica di whiles_ : 17-12-2011 alle 14:46. |
17-12-2011, 15:16 | #7 |
Senior Member
Iscritto dal: Feb 2002
Messaggi: 2511
|
Non mi e' ben chiaro come sei messo, ma di norma
1 se hai una ADSL pppoe (pppoeconf) stabilisce la connessione 1 se un cellulare o simile wvdial stabilisce la connessione 2 iptables fa il NAT per condividere la connessione 3 dnsmasq fa tutto il resto per tirare su la lan: dhcpd, routing, dns |
17-12-2011, 15:19 | #8 |
Bannato
Iscritto dal: Mar 2009
Messaggi: 105
|
contento di averti dato una idea utile!
|
17-12-2011, 15:29 | #9 |
Member
Iscritto dal: Mar 2006
Città: Molfetta
Messaggi: 234
|
La maggior parte del traffico generato durante la connessione è sicuramente il traffico sotto protocollo MDNS.
Codice:
No. Time Source Destination Protocol Length Info 30 2.493633 fe80::9a4b:e1ff:feb8:cb2d ff02::fb MDNS 101 Standard query PTR _sane-port._tcp.local, "QM" question Frame 30: 101 bytes on wire (808 bits), 101 bytes captured (808 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv6mcast_00:00:00:fb (33:33:00:00:00:fb) Internet Protocol Version 6, Src: fe80::9a4b:e1ff:feb8:cb2d (fe80::9a4b:e1ff:feb8:cb2d), Dst: ff02::fb (ff02::fb) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (query) No. Time Source Destination Protocol Length Info 31 2.594957 fe80::9a4b:e1ff:feb8:cb2d ff02::fb MDNS 222 Standard query response PTR _udisks-ssh._tcp.local PTR hp-dv6 [98:4b:e1:b8:cb:2d]._workstation._tcp.local PTR _workstation._tcp.local PTR hp-dv6._udisks-ssh._tcp.local Frame 31: 222 bytes on wire (1776 bits), 222 bytes captured (1776 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv6mcast_00:00:00:fb (33:33:00:00:00:fb) Internet Protocol Version 6, Src: fe80::9a4b:e1ff:feb8:cb2d (fe80::9a4b:e1ff:feb8:cb2d), Dst: ff02::fb (ff02::fb) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (response) No. Time Source Destination Protocol Length Info 32 3.099991 192.168.2.111 224.0.0.251 MDNS 81 Standard query PTR _sane-port._tcp.local, "QM" question Frame 32: 81 bytes on wire (648 bits), 81 bytes captured (648 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb) Internet Protocol Version 4, Src: 192.168.2.111 (192.168.2.111), Dst: 224.0.0.251 (224.0.0.251) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (query) No. Time Source Destination Protocol Length Info 33 3.277343 192.168.2.111 224.0.0.251 MDNS 319 Standard query response PTR _udisks-ssh._tcp.local PTR hp-dv6 [98:4b:e1:b8:cb:2d]._workstation._tcp.local TXT, cache flush SRV, cache flush 0 0 9 hp-dv6.local AAAA, cache flush fe80::9a4b:e1ff:feb8:cb2d A, cache flush 192.168.2.111 PTR _workstation._tcp.local PTR hp-dv6._udisks-ssh._tcp.local TXT, cache flush SRV, cache flush 0 0 22 hp-dv6.local Frame 33: 319 bytes on wire (2552 bits), 319 bytes captured (2552 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb) Internet Protocol Version 4, Src: 192.168.2.111 (192.168.2.111), Dst: 224.0.0.251 (224.0.0.251) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (response) No. Time Source Destination Protocol Length Info 34 3.297876 fe80::9a4b:e1ff:feb8:cb2d ff02::fb MDNS 355 Standard query response TXT, cache flush AAAA, cache flush fe80::9a4b:e1ff:feb8:cb2d PTR, cache flush hp-dv6.local HINFO, cache flush X86_64 LINUX SRV, cache flush 0 0 9 hp-dv6.local TXT, cache flush SRV, cache flush 0 0 22 hp-dv6.local Frame 34: 355 bytes on wire (2840 bits), 355 bytes captured (2840 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv6mcast_00:00:00:fb (33:33:00:00:00:fb) Internet Protocol Version 6, Src: fe80::9a4b:e1ff:feb8:cb2d (fe80::9a4b:e1ff:feb8:cb2d), Dst: ff02::fb (ff02::fb) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (response) No. Time Source Destination Protocol Length Info 35 3.298129 192.168.2.111 224.0.0.251 MDNS 152 Standard query response PTR, cache flush hp-dv6.local Frame 35: 152 bytes on wire (1216 bits), 152 bytes captured (1216 bits) Ethernet II, Src: HewlettP_b8:cb:2d (98:4b:e1:b8:cb:2d), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb) Internet Protocol Version 4, Src: 192.168.2.111 (192.168.2.111), Dst: 224.0.0.251 (224.0.0.251) User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353) Domain Name System (response)
__________________
|
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:18.