Community discussions

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

QOS fail with hotspot

Sun May 22, 2011 8:31 pm

hi sir
i work with mikrotik hotspot (work with ip+name+mac+pass)
firewall
1 (nat) general=srcnat action= masquerade
2 (mangle) /ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all passthrough=no

lan = 192.168.16.1
wan = 192.168.1.1

dsl line = 1024 / 256
pppoe-client

============================================
this is my QoS


/queue type add name="PCQ_download" kind=pcq pcq-rate=1024000 pcq-classifier=dst-address
/queue type add name="PCQ_upload" kind=pcq pcq-rate=256000 pcq-classifier=src-address
********

/queue tree add parent=global-in queue=PCQ_download packet-mark=all
/queue tree add parent=global-out queue=PCQ_upload packet-mark=all

*******
/queue simple add queue=PCQ_upload/PCQ_download target-addresses=192.168.16.0/24

where's my problem ?
1- clients login and others can't login
when i remove (mac) login by mac >>>>>>>>>>>>>>>> all users easly login

2- i want Bandwidth Equal between Users like the image i upload like this:--

one user on line will get 1024/256
if another user become online i want 1024/256 divide to 2 (1024/256 / 2 = 512/128)
if they 7 users become online i want 1024/256 divide to 7 (1024/256 / 7 = 146/36)

please help me where's my error
best regards
You do not have the required permissions to view the files attached to this post.
Last edited by khaloudy on Sun May 22, 2011 9:23 pm, edited 1 time in total.
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Sun May 22, 2011 8:32 pm

please i want my QoS like the image up

and what about hotspot rate
did i will use it when i use QoS or leave it empty ?
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Sun May 22, 2011 11:23 pm

Please Heeeeeeeeeeeeeeeeeeeeeelp
some users login and others can't
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: QOS fail with hotspot

Sun May 22, 2011 11:47 pm

For the QoS portion, follow the diagram you quoted. Make two PCQ types as you already have and set their pcq-rate value to 0, just like the manual says. Then set the max-limit on the upload queue to your upload DSL speed, and the max-limit on the download queue to your download DSL speed. Just like the manual you already found says to do.

You didn't post nearly enough information to troubleshoot authentication issues. Step one: add a logging topic for 'hotspot', either to disk or to memory. Then watch users try to authenticate and fail. What do the logs say?
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Mon May 23, 2011 12:47 am

i am sorry sir i am not good in mikrotik and english too
i will tell you how i configured mikrotik from the beginning...

sys reset -- y
log to mikrotik via winbox
interfaces
Ethernet 1 = wan
Ethernet 2= lan
+ PPPoE Clent as wan and i add username and password for ISP

ip > Addresses > add 192.168.16.1/24 (lan)
ip > Hotspot > servers > setup >>>>>>>>lan >>>>>> successes
change address per mac (2) to (1)

mikrotik auto add to me dns , pool and DHCP server

firewall > nat > add from general=srcnat from action=masquerade

and add this rowls for QOS

=====================>
/ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all passthrough=no

/queue type add name="PCQ_download" kind=pcq pcq-rate=1024000 pcq-classifier=dst-address
/queue type add name="PCQ_upload" kind=pcq pcq-rate=128000 pcq-classifier=src-address

/queue tree add parent=global-in queue=PCQ_download packet-mark=all
/queue tree add parent=global-out queue=PCQ_upload packet-mark=all

/queue simple add queue=PCQ_upload/PCQ_download target-addresses=192.168.16.0/24

===================================
this is my config for mikrotik
no thing else
please re correct to me the error
by exampls rolls pleaseeeee
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: QOS fail with hotspot

Mon May 23, 2011 12:56 am

/queue type
set [find name=PCQ_download] pcq-rate=0
set [find name=PCQ_upload] pcq-rate=0
/queue tree
set [find queue=PCQ_download] max-limit=1024000
set [find queue=PCQ_upload] max-limit=256000
That should fix QoS. You probably want to start hitting the manuals, though. This is very basic stuff and explained very well in the manuals. I realize you're new to the product, but you are providing a service to users. Make sure it works right in a lab or on a bench before putting users behind it.

Authentication:
/system logging
add action=memory topic=hotspot
Then watch the log files via the "Log" button in winbox, or via "/log print" in the terminal. See what errors get logged when someone can't authenticate.
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Mon May 23, 2011 3:26 am

thank you sir for help me to fix my problem
this is my prints
/ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=192.168.16.1/24 network=192.168.16.0 broadcast=192.168.16.255 interface=LAN actual-interface=LAN

1 address=192.168.1.99/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN actual-interface=WAN

2 D address=41.34.252.252/32 network=163.121.171.49 broadcast=0.0.0.0 interface=ADSL actual-interface=ADSL
******************
/ip route print detail
*************************************
[admin@MikroTik] > /ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf
0 ADC dst-address=163.121.171.49/32 pref-src=41.34.252.252 interface=ADSL scope=10 target-scope=0

1 ADC dst-address=192.168.1.0/24 pref-src=192.168.1.99 interface=WAN scope=10 target-scope=0

2 ADC dst-address=192.168.16.0/24 pref-src=192.168.16.1 interface=LAN scope=10 target-scope=0

3 AD dst-address=0.0.0.0/0 gateway=163.121.171.49 interface=ADSL gateway-state=reachable distance=1 scope=30
target-scope=10
*************************
[admin@MikroTik] > /interface print
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R WAN ether 0 0 1500
1 R LAN ether 0 0 1500
2 R ADSL pppoe-out 0 0 1480
***************************


/ ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=user-con passthrough=yes comment="user \
connection" disabled=no
add chain=forward connection-mark=user-con action=mark-packet new-packet-mark=users passthrough=no \
comment="speed" disabled=no
/ ip firewall nat
add chain=srcnat action=masquerade comment="" disabled=no
/ ip firewall connection tracking
set enabled=yes tcp-syn-sent-timeout=5s tcp-syn-received-timeout=5s tcp-established-timeout=1d \
tcp-fin-wait-timeout=10s tcp-close-wait-timeout=10s tcp-last-ack-timeout=10s tcp-time-wait-timeout=10s \
tcp-close-timeout=10s udp-timeout=10s udp-stream-timeout=3m icmp-timeout=10s generic-timeout=10m \
tcp-syncookie=no
/ ip firewall filter
/ ip firewall service-port
set ftp ports=21 disabled=no
set tftp ports=69 disabled=no
set irc ports=6667 disabled=no
set h323 disabled=yes
set quake3 disabled=no
set gre disabled=yes
set pptp disabled=yes
**************************
this is my accurate network diagram.
1-Repotec router (Bridge)
2- Mikrotik os
3- hup1 ( mypc - access point= 3 clients wirless - hup2=3clients wired
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: QOS fail with hotspot

Mon May 23, 2011 3:28 am

My forum signature has nothing to do with your problem. That information doesn't help here.

Does QoS work now after the changes?
What do the logs say for authentication failure?
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Mon May 23, 2011 3:29 am

this print after i use your fix rolls
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: QOS fail with hotspot

Mon May 23, 2011 3:36 am

now i am alone online
i will wait users when they log tomorrow
i hope they work good
i am working good now