PDA

Επιστροφή στο Forum : Εδώ μιλάμε για Mikrotik RouterBoard



Σελίδες : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 [76] 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170

teodor_ch
11-06-17, 22:46
Όταν κάνεις επανεκκίνηση το modem πέφτει και η ether του που είναι συνδεδεμένη με το ΜΤ.
Οπότε το ΜΤ χάνει την φυσική σύνδεση με το modem και σου ρίχνει τον pppoe client.
Αν χάσει όμως τον συγχρονισμό πχ αποσυνδέσεις το καλώδιο της τηλεφωνίας... δεν είναι το ίδιο.
Η ether με το ΜΤ παραμένει ενεργή και ο μόνος τρόπος για να πέσει ο pppoe client είναι είτε χειροκίνητα, είτε μέσω keep alive.

δοκίμασα να αλλάξω τo adsl mode/type το οποίο ρίχνει το adsl link
και το μικροτικ δεν κατάλαβε ότι έπεσε η σύνδεση
αλλά σε 10-15" είχε ξανασυγχρονίσει
και χωρίς να αλλάξει το connected στο pppoe-out είχα ίντερνετ χωρίς να αλλάξει και το Link down
δηλαδή συνέχισα να έχω ίντερνετ χωρίς να γίνει νέα pppoe κλήση!

deniSun
12-06-17, 17:08
δοκίμασα να αλλάξω τo adsl mode/type το οποίο ρίχνει το adsl link
και το μικροτικ δεν κατάλαβε ότι έπεσε η σύνδεση
αλλά σε 10-15" είχε ξανασυγχρονίσει
και χωρίς να αλλάξει το connected στο pppoe-out είχα ίντερνετ χωρίς να αλλάξει και το Link down
δηλαδή συνέχισα να έχω ίντερνετ χωρίς να γίνει νέα pppoe κλήση!

Αν παρατηρήσεις σου κρατάει και την public ip.
Που σημαίνει ότι στην εξαιρετική περίπτωση που θα την έχει πάρει κάποιος άλλος στο διάστημα του επανασυγχρονισμού, θα έχεις conflict και δεν θα μπορείς να βγεις προς τα έξω.
Μου είχε τύχει 1-2 φορές όταν είχα απενεργοποιημένο το keep alive.
Γι αυτό χρειάζεται μικρός χρόνος στο keep alive ώστε να αντιλαμβάνεται τις τέτοιου είδους αλλαγές.

- - - Updated - - -

Newsletter 76 (https://forum.mikrotik.com/viewtopic.php?f=21&t=122502)
Εντυπωσιακό το RB1100AHx4 Dude Edition με διπλό τροφοδοτικό και ssd.
Μουράτο το hAP mini.
Πολύ καλό το CRS326-24G-2S+RM με dual boot ROS/SwOS.
Δεν βλέπω κάτι για Ελλάδα στις μέχρι τώρα MUM.

teodor_ch
13-06-17, 15:53
έχω το ΜΚ να κάνει την pppoe-out κλήση

έστησα ένα VM στο server στο σπίτι με OPNsense για δοκιμές
με wan IP 192.168.1.50
lan 192.168.1.51

λογικά γίνεται να δρομολογώ όλη την 0.0.0.0/0 κίνηση μέσω πχ. της 192.168.1.50
και να βγαίνει απο την 192.168.1.51 για να περνάει ξανά στο ΜΚ και να βγαίνει απο την pppoe-out

(θα μπορούσα να βάλω να κάνει την κλήση το opnsense αλλά το μπλέκω περισσότερο νομίζω)

σωστά?

deniSun
13-06-17, 17:08
έχω το ΜΚ να κάνει την pppoe-out κλήση

έστησα ένα VM στο server στο σπίτι με OPNsense για δοκιμές
με wan IP 192.168.1.50
lan 192.168.1.51

λογικά γίνεται να δρομολογώ όλη την 0.0.0.0/0 κίνηση μέσω πχ. της 192.168.1.50
και να βγαίνει απο την 192.168.1.51 για να περνάει ξανά στο ΜΚ και να βγαίνει απο την pppoe-out

(θα μπορούσα να βάλω να κάνει την κλήση το opnsense αλλά το μπλέκω περισσότερο νομίζω)

σωστά?

Γιατί όλο αυτό;
Για δοκιμές;

macro
13-06-17, 17:15
Για να κανει traffic shaping μεσω αυτου.:hmm:

deniSun
13-06-17, 19:51
Γιατί όχι με το ΜΤ;

macro
13-06-17, 19:54
ε τωρα και εσυ...... ξυνεις πληγες:whistle:

deniSun
13-06-17, 20:54
ε τωρα και εσυ...... ξυνεις πληγες:whistle:

Λέμε τώρα...
Μιας και γράφουμε στο topic του ΜΤ.

gfdimopo
14-06-17, 09:45
Χρησιμοποιεί κανείς απο εσάς τα γραφήματα που προσφέρει το mikrotik?

Υπάρχει κανένας οδηγός για το πως τα παραμετροποιούμε?

minas
14-06-17, 09:54
Χρησιμοποιεί κανείς απο εσάς τα γραφήματα που προσφέρει το mikrotik?

Υπάρχει κανένας οδηγός για το πως τα παραμετροποιούμε?

Εγώ τα χρησιμοποιούσα πριν αποφασίσω να τα στέλνω σε χωριστό SNMP, αλλά μόνο στη μνήμη (δεν ξέρω πόσο πολύ γράφουν/σβήνουν στον αποθηκευτικό χώρο). Από μνήμης θα έλεγα ότι δεν επιδέχονται πολύ παραπετροποίηση, απλά ενεργοποίηση/απενεργοποίηση ανά θύρα.

teodor_ch
14-06-17, 10:29
Γιατί όλο αυτό;
Για δοκιμές;

νομίζω το γράφω :p

deniSun
14-06-17, 14:41
Χρησιμοποιεί κανείς απο εσάς τα γραφήματα που προσφέρει το mikrotik?

Υπάρχει κανένας οδηγός για το πως τα παραμετροποιούμε?

Τα έχω ενεργοποιημένα απ όταν ξεκίνησα να χρησιμοποιώ ΜΤ.
Παραμετροποίηση... δεν έχεις πολλές επιλογές.
Για κάτι παραπάνω πρέπει να στήσεις mrtg και σχετικά snmp.

deniSun
21-06-17, 17:46
v6.38.7 [bugfix]

What's new in 6.38.7 (2017-Jun-20 10:55):

!) bridge - fixed BPDU rx/tx when "protocol-mode=none"
!) bridge - reverted bridge BPDU processing back to pre-v6.38 behaviour (v6.40 will have another separate VLAN-aware bridge implementation);
*) 6to4 - fixed wrong IPv6 "link-local" address generation;
*) arp - fixed "make-static";
*) bonding - do not add bonding interface if "could not set MTU" error is received;
*) console - fixed "/ip neighbor discovery" export;
*) console - fixed unexpected console crash when using variables as functions;
*) console - instead of true/false report yes/no as LCD enabled state;
*) defconf - discard default configuration startup query with configuration change from Webfig;
*) defconf - discard default configuration startup query with RouterOS upgrade;
*) defconf - fixed default configuration generation when wireless package is disabled;
*) defconf - fixed Groove 52 ac band settings;
*) dns - made loading thousands of static entries faster;
*) ethernet - fixed "loop-protect" on "master-port";
*) ethernet - fixed rare switch chip hang (could cause port flapping);
*) fetch - fixed download issue over HTTPS;
*) firewall - do not allow to set "rate" value to 0 for "limit" parameter;
*) firewall - fixed "address-list" entry "creation-time" adjustment to timezone;
*) firewall - fixed "address-list" entry changing from IP to DNS and vice versa;
*) firewall - fixed cosmetic "invalid" flag when item was disabled;
*) ike1 - fixed crash on xauth message;
*) ike2 - allow multiple child SA traffic selectors on re-key;
*) ike2 - fixed last EAP authentication payload type;
*) ike2 - fixed policy release during SA negotiation;
*) ike2 - fixed RSA authentication without EAP;
*) ike2 - fixed situation when traffic selector prefix was parsed incorrectly;
*) ipsec - do not deduct policy src/dst address for tunnel policies;
*) ipsec - fixed generated policy priority;
*) ipsec - fixed peer "my-id" address reset;
*) ipv6 - fixed address becoming invalid when interface was removed from bridge/mesh;
*) led - fixed turning off LED when interface is lost;
*) log - added missing "license limit exceeded" log entry;
*) log - work on false CPU/RAM overclocked alarms;
*) netinstall - fixed typos in Netinstall status messages;
*) ntp - restart NTP client when it is stuck in error state;
*) ppp - fixed IPv6 address receiving on PPP interface;
*) pppoe - added warning on PPPoE client/server, if it is configured on slave interface;
*) pppoe-server - fixed "one-session-per-host" issue where 2 simultaneous sessions were possible from the same host;
*) queue - fixed queuing when at least one child queue has "default-small" and other/s is/are different (introduced in 6.35);
*) quickset - fixed LTE "signal-strength" graphs;
*) smb - fixed share path on devices with "/flash" directory;
*) sniffer - fixed VLAN tags when sniffing all interfaces;
*) snmp - added fan-speed OIDs in "/system health print oid";
*) snmp - fixed limited walk;
*) switch - fixed disabling of MAC learning on CRS1xx/CRS2xx;
*) tile - fixed EoIP keepalive when tunnel is made over VLAN interface;
*) traffic-flow - fixed IPFIX IPv6 data reporting;
*) upnp - fixed firewall NAT rule update when external IP address changes;
*) userman - allow "name-for-user" to be empty and not unique;
*) userman - fixed rare GUI crash when User Manager files are not accessible;
*) webfig - allow to enter frequency ranges in wireless "scan-list"
*) webfig - allow to select "default-encryption" profile on PPP tunnels;
*) webfig - correctly specify routing filter prefix;
*) webfig - do not allow to reorder items if table is sorted by some column;
*) webfig - fixed "last-link-up" & "last-link-down" time information;
*) webfig - fixed Bridge Filter properties display when there are more than one Filter available;
*) webfig - show all available options under "Advanced Mode" for wireless interfaces;
*) winbox - added "Flush" button under "unicast-fdb" menu;
*) winbox - added "memory-scroll", "filter-cpu", "filter-ipv6-address", "filter-operation-between-entries" Sniffer parameters;
*) winbox - added "protected-routerboard" parameters under RouterBOARD settings menu;
*) winbox - allow shorten bytes to k,M,G in firewall "connection-bytes" and "connection-rates";
*) winbox - do not allow Packet Sniffer "memory-limit" and "file-limit" lower than 10KiB;
*) winbox - do not allow to open multiple same sub-menus at the same time;
*) winbox - do not show "dpd-max-failures" on IKEv2;
*) winbox - do not start Traffic Generator automatically when opening "Quick Start";
*) winbox - fixed "Montly" typo to "Monthly" in Graphing menu;
*) winbox - fixed firewall port selection with Winbox v2;
*) winbox - fixed IPSec "mode-config" DNS settings;
*) winbox - fixed issue when working IPSec policies were shown as invalid;
*) winbox - fixed switch ACL Policer statistics;
*) winbox - fixed typo in BGP advertisements menu Aggragator->Aggregator;
*) winbox - hide "wps-mode" & "security-profile" in wireless nv2 mode;
*) winbox - properly show "dhcp-server" warnings;
*) winbox - removed spare values from "loop-protect" setting for EoIPv6 tunnels;
*) winbox - removed unnecessary "/system health" menu on "hAP ac lite" and "RB450"
*) winbox - show "A" flag for IPSec policies;
*) wireless - reduced load on CPU for high speed wireless links;.

Nikiforos
21-06-17, 17:51
καλησπέρα καλη, εχω μιαν απορια, ας πουμε οτι εχουμε σε ενα εσωτερικο RB ιντερνετ απο 2 σημεια, δλδ κινητης με PPP με ενα stick usb και ενα που ερχεται απο ενα αλλο εξωτερικο RB ασυρματα και καταληγει να ειναι σε ενα vpn client.
Γινεται στο εσωτερικο μου δικτυο σε μερικα μηχανηματα να δινω απο της κινητης και σε αλλα επιλεκτικα να δινω απο το vpn δλδ στην ουσια απο την εξωτερικη ζευξη?
ειναι μια σκεψη μπορει να ειναι και αλλιως πχ ppoe client + ppp κινητης κτλ ή ppoe client + vpn απο καποιον αλλον κτλ.
Δλδ θελω επιλεκτικα καποια μηχανηματα στο εσωτερικο μου δικτυο να εχουν απο το 1ο και καποια απο το 2ο.
Εχει καμια ιδεα κανεις πως αυτο μπορει να γινει? μιλαω σε ενα μηχανημα, αμα ειναι να μπει και αλλο ξερω πως γινεται απλα εχεις ενα αλλο gw και το καθενα εχει το δικο του ιντερνετ οποτε στα μηχανηματα πελατες δηλωνεις το αλλο gw.

Βασικα λιγο που το εχω μελετησει δε νομιζω οτι ειναι εφικτο. Λογικα θελει και αλλο μηχανημα. Αν εχει ιδεα κανεις αν μπορει καπως να γινει σε ενα ας μου πει.
Confused....:oops:

macro
21-06-17, 19:24
Γινεται με load balance και 2 parents με τα αναλογα mangles. Αυτο κανω τωρα εγω.

Nikiforos
21-06-17, 19:30
Γινεται με load balance και 2 parents με τα αναλογα mangles. Αυτο κανω τωρα εγω.

κατι ποιο συγκεκριμενο? δεν θελω να ενωσω τα 2 ιντερνετ σε ενα interface, εκει δεν θελουμε load balance? τα αλλα δεν τα καταλαβαινω, αυτα τα parents δεν ξερω και καν τι ειναι.
μηπως επειδη στον χωρο εχω και αλλα rbs, 2 εξωτερικα και 2 εσωτερικα, αλλα το 2ο παιζει gw με vpn και δεν μπορω να κανω αυτη την δουλεια εκει, να βαλω το vpn πχ στο εξωτερικο ωστε να ειναι ξεχωριστο gw, και το 1ο εσωτερικο να εχει το ppp ιντερνετ κινητης.
Και οσες συσκευες θελω να παιρνουν απο το αλλο θα δηλωνω εκεινο gw.
Bεβαια εχω ενα θεμα τι γινεται με οσες παιρνουν απο dhcp, μαλλον θα το κανω χειροκινητα αυτο.

macro
21-06-17, 19:47
Λογικα γινεται και χωρις Load balance. κανε μια δοκιμη και φτιαξε 2 parents στο queue, σαν αυτη που εχεις για το QOS δλδ, ( η πρωτη ουρα ) και δηλωσε την να παιρνει απο το gw1 και αλλη μια parent να χτυπαει στο gw2, μετα φτιαχνεις mangles που θα λες ποιο μηχανημα θα χτυπαει που σε child ουρες. Αυτες που εχεις κατω απο την parent τωρα στο qos ειναι οι child. Στις child θα δηλωνεις αναλογα σε ποια parent θα χτυπανε και λογικα θα παιζει καλα.


Καπως ετσι θα ξεκινουσα.

Nikiforos
21-06-17, 21:40
Το μηχανημα δεν εχει QoS μεχρι προτεινος επαιζε μονο με ενα ovpn client, τωρα θα μπει και ppp με κινητη και στις διακοπες δεν θελω να το λιωνουμε (λογω περιορισμου στα GBs) γιαυτο σκεφτηκα αυτο.
Αυτο που λες παλι απαιτει 2 μηχανηματα? το θεμα ειναι στο ιδιο πως γινεται και ΑΝ γινεται.
Αμα ειναι να το κανω με 2 μπορω απλα το ovpn client να το βαλω σε ενα αλλο RB αντι να ειναι στο ιδιο με το στικακι και λυθηκε το θεμα.

rebeskes
21-06-17, 22:26
καλησπέρα κι από εμένα θέλω να ρωτήσω το εξής, έχω 4 σταθερά μέρη το κάθε μέρος έχει από ένα δικό του δίκτυο μπορώ να τα ενώσω αυτά τα μέρη με site to site vpn αλλά όταν χτυπάνε κάποιο κανονικό address πχ google.com η σύνδεση να μην πηγαίνει μέσα από το vpn?

Ikarantanis
21-06-17, 22:57
Γεια σας και πάλι !
Λοιπόν έχω ένα θεματάκι και θα ήθελα τα φώτα σας .
Όταν κανείς login στο hotspot του mikrotik (σαν χρήστης ) σου πετάει ένα pop up window που γράφει λεπτομέρειες σχετικά με τον χρόνο σύνδεσης κτλ.
Ερώτηση πρώτη : υπάρχει τρόπος να παραμετροποίησω αυτό το pop up ώστε να δείχνει τα υπολειπόμενα mb?
Ερώτηση δεύτερη και πιο σημαντική : όταν ανοίγει αυτό το pop up δυστυχώς οι browsers το κλείνουν (pop up blocking)
Υπάρχει τρόπος να μην γίνεται αυτό ; εννοείται πως η λύση πρέπει να βρεθεί από την μεριά του mikrotik καθώς δεν μπορώ να λέω σε κάθε πελάτη για κάθε συσκευή να αλλάξει τις ρυθμίσεις του !


Σας ευχαριστώ εκ των προτέρων !

macro
22-06-17, 16:56
Το μηχανημα δεν εχει QoS μεχρι προτεινος επαιζε μονο με ενα ovpn client, τωρα θα μπει και ppp με κινητη και στις διακοπες δεν θελω να το λιωνουμε (λογω περιορισμου στα GBs) γιαυτο σκεφτηκα αυτο.
Αυτο που λες παλι απαιτει 2 μηχανηματα? το θεμα ειναι στο ιδιο πως γινεται και ΑΝ γινεται.
Αμα ειναι να το κανω με 2 μπορω απλα το ovpn client να το βαλω σε ενα αλλο RB αντι να ειναι στο ιδιο με το στικακι και λυθηκε το θεμα.

Σου εξηγησα οτι γινεται. Ενα μηχανημα θες. Αυτο που σου λεω για το QOS ειναι να δεις σε μηχανημα που εχεις QOS ποιες ειναι οι parents και οι clients ουρες. Δε σου λεω να φτιαξεις σε αυτο qos ουτε να αγορασεις αλλο μηχανημα. Μολις βρω χρονο πιο μετα θα σου δωσω ενα παραδειγμα.

- - - Updated - - -

λοιπον απο τις σημειωσεις μου επειδη δεν εχω χρονο να φορτωσω τωρα αυτο configuration θα κυμανθεις καπως ετσι..


/ip firewall mangle add action=mark-routing chain=prerouting new-routing mark=routing_mark_pppoe-out1 src-address=192.168.10.2
/ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=routing_mark_pppoe-out2 src-address=192.168.10.3


/ip route add gateway=pppoe-out1 routing-mark=routing_mark_pppoe-out1
/ip route add gateway=pppoe-out2 routing-mark=routing_mark_pppoe-out2


To 192.168.10.2 το μαρκαρω και το στελνω στο pppoe-out1

To 192.168.10.3 το μαρκαρω και το στελνω στο pppoe-out2

Nikiforos
22-06-17, 18:55
καλησπέρα, ευχαριστω πολυ, αν και δεν τα πολυκαταλαβαινω γενικα αυτα, κατι επιασα νομιζω, θα τα σωσω να τα μελετησω.
Ναι μπερδευτηκα πριν, QoS εχω βαλει στο 109 που εχω εδω περα, το 951 στο αλλο μερος δεν εχει. Αλλα τα παραδειγματα που λες δεν ειναι QoS, απλα εχω συνδυασει τα mangles με το QoS και ολο μπερδευομαι!
Το ΣΚ θα μπει μονιμα ιντερνετ κινητης απο στικ 4G στο 951 να δω πως θα παιζουν ολα και θα δουμε τι θα κανω.
Για τωρα δεν με πειραζει, για τις διακοπες ειναι το θεμα γιατι 2 μηνες τουλαχιστον θα ειναι πολλα ατομα εκει και δεν θελω να σκιζουν το ιντερνετ κινητης γιατι εχω 2,5 gb για μερα και το βραδυ 0:00-08:00 αλλα τοσα.

Οποτε αν δουλευει σωστα το AWMN θελω απο το ovpn client, θελω να αφησω το dvr cctv και το linksys PAP2 (voip) στο ιντερνετ κινητης και οτι παιρνει απο dhcp να ειναι απο το ovpn client.
Βασικα μαλλον ειναι ποιο ευκολα τα πραγματα.
Δεν μπορω να βαλω στο εξωτερικο 911 που εχω το ovpn client και να το ορισω σαν gw στον dhcp server που ομως τρεχει στο 951?
ετσι ολα τα μηχανηματα που θα παιρνουν απο τον dhcp θα παιρνουν ιντερνετ απο το ovpn ενω οτι ειναι στο εσωτερικο δικτυο με static θα ειναι απο της κινητης.

Στο παραδειγμα σου ειναι και τα 2 ppoe clients, εγω θα εχω ppp (usbstick 4G) και ovpn client φανταζομαι παλι θα παιζουν ετσι?

macro
22-06-17, 19:36
Σε αυτα που σου εχω τονισει με κοκκινο εσυ απλα αλλαζεις το ονομα με το δικο σου gateway, ppp-vpn ας πουμε, ή ether2 αν το εχεις κουμπωσει στη θυρα 2 και αλλαζεις και τις ip's που θες, μπορεις να βαλεις και range ip's αν δε κανω λαθος.



Αυτο που σου ελεγα με τα parents και childs αστο προς το παρον.

Nikiforos
23-06-17, 06:31
καλημερα, ωραια κατσε αυριο να το φτιαξω και θα δοκιμασω και τον δικο μου τροπο που ειπα παραπανω και αυτο που λες εσυ να δουμε τι θα μου αρεσει καλυτερα και τι ειναι ποιο βολικο στην πραξη και θα δουμε, ευχαριστω και παλι :)

και κατι ποιο δυσκολο, αν και ηδη το εχω βολεψει με ενα 711 με καμμενη wlan που εχω αναφερει παλι αλλα επειδη βλεπω την ether1 να ειναι up and down μαλλον εχει θεμα, το βλεπω στα logs αλλα δεν δειχνει να του κοβεται το ρευμα, μαλλον χανει μονο το δικτυο. Εχει φαει αστραποβροντια και καηκε η wlan ισως εχει θεμα και η ethernet.

Λοιπον εκει περα εχω 2 εξωτερικες ασυρματες ζευξεις του Awmn με ενα 911 και ενα 411, επειδη και τα 2 ειναι licence 3 εχω και ενα 951 ωστε να ρουταρουν αυτα μεταξυ τους αλλα και με το εσωτερικο μου δικτυο και φυσικα να εχω και wifi AP.
Στο 951 ειναι στην ether1 το 911, στην ether2 το 411 και στην ether3 ενα switch και εχει τα αλλα μηχανηματα (pc δεν εχω εκει μονιμο), οποτε ειναι ενα dvr cctv και ενα linksys pap2.
Επειδη λοιπον το δικτυο αρκετα συχνα λογω περιορισμενων διαδρομων και προβληματων που δεν επισκευαζουν ευκολα δεν δουλευει, ειτε εχει πεσει, ειτε λαγκαρει και ειναι αχρηστα ολα γιαυτο πηρα κινητη οπως ειπα στο αλλο θεμα με στικ που θα ειναι στο 951.

Το προβλημα τωρα, θελω ολα τα 10.0.0.0/8 να τα βλεπω μεσω ιντερνετ κινητης....
στο 951 ομως επειδη ειναι στο awmn απευθειας τα βλεπει απο εκει οποτε δεν παιζει και vpn client να παιρναει παλι τα 10αρια μεσω ιντερνετ κινητης γιατι ειναι ποιο μετα στο route distance αυτοματα.
Οκ αμα πεσει εντελως το awmn γινεται φυσικα, αλλα εγω θελω να γινεται και οταν εχει lag απο ενα νουμερο και πανω.
Υπαρχει τροπος να το κανω να γυριζει σε κινητη οταν αυξανει το lag ωστε να μην θελω 2ο μηχανημα? και το λεω γιατι βλεπω νουμερα οπως ειπα στο 711 και μαλλον θα πρεπει να αγορασω καποιο αλλο.

τωρα τι εχω κανει, εχω βαλει το 711 και παιρνει ιντερνετ απο το 951 οποτε εκει κλεινω το ovpn client και παιζει με PPP κινητης.
Στο 711 εχω ενα vpn client ωστε ολα τα 10αρια να τα περναει απο το ιντερνετ κινητης, και σε καθε μηχανημα που θελω να βλεπει ετσι βαζω gateway την ip του 711 αντι του 951.
Ετσι το εχω στο καταγραφικο και στο linksys για να παιζει καλα η τηλεφωνια καθως εκει δεν εχω σταθερο.
Τωρα για τα αλλα οταν παω εκει και δω οτι εχει προβλημα το ιντερνετ μεσω awmn τοτε κλεινω το ovpn client και παιζει μεσω κινητης.

Πολλα πραγματα γινονται απο προγραμματα σε android οποτε δεν θες υπολογιστη, δουλευω με το mikro winbox pro που εχω αγορασει, ειναι το καλυτερο ολα τα εχω δοκιμασει και τα εχω και εγκατεστημενα μαλιστα στο κινητο.

macro
23-06-17, 10:52
Κυκλοφορει script για average gateway ping για να σου γυρναει αυτοματα το gateway σε υψηλο latency, νομιζω το ειχες ποσταρει και εσυ. Και απο οσο το ειχα ψαξει δουλευε μια χαρα. Σε αλλους εννοω, εγω δε το εχω δοκιμασει αυτο, επειδη δεν εχω το λογο που εχεις εσυ.


Για το αλλο που λεγαμε, με τα 2 gateways, δουλευει μια χαρα να ξερεις και δεν ειναι τπτ. Εγω χρησιμοποιω για vpn το hamachi για να συνδεομαι απομακρυσμενα σε πελατες. Ελα μου ντε ομως που στο load balancing με συνδεει relay και οχι direct με αποτελεσμα να εχω υψηλο απομακρυσμενο ping και να μη μπορω να κανω remotes ευκολα.

Και τι εκανα? Περασα την ip του λαπτοπ και τις πορτες του hamachi απο το ενα gateway μονο και απο τοτε καθαρισα.

teodor_ch
23-06-17, 12:05
. Ελα μου ντε ομως που στο load balancing με συνδεει relay και οχι direct με αποτελεσμα να εχω υψηλο απομακρυσμενο ping και να μη μπορω να κανω remotes ευκολα.

Λογικά ναι, αλλά το ρωτάω για παν ενδεχόμενο.
Έχεις βάλει τις εισερχόμενες συνδέσεις να μαρκάρονται με βάση τον gateway που έρχονται και να φεύγουν πάντα απο τον ίδιο gateway πριν απο όλο το υπόλοιπο load balance σωστά?


Γιατί δε σε συνδέει direct δεν καταλαβαίνω αλλά relay.

macro
23-06-17, 12:31
Αυτο το setup εχω.......... με τους 2 πρωτους κανονες κανω αυτο που λεμε


/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=192.168.0.1 passthrough=no port=1320,17771,5000-5500 protocol=udp src-address=10.157.138.100/31
add action=mark-routing chain=prerouting new-routing-mark=192.168.0.1 passthrough=no port=1320,12975,32976,4899,5938 protocol=tcp src-address=10.157.138.100/31

add action=mark-connection chain=input in-interface=ether1 new-connection-mark=ether1_conn passthrough=no
add action=mark-connection chain=input in-interface=wlan1 new-connection-mark=wlan1_conn passthrough=no

add action=mark-routing chain=output connection-mark=ether1_conn new-routing-mark=to_ether1 passthrough=no
add action=mark-routing chain=output connection-mark=wlan1_conn new-routing-mark=to_wlan1 passthrough=no

add action=accept chain=prerouting dst-address=192.168.0.0/24 in-interface=ether2-master-local
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=ether2-master-local

add action=mark-connection chain=prerouting dst-address-type=!local in-interface=ether2-master-local new-connection-mark=ether1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=ether2-master-local new-connection-mark=wlan1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1

add action=mark-routing chain=prerouting connection-mark=ether1_conn in-interface=ether2-master-local new-routing-mark=to_ether1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=wlan1_conn in-interface=ether2-master-local new-routing-mark=to_wlan1 passthrough=no


/ip route
add check-gateway=ping distance=1 gateway=192.168.0.1 routing-mark=to_pppoe-out1
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_wlan1
add check-gateway=ping distance=1 gateway=192.168.0.1
add check-gateway=ping distance=2 gateway=192.168.2.1

Nikiforos
23-06-17, 12:45
Κυκλοφορει script για average gateway ping για να σου γυρναει αυτοματα το gateway σε υψηλο latency, νομιζω το ειχες ποσταρει και εσυ. Και απο οσο το ειχα ψαξει δουλευε μια χαρα. Σε αλλους εννοω, εγω δε το εχω δοκιμασει αυτο, επειδη δεν εχω το λογο που εχεις εσυ.
Για το αλλο που λεγαμε, με τα 2 gateways, δουλευει μια χαρα να ξερεις και δεν ειναι τπτ. Εγω χρησιμοποιω για vpn το hamachi για να συνδεομαι απομακρυσμενα σε πελατες. Ελα μου ντε ομως που στο load balancing με συνδεει relay και οχι direct με αποτελεσμα να εχω υψηλο απομακρυσμενο ping και να μη μπορω να κανω remotes ευκολα.
Και τι εκανα? Περασα την ip του λαπτοπ και τις πορτες του hamachi απο το ενα gateway μονο και απο τοτε καθαρισα.

δεν γινεται αυτο με το script ετσι απλα στην δικια μου περιπτωση, το 951 ρουταρει το awmn γιατι ειναι μερος του κομβου μου στο AWMN!
οποτε δεν μπορει να αποκλεισει ετσι απλα το awmn routing που παιζει οχι μονο με routes, αλλα και με BGP και OSPF.
Εκεινο το script που ειχα ποσταρει ειναι για 2 gateways αυτονομα και γινεται η αλλαγη μεταξυ τους.
Μπορει να γινει αν εχω αλλο ενα μηχανημα ασχετο με το awmn routing στο εσωτερικο δικτυο (πχ ενα απο τα 2 εξωτερικα μου rbs).

Αν γινοταν αυτο που λεω που δεν μπορει να γινει γιατι απο default το routing ειναι 0 για το awmn στο 951, τοτε θα περνουσε ολος ο κομβος μου μεσα απο το ιντερνετ αντι να εχει απευθειας συνδεση με το awmn.
Ελεγα μπας και εχει καποιον αλλον τροπο σε αυτο αλλα δε νομιζω και ειναι λογικοτατο αλλωστε.

Επειδη ειναι για AWMN αυτο το ζητημα, μπορει να μην το καταλαβαινει οποιος δεν ειναι σε αυτο δυστυχως.
Eνταξει μην το μπερδευω πολυ το πραμα, αμα εχει προβλημα το 711 θα παρω ενα αλλο εσωτερικο RB και τελος.


Αυτο το setup εχω.......... με τους 2 πρωτους κανονες κανω αυτο που λεμε...


ωραια ειναι και ευχαριστω, αλλα ειναι παρα πολυ πολυπλοκα και δεν τα καταλαβαινω ευκολα. Θα πεδευτω πολυ και δεν θα καταφερω και τιποτα στο τελος.
νομιζω η ποιο ευκολη και απλη λυση ειναι στο 911 που εχω και ειναι το 1ο εξωτερικο RB να στησω εκει το ovpn client που παιρνει ιντερνετ μεσω του awmn και ετσι αυτο να ειναι το 1ο ιντερνετ gw και το 2ο θα ειναι το 711 που θα παιρνει ιντερνετ απο το εσωτερικο RB 951 που θα εχει το usbstick 4G με το ιντερνετ κινητης.
Ετσι θα μπορω να επιλεξω ευκολα ποιο απο τα 2 θα δινει το ιντερνετ και σε αυτη την περιπτωση μπορω να παιξω και με την επιλογη για το lag με script κτλ.
Ετσι το εχω σκεφτει μενει να το δω αυριο στην πραξη! :)

macro
23-06-17, 14:25
Αυτο ειναι ολο το load balance, για τον theodor το ποσταρα να δει τα input-output, εσυ θα χρειαστεις μονο τους 2 πρωτους κανονες και το route που σου εδωσα. Ειναι πολυ απλο βρε συ.

Απλα αντι να το κανεις εσυ manual και να επιλεγεις GW, το κανει αυτο για σενα. Και αν βαλεις και το script, θα γινεται εντελως αυτοματα.

Nikiforos
23-06-17, 17:38
Αυτο ειναι ολο το load balance, για τον theodor το ποσταρα να δει τα input-output, εσυ θα χρειαστεις μονο τους 2 πρωτους κανονες και το route που σου εδωσα. Ειναι πολυ απλο βρε συ.

Απλα αντι να το κανεις εσυ manual και να επιλεγεις GW, το κανει αυτο για σενα. Και αν βαλεις και το script, θα γινεται εντελως αυτοματα.

ενταξει ευχαριστω θα τα δω αυριο που θα ειμαι εκει.
Θα τα δοκιμασω και αυτα και θα δω τι βολευει.

macro
23-06-17, 18:19
Το βρηκα στα γρηγορα.......

Gateway fail-over

The most simple way to do this is to use netwatch. Here we will ping once in 5 seconds the "primary" gateway (2.2.2.2) of the router, and if does not respond, we will switch to the "backup" gateway (3.3.3.1):


/system script add name=down source={/ip route \
{... set [/ip route find dst-address=0.0.0.0] gateway 3.3.3.1}
/system script add name=up source={/ip route \
{... set [/ip route find dst-address=0.0.0.0] gateway 2.2.2.1}
/tool netwatch add host=2.2.2.2 interval=5s up-script=up down-script=down

teodor_ch
23-06-17, 23:37
δεν είναι τόσο απλό

χρειάζεται και ip routes rules
να βάλεις ώστε ο κάθε gateway να φεύγει απο το σωστό routing γιατί με το load balance θα πηγαίνει μία απο τη μία και μία απο την άλλη
απο τη μία δε θα έρχεται pong :p

Ikarantanis
24-06-17, 00:40
Γεια σας και πάλι !
Λοιπόν έχω ένα θεματάκι και θα ήθελα τα φώτα σας .
Όταν κανείς login στο hotspot του mikrotik (σαν χρήστης ) σου πετάει ένα pop up window που γράφει λεπτομέρειες σχετικά με τον χρόνο σύνδεσης κτλ.
Ερώτηση πρώτη : υπάρχει τρόπος να παραμετροποίησω αυτό το pop up ώστε να δείχνει τα υπολειπόμενα mb?
Ερώτηση δεύτερη και πιο σημαντική : όταν ανοίγει αυτό το pop up δυστυχώς οι browsers το κλείνουν (pop up blocking)
Υπάρχει τρόπος να μην γίνεται αυτό ; εννοείται πως η λύση πρέπει να βρεθεί από την μεριά του mikrotik καθώς δεν μπορώ να λέω σε κάθε πελάτη για κάθε συσκευή να αλλάξει τις ρυθμίσεις του !


Σας ευχαριστώ εκ των προτέρων !

macro
24-06-17, 11:00
δεν είναι τόσο απλό

χρειάζεται και ip routes rules
να βάλεις ώστε ο κάθε gateway να φεύγει απο το σωστό routing γιατί με το load balance θα πηγαίνει μία απο τη μία και μία απο την άλλη
απο τη μία δε θα έρχεται pong :p

δλδ τι πρεπει να κανω? Για δωσε καρμα συμφωνα με αυτο που σου ποσταρα. Το βλεπω και σε sites που πρεπει να κανω συνεχεια relogin, οπως στο adslgr.

Κάπου το είχες ποσταρει το δικό σου route, αλλά δε κατάφερα να το βρω. Για δωστο αν μπορείς.

teodor_ch
24-06-17, 15:34
δλδ τι πρεπει να κανω? Για δωσε καρμα συμφωνα με αυτο που σου ποσταρα. Το βλεπω και σε sites που πρεπει να κανω συνεχεια relogin, οπως στο adslgr.

Κάπου το είχες ποσταρει το δικό σου route, αλλά δε κατάφερα να το βρω. Για δωστο αν μπορείς.


/ip firewall mangle
add action=change-mss chain=forward comment=TCP-MSS_in in-interface=all-ppp new-mss=1452 passthrough=yes protocol=tcp tcp-flags=syn,!rst tcp-mss=1453-65535
add action=change-mss chain=forward comment=TCP-MSS_out new-mss=1452 out-interface=all-ppp passthrough=yes protocol=tcp tcp-flags=syn,!rst tcp-mss=1453-65535
add action=mark-connection chain=prerouting comment="Mark LAN-DNS connections UDP" in-interface=!all-ppp new-connection-mark=LAN-DNS passthrough=no port=53 \
protocol=udp
add action=mark-connection chain=prerouting comment="Mark LAN-DNS connections TCP" in-interface=!all-ppp new-connection-mark=LAN-DNS passthrough=no port=53 \
protocol=tcp
add action=mark-connection chain=prerouting comment="Mark Broadcasts ONLY" dst-address-type=broadcast new-connection-mark="Internal Broadcast" passthrough=no
add action=mark-connection chain=prerouting comment="Mark Multicast ONLY" dst-address-type=multicast new-connection-mark="Internal Broadcast" passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-home new-connection-mark=LAN out-interface=bridge-home \
passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-customers new-connection-mark=LAN out-interface=bridge-home \
passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-home new-connection-mark=LAN out-interface=bridge-customers \
passthrough=no
add action=mark-connection chain=input comment="Mark connections through OTE" connection-mark=no-mark in-interface=pppoe-out1ote new-connection-mark=\
input-wan-ote1 passthrough=no
add action=mark-connection chain=input comment="Mark connections through OTE2" connection-mark=no-mark in-interface=pppoe-out2ote new-connection-mark=\
input-wan-ote2 passthrough=no
add action=mark-routing chain=output comment="Route OTE through OTE" connection-mark=input-wan-ote1 new-routing-mark=route-wan-ote1 passthrough=no
add action=mark-routing chain=output comment="Route OTE2 through OTE2" connection-mark=input-wan-ote2 new-routing-mark=route-wan-ote2 passthrough=no
add action=mark-connection chain=prerouting comment="Split OTE connection for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-home new-connection-mark=split-wan-ote1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="Split OTE2 connections for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-home new-connection-mark=split-wan-ote2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting comment="Route split OTE through OTE for clients" connection-mark=split-wan-ote1 in-interface=bridge-home \
new-routing-mark=route-wan-ote1 passthrough=no
add action=mark-routing chain=prerouting comment="Route split OTE2 through OTE2 for clients" connection-mark=split-wan-ote2 in-interface=bridge-home \
new-routing-mark=route-wan-ote2 passthrough=no
add action=mark-connection chain=prerouting comment="Split OTE connection for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-customers new-connection-mark=splitcustomers-wan-ote1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="Split OTE2


/ip route
add check-gateway=ping distance=1 gateway=pppoe-out1ote routing-mark=route-wan-ote1
add check-gateway=ping distance=2 gateway=pppoe-out2ote routing-mark=route-wan-ote1
add check-gateway=ping distance=1 gateway=pppoe-out2ote routing-mark=route-wan-ote2
add distance=2 gateway=pppoe-out1ote routing-mark=route-wan-ote2
add check-gateway=ping distance=1 gateway=pppoe-out1ote
add check-gateway=ping distance=2 gateway=pppoe-out2ote
/ip route rule
add dst-address=192.168.12.0/24 table=main
add dst-address=192.168.11.0/24 table=main
add dst-address=192.168.4.0/24 table=main
add dst-address=192.168.1.0/24 table=main


έχω δύο bridges και δύο pppoe-out connections
με ips


/ip address
add address=192.168.12.1/24 interface=ether2-ote network=192.168.12.0
add address=192.168.1.1/24 interface=bridge-home network=192.168.1.0
add address=192.168.11.1/24 interface=ether1-ote network=192.168.11.0
add address=192.168.4.1/24 interface=bridge-customers network=192.168.4.0

Ikarantanis
25-06-17, 11:51
Καλημερα σας και παλι.
Μπορει να μου πει καποιος γιατι δεν μου τρεχει το παρακατω script ?

add name=overseer policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global found\r\
\n:global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local isfqdn\r\
\n\r\
\n##################\r\
\n# User editable Variables #\r\
\n##################\r\
\n\r\
\n# Set all mail variables each time script is run - you should update these details from this script only\r\
\n# Note you can use a dns name for the mailserver however if for any reason this name does not resolve the script will terminate. This is a known bug in 3.X and 4.X\r\
\n\r\
\n:set mailserver "your-mail-server.domain.tld"\r\
\n\r\
\n# Is the value above a valid domain name ( change to "no" if IP address, "yes" if it's a name the mikrotik can resolve)\r\
\n:set isfqdn "yes"\r\
\n\r\
\n:set adminaddress "email-address-to-send-admin-reports-to @ yourdomain dot tld"\r\
\n:set fromaddress "email-address-reports-come-from @ yourdomain dot tld"\r\
\n\r\
\n######################\r\
\n# End of user editible variables #\r\
\n######################\r\
\n\r\
\n:if ([\$isfqdn] = "yes") do={:set mailserver [:resolve \$mailserver]}\r\
\n\r\
\n/system script run monthend\r\
\n\r\
\n:if ([\$found] = "true") do={/system script run monthlyreport; :log info "--Completed Monthly Report--"} else={ /system script run usagereport; :log info "--Completed Usage Report--"}"
add name=monthend policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":local date\r\
\n:local time\r\
\n:local day\r\
\n:local month\r\
\n:local year\r\
\n:local hour\r\
\n:global found ""\r\
\n\r\
\n:set date [/system clock get date]\r\
\n:set time [/system clock get time]\r\
\n:set day [:pick \$date 4 6]\r\
\n:set hour [:pick \$time 0 2]\r\
\n\r\
\n:if ([\$day] = "01" ) do={ :if ([\$hour] = "00" ) do={:set found "true" } else={ :set found "false" } } else={ :set found "false" }"
add name=usagereport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local lastwarning\r\
\n:local warninglevel\r\
\n:local warn\r\
\n:local update\r\
\n:local newwarning\r\
\n:local bytesdownsaved\r\
\n:local bytestotal\r\
\n\r\
\n#Script based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n#Details:\r\
\n#This script checks all current simple queues and using values stored in the queue comment will allow you keep track of usage by each site\r\
\n#The details stored in the queue are broken down and used to determine when a user should be sent a usage warning at 50 75 90 and 100%\r\
\n#You can create/modify a new entry as long as you follow this format\r\
\n#1) If you just want to name an entry you may do so like "XYZ Router" in the queue name\r\
\n#2) If you want to determine a data limit, enter it like "sitename!gigabytelimit#emailaddress!00#0000" into the comment.\r\
\n#3) If you just want to enter a comment on its own, you can do this so long as you don't have an "!" in the field\r\
\n#Breaking it down: sitename is a descriptive name, gigabyte limit is the monthy limit, email address is the address you want notified\r\
\n#00 is the last percentage warning level for this user, 0000 is the default value for a new data store\r\
\n#This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15/June/2009\r\
\n:log info "------ Begining Daily Usage Reports -------"\r\
\n\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=""] do={\r\
\n\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment]\r\
\n\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-99)\r\
\n:if ([:find \$content "!"] != "") do={\r\
\n :local pos1 [:find \$content "!"]\r\
\n :local pos4 [:len \$content]\r\
\n :local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] "#"]+\$pos1+1)\r\
\n :local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] "!"]+\$pos2)\r\
\n :set sitename [:pick \$content 0 (\$pos1)]\r\
\n :set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n :set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n :set totalcurrent [/queue simple get \$i bytes]\r\
\n :set lastwarning [:pick \$content (\$pos3+2) (\$pos3+4)]\r\
\n :local pos5 [:find \$totalcurrent "/"]\r\
\n :local pos6 [:len \$totalcurrent]\r\
\n :set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n :set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n :set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n :set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n :set bytestotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n :set megsdowncurrent (\$bytestotal / 1048576)\r\
\n\r\
\n#Begin calculating usage percentage\r\
\n :set percentage ( ( \$bytestotal * 100) / (\$gigs * 1073741824 ) )\r\
\n :log info "\$sitename: \$percentage%"\r\
\n :if ([\$percentage] < 50) do={ :set warninglevel "00" }\r\
\n :if ([\$percentage] > 50) do={\r\
\n :if ([\$percentage] < 75) do={ :set warninglevel "50" }\r\
\n :if ([\$percentage] > 75) do={ :set warninglevel "75" }\r\
\n }\r\
\n :if ([\$percentage] > 75) do={\r\
\n :if ([\$percentage] < 90) do={ :set warninglevel "75" }\r\
\n :if ([\$percentage] > 90) do={ :set warninglevel "90" }\r\
\n }\r\
\n :if ([\$percentage] > 90) do={\r\
\n :if ([\$percentage] < 100) do={ :set warninglevel "90" }\r\
\n :if ([\$percentage] > 100) do={ :set warninglevel "99" }\r\
\n }\r\
\n\r\
\n# Parse warning necessity\r\
\n :if ([\$warninglevel] > \$lastwarning ) do={ :set warn "true" ; :set update "true" }\r\
\n :if ([\$warninglevel] = \$lastwarning ) do={ :set warn "false" ; :set update "false" }\r\
\n :if ([\$warninglevel] < \$lastwarning ) do={ :set warn "false" ; :set update "true" }\r\
\n\r\
\n#Update Warning Levels\r\
\n :if ([\$update] = true ) do={ :set newwarning \$warninglevel } else={ :set newwarning \$lastwarning }\r\
\n :if ([\$warn] = true ) do={\r\
\n#Check for email address in queue comment\r\
\n :if ([\$email] != "" ) do={\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to="\$email" subject="\$sitename: Usage at \$percentage" body="This message is to inform you of the current usage for \$sitename\r\
\nThe current warning trigger is \$warninglevel%.\r\
\n\r\
\nThis site has downloaded \$megsdowncurrent MB, which is over \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nThis is an Automatically generated E-mail that is sent out when users reach 50%, 75%, 90% and 100% of their cap.\r\
\n\r\
\nTraffic Monitor System,\r\
\n\$fromaddress"\r\
\n}\r\
\n#Send email to support/accounts also\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject="\$sitename: Usage at \$percentage" body="Current usage for \$sitename - trigger is \$warninglevel%.\r\
\n\$megsdowncurrent MB, which is over \$percentage% of the \$gigs GB monthly download allowance.\r\
\nTraffic Monitor System""
add name=monthlyreport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local bytesdownsaved\r\
\n:local bytesdowntotal\r\
\n\r\
\n#Script based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n#This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15th June 2009\r\
\n:log info "------ Begining Monthly Reports -------"\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=""] do={\r\
\n\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment] \r\
\n\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-100)\r\
\n:if ( [ :find \$content "!" ] != "" ) do={\r\
\n :local pos1 [:find \$content "!"]\r\
\n :local pos4 [:len \$content]\r\
\n :local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] "#"]+\$pos1+1)\r\
\n :local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] "!"]+\$pos2)\r\
\n :set sitename [:pick \$content 0 (\$pos1)]\r\
\n :set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n :set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n :set totalcurrent [/queue simple get \$i bytes]\r\
\n :local pos5 [:find \$totalcurrent "/"]\r\
\n :local pos6 [:len \$totalcurrent]\r\
\n :set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n :set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n :set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n :set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n :set bytesdowntotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n :set megsdowncurrent (\$bytesdowntotal / 1048576)\r\
\n\r\
\n#Begin calculating usage percentage\r\
\n :set percentage ( ( \$bytesdowntotal * 100 ) / ( \$gigs * 1073741824 ) )\r\
\n :log info "\$sitename: \$percentage%"\r\
\n:if ([\$email] != "" ) do={\r\
\n/tool e-mail send server=\$mailserver from=\$fromaddress to=\$email subject="\$sitename: Monthly Report" body="This message is to inform you of the full monthly usage for \$sitename\r\
\n\r\
\nIn this month this site has downloaded \$megsdowncurrent MB, which is \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nThis is an Automatically generated E-mail that is sent out at the end of each month.\r\
\n\r\
\nTraffic Monitor System,\r\
\n\$fromaddress"\r\
\n}\r\
\n#Send email to support/accounts also\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject="\$sitename: Monthly Report" body="Full monthly usage for \$sitename\r\
\nIn this month this site has downloaded \$megsdowncurrent MB, which is \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nTraffic Monitor System,\r\
\nPlease report any errors in this message to \$fromaddress"\r\
\n:log info "Sent monthly report for \$sitename to \$email"\r\
\n#Set warning level on queue comment back to 00 and reset counters\r\
\n/queue simple set \$i comment="\$sitename!\$gigs#\$email!00#0000"\r\
\n/queue simple reset-counters \$i\r\
\n}\r\
\n}"
add name=manualusagereport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local lastwarning\r\
\n:local warninglevel\r\
\n:local warn\r\
\n:local update\r\
\n:local newwarning\r\
\n:local bytesdownsaved\r\
\n:local bytestotal\r\
\n:local text\r\
\n:local combinedtext\r\
\n:set combinedtext ""\r\
\n#Scripts based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n# This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15th June 2009\r\
\n:log info "------ Begining Manual Usage Reports -------"\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=""] do={\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment]\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-99) # data-used (0000)\r\
\n:if ([:find \$content "!"] != "") do={\r\
\n:local pos1 [:find \$content "!"]\r\
\n:local pos4 [:len \$content]\r\
\n:local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] "#"]+\$pos1+1)\r\
\n:local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] "!"]+\$pos2)\r\
\n:set sitename [:pick \$content 0 (\$pos1)]\r\
\n:set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n:set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n:set totalcurrent [/queue simple get \$i bytes]\r\
\n:set lastwarning [:pick \$content (\$pos3+2) (\$pos3+4)]\r\
\n:local pos5 [:find \$totalcurrent "/"]\r\
\n:local pos6 [:len \$totalcurrent]\r\
\n:set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n:set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n:set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n:set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n:set bytestotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n:set megsdowncurrent (\$bytestotal / 1048576)\r\
\n#Begin calculating usage percentage\r\
\n:set percentage ( ( \$bytestotal * 100) / (\$gigs * 1073741824 ) )\r\
\n:log info "\$sitename: \$percentage% - \$megsdowncurrent MB used - Allowance is \$gigs GB"\r\
\n:set text "\$combinedtext \\n \$sitename: \$percentage% - \$megsdowncurrent MB used - Allowance is \$gigs GB"\r\
\n:set combinedtext "\$text"\r\
\n}\r\
\n}\r\
\n:log info "------ Ending Manual Usage Reports -------"\r\
\n:local time [/system clock get time]\r\
\n/tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject="Manual usage report" body="Site Usage report - Runtime: \$time\r\
\n\$text\r\
\nRegards,\r\
\n\$fromaddress""

Το βρηκα εδω : https://www.mikrotik-routeros.com/2010/01/automated-usage-script-without-usermanager/

Nikiforos
25-06-17, 15:19
καλησπερα, για κωδικες κτλ χρησιμοποιουμε το # θα σου βγαλει CODE και τα βαζεις αναμεσα σε αυτα τα 2 που θα σου βγαλει.
Δυσκολο για το script μαλλον να καταλαβει κανεις, ειδικα οταν εχουν αλλαχτει πολλα γραμματα με φατσουλες!!!
κανε αυτο με το code να φαινεται σωστα.

Ikarantanis
25-06-17, 15:36
Καταρχάς σε ευχαριστώ παρά πολύ για την απάντηση .
Τις # δεν κατάλαβα που τις βάζω ;
Στην αρχή κάθε γραμμής ; σε όλες τις γραμμές ;
Συγνώμη αλλά από κώδικα είμαι εντελώς άσχετος :)

Nikiforos
25-06-17, 17:03
οταν γραφεις ενα μηνημα εχει μια μπαρα απο πανω σαν το word πχ ενα πραμα, στο τελος θα δεις μια #.
Πατας αυτο και κανει το CODE, βαζεις το κειμενο που θες αναμεσα στα 2 CODE που θα σου βγαλει και εισαι ετοιμος.
Δες πχ

αυτα τα 2 το κειμενο πρεπει να ειναι αναμεσα τους ετσι



τεστ

Ikarantanis
25-06-17, 17:46
add name=overseer policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global found\r\
\n:global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local isfqdn\r\
\n\r\
\n##################\r\
\n# User editable Variables #\r\
\n##################\r\
\n\r\
\n# Set all mail variables each time script is run - you should update these details from this script only\r\
\n# Note you can use a dns name for the mailserver however if for any reason this name does not resolve the script will terminate. This is a known bug in 3.X and 4.X\r\
\n\r\
\n:set mailserver \"your-mail-server.domain.tld\"\r\
\n\r\
\n# Is the value above a valid domain name ( change to \"no\" if IP address, \"yes\" if it's a name the mikrotik can resolve)\r\
\n:set isfqdn \"yes\"\r\
\n\r\
\n:set adminaddress \"email-address-to-send-admin-reports-to @ yourdomain dot tld"\r\
\n:set fromaddress \"email-address-reports-come-from @ yourdomain dot tld"\r\
\n\r\
\n######################\r\
\n# End of user editible variables #\r\
\n######################\r\
\n\r\
\n:if ([\$isfqdn] = \"yes\") do={:set mailserver [:resolve \$mailserver]}\r\
\n\r\
\n/system script run monthend\r\
\n\r\
\n:if ([\$found] = \"true\") do={/system script run monthlyreport; :log info \"--Completed Monthly Report--\"} else={ /system script run usagereport; :log info \"--Completed Usage Report--\"}"
add name=monthend policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":local date\r\
\n:local time\r\
\n:local day\r\
\n:local month\r\
\n:local year\r\
\n:local hour\r\
\n:global found \"\"\r\
\n\r\
\n:set date [/system clock get date]\r\
\n:set time [/system clock get time]\r\
\n:set day [:pick \$date 4 6]\r\
\n:set hour [:pick \$time 0 2]\r\
\n\r\
\n:if ([\$day] = \"01\" ) do={ :if ([\$hour] = \"00\" ) do={:set found \"true\" } else={ :set found \"false\" } } else={ :set found \"false\" }"
add name=usagereport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local lastwarning\r\
\n:local warninglevel\r\
\n:local warn\r\
\n:local update\r\
\n:local newwarning\r\
\n:local bytesdownsaved\r\
\n:local bytestotal\r\
\n\r\
\n#Script based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n#Details:\r\
\n#This script checks all current simple queues and using values stored in the queue comment will allow you keep track of usage by each site\r\
\n#The details stored in the queue are broken down and used to determine when a user should be sent a usage warning at 50 75 90 and 100%\r\
\n#You can create/modify a new entry as long as you follow this format\r\
\n#1) If you just want to name an entry you may do so like \"XYZ Router\" in the queue name\r\
\n#2) If you want to determine a data limit, enter it like \"sitename!gigabytelimit#emailaddress!00#0000\" into the comment.\r\
\n#3) If you just want to enter a comment on its own, you can do this so long as you don't have an \"!\" in the field\r\
\n#Breaking it down: sitename is a descriptive name, gigabyte limit is the monthy limit, email address is the address you want notified\r\
\n#00 is the last percentage warning level for this user, 0000 is the default value for a new data store\r\
\n#This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15/June/2009\r\
\n:log info \"------ Begining Daily Usage Reports -------\"\r\
\n\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=\"\"] do={\r\
\n\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment]\r\
\n\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-99)\r\
\n:if ([:find \$content \"!\"] != \"\") do={\r\
\n :local pos1 [:find \$content \"!\"]\r\
\n :local pos4 [:len \$content]\r\
\n :local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] \"#\"]+\$pos1+1)\r\
\n :local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] \"!\"]+\$pos2)\r\
\n :set sitename [:pick \$content 0 (\$pos1)]\r\
\n :set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n :set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n :set totalcurrent [/queue simple get \$i bytes]\r\
\n :set lastwarning [:pick \$content (\$pos3+2) (\$pos3+4)]\r\
\n :local pos5 [:find \$totalcurrent \"/\"]\r\
\n :local pos6 [:len \$totalcurrent]\r\
\n :set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n :set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n :set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n :set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n :set bytestotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n :set megsdowncurrent (\$bytestotal / 1048576)\r\
\n\r\
\n#Begin calculating usage percentage\r\
\n :set percentage ( ( \$bytestotal * 100) / (\$gigs * 1073741824 ) )\r\
\n :log info \"\$sitename: \$percentage%\"\r\
\n :if ([\$percentage] < 50) do={ :set warninglevel \"00\" }\r\
\n :if ([\$percentage] > 50) do={\r\
\n :if ([\$percentage] < 75) do={ :set warninglevel \"50\" }\r\
\n :if ([\$percentage] > 75) do={ :set warninglevel \"75\" }\r\
\n }\r\
\n :if ([\$percentage] > 75) do={\r\
\n :if ([\$percentage] < 90) do={ :set warninglevel \"75\" }\r\
\n :if ([\$percentage] > 90) do={ :set warninglevel \"90\" }\r\
\n }\r\
\n :if ([\$percentage] > 90) do={\r\
\n :if ([\$percentage] < 100) do={ :set warninglevel \"90\" }\r\
\n :if ([\$percentage] > 100) do={ :set warninglevel \"99\" }\r\
\n }\r\
\n\r\
\n# Parse warning necessity\r\
\n :if ([\$warninglevel] > \$lastwarning ) do={ :set warn \"true\" ; :set update \"true\" }\r\
\n :if ([\$warninglevel] = \$lastwarning ) do={ :set warn \"false\" ; :set update \"false\" }\r\
\n :if ([\$warninglevel] < \$lastwarning ) do={ :set warn \"false\" ; :set update \"true\" }\r\
\n\r\
\n#Update Warning Levels\r\
\n :if ([\$update] = true ) do={ :set newwarning \$warninglevel } else={ :set newwarning \$lastwarning }\r\
\n :if ([\$warn] = true ) do={\r\
\n#Check for email address in queue comment\r\
\n :if ([\$email] != \"\" ) do={\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to=\"\$email\" subject=\"\$sitename: Usage at \$percentage\" body=\"This message is to inform you of the current usage for \$sitename\r\
\nThe current warning trigger is \$warninglevel%.\r\
\n\r\
\nThis site has downloaded \$megsdowncurrent MB, which is over \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nThis is an Automatically generated E-mail that is sent out when users reach 50%, 75%, 90% and 100% of their cap.\r\
\n\r\
\nTraffic Monitor System,\r\
\n\$fromaddress\"\r\
\n}\r\
\n#Send email to support/accounts also\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject=\"\$sitename: Usage at \$percentage\" body=\"Current usage for \$sitename - trigger is \$warninglevel%.\r\
\n\$megsdowncurrent MB, which is over \$percentage% of the \$gigs GB monthly download allowance.\r\
\nTraffic Monitor System\""
add name=monthlyreport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local bytesdownsaved\r\
\n:local bytesdowntotal\r\
\n\r\
\n#Script based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n#This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15th June 2009\r\
\n:log info \"------ Begining Monthly Reports -------\"\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=\"\"] do={\r\
\n\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment] \r\
\n\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-100)\r\
\n:if ( [ :find \$content \"!\" ] != \"\" ) do={\r\
\n :local pos1 [:find \$content \"!\"]\r\
\n :local pos4 [:len \$content]\r\
\n :local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] \"#\"]+\$pos1+1)\r\
\n :local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] \"!\"]+\$pos2)\r\
\n :set sitename [:pick \$content 0 (\$pos1)]\r\
\n :set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n :set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n :set totalcurrent [/queue simple get \$i bytes]\r\
\n :local pos5 [:find \$totalcurrent \"/\"]\r\
\n :local pos6 [:len \$totalcurrent]\r\
\n :set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n :set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n :set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n :set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n :set bytesdowntotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n :set megsdowncurrent (\$bytesdowntotal / 1048576)\r\
\n\r\
\n#Begin calculating usage percentage\r\
\n :set percentage ( ( \$bytesdowntotal * 100 ) / ( \$gigs * 1073741824 ) )\r\
\n :log info \"\$sitename: \$percentage%\"\r\
\n:if ([\$email] != \"\" ) do={\r\
\n/tool e-mail send server=\$mailserver from=\$fromaddress to=\$email subject=\"\$sitename: Monthly Report\" body=\"This message is to inform you of the full monthly usage for \$sitename\r\
\n\r\
\nIn this month this site has downloaded \$megsdowncurrent MB, which is \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nThis is an Automatically generated E-mail that is sent out at the end of each month.\r\
\n\r\
\nTraffic Monitor System,\r\
\n\$fromaddress\"\r\
\n}\r\
\n#Send email to support/accounts also\r\
\n /tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject=\"\$sitename: Monthly Report\" body=\"Full monthly usage for \$sitename\r\
\nIn this month this site has downloaded \$megsdowncurrent MB, which is \$percentage% of the \$gigs GB monthly download allowance.\r\
\n\r\
\nTraffic Monitor System,\r\
\nPlease report any errors in this message to \$fromaddress\"\r\
\n:log info \"Sent monthly report for \$sitename to \$email\"\r\
\n#Set warning level on queue comment back to 00 and reset counters\r\
\n/queue simple set \$i comment=\"\$sitename!\$gigs#\$email!00#0000\"\r\
\n/queue simple reset-counters \$i\r\
\n}\r\
\n}"
add name=manualusagereport policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":global mailserver\r\
\n:global adminaddress\r\
\n:global fromaddress\r\
\n:local content\r\
\n:local i\r\
\n:local sitename\r\
\n:local gigs\r\
\n:local email\r\
\n:local megstotal\r\
\n:local totalcurrent\r\
\n:local bytesdowncurrent\r\
\n:local bytesupcurrent\r\
\n:local megsdowncurrent\r\
\n:local megsupcurrent\r\
\n:local percentage\r\
\n:local lastwarning\r\
\n:local warninglevel\r\
\n:local warn\r\
\n:local update\r\
\n:local newwarning\r\
\n:local bytesdownsaved\r\
\n:local bytestotal\r\
\n:local text\r\
\n:local combinedtext\r\
\n:set combinedtext \"\"\r\
\n#Scripts based on Automated billing script at http://wiki.mikrotik.com/wiki/AutomatedBilling\r\
\n# This version created by Andrew Cox - www.accessplus.com.au\r\
\n#v1.4 Updated 15th June 2009\r\
\n:log info \"------ Begining Manual Usage Reports -------\"\r\
\n#For each queue in the list\r\
\n:foreach i in=[/queue simple find comment !=\"\"] do={\r\
\n#Pull comment out of queue and divide up accordingly\r\
\n:set content [/queue simple get \$i comment]\r\
\n#Determine variables from comment\r\
\n#Format is: sitename ! gigsallowed # who-to-email ! last warning level(0-50-75-90-99) # data-used (0000)\r\
\n:if ([:find \$content \"!\"] != \"\") do={\r\
\n:local pos1 [:find \$content \"!\"]\r\
\n:local pos4 [:len \$content]\r\
\n:local pos2 ([:find [:pick \$content (\$pos1+1) \$pos4] \"#\"]+\$pos1+1)\r\
\n:local pos3 ([:find [:pick \$content (\$pos2+1) \$pos4] \"!\"]+\$pos2)\r\
\n:set sitename [:pick \$content 0 (\$pos1)]\r\
\n:set gigs [:pick \$content (\$pos1+1) \$pos2]\r\
\n:set email [:pick \$content (\$pos2+1) (\$pos3+1)]\r\
\n:set totalcurrent [/queue simple get \$i bytes]\r\
\n:set lastwarning [:pick \$content (\$pos3+2) (\$pos3+4)]\r\
\n:local pos5 [:find \$totalcurrent \"/\"]\r\
\n:local pos6 [:len \$totalcurrent]\r\
\n:set bytesupcurrent ([:pick \$totalcurrent 0 (\$pos5)])\r\
\n:set bytesdowncurrent ([:pick \$totalcurrent (\$pos5+1) \$pos6])\r\
\n:set megsupcurrent (\$bytesupcurrent / 1048576)\r\
\n:set bytesdownsaved ([:pick \$content (\$pos3+5) \$pos4])\r\
\n:set bytestotal (\$bytesdowncurrent + \$bytesdownsaved)\r\
\n:set megsdowncurrent (\$bytestotal / 1048576)\r\
\n#Begin calculating usage percentage\r\
\n:set percentage ( ( \$bytestotal * 100) / (\$gigs * 1073741824 ) )\r\
\n:log info \"\$sitename: \$percentage% - \$megsdowncurrent MB used - Allowance is \$gigs GB\"\r\
\n:set text \"\$combinedtext \\n \$sitename: \$percentage% - \$megsdowncurrent MB used - Allowance is \$gigs GB\"\r\
\n:set combinedtext \"\$text\"\r\
\n}\r\
\n}\r\
\n:log info \"------ Ending Manual Usage Reports -------\"\r\
\n:local time [/system clock get time]\r\
\n/tool e-mail send server=\$mailserver from=\$fromaddress to=\$adminaddress subject=\"Manual usage report\" body=\"Site Usage report - Runtime: \$time\r\
\n\$text\r\
\nRegards,\r\
\n\$fromaddress\""

RyDeR
25-06-17, 20:29
Σήμερα τοποθέτησα κάποια wap (παλιά έβαζα picostation) και δεν είμαι καθόλου ικανοποιημένος απο την κάλυψη εντός των χώρων. Τι να δώ ώστε να ανοίξω το output power οσο πάει και δεν πάει;

Nikiforos
25-06-17, 20:55
Σήμερα τοποθέτησα κάποια wap (παλιά έβαζα picostation) και δεν είμαι καθόλου ικανοποιημένος απο την κάλυψη εντός των χώρων. Τι να δώ ώστε να ανοίξω το output power οσο πάει και δεν πάει;

καλησπέρα, καταρχην πες μας ποιο ειναι να δουμε τεχνικα χαρακτηριστικα για το τι μπορει να γινει.
Μπορεις να δοκιμασεις να δυναμωσεις το tx power στην καρτελα του wireless , tx power-tx power mode-all rates fixed και απο κατω βαλε νουμερο, οπως ξερω το default ειναι το 17 οποτε δοκιμασε και παραπανω πχ 20, δεν ξερω ποσο παει και ποσο παιζει δεν εχω παιξει ποτε με τοσο πολυ tx power, μονο μεχρι το default για λιγο αυτο.

RyDeR
25-06-17, 21:10
Για αυτό μιλάω:

https://routerboard.com/RBwAP2nD

Θα κάνω ο,τι δοκιμές είναι να κάνω και μετά μάλλον με βλέπω για basebox.

Nikiforos
25-06-17, 22:12
2dbi κεραια εχει, εχω δει και με 1,5 αν θυμαμαι καλα.
Μπορεις για αρχη να δοκιμασεις ρυθμισεις, αν σε ενδιαφερει H/W παρεμβαση για να μπει ποιο μεγαλη εξωτερικη αποσπωμενη R-SMA για πολυ υψηλοτερη απολαβη σε dbi να το δουμε.

griniaris
25-06-17, 23:47
Το εχεις σε εξωτερικο χωρο ετσι?

Ειναι τοποθετημενο πολυ ψηλα μηπως?

Πες καμμια πληροφορια γιατι γενικα παιζουν αρκετα καλα αυτα.

RyDeR
26-06-17, 08:21
Ανεβαζω φωτογραφία (γραφω απο το hiphone). Ακριβως στην πάνω μπαλκονοπορτα, απο τη εσωτερικη πλευρα, το σημα ειναι μηδαμινο.

Μεχρι τι ρύθμιση να παίξω;

griniaris
26-06-17, 09:55
Αν καταλαβα καλα..... το εχεις τοποθετησει σε μπαλκονι στην εξω πλευρα.

Και θες μεσα στο δωματιο να εχει σημα και να παιζει ικανοποιητικα? Πολυ δυσκολο.

Δεν ειναι καθολου ευκολο να πιασεις σημα στην "πλατη" καποιου ΑΡ. Οταν μαλιστα παρεμβαλεται και τοιχος ειναι ακατορθωτο. μονο μεσω ανακλασεων.

Αλλαξε του θεση και βαλτο μεσα στο δωματιο και να κοιταει προς τα εξω. Αλλιως θα εχεις συνεχεια παραπονα οτι δεν δουλευει η υπηρεσια wifi.

Ολα τα ΑΡ εκτος αν το γραφει διαφορετικα εχουν συγκεκριμενη δεσμη που εκπεμπουν. εσυ οχι μονο εισαι εκτος.... αλλα και 180 μοιρες αντιθετα.

Δεν ξερω αν υπηρχε το καλωδιο ηδη εκει ,αλλα αν περαστηκε τωρα, ειναι πολυ λαθος η μελετη που εγινε.



EDIT : αν δεν μπορεις να αλλαξεις θεση, τοτε μαλλον θα πας σε TPlink για οικονομια...

RyDeR
26-06-17, 10:45
Υπηρχε ηδη εκει το καλώδιο.

Το θεμα είναι οτι το αγόρασα γιατι διάβασα οτι ειναι 360 μοίρες το beam του. Απο τη μεσα μερια δεν θα εγκλωβισουμε το σήμα σε ενα σημείο; Δεν μου αρέσει.

Αν παω σε κάτι μεγαλύτερο, π.χ. Basebox με τις omni του, δεν θα εχω κέρδος; Δεν θελω θαύματα αλλα μου φαίνεται απίστευτο αυτό να μην μπορει 2 μέτρα διαγώνια να μην μπορει να δουλεψει.

griniaris
26-06-17, 13:16
Εγω παντως δεν βρηκα πουθενα να λεει οτι εινα για 360 μοιρες.

Μηπως μπερδευτηκες με το official site που εχει στις εικονες ενα 360 ?
Ειναι για να δεις το προιον σε 360 μοιρες. οχι οτι εκπεμπει ετσι.

To Basebox ??? πως σου προεκυψε? ειναι λιγο μεγαλο.... και θελει και pigtail .... και εξωτερικες κεραιες....
Το βαζουμε συνηθως πισω απο πιατακι... ή καποια sector. Δεν νομιζω να ειναι αυτο που θα σε βολεψει.

Δοκιμασε ενα TP-Link EAP110-Outdoor που ειναι φτηνο και που σιγουρα εκπεμπει 360 μοιρες αφου εχει πανω 2 ΟΜΝΙ.

Επισης... δεν εχεις καθολου σημα μεσα? εχεις λιγο? κανε ενα scan δες λιγο τι γινεται με τα καναλια.
Βρες καποιο ελευθερο και καθαρο να δεις αν θα ειναι καλυτερα.

edit: Θες να φτιαξεις ενα νεο νημα και να συνεχισουμε εκει γιανα μην γεμιζουμε αυτο το τοπικ?
Βαλε τιτλο πχ FREE WIFI AP προβλημα .

macro
26-06-17, 14:14
/ip firewall mangle
add action=change-mss chain=forward comment=TCP-MSS_in in-interface=all-ppp new-mss=1452 passthrough=yes protocol=tcp tcp-flags=syn,!rst tcp-mss=1453-65535
add action=change-mss chain=forward comment=TCP-MSS_out new-mss=1452 out-interface=all-ppp passthrough=yes protocol=tcp tcp-flags=syn,!rst tcp-mss=1453-65535
add action=mark-connection chain=prerouting comment="Mark LAN-DNS connections UDP" in-interface=!all-ppp new-connection-mark=LAN-DNS passthrough=no port=53 \
protocol=udp
add action=mark-connection chain=prerouting comment="Mark LAN-DNS connections TCP" in-interface=!all-ppp new-connection-mark=LAN-DNS passthrough=no port=53 \
protocol=tcp
add action=mark-connection chain=prerouting comment="Mark Broadcasts ONLY" dst-address-type=broadcast new-connection-mark="Internal Broadcast" passthrough=no
add action=mark-connection chain=prerouting comment="Mark Multicast ONLY" dst-address-type=multicast new-connection-mark="Internal Broadcast" passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-home new-connection-mark=LAN out-interface=bridge-home \
passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-customers new-connection-mark=LAN out-interface=bridge-home \
passthrough=no
add action=mark-connection chain=forward comment="Mark LAN connections" in-interface=bridge-home new-connection-mark=LAN out-interface=bridge-customers \
passthrough=no
add action=mark-connection chain=input comment="Mark connections through OTE" connection-mark=no-mark in-interface=pppoe-out1ote new-connection-mark=\
input-wan-ote1 passthrough=no
add action=mark-connection chain=input comment="Mark connections through OTE2" connection-mark=no-mark in-interface=pppoe-out2ote new-connection-mark=\
input-wan-ote2 passthrough=no
add action=mark-routing chain=output comment="Route OTE through OTE" connection-mark=input-wan-ote1 new-routing-mark=route-wan-ote1 passthrough=no
add action=mark-routing chain=output comment="Route OTE2 through OTE2" connection-mark=input-wan-ote2 new-routing-mark=route-wan-ote2 passthrough=no
add action=mark-connection chain=prerouting comment="Split OTE connection for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-home new-connection-mark=split-wan-ote1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="Split OTE2 connections for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-home new-connection-mark=split-wan-ote2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting comment="Route split OTE through OTE for clients" connection-mark=split-wan-ote1 in-interface=bridge-home \
new-routing-mark=route-wan-ote1 passthrough=no
add action=mark-routing chain=prerouting comment="Route split OTE2 through OTE2 for clients" connection-mark=split-wan-ote2 in-interface=bridge-home \
new-routing-mark=route-wan-ote2 passthrough=no
add action=mark-connection chain=prerouting comment="Split OTE connection for clients" connection-mark=no-mark dst-address-type=!local in-interface=\
bridge-customers new-connection-mark=splitcustomers-wan-ote1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="Split OTE2


/ip route
add check-gateway=ping distance=1 gateway=pppoe-out1ote routing-mark=route-wan-ote1
add check-gateway=ping distance=2 gateway=pppoe-out2ote routing-mark=route-wan-ote1
add check-gateway=ping distance=1 gateway=pppoe-out2ote routing-mark=route-wan-ote2
add distance=2 gateway=pppoe-out1ote routing-mark=route-wan-ote2
add check-gateway=ping distance=1 gateway=pppoe-out1ote
add check-gateway=ping distance=2 gateway=pppoe-out2ote
/ip route rule
add dst-address=192.168.12.0/24 table=main
add dst-address=192.168.11.0/24 table=main
add dst-address=192.168.4.0/24 table=main
add dst-address=192.168.1.0/24 table=main


έχω δύο bridges και δύο pppoe-out connections
με ips


/ip address
add address=192.168.12.1/24 interface=ether2-ote network=192.168.12.0
add address=192.168.1.1/24 interface=bridge-home network=192.168.1.0
add address=192.168.11.1/24 interface=ether1-ote network=192.168.11.0
add address=192.168.4.1/24 interface=bridge-customers network=192.168.4.0


Δεν εχω καταλαβει αυτοι οι κανονες στα mangles που ακριβως χρησιμευουν να σου πω την αληθεια. Ενταξει το recursive failover πες οτι βοηθαει, αν και με το check gateway=ping που δε δουλευει στα pppoe connections, αμφιβαλλω και για αυτο.

Εσυ το ακριβως προβλημα ειχες και τα εκανες ολα αυτα και τι δορθωσε ολο αυτο?

@ ADSLgr.com All rights reserved.