Community discussions

MikroTik App
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Mikrotik DHCP Server Lease problem

Wed Jun 21, 2017 11:25 pm

my MT soft is LQ3R-BR4T
Board Name is RB951Ui-2HnD

i am working with PPPOE Client

lan1 = wan
lan3 = lan
wlan = MT

hotspost + queue

this is my config
# software id = LQ3R-BR4T
#
/interface ethernet
set [ find default-name=ether3 ] l2mtu=1600 name=LAN
set [ find default-name=ether1 ] l2mtu=1600 name=WAN
set [ find default-name=ether2 ] disabled=yes
set [ find default-name=ether4 ] disabled=yes
set [ find default-name=ether5 ] disabled=yes

/interface wireless
set [ find default-name=wlan1 ] disabled=no frequency=2417 l2mtu=1600 mode=\
    ap-bridge name=MT wireless-protocol=802.11

/interface wireless nstreme
set MT enable-nstreme=yes

/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik

/ip hotspot profile
add dns-name=www.msk.net hotspot-address=4.4.4.1 login-by=\
    cookie,http-chap,http-pap name=hsprof1
add dns-name=www.roro.net hotspot-address=192.168.10.1 login-by=\
    cookie,http-chap,http-pap name=hsprof2

/ip hotspot user profile
set [ find default=yes ] shared-users=4
add keepalive-timeout=20m name=FREE rate-limit=64K/64K shared-users=4
add keepalive-timeout=20m name=256 rate-limit=175k/175k
add keepalive-timeout=20m name=512 rate-limit=256k/256k
add keepalive-timeout=20m name=Bad rate-limit=333k/333k shared-users=10

/ip pool
add name=hs-pool-3 ranges=4.4.4.20-4.4.4.200
add name=hs-pool-8 ranges=192.168.10.2-192.168.10.254

/ip dhcp-server
add address-pool=hs-pool-3 disabled=no interface=LAN lease-time=1h name=dhcp1
add address-pool=hs-pool-8 disabled=no interface=MT lease-time=1h name=dhcp2

/ip hotspot
add address-pool=hs-pool-3 disabled=no interface=LAN name=hotspot1 profile=\
    hsprof1
add address-pool=hs-pool-8 disabled=no interface=MT name=hotspot2 profile=\
    hsprof2

/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    default-route-distance=1 dial-on-demand=yes disabled=no interface=WAN \
    keepalive-timeout=600 max-mru=1500 max-mtu=1500 mrru=1600 name=Te-Data \
    password=xxxxxxx profile=default service-name="" use-peer-dns=yes user=\
    xxxxx@xxxxxxx

/queue simple
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-EsLAM target=4.4.4.236/32
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-Amr target=4.4.4.238/32
 
/system logging action
set 2 remember=yes
set 3 remote=0.0.0.0 src-address=0.0.0.0

/ip address
add address=5.5.5.1/24 interface=wan network=5.5.5.0
add address=4.4.4.1/24 interface=LAN network=4.4.4.0
add address=192.168.10.0/24 dns-server=163.121.128.134,163.121.128.135 gateway=\
    192.168.10.1 netmask=24

/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.10.1 name=www.roro.net ttl=5m
/ip firewall filter
add action=return chain=hs-unauth in-interface=LAN
add action=return chain=hs-unauth-to out-interface=LAN
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
    disabled=yes

/ip firewall nat
add action=return chain=hs-unauth in-interface=LAN
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
    disabled=yes
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    to-addresses=0.0.0.0
 
/ip hotspot user
add comment="counters and limits for trial users" name=default-trial
add comment="counters and limits for trial users" disabled=yes name=\
    default-trial
add name=rsrs password=7777
add name=rsrs1 password=7777
add name=rsrs2 password=7777
 
/ip hotspot walled-garden
add comment="place hotspot rules here" disabled=yes
/ip hotspot walled-garden ip
add action=accept disabled=no server=hotspot2
/ip packing
add interface=LAN packing=compress-headers unpacking=compress-headers
add interface=WAN packing=compress-headers unpacking=compress-headers
/ip proxy
set cache-path=web-proxy1
/ip service
set telnet address=4.4.4.0/24 disabled=yes
set www disabled=yes
set ssh disabled=yes
set winbox port=66
set api-ssl disabled=yes
/ip upnp
set allow-disable-external-interface=no
/queue interface
set MT queue=only-hardware-queue
/snmp
set trap-community=public
/system clock
set time-zone-name=Africa/Cairo
/system identity
set name=EgyTik
/system logging
add topics=hotspot
/system ntp client
set enabled=yes primary-ntp=216.228.192.69
[UpDate@EgyTik] > 

my problem is
dhcp server Leases not working with lan

but working with wlan

how to fix that
users on wlan get automatic ip
users on lan can't get automatic ip

so they must use static ip manual in them pc and open mikrotik page manwaly by writting 4.4.4.1 in browswer

but in wlan hotspot page open automatically


and this image for dhcp server lease
You do not have the required permissions to view the files attached to this post.
Last edited by khaloudy on Thu Jun 22, 2017 9:16 pm, edited 2 times in total.
 
ifast
newbie
Posts: 43
Joined: Sun Sep 14, 2014 11:27 am
Location: Pakistan
Contact:

Re: Mikrotik DHCP Server Lease not working on lan out

Wed Jun 21, 2017 11:54 pm

You have to configure 2 DHCP servers for both Lan and Wan Interfaces. You can also set wlan as parent interface in Lan and remove IPs from addresses from that interface. Now your LAN customers also get DHCP IP automatically.

Sent from my SM-N910T using Tapatalk
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease not working on lan out

Thu Jun 22, 2017 12:42 am

You have to configure 2 DHCP servers for both Lan and Wan Interfaces ؟
How can i do DHCP server for WAN?
i have 2 DHCP servers for LAN and WLAN

and where are this step?
((((You can also set wlan as parent interface in Lan and remove IPs from addresses from that interface))))

Please tell me the way!
You do not have the required permissions to view the files attached to this post.
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease not working on lan out

Thu Jun 22, 2017 1:12 am

Please Mikrotik administrator if her help me how to fix this problem !!!
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease not working on lan out

Thu Jun 22, 2017 2:17 am

Up
Up
Up
Help
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease problem

Thu Jun 22, 2017 9:17 pm

any one can help me where is the error?
 
User avatar
amt
Long time Member
Long time Member
Posts: 529
Joined: Fri Jan 16, 2015 2:05 pm

Re: Mikrotik DHCP Server Lease problem

Fri Jun 23, 2017 10:45 am

Hi,

why dont you delete all settings and create bridge add wlan and lan interface to bridge and assign ip to bridge. then create hotspot on bridge interface.

also in your settings;

/ip address
add address=5.5.5.1/24 interface=wan network=5.5.5.0
if you are connecting your device to internet with pppoe_client why you assign ip to your wan interface ?
add address=192.168.10.0/24 dns-server=163.121.128.134,163.121.128.135 gateway=\
192.168.10.1 netmask=24
somtehing wrong in here ?
 
ifast
newbie
Posts: 43
Joined: Sun Sep 14, 2014 11:27 am
Location: Pakistan
Contact:

Re: RE: Re: Mikrotik DHCP Server Lease not working on lan out

Fri Jun 23, 2017 9:05 pm

You have to configure 2 DHCP servers for both Lan and Wan Interfaces ؟
How can i do DHCP server for WAN?
i have 2 DHCP servers for LAN and WLAN

and where are this step?
((((You can also set wlan as parent interface in Lan and remove IPs from addresses from that interface))))

Please tell me the way!
Sorry it was mistyped, I meant the same that you have to create 2 dhcp servers for Lan and Wlan interfaces.

Sent from my SM-N910T using Tapatalk
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 4:16 am

Hi,

why dont you delete all settings and create bridge add wlan and lan interface to bridge and assign ip to bridge. then create hotspot on bridge interface.

also in your settings;

/ip address
add address=5.5.5.1/24 interface=wan network=5.5.5.0
if you are connecting your device to internet with pppoe_client why you assign ip to your wan interface ?
add address=192.168.10.0/24 dns-server=163.121.128.134,163.121.128.135 gateway=\
192.168.10.1 netmask=24
somtehing wrong in here ?

if you are connecting your device to internet with pppoe_client why you assign ip to your wan interface ?
this not for wan ip but static ip work for DVR

i did 2 bridges for lan and w lan and assign ip to bridges but the same problem
no automatic ip for clients
no lease for lan_bridge
 
User avatar
amt
Long time Member
Long time Member
Posts: 529
Joined: Fri Jan 16, 2015 2:05 pm

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 11:31 am

Hi,
Please export your configuration please.
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 2:13 pm

Hi,
Please export your configuration please.


this is my config
export
[Up@Egy] > export
# jul/06/2017 13:59:44 by RouterOS 6.22
# software id = LQ3R-BR4T
#
/interface bridge
add name=BLAN
add name=BVLAN
add name=BWLAN
/interface ethernet
set [ find default-name=ether3 ] name=LAN
set [ find default-name=ether1 ] name=WAN
set [ find default-name=ether2 ] disabled=yes
set [ find default-name=ether4 ] disabled=yes
set [ find default-name=ether5 ] disabled=yes
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no frequency=2417 \
    l2mtu=2290 mode=ap-bridge name=WLAN ssid=Egy \
    wireless-protocol=802.11
/interface vlan
add interface=LAN l2mtu=1594 name=VLAN vlan-id=101
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] login-by=cookie,http-chap,http-pap
add dns-name=www.ask.net hotspot-address=4.4.4.1 name=hsprof1
add dns-name=www.ask.net hotspot-address=5.5.5.1 name=hsprof2
add dns-name=www.ask.net hotspot-address=6.6.6.1 name=hsprof3
/ip hotspot user profile
set [ find default=yes ] shared-users=4
add keepalive-timeout=20m name=FREE rate-limit=64K/64K shared-users=4
add keepalive-timeout=20m name=256 rate-limit=175k/175k
add keepalive-timeout=20m name=512 rate-limit=256k/256k
add keepalive-timeout=20m name=Bad rate-limit=333k/333k shared-users=10
/ip pool
add name=dhcp_pool1 ranges=6.6.6.2-6.6.6.254
add name=dhcp_pool2 ranges=4.4.4.2-4.4.4.254
add name=dhcp_pool3 ranges=5.5.5.2-5.5.5.254
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool1 always-broadcast=yes disabled=no \
    interface=BWLAN lease-time=3d name=dhcp1
add add-arp=yes address-pool=dhcp_pool2 always-broadcast=yes disabled=no \
    interface=BLAN lease-time=3d name=dhcp2
add add-arp=yes address-pool=dhcp_pool3 always-broadcast=yes disabled=no \
    interface=BVLAN lease-time=3d name=dhcp3
/ip hotspot
add address-pool=dhcp_pool2 disabled=no interface=BLAN name=hotspot1 profile=\
    hsprof1
add address-pool=dhcp_pool3 disabled=no interface=BVLAN name=hs-BVLAN profile=\
    hsprof2
add address-pool=dhcp_pool1 disabled=no interface=BWLAN name=hs-BWLAN profile=\
    hsprof3
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    default-route-distance=1 dial-on-demand=yes disabled=no interface=WAN \
    keepalive-timeout=600 max-mru=1480 max-mtu=1480 mrru=1500 name=Te-Data \
    password=9555494 profile=default service-name="" use-peer-dns=no user=\
    2777776@tedata.net.eg
/queue simple
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-EsLAM target=4.4.4.236/32
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-Amr target=4.4.4.238/32
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-Nasser target=4.4.4.130/32
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=SSaid target=4.4.4.216/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=Said target=4.4.4.239/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name="Om Adham" target=4.4.4.237/32
add burst-limit=1k/1k burst-threshold=1k/1k burst-time=1m/1m max-limit=1k/1k \
    name=Soad target=4.4.4.235/32
add burst-limit=512k/512k burst-threshold=512k/512k burst-time=1m/1m max-limit=\
    512k/512k name=allinone target="4.4.4.70/32,4.4.4.71/32,4.4.4.72/32,4.4.4.73\
    /32,4.4.4.74/32,4.4.4.75/32,4.4.4.76/32,4.4.4.77/32,4.4.4.78/32,4.4.4.79/32"
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=blink target=4.4.4.226/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=Essam.Net target=4.4.4.246/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=GBS target=4.4.4.175/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name="Mahmoud CO" target=4.4.4.230/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name="Sh Adel" target=4.4.4.215/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=AhmedAlex target=4.4.4.247/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=Dr target=4.4.4.248/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=Azza target=4.4.4.249/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=TokTok target=4.4.4.242/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name="Moh SS" target=4.4.4.221/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=DVR1 target=4.4.4.229/32
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=DVR2 target=4.4.4.180/32
add burst-limit=225k/225k burst-threshold=225k/225k burst-time=1m/1m max-limit=\
    225k/225k name=30-Hamoty target=4.4.4.66/32
add burst-limit=400k/400k burst-threshold=400k/400k burst-time=1m/1m max-limit=\
    400k/400k name=Maha queue=default/default target=4.4.4.220/32 total-queue=\
    default
add burst-limit=400k/400k burst-threshold=400k/400k burst-time=1m/1m max-limit=\
    400k/400k name=Abou queue=default/default target=4.4.4.245/32 total-queue=\
    default
add burst-limit=444k/444k burst-threshold=444k/444k burst-time=1m/1m max-limit=\
    444k/444k name=Ganat queue=default/default target=4.4.4.184/32 total-queue=\
    default
add burst-limit=333k/333k burst-threshold=333k/333k burst-time=1m/1m max-limit=\
    333k/333k name=Ayman queue=default/default target=4.4.4.225/32 total-queue=\
    default
 
/interface bridge port
add bridge=BLAN interface=LAN
add bridge=BWLAN interface=WLAN
add bridge=BVLAN interface=VLAN
/ip address
add address=4.4.4.1/24 interface=LAN network=4.4.4.0
add address=41.32.207.111/30 interface=WAN network=41.32.207.180  >>static ip for dvr
add address=6.6.6.1/24 interface=WLAN network=6.6.6.0
add address=5.5.5.1/24 interface=VLAN network=5.5.5.0
/ip dhcp-server network
add address=4.4.4.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=4.4.4.1 netmask=24
add address=5.5.5.0/24 gateway=5.5.5.1
add address=6.6.6.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=6.6.6.1 netmask=24
/ip dns
set allow-remote-requests=yes cache-size=4200KiB servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
    disabled=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
    disabled=yes
add action=dst-nat chain=dstnat dst-address=41.32.207.111 dst-port=0-65535 \
    protocol=tcp to-addresses=4.4.4.229 to-ports=0-65535
add action=masquerade chain=srcnat
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=4.4.4.0/24
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=5.5.5.0/24
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=6.6.6.0/24
/ip hotspot ip-binding
add address=4.4.4.130 comment=Nasser mac-address=  to-address=\
    4.4.4.130 type=bypassed
add address=4.4.4.175 comment="Gar Basant" mac-address=  \
    to-address=4.4.4.175 type=bypassed
add address=4.4.4.237 comment="Om Adham" mac-address=  \
    to-address=4.4.4.237 type=bypassed
 
/ip hotspot user
add comment="counters and limits for trial users" name=default-trial
add name=sock password=pa
add name=6 password=66 profile=Bad
add name=sm password=s111 profile=256
add name=st password=s1 profile=256
add name=sv password=s11 profile=256
/ip proxy
set cache-path=web-proxy1
/ip service
set telnet address=4.4.4.0/24 disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set winbox port=2016
set api-ssl disabled=yes
/ip upnp
set allow-disable-external-interface=no
/snmp
set trap-community=public
/system clock
set time-zone-name=Africa/Cairo
/system identity
set name=Egy
/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 Te-Data disabled=yes display-time=5s
set BLAN disabled=yes display-time=5s
set BWLAN disabled=yes display-time=5s
set BVLAN disabled=yes display-time=5s
set WLAN disabled=yes display-time=5s
set WAN disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set LAN disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
set VLAN disabled=yes display-time=5s
/system logging
add topics=hotspot
/system ntp client
set enabled=yes primary-ntp=216.228.192.69
/tool user-manager database
set db-path=user-manager


leases not working with LAN or LAN_BRIDGE
no automatic ip to any client mobile , pc or laptop too

lease working fine with wlan or wlan_bridge
auto ip working fin with wlan or wlan_bridge
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 4:00 pm

Your config appears fine.

What Rotuerboard are you using, and what device are you putting on Eth3 (LAN) to test?
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 8:23 pm

Your config appears fine.

What Rotuerboard are you using, and what device are you putting on Eth3 (LAN) to test?

951Ui-2HnD
LAN3 To Access Point
Access point connected to PC with Cable
and wifi for Mobiles

i can connect only from mikrotik wifi and get auto ip easy
but from access or direct to pc or via switch no auto ip
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 9:02 pm

What happens if you connect your PC, and possibly another test device, directly to Eth 3?
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Mikrotik DHCP Server Lease problem

Thu Jul 06, 2017 10:00 pm

What happens if you connect your PC, and possibly another test device, directly to Eth 3?


trying long time to get ip and fail
if i enter manual ip its working

the same laptop longing automatically via mikrotik wlan
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: Mikrotik DHCP Server Lease problem

Fri Jul 07, 2017 1:13 pm

I would suggest trying a different device in addition to your laptop, and also updating your version of Router OS - 6.39.2 is the latest in current.

I have provisioned your config on a RB951Ui-2HnD I had spare.
I connected a RB2011 to Eth3, and the RB 2011 got an address straight away.