dnsmasq und das Gast Wlan

JokerGermany

Mitglied
Mitglied seit
7 Aug 2007
Beiträge
606
Punkte für Reaktionen
6
Punkte
18
Ich habe beim make menuconfig den multid für DHCP und DNS ausgeschaltet.
Kann ich in dnsmasq irgendwie dafür sorgen, dass das Gast Wlan eine IP aus dem 192.168.179.0/24 bekommt und der Rest aus dem 192.168.2.0/24 Netz?

€dit:
OK, so sollte es gehen, oder?
Ist bloß die Frage ob die Dopplungen stören.
dhcp-range=wlan_guest,192.179.100.100,192.168.179.199,12h
dhcp-range=guest4,192.168.179.100,192.168.179.199,12h
dhcp-range=wlan,192.168.2.100,192.168.2.199,12h
dhcp-range=lan:0,192.168.2.100,192.168.2.199,12h

- - - Aktualisiert - - -

Hmmm, komplizierter als ich dachte:
Code:
adsl
ath0
dsl
eoam
eth0
eth1
eth2
eth3
guest
guest4
lan
lan:0
lo
ptm_vr9
sit0
tun0
tunl0
wasp
wifi0
wifi1
wlan
wlan_guest

Welchen davon muss ich allen eine DHCP Adresse zuweisen?
 
Zuletzt bearbeitet:
Hallo JokerGermany,
ich habe mal eine DNSmasq-Config für DHCP-Server-Betrieb für 2 Netzwerke erstellt.
hier ist die Zustellung von wichtigen Netzwerkinformationen wie Default-Router, DNS-Server-IP, usw. enthalten.

Code:
cat /etc/dnsmasq/dhcpd/dnsmasq_dhcpd.conf
#From `man dnsmasq`
#-p, --port=<port>
#        Listen on <port> instead of the standard DNS port (53).
#        Setting this to zero completely disables DNS  function,
#        leaving only DHCP and/or TFTP.
#
# general DHCP stuff (see RFC 2132)
#
# 1:  subnet masq
# 3:  default router
# 6:  DNS server
# 12: hostname
# 15: DNS domain (unneeded with option 'domain')
# 28: broadcast address
# 42: time server
#
dhcp-authoritative
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
#
dhcp-option=lan:0,1,255.255.255.0
#dhcp-option=lan:0,3,192.168.2.1
#dhcp-option=lan:0,6,192.168.2.254
dhcp-option=lan:0,28,192.168.2.255

#addn-hosts=/etc/dnsmasq/hosts
log-dhcp
log-facility=/var/log/dnsmasq/dhcpd/dnsmasq_dhcpd_lan:0.log
pid-file=/var/run/dnsmasq_dhcpd_lan:0.pid

#interface=lan:0

# Pool-Definition:
#dhcp-range=vlan2,<start ip>,<end ip>,<net mask>,<lease time>
dhcp-range=lan:0,192.168.2.101,192.168.2.120,255.255.255.0,24h
dhcp-range=wlan_guest,192.168.179.101,192.168.179.120,255.255.255.0,24h

# Default-Gateway:
#dhcp-option=vlan2,3,<router address on vlan>
dhcp-option=lan:0,3,192.168.2.1
dhcp-option=wlan_guest,3,192.168.179.1

# statische IP:
dhcp-host=lan:0,FC:E9:98:25:BB:0E,gast_1,192.168.2.187,24h
# wlan_guest: 192.168.179.xxx
dhcp-host=wlan_guest,88:32:9B:DD:EE:11,gast_2,192.168.179.188,24h
#
#Clients bekommen als Nameserver 192.168.2.1, 192.168.0.1
#  dhcp-option=lan:0,6,[DNS IP 1],[DNS IP 2]
dhcp-option=lan:0,6,192.168.2.1
dhcp-option=wlan_guest,6,192.168.2.1


Daemon-Start:
Code:
/usr/sbin/dnsmasq --port=0 --conf-file=/etc/dnsmasq/dhcpd/dnsmasq_dhcpd.conf &


Frage ob die Dopplungen stören.
dhcp-range=wlan_guest,192.179.100.100,192.168.179.199,12h
dhcp-range=guest4,192.168.179.100,192.168.179.199,12h
dhcp-range=wlan,192.168.2.100,192.168.2.199,12h
dhcp-range=lan:0,192.168.2.100,192.168.2.199,12h

Wozu diese "Doppelungen" ?
die Interfaces wlan_guest, guest4 sowie wlan, lan:0 sind doch jeweils gebridged;
somit reicht die Definition von wlan_guest und lan:0 in der dhcpd-config.

LG Riverhopper
 
Zuletzt bearbeitet:
Code:
cat /etc/dnsmasq/dhcpd/dnsmasq_dhcpd.conf
#From `man dnsmasq`
#-p, --port=<port>
#        Listen on <port> instead of the standard DNS port (53).
#        Setting this to zero completely disables DNS  function,
#        leaving only DHCP and/or TFTP.
#
# general DHCP stuff (see RFC 2132)
#
# 1:  subnet masq
# 3:  default router
# 6:  DNS server
# 12: hostname
# 15: DNS domain (unneeded with option 'domain')
# 28: broadcast address
# 42: time server
#
dhcp-authoritative
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
#
dhcp-option=lan:0,1,255.255.255.0
#dhcp-option=lan:0,3,192.168.2.1
#dhcp-option=lan:0,6,192.168.2.254
dhcp-option=lan:0,28,192.168.2.255

#addn-hosts=/etc/dnsmasq/hosts
log-dhcp
log-facility=/var/log/dnsmasq/dhcpd/dnsmasq_dhcpd_lan:0.log
pid-file=/var/run/dnsmasq_dhcpd_lan:0.pid

#interface=lan:0

# Pool-Definition:
#dhcp-range=vlan2,<start ip>,<end ip>,<net mask>,<lease time>
dhcp-range=lan:0,192.168.2.101,192.168.2.120,255.255.255.0,24h
dhcp-range=wlan_guest,192.168.179.101,192.168.179.120,255.255.255.0,24h

# Default-Gateway:
#dhcp-option=vlan2,3,<router address on vlan>
dhcp-option=lan:0,3,192.168.2.1
dhcp-option=wlan_guest,3,192.168.179.1

# statische IP:
dhcp-host=lan:0,FC:E9:98:25:BB:0E,gast_1,192.168.2.187,24h
# wlan_guest: 192.168.179.xxx
dhcp-host=wlan_guest,88:32:9B:DD:EE:11,gast_2,192.168.179.188,24h
#
#Clients bekommen als Nameserver 192.168.2.1, 192.168.0.1
#  dhcp-option=lan:0,6,[DNS IP 1],[DNS IP 2]
dhcp-option=lan:0,6,192.168.2.1
dhcp-option=wlan_guest,6,192.168.2.1

WoW Danke, aber ein fehler ist mir aufgefallen:
dhcp-option=wlan_guest,6,192.168.2.1
Müsste da nicht dhcp-option=wlan_guest,6,192.168.179.1 stehen?

Meine Config mit Suchdomänen:
Code:
#From `man dnsmasq`
#-p, --port=<port>
#        Listen on <port> instead of the standard DNS port (53).
#        Setting this to zero completely disables DNS  function,
#        leaving only DHCP and/or TFTP.
#
# general DHCP stuff (see RFC 2132)
#
# 1:  subnet masq
# 3:  default router
# 6:  DNS server
# 12: hostname
# 15: DNS domain (unneeded with option 'domain')
# 28: broadcast address
# 42: time server
#
dhcp-authoritative
dhcp-leasefile=/var/media/ftp/FRITZ/dnsmasq/dnsmasq.leases
#
dhcp-option=lan:0,1,255.255.255.0
#dhcp-option=lan:0,3,192.168.188.1
#dhcp-option=lan:0,6,192.168.188.254
dhcp-option=lan:0,28,192.168.188.255

#addn-hosts=/etc/dnsmasq/hosts
log-dhcp
log-facility=/var/media/ftp/FRITZ/dnsmasq/dnsmasq_dhcpd_lan:0.log
pid-file=/var/run/dnsmasq_dhcpd_lan:0.pid

#interface=lan:0

# Pool-Definition:
#dhcp-range=vlan2,<start ip>,<end ip>,<net mask>,<lease time>
dhcp-range=lan:0,192.168.188.101,192.168.188.200,255.255.255.0,24h
dhcp-range=wlan_guest,192.168.189.101,192.168.189.200,255.255.255.0,24h

# Default-Gateway:
#dhcp-option=vlan2,3,<router address on vlan>
dhcp-option=lan:0,3,192.168.188.1
dhcp-option=wlan_guest,3,192.168.189.1

# statische IP:
#dhcp-host=lan:0,FC:E9:98:25:BB:0E,gast_1,192.168.188.187,24h
# wlan_guest: 192.168.189.xxx
#dhcp-host=wlan_guest,88:32:9B:DD:EE:11,gast_2,192.168.189.188,24h
#
#Clients bekommen als Nameserver 192.168.188.1, 192.168.0.1
#  dhcp-option=lan:0,6,[DNS IP 1],[DNS IP 2]
#dhcp-option=lan:0,6,192.168.188.1,192.168.2.2
dhcp-option=lan:0,6,192.168.188.1
dhcp-option=wlan_guest,6,192.168.189.1
dhcp-option=119,m.geheim.lan,geheim.lan
dhcp-option=15,"m.geheim.lan geheim.lan"
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.