DCHP server will not give ip-adres to pc

we had configure our router with a DCHP on the LAN site (2), client DHCP on the WAN port (1) and we have a wifi with DHCP.

When we connect us to the wifi, he give us a IP from the DHCP.
But when we connect a device to the LAN port, we don’t receive an ip-adres.
We see also that the router try to give an IP-adres. (192.168.88.xx)

We had try different options in the DHCP server of the Mikrotik router, but every time we don’t receive an IP.
When we configure our device with an Static IP, we have access to everything (other lan devices, internet on the WANport,…)

We had also look on the internet, youtube,… but we cannot correct our issue.

Hereby we send our script.

Who can help us with our issue?

script:

# jan/28/2014 22:20:29 by RouterOS 6.7
# software id = AXRZ-CETT
#
/interface ethernet
set [ find default-name=ether1 ] mtu=1472 name=ether1-WAN
set [ find default-name=sfp1 ] name=sfp1-gateway
/interface bridge
add admin-mac=D4:CA:6D:8A:93:65 auto-mac=no name=bridge-Hotspot \
    protocol-mode=rstp
add admin-mac=D4:CA:6D:8A:93:63 auto-mac=no name=bridge-Wireless-AP \
    protocol-mode=rstp
add admin-mac=D4:CA:6D:8A:93:62 auto-mac=no l2mtu=1598 name=bridge-lan \
    protocol-mode=rstp
/ip neighbor discovery
set ether1-WAN discover=no
set sfp1-gateway discover=no
/interface vlan
add interface=ether1-WAN l2mtu=1594 name=vlan_100_tv vlan-id=100
add interface=ether1-WAN l2mtu=1594 name=vlan_200_phone vlan-id=200
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    group-ciphers=tkip,aes-ccm mode=dynamic-keys unicast-ciphers=tkip,aes-ccm \
    wpa-pre-shared-key=123456789 wpa2-pre-shared-key=123456789
add authentication-types=wpa-psk,wpa2-psk eap-methods="" group-ciphers=\
    tkip,aes-ccm name=sec_profile_hotspot_No_Security unicast-ciphers=\
    tkip,aes-ccm wpa-pre-shared-key=123456789 wpa2-pre-shared-key=123456789
add authentication-types=wpa-psk,wpa2-psk eap-methods="" group-ciphers=\
    tkip,aes-ccm mode=dynamic-keys name=sec_profile_WPA2_PSK unicast-ciphers=\
    tkip,aes-ccm wpa-pre-shared-key=123456789 wpa2-pre-shared-key=123456789
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=\
    20/40mhz-ht-above country=belgium disabled=no distance=indoors l2mtu=2290 \
    mode=ap-bridge name=wlan-main security-profile=sec_profile_WPA2_PSK ssid=\
    WLAN-7 wireless-protocol=802.11
add disabled=no l2mtu=2290 mac-address=D6:CA:6D:8A:93:6B master-interface=\
    wlan-main name=wlan-hotspot security-profile=\
    sec_profile_hotspot_No_Security ssid=hotspot-rutten wds-cost-range=0 \
    wds-default-cost=0
/ip dhcp-server
add interface=sfp1-gateway name=dhcp1
/ip dhcp-server option
add code=121 name=classless value=0x18A000000A016501000A016501
/ip hotspot profile
add dns-name=hotspot.login hotspot-address=192.168.95.1 name=\
    hotspot_profile_rutten
/ip hotspot user profile
set [ find default=yes ] mac-cookie-timeout=3d name=\
    hotspot_userprofile_default session-timeout=30m
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=dhcp_pool_lan ranges=192.168.88.100-192.168.88.150
add name=dhcp_pool_Wireless_AP ranges=192.168.90.100-192.168.90.150
add name=dhcp_pool_hotspot ranges=192.168.95.100-192.168.95.150
add name=dhcp_pool1 ranges=192.168.128.2-192.168.128.254
/ip dhcp-server
add address-pool=dhcp_pool_lan bootp-lease-time=lease-time bootp-support=\
    dynamic disabled=no interface=bridge-lan name=dhcp_server_lan relay=\
    192.168.88.1
add address-pool=dhcp_pool_Wireless_AP disabled=no interface=\
    bridge-Wireless-AP name=dhcp_server_Wireless_AP
add address-pool=dhcp_pool_hotspot disabled=no interface=bridge-Hotspot name=\
    dhcp_server_hotspot
/ip hotspot
add address-pool=dhcp_pool_hotspot idle-timeout=none interface=bridge-Hotspot \
    name=hotspot_server
add address-pool=dhcp_pool_hotspot disabled=no interface=bridge-Hotspot name=\
    hotspot_rutten profile=hotspot_profile_rutten
/port
set 0 name=serial0
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
set 3 remote=192.168.88.149
add email-to=G.Onkelinx@gmail.com name=email target=email
/tool traffic-generator port
add interface=ether1-WAN name=port1
/interface bridge port
add bridge=bridge-lan interface=ether2
add bridge=bridge-lan interface=ether3
add bridge=bridge-lan interface=ether4
add bridge=bridge-lan interface=ether5
add bridge=bridge-lan interface=ether6
add bridge=bridge-Wireless-AP interface=wlan-main
add bridge=bridge-Hotspot interface=wlan-hotspot
add bridge=bridge-lan interface=ether7
add bridge=bridge-lan interface=ether8
add bridge=bridge-Hotspot interface=ether10
add bridge=bridge-lan interface=ether9
/interface ethernet switch vlan
add disabled=yes ports=ether1-WAN switch=switch1 vlan-id=100
/interface wireless access-list
add mac-address=34:C0:59:47:07:B2
/ip accounting
set account-local-traffic=yes enabled=yes
/ip address
add address=192.168.88.1/24 comment="default configuration" interface=\
    bridge-lan network=192.168.88.0
add address=192.168.90.1/24 interface=wlan-main network=192.168.90.0
add address=192.168.95.1/24 interface=bridge-Hotspot network=192.168.95.0
/ip dhcp-client
add comment="default configuration" dhcp-options=hostname,clientid interface=\
    sfp1-gateway
add comment="default configuration" dhcp-options=hostname,clientid disabled=\
    no interface=ether1-WAN
add default-route-distance=0 dhcp-options=hostname,clientid interface=\
    bridge-lan
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
    192.168.88.1,8.8.8.8,195.130.130.3 domain=Dhome gateway=192.168.88.1 \
    netmask=24
add address=192.168.90.0/24 dns-server=192.168.90.1 gateway=192.168.90.1 \
    netmask=24
add address=192.168.95.0/24 dns-server=192.168.95.1 gateway=192.168.95.1 \
    netmask=24
add address=192.168.128.0/24 gateway=192.168.128.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=drop chain=input comment=\
    "Block hotspot has access to other networks" dst-address=192.168.88.0/24 \
    src-address=192.168.95.0/24
add action=drop chain=input dst-address=192.168.90.0/24 src-address=\
    192.168.95.0/24
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add action=drop chain=input comment="default configuration" in-interface=\
    sfp1-gateway
add action=drop chain=input comment="default configuration" in-interface=\
    ether1-WAN
add chain=forward comment="default configuration" connection-state=\
    established
add chain=forward comment="default configuration" connection-state=related
add action=drop chain=forward comment="default configuration" \
    connection-state=invalid
add action=drop chain=forward comment="Blocking UDP Packets" dst-port=69 \
    protocol=udp
add action=drop chain=forward dst-port=111 protocol=udp
add action=drop chain=forward dst-port=135 protocol=udp
add action=drop chain=forward dst-port=137-139 protocol=udp
add action=drop chain=forward dst-port=2049 protocol=udp
add action=drop chain=forward dst-port=3133 protocol=udp
add action=drop chain=forward comment="Blocking TCP Packets" dst-port=69 \
    protocol=tcp
add action=drop chain=forward dst-port=111 protocol=tcp
add action=drop chain=forward dst-port=119 protocol=tcp
add action=drop chain=forward dst-port=135 protocol=tcp
add action=drop chain=forward dst-port=137-139 protocol=tcp
add action=drop chain=forward dst-port=445 protocol=tcp
add action=drop chain=forward dst-port=2049 protocol=tcp
add action=drop chain=forward dst-port=12345-12346 protocol=tcp
add action=drop chain=forward dst-port=20034 protocol=tcp
add action=drop chain=forward dst-port=3133 protocol=tcp
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="default configuration" disabled=\
    yes out-interface=sfp1-gateway
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-WAN
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=192.168.95.0/24 to-addresses=0.0.0.0
add chain=hs-unauth
/ip hotspot user
add name=admin password=12345
add email=G.Onkelinx@gmail.com name=GOnkelinx password=123456 server=\
    hotspot_rutten
/ip hotspot walled-garden
add comment="place hotspot rules here" disabled=yes
/ip hotspot walled-garden ip
add action=accept disabled=yes dst-host=www.google.com dst-port=80 protocol=\
    tcp server=hotspot_rutten
/ip proxy
set parent-proxy=0.0.0.0
/ip smb
set enabled=yes
/ip traffic-flow
set enabled=yes
/lcd pin
set hide-pin-number=yes
/lcd interface
set sfp1-gateway interface=sfp1-gateway
set ether1-WAN interface=ether1-WAN
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10
set wlan-main interface=wlan-main
add interface=wlan-hotspot
/lcd interface pages
set 0 interfaces=sfp1-gateway
/radius
add address=192.168.88.2 disabled=yes
/snmp
set contact=Onkelinx enabled=yes location=Home trap-community=public
/system clock
set time-zone-name=CET
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set bridge-lan disabled=no display-time=5s
set bridge-Wireless-AP disabled=no display-time=5s
set bridge-Hotspot disabled=no display-time=5s
set wlan-main disabled=no display-time=5s
set sfp1-gateway disabled=yes display-time=5s
set ether1-WAN disabled=no display-time=5s
set ether2 disabled=yes display-time=5s
set ether3 disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
set ether6 disabled=yes display-time=5s
set ether7 disabled=yes display-time=5s
set ether8 disabled=yes display-time=5s
set ether9 disabled=yes display-time=5s
set ether10 disabled=yes display-time=5s
set wlan-hotspot disabled=no display-time=5s
set vlan_100_tv disabled=yes display-time=5s
set vlan_200_phone disabled=yes display-time=5s
/system leds
add disabled=yes leds="" type=flash-access
/system logging
add action=remote prefix="dhcp: " topics=dhcp
add action=remote prefix="errors: " topics=critical,error,warning
add action=remote prefix="debug: " topics=debug
/system ntp client
set enabled=yes primary-ntp=193.190.230.65 secondary-ntp=195.13.1.153
/system ntp server
set enabled=yes
/system routerboard settings
set boot-delay=5s

/tool graphing interface
add
/tool graphing queue
add
/tool graphing resource
add
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether9
add interface=wlan-main
add interface=bridge-lan
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether9
add interface=wlan-main
add interface=bridge-lan
/tool netwatch
add host=192.168.10.20
add host=192.168.10.22
add host=8.8.8.8
/tool traffic-generator packet-template
add data=random name=packet-template1
/tool traffic-generator stream
add id=1 name=str1 packet-size=1500 port=port1 tx-template=packet-template1

See below my comments:

  • I see some weird config regarding the wireless. I see you have a bridge with only the wlan-main interface as member. You configured the DHCP server for it to the bridge, but the IP address is on the wlan-main interface. That is wrong. Please put the IP address on the bridge too. Or remove the bridge and put the DHCP server on the wlan-main interface.
  • Is the DHCP server on your sfp interface needed, if not remove it
  • Remove the DHCP client on your bridge-lan

We could not understand what is wrong, please tell us where it goes wrong in the script.

→ I see you have a bridge with only the wlan-main interface as member.
we having 3 different bidges connected to 3 different DHCP servers

→ You configured the DHCP server for it to the bridge, but the IP address is on the wlan-main interface. That is wrong.
We cannot find where in the script where the LAN bridge was connect to the IP address of the wlan-main interface

We could not understand what is wrong, please tell us where it goes wrong in the script.

→ I see you have a bridge with only the wlan-main interface as member.
we having 3 different bidges connected to 3 different DHCP servers

→ You configured the DHCP server for it to the bridge, but the IP address is on the wlan-main interface. That is wrong.
We cannot find where in the script where the LAN bridge was connect to the IP address of the wlan-main interface

IP adress is tied to wlan-main, but DHCP server is tied to bridge-wlan

Sorry but we cannot find in the script where it goes wrong

add address=192.168.88.1/24 interface=bridge-lan network=192.168.88.0
add address=192.168.90.1/24 interface=wlan-main network=192.168.90.0
add address=192.168.95.1/24 interface=bridge-Hotspot network=192.168.95.0

The DHCP on the ‘wlan-main’ and ‘bridge-Hotspot’ works fine, but we have a issue with the DHCP server of > ‘bridge-lan’ > 192.168.88.0/24

Please can you indicate in the script what is wrong?

So we have simplify the script:

DHCP don’t works, cannot release an ip address on device (192.168.88.0/24)

The Wan-port is connectec to another internet router where we will become the ip adress from.
Also the Wireless connection are disable

can you tell us where it goes wrong in the script (tell me which ligne in script)




# jan/01/2002 02:00:02 by RouterOS 6.7
# software id = AXRZ-CETT
#
/interface ethernet
set [ find default-name=ether1 ] mtu=1472 name=ether1-WAN
set [ find default-name=sfp1 ] disabled=yes name=sfp1-gateway
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n bridge-mode=disabled \
    channel-width=20/40mhz-ht-above country=belgium distance=indoors l2mtu=\
    2290 mode=ap-bridge name=wlan-main ssid="" wireless-protocol=802.11
/ip neighbor discovery
set ether1-WAN discover=no
set sfp1-gateway discover=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
    group-ciphers=tkip,aes-ccm mode=dynamic-keys unicast-ciphers=tkip,aes-ccm \
    wpa-pre-shared-key=123456789 wpa2-pre-shared-key=123456789
/ip hotspot user profile
set [ find default=yes ] mac-cookie-timeout=3d name=\
    hotspot_userprofile_default session-timeout=30m
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=dhcp_pool_lan ranges=192.168.88.100-192.168.88.150
/ip dhcp-server
add address-pool=dhcp_pool_lan disabled=no interface=ether2 name=\
    dhcp_server_lan
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
set 3 remote=192.168.88.149
add email-to=G.Onkelinx@gmail.com name=email target=email
/interface bridge port
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether10
add interface=ether9
/ip accounting
set account-local-traffic=yes
/ip address
add address=192.168.88.1/24 comment="default configuration" interface=ether2 \
    network=192.168.88.0
/ip dhcp-client
add comment="default configuration" dhcp-options=hostname,clientid interface=\
    sfp1-gateway
add comment="default configuration" dhcp-options=hostname,clientid disabled=\
    no interface=ether1-WAN
add default-route-distance=0 dhcp-options=hostname,clientid
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
    8.8.8.8,195.130.130.3 gateway=192.168.88.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add chain=forward comment="default configuration" connection-state=\
    established
add chain=forward comment="default configuration" connection-state=related
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-WAN
/ip hotspot service-port
set ftp disabled=yes
/ip proxy
set parent-proxy=0.0.0.0
/ip smb
set enabled=yes
/ip traffic-flow
set enabled=yes
/lcd pin
set hide-pin-number=yes
/lcd interface
set sfp1-gateway interface=sfp1-gateway
set ether1-WAN interface=ether1-WAN
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10
set wlan-main interface=wlan-main
add
/lcd interface pages
set 0 interfaces=sfp1-gateway
/radius
add address=192.168.88.2 disabled=yes
/snmp
set contact=Onkelinx location=Home trap-community=public
/system clock
set time-zone-name=CET
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set wlan-main disabled=yes display-time=5s
set sfp1-gateway disabled=yes display-time=5s
set ether1-WAN disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set ether3 disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
set ether6 disabled=yes display-time=5s
set ether7 disabled=yes display-time=5s
set ether8 disabled=yes display-time=5s
set ether9 disabled=yes display-time=5s
set ether10 disabled=yes display-time=5s
/system leds
add disabled=yes leds="" type=flash-access
/system logging
add action=remote prefix="dhcp: " topics=dhcp
add action=remote prefix="errors: " topics=critical,error,warning
add action=remote prefix="debug: " topics=debug
/system ntp client
set primary-ntp=193.190.230.65 secondary-ntp=195.13.1.153
/system routerboard settings
set boot-delay=5s
/system watchdog
set auto-send-supout=yes watchdog-timer=no
/tool e-mail
set from="" start-tls=yes
/tool graphing interface
add
/tool graphing queue
add
/tool graphing resource
add
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether9
add interface=wlan-main
add
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2
add interface=ether3
add interface=ether4
add interface=ether5
add interface=ether6
add interface=ether7
add interface=ether8
add interface=ether9
add interface=wlan-main
add
/tool traffic-generator stream
add id=1 name=str1 packet-size=1500 port="(unknown)"

You put all the ether ports in the bridge but IP address and DHCP server is configured on ether2. Both should be on the bridge, which I do not see created in the config either.

Please don’t use the second script more, but use my first script.

please tell my where in the script it going wrong. (line number or instruction,…)