Předně děkuji za rady.
Laborováním jsem zjistil, že problém není v DHCP serveru, ale v mikrotiku jako DNS serveru.
Pokud si ve widlích nastavím ručně adresu, masku a bránu (192.168.200.114/24 gate=192.168.200.1) a ručně nastavím DNS na 192.168.2.1 nebo 192.168.200.1, tak to nefunguje Pokud nastavím DNS 8.8.8.8 tak je to ok. Pokud nastavím ručne adresu 192.168.2.1/24 gate=192.168.2.1 a DNS192.168.2.1 nebo i 192.168.200.1tak vše funguje. Chová se to tak, že když PC požaduje služby DNS a PC je na vlaně tak DNS neodpoví. Pokud je PC na fyzické síti tak je vše v pořádku. Jako by se ta VLANa chovala jinak než fyzická síť. Zkoušel jsem to tak, že jsem virtuálnímu PC (ESXI) přidal dvě síťové karty, jednu v Lan a druhou v VLAN a střídavě jsem je zakazoval nebo povoloval. Ještě mne napadá, že mezi routerem a PC je switch. (CRS328-24P-4S+).
Nastavení mikrotiku:
# jan/02/2022 12:44:32 by RouterOS 7.1.1
# software id = 3598-D9XC
#
# model = 850Gx2
# serial number = 5D3D057C4EE4
/interface bridge
add fast-forward=no name=Lan protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=WanA
set [ find default-name=ether2 ] name=WanB (nezapojeno)
/interface pppoe-client
add add-default-route=yes comment="Pripojeni kInternetu" disabled=no \
interface=WanA keepalive-timeout=60 max-mru=1500 max-mtu=1500 mrru=1600 \
name=pppoe use-peer-dns=yes user=xxxxxxxx
/interface vlan
add interface=Lan name=vlanHost vlan-id=200
/interface bonding
add mode=802.3ad name=bondingSvic slaves=ether5,ether4
/disk
set sd1 disabled=no
set sd1-part1 disabled=no name=disk1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.2.201-192.168.2.254
add name=WifiHost ranges=192.168.200.201-192.168.200.254
/ip dhcp-server
add address-pool=dhcp authoritative=after-10sec-delay bootp-support=none \
interface=Lan lease-time=3d1m name=DHCPLan
add address-pool=WifiHost authoritative=after-10sec-delay bootp-support=none \
interface=vlanHost lease-time=3d2m name=DHCPWiFiHost
/port
set 0 name=serial0
/ppp profile
add change-tcp-mss=yes comment=NaServerPPTPprahaVinicka name=pptpVinicka \
on-down=VinickaKrnovRouteDown on-up="VinickaKrnovRouteUp\r\
\n" only-one=yes use-compression=no use-encryption=yes use-ipv6=no \
use-mpls=no use-upnp=no
/interface pptp-client
add allow=mschap2 comment="Propojeni Na Praha Vinicka" connect-to=\
94.142.xx.xx disabled=no name=pptp-NaVinicka profile=pptpVinicka user=\
S1598xxx
/system logging action
set 3 remote=192.168.2.110 syslog-facility=news
add bsd-syslog=yes name=RemoteCritical remote=192.168.2.110 syslog-severity=\
critical target=remote
add bsd-syslog=yes name=RemoteError remote=192.168.2.110 syslog-severity=\
error target=remote
add bsd-syslog=yes name=RemoteInfo remote=192.168.2.110 syslog-severity=info \
target=remote
add bsd-syslog=yes name=RemoteWaring remote=192.168.2.110 syslog-severity=\
warning target=remote
add bsd-syslog=yes name=RemoteDebug remote=192.168.2.110 syslog-severity=\
debug target=remote
add email-to=sarance@volny.cz name=MailLogin target=email
/user group
set read policy="local,telnet,ssh,read,test,winbox,password,web,sniff,sensitiv\
e,api,romon,tikapp,rest-api,!ftp,!reboot,!write,!policy,!dude"
add name=ucto policy="ssh,read,!local,!telnet,!ftp,!reboot,!write,!policy,!tes\
t,!winbox,!password,!web,!sniff,!sensitive,!api,!romon,!dude,!tikapp,!rest\
-api"
/interface bridge port
add bridge=Lan interface=ether3
add bridge=Lan interface=bondingSvic
/ip settings
set allow-fast-path=no
/ipv6 settings
set disable-ipv6=yes
/ip address
add address=192.168.2.1/24 interface=Lan network=192.168.2.0
add address=192.168.200.1/24 comment=VlanHost200 interface=vlanHost network=\
192.168.200.0
/ip cloud
set update-time=no
/ip dhcp-server config
set store-leases-disk=never
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1 ntp-server=192.168.2.1
add address=192.168.200.0/24 gateway=192.168.200.1 ntp-server=192.168.2.1
/ip dns
set allow-remote-requests=yes query-server-timeout=4s query-total-timeout=20s
/ip dns static
add address=192.168.2.110 name=kamery.s1596.cz
/ip firewall address-list
add address=192.168.2.110 comment="Povolene adresy pro WiFi" list=\
PovolVlan200
add address=192.168.2.15 comment="Povolene adresy pro WiFi" list=PovolVlan200
/ip firewall filter
add action=accept chain=input comment="NTPServer Pristup z venku" disabled=\
yes dst-port=123 in-interface=pppoe protocol=udp
add action=accept chain=input comment="Winbox Pristup z venku" dst-port=8291 \
in-interface=pppoe protocol=tcp
add action=accept chain=input comment="Btest Pristup z venku" disabled=yes \
dst-port=2000 in-interface=pppoe protocol=tcp
add action=accept chain=input comment="Putty Pristup z venku" disabled=yes \
dst-port=22 in-interface=pppoe protocol=tcp
add action=accept chain=input comment="Ping Pristup z venku" in-interface=\
pppoe protocol=icmp
add action=accept chain=input comment="Ping z venku SysDataCom" in-interface=\
WanA protocol=icmp
add action=accept chain=input comment="HTTP Pristup z venku" disabled=yes \
dst-port=80 in-interface=pppoe protocol=tcp
add action=accept chain=input comment=\
"Neighbour-discovery Pristup z SysDataCom" dst-port=5678 in-interface=\
WanA protocol=udp
add action=accept chain=input comment="Povoluji vse z vnitrni site" \
in-interface=Lan
add action=accept chain=input comment="VlanHost DNS" in-interface=vlanHost \
log-prefix=xx protocol=udp (tady jsem zkusil pvolit všechno, ale nepomohhlo to)
add action=accept chain=input comment="Vytvorene spojeni (hlavne tunely)" \
connection-state=established,related
add action=drop chain=input comment="default configuration" in-interface=\
pppoe
add action=drop chain=input in-interface=WanA
add action=drop chain=input comment="Drop Invald" connection-state=invalid
add action=drop chain=input comment=DropVse log-prefix=DropVseImput15
add action=accept chain=forward comment="VoIP Sip" connection-state=\
established,related connection-type=sip
add action=accept chain=forward comment=\
"Povoluji pristup do Krnova vytvorena spojeni" connection-state=\
established,related dst-address=192.168.25.0/24 in-interface=Lan \
log-prefix=Krnov src-address=192.168.2.0/24
add action=drop chain=forward comment="Blokuji vse z Krnova" disabled=yes \
dst-address=192.168.2.0/24 out-interface=Lan src-address=192.168.25.0/24
add action=accept chain=forward comment="Povoluji JS Na S1596" dst-address=\
192.168.1.152 in-interface=Lan protocol=tcp src-address=192.168.2.110 \
src-port=3454
add action=drop chain=forward comment="Blokuji vse z JS" dst-address=\
192.168.1.152 in-interface=Lan
add action=accept chain=forward comment="vlanHost Povoli Vybrane Adresy" \
dst-address-list=PovolVlan200 in-interface=vlanHost log-prefix=vlan \
out-interface=Lan
add action=accept chain=forward comment="vlanHost jen Internet" in-interface=\
vlanHost out-interface=pppoe
add action=drop chain=forward comment="vlanHost jen Internet" in-interface=\
vlanHost log-prefix=vlan out-interface=Lan
add action=accept chain=forward comment="default configuration" \
connection-state=established,related log-prefix=test
add action=drop chain=forward comment="default configuration" \
connection-nat-state=!dstnat connection-state=new in-interface=pppoe \
log-prefix=test
add action=drop chain=forward comment="default configuration Invalid" \
connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=pppoe
/ip firewall service-port
set sip ports=5060,5061,5004
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip route
add comment="Smeruje na PCR" disabled=no dst-address=10.0.0.0/8 gateway=\
192.168.2.4 routing-table=main suppress-hw-offload=no
add comment=NaPrahaVinickaScript dst-address=192.168.1.0/24 gateway=\
pptp-NaVinicka
add comment="Krnov Pres Prahu Script" dst-address=192.168.25.0/24 gateway=\
pptp-NaVinicka
add comment="Vlana 100 v Praze Script" dst-address=192.168.100.0/24 gateway=\
pptp-NaVinicka
/snmp
set contact="Nemec tel 604541684" enabled=yes location="Smetanova XXX XXX"
/system clock
set time-zone-autodetect=no
/system clock manual
set time-zone=+01:00
/system identity
set name=SXXX_XXXX
/system logging
set 0 action=RemoteInfo
set 1 action=RemoteError
set 2 action=RemoteWaring
set 3 action=RemoteCritical
add action=RemoteDebug topics=firewall
add action=MailLogin topics=critical
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes
/system ntp client servers
add address=195.113.144.201
/system routerboard settings
set boot-delay=9s enter-setup-on=delete-key
/system script
add dont-require-permissions=no name=PosliMail owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
local sysname\r\
\n:local time\r\
\n:local date\r\
\n:set sysname [/system identity get name]\r\
\n:set time [/system clock get time]\r\
\n:set date [/system clock get date]\r\
\n/tool e-mail send to=sarance@volny.cz subject=(\"Login Nemec \".\$sysnam\
e) body=(\"Nemec log In \" . \$date . \" \" . \$time)"
add dont-require-permissions=no name=VinickaRouteUp owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="i\
p route add dst-address=192.168.1.0/24 gateway=pptp-NaVinicka comment=\"Na\
PrahaVinickaScript\"\r\
\n\r\
\n\r\
\n"
add dont-require-permissions=no name=KrnovRouteDown owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
"ip route remove [find dst-address=\"192.168.25.0/24\"]\
\n\
\n\r\
\n"
add dont-require-permissions=no name=KrnovRouteUp owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="i\
p route add dst-address=192.168.25.0/24 gateway=pptp-NaVinicka comment=\"\
Krnov Pres Prahu Script\"\r\
\n"
add dont-require-permissions=no name=VinickaRouteDown owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
"ip route remove [find dst-address=\"192.168.1.0/24\"]\
\n\
\n\r\
\n"
add comment="Skript prida routu Na Vinicku a do Krnova" \
dont-require-permissions=no name=VinickaKrnovRouteUp owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="i\
p route add dst-address=192.168.1.0/24 gateway=pptp-NaVinicka comment=\"Na\
PrahaVinickaScript\"\r\
\nip route add dst-address=192.168.25.0/24 gateway=pptp-NaVinicka comment\
=\"Krnov Pres Prahu Script\"\r\
\nip route add dst-address=192.168.100.0/24 gateway=pptp-NaVinicka commen\
t=\"Vlana 100 v Praze Script\"\r\
\n"
add comment="Skript odebere routu na Vinicku a do Krnova" \
dont-require-permissions=no name=VinickaKrnovRouteDown owner=admin \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
source="ip route remove [find dst-address=\"192.168.1.0/24\"]\
\n\
\n\r\
\nip route remove [find dst-address=\"192.168.25.0/24\"]\
\n\
\n\r\
\nip route remove [find dst-address=\"192.168.100.0/24\"]\
\n\
\n\r\
\n"
/tool bandwidth-server
set authenticate=no
/tool graphing
set store-every=24hours
/tool graphing interface
add interface=pppoe