[dnsmasq] client krijgt geen ip

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • Sir Isaac
  • Registratie: September 2002
  • Laatst online: 21-05 20:45
Ik ben bezig met het opzetten van een ltsp omgeving, waarbij ik dnsmasq als dhcp en tftp server wil gebruiken. Om te voorkomen dat ik mijn clients de ene helft van de info van mijn modem/router krijgen en de andere van mijn ltsp server heb ik dhcp op het modem uitgezet. Mijn ltsp server heeft een statisch ip adres.

dnsmasq luistert wel op de juiste poorten:
root@~> netstat - upan | grep dnsmasq
udp        0      0 0.0.0.0:4011            0.0.0.0:*                           4327/dnsmasq    
udp        0      0 127.0.0.1:53            0.0.0.0:*                           4327/dnsmasq    
udp        0      0 192.168.0.10:53         0.0.0.0:*                           4327/dnsmasq    
udp        0      0 0.0.0.0:67              0.0.0.0:*                           4327/dnsmasq    
udp        0      0 127.0.0.1:69            0.0.0.0:*                           4327/dnsmasq    
udp        0      0 192.168.0.10:69         0.0.0.0:*                           4327/dnsmasq    
udp6       0      0 ::1:53                  :::*                                4327/dnsmasq    
udp6       0      0 fe80::be5f:f4ff:fedc:53 :::*                                4327/dnsmasq    
udp6       0      0 ::1:69                  :::*                                4327/dnsmasq    
udp6       0      0 fe80::be5f:f4ff:fedc:69 :::*                                4327/dnsmasq


Wat mij verbaast is dat de dns server op alle interfaces luister (0.0.0.0) terwijl de dns server (die uit zou moeten staan!) op specifieke interfaces luistert.

dnsmasq is gestart als
/usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new,.bak


Hij haalt zijn config dus uit /etc/dnsmasq.d/ Daar staat ltsp-server-dnsmasq.conf met de volgende inhoud:
interface=eth0
dhcp-range=192.168.67.20,192.168.67.250,8h
dhcp-option=17,/opt/ltsp/i386
dhcp-vendorclass=etherboot,Etherboot
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=ltsp,"Linux ipconfig"
dhcp-boot=net:pxe,/ltsp/i386/pxelinux.0
dhcp-boot=net:etherboot,/ltsp/i386/nbi.img
dhcp-boot=net:ltsp,/ltsp/i386/lts.conf
dhcp-option=vendor:pxe,6,2b
dhcp-no-override
pxe-service=X86PC, "Boot from network", /ltsp/i386/pxelinux
enable-tftp
tftp-root=/var/lib/tftpboot/

Ik heb geen firewall draaien. Waar gaat dit verkeerd? Ik krijgt direct een timeout op het krijgen van de dhcp lease. Alles wat over tftp gaat komt hij dus al helemal niet aan toe. Mijn firewall staat uit (guwf)

Overige info:
Ubuntu 13.10
dnsmasq 2.66

Acties:
  • 0 Henk 'm!

  • CAPSLOCK2000
  • Registratie: Februari 2003
  • Laatst online: 16:39

CAPSLOCK2000

zie teletekst pagina 888

Uit de handleiding:

# On systems which support it, dnsmasq binds the wildcard address,
# even when it is listening on only some interfaces. It then discards
# requests that it shouldn't reply to. This has the advantage of
# working even when interfaces come and go and change address. If you
# want dnsmasq to really bind only the interfaces it is listening on,
# uncomment this option. About the only time you may need this is when
# running another nameserver on the same machine.


Je zegt dat DNS uit zou moeten staan maar dat zie ik niet in je configuratie.

Ik zie ook niet waarom DHCP het niet doet. Staat er iets in de logs?
De tools 'tcpdump' en 'dhcpdump' zijn handig bij het uitzoeken van dit soort problemen. Controleer of het DHCP-verzoek je client verlaat, op je server aankomt, of er dan ook een antwoord uit en of dat antwoord bij je client aankomt.

This post is warranted for the full amount you paid me for it.


Acties:
  • 0 Henk 'm!

  • webfreakz.nl
  • Registratie: November 2003
  • Laatst online: 21-08 15:56

webfreakz.nl

el-nul-zet-é-er

Je hebt een DHCP range geconfigureerd van 192.168.67.(20-250) . Je server lijkt het IP adres 192.168.0.10 te hebben. Relay je soms je DHCP verkeer? Want het *lijkt* geen verkeer op het local segment te zijn?

Daarnaast is het inderdaad aan te raden even te kijken met tcpdump wat voor verkeer je voorbij ziet komen.

"You smell that, son? What sir? Napalm, I love the smell of napalm in the mornin!" || Children of Bodom fan!


Acties:
  • 0 Henk 'm!

  • Sir Isaac
  • Registratie: September 2002
  • Laatst online: 21-05 20:45
Bedankt voor de tips die fout in het IP range was echt 8)7. DHCP werkt nu:
tcpdump -v
22:00:16.605831 IP (tos 0x0, ttl 64, id 2, offset 0, flags [none], proto UDP (17), length 430)
    0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:17:9a:bc:bc:dc (oui Unknown), length 402, xid 0x9abcbcdc, Flags [none]
	  Client-Ethernet-Address 00:17:9a:bc:bc:dc (oui Unknown)
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Request
	    MSZ Option 57, length 2: 1472
	    ARCH Option 93, length 2: 0
	    NDI Option 94, length 3: 1.2.1
	    Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
	    CLASS Option 77, length 4: "gPXE"
	    Parameter-Request Option 55, length 13: 
	      Subnet-Mask, Default-Gateway, Domain-Name-Server, LOG
	      Hostname, Domain-Name, RP, Vendor-Option
	      Vendor-Class, TFTP, BF, Option 175
	      Option 203
	    T175 Option 175, length 48: 2969895185,103876120,16851713,19005697,419496224,16851201,17826050,302055699,16847105,32178945,71425,18153729
	    Client-ID Option 61, length 7: ether 00:17:9a:bc:bc:dc
	    GUID Option 97, length 17: 0.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255
	    Server-ID Option 54, length 4: martijn-ubuntu
	    Requested-IP Option 50, length 4: oud-beesie
22:00:16.610356 IP (tos 0xc0, ttl 64, id 35514, offset 0, flags [none], proto UDP (17), length 409)
    martijn-ubuntu.bootps > oud-beesie.bootpc: BOOTP/DHCP, Reply, length 381, xid 0x9abcbcdc, Flags [none]
	  Your-IP oud-beesie
	  Server-IP martijn-ubuntu
	  Client-Ethernet-Address 00:17:9a:bc:bc:dc (oui Unknown)
	  file "/ltsp/i386/pxelinux.0"
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: ACK
	    Server-ID Option 54, length 4: martijn-ubuntu
	    Lease-Time Option 51, length 4: 28800
	    RN Option 58, length 4: 14400
	    RB Option 59, length 4: 25200
	    Subnet-Mask Option 1, length 4: 255.255.255.0
	    BR Option 28, length 4: 192.168.0.255
	    Domain-Name-Server Option 6, length 4: martijn-ubuntu
	    RP Option 17, length 14: "/opt/ltsp/i386"
	    Default-Gateway Option 3, length 4: 192.168.0.254
	    Vendor-Class Option 60, length 9: "PXEClient"
	    GUID Option 97, length 17: 0.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255
	    Vendor-Option Option 43, length 41: 6.1.3.10.4.0.80.88.69.8.7.128.0.1.192.168.0.10.9.20.128.0.17.66.111.111.116.32.102.114.111.109.32.110.101.116.119.111.114.107.255
22:00:16.612570 IP (tos 0x0, ttl 64, id 28091, offset 0, flags [DF], proto UDP (17), length 72)
    martijn-ubuntu.1319 > resolve10.dns.internl.net.domain: 2886+ PTR? 255.0.168.192.in-addr.arpa. (44)
22:00:16.612607 IP (tos 0x0, ttl 64, id 26026, offset 0, flags [DF], proto UDP (17), length 72)
    martijn-ubuntu.1319 > resolve20.dns.internl.net.domain: 2886+ PTR? 255.0.168.192.in-addr.arpa. (44)
22:00:16.637616 IP (tos 0x0, ttl 61, id 0, offset 0, flags [DF], proto UDP (17), length 121)
    resolve10.dns.internl.net.domain > martijn-ubuntu.1319: 2886 NXDomain 0/1/0 (93)
22:00:16.638309 IP (tos 0x0, ttl 60, id 0, offset 0, flags [DF], proto UDP (17), length 121)
    resolve20.dns.internl.net.domain > martijn-ubuntu.1319: 2886 NXDomain 0/1/0 (93)
22:00:16.638390 IP (tos 0xc0, ttl 64, id 26027, offset 0, flags [none], proto ICMP (1), length 149)
    martijn-ubuntu > resolve20.dns.internl.net: ICMP martijn-ubuntu udp port 1319 unreachable, length 129
	IP (tos 0x0, ttl 60, id 0, offset 0, flags [DF], proto UDP (17), length 121)
    resolve20.dns.internl.net.domain > martijn-ubuntu.1319: 2886 NXDomain 0/1/0 (93)


De server geeft de naam vad de file (pxelinux.0). Ik kan files uit /ltsp/i386 downloaden met een tftp client, maar het ziet er uit alsof de client de file niet opvraagd: ik zie geen request in de bovenstaande log.

[ Voor 85% gewijzigd door Sir Isaac op 24-11-2013 22:03 ]


Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 01-10 21:30

Hero of Time

Moderator LNX

There is only one Legend

Ik zie anders wel verzoeken voor een DNS resolving. Dat mislukt want je forwarder kent je interne DNS namen niet. Omdat die faalt, kan je tftp download mogelijk ook falen, afhankelijk wat je hebt ingesteld staan. Als je namelijk met DNS namen werkt voor downloads, wordt de domeinnaam eerst naar IP omgezet voordat er verder wordt gegaan.

Check dus even je configuratie, maak je gebruik van hostnaam of IP adres?

Commandline FTW | Tweakt met mate