Always Running Ethernet Interface On Mikrotik

Posted by Admin Thursday, July 21, 2011 0 comments

Some of X86 server based mikrotiks were showing “R” at ethernet interfaces although the cable is unplug. I did some quick searching and found that on X86 installs by default there is an option “disable-running-check” enabled. What this does is make the interface appear to always be running. As a byproduct if the interface always appears to be running, any IP addressing and routing is also still valid. This means that your router will still thinks this is a valid path.

With a quick command, you can revert this behavior to normal opperation:
In the below command I specified all three of my interfaces at once.


/interface ethernet set 0,1,2 disable-running-check=no
 
(MU).

Mikrotik Hotspot User Manager Backup

Posted by Admin Monday, July 18, 2011 3 comments
Mikrotik Hotspot User Manager Backup - Just simple script to backup and restore for all hotspot user account in user manager.

To backup, open the terminal then type :


/tool user-manager database save
 
And to restore :

/tool user-manager database load
 
Done.


Mikrotik Wireless Retransmits Check

Posted by Admin 0 comments

Wireless retransmission is when the card sends out a frame and you don't receive back the acknowledgment (ACK), you send out the frame once more till you get back the acknowledgment. Wireless retransmits can increase the latency and also lower the throughput of the wireless link.

To check if the wireless connection has wireless retransmissions you need to compare two fields in the wireless registration table: frames and hw-frames. If the hw-frames value is bigger than frames value then it means that the wireless link is making retransmissions. If the difference is not so big, it can be ignored, but if the hw-frames count it two, three or four times or even bigger than the frames count then you need to troubleshoot this wireless connection.

(wm).

Block Bit Torrent In Mikrotik

Posted by Admin Sunday, July 17, 2011 0 comments
The bane of most ISPs is Peer to Peer traffic(p2p). If you run hotels or apartments, especially apartments full of students, p2p will be your main source of issues. In some cases, extreme measure must be taken. So how does one go about taking back their network? The first thing to do is to find the offending traffic.
Mikrotik has some built in matching functionality for p2p traffic. You can use this in mangle rules or firewall rules. In mangle, you can mark the packets and then lower their precedence, or stick them in a smaller queue. In the firewall, you can block them all together.
Notice the many matches

New Model Of Mikrotik Wireless Router

Posted by Admin 0 comments

The omnitik is now going to be released. It is a cute little mimo omni outdoor radio, but also has a 5 ethernet ports. The only downside(and only an opininon) is that it is an A/N radio. I would like to see a B/G version. I would love to see the B/G version for golf courses and the like.

7.5 dBi antenna
400 Mhz proc
32 MB RAM
MSRP $119

Webfig Skins

They talk about webfig skins. This gives you the ability to customize the webfig interface. The only downside is that you don’t have the option to make the base page load straight to webfig when you browse to the router. It still loads to the generic Mikrotik screen which gives you the menu options for webfix/winbox/etc.

Wireless Options Simplified

They’ve merged ht-extension-channels into the channel-width option.

SXT Reflector

They highlight a 3rd party reflector that you mount the SXT on that narrows the beam with down by 20 dBi…25 down to 5. They are saying it buys you an extra 7KM.
Nothing really blowing my skirt up, but at least more product is hitting the market.




(gsw).

Wireless Point To Point Setup

Posted by Admin 0 comments
Mikrotik Wireless Point To Point Setup - When you are looking at a point to point (P2P) wireless link you will hear people mention “line of sight”. As in, if I stand at one point can I see where the other antenna will be mounted. I once thought “as long as I can see the other antenna, I’m good…right?” Not exactly. There is this tiny thing called the Fresnel zone.
Wikipedia will give you the complete scoop, so I will paraphrase :) The Fzone is the shape of the wireless signal between two radios.

What most people don’t realize is that the wireless Fzone between two radios is shaped like a football. It is actually fatter in the middle and tapers down towards the ends. What this means is that if you have a large obstruction in the middle of your Fzone, you will get degraded signal. Degraded signal means lower throughput and possibly no connection at all! So, how does one figure all this mess out?
Find point A’s elevation, point B’s elevation and the elevation of point M, which is the halfway point between A and B. A great place to find this info is here. This is Daft Logics altitude finder. It will give you the altitude for a point on a google map.
Lets say that site A is 100′, B is 200′ and M is 120′.


Our setup
What we want to do is take the site with the lowest elevation and make it 0 by subtracting itself:
Site A now: 100 – 100 = 0
Then subtract Site A’s original value from the other sites:
Site B now: 200 – 100 = 100
Site M now: 120 – 100 = 20
Site A = 0, site B = 100 and site M = 20.


Leveling the playing field.
Then find the distance between point A and B “as the crow flies”, aka a straight line. You can again use Daft Logic for this.
We will say that our distance is 10 miles.
Now visit an Fzone calculator like this one. Put in your distance and frequency and it will give you the height of the Fzone at midpoint. I’m saying my distance is 10 miles and my frequency is 5800. This gives me an Fzone height of 46′ at 5 miles (the halfway point).
So using all of this information I know that my Fzone midpoint will be 50′ at 5 miles(site A elevation + site B elevation / 2). This is the center of the Fzone at 5 miles, and we know that from our Fzone calc that the Fzone is 46′. If we divide that in half, we get 23′. So now we take our 50′ midpoint for the Fzone, subtract 23′ and last subtract the mid point M’s elevation which is 20 and we end up with 7′.


That's a spicy meatball.
It looks like the earth isn’t hitting our Fzone, but if anything stands higher than 7′ at that mid point, it will start to eat into our Fzone. What can we do? We can raise up our antennas to increase our distance from earth.

(gsw) .

Configure Mikrotik CPE Router

Posted by Admin Thursday, July 14, 2011 0 comments

This is my first post about the Mikrotik Product.  I will be putting up several examples in the coming weeks and months, so if you don’t see what you are looking for, be sure to contact me directly.  Leaving a comment is fine, but not likely to be “answered” unless it is a clarification for the specific article.
This article is intended to be a short guide to help you configure a Mikrotik router to behave in a way that is similar to a soho router with a wireless connection upstream.  This configuration is perfect for a WISP that is using devices like the RouterBoard 411 (priced at about $59), along with a CM9 or similar radio (about $40), associated power supply, outdoor enclosure/antenna, etc.  The total cost of a flexible device like this is about $150-160, including everything needed to install at a customer’s house or business.

This particular configuration features a DHCP server for the LAN clients, wireless upstream and a NAT function that will allow you, the WISP, to only require a single IP for the customer.  For the impatient, you can scroll to the bottom for a CUT/PASTE complete script without further ado.  For those that WANT further ado, read on…
Step one with a newly opened RouterBoard product is to log into the board.  Other articles explain that process, so I won’t take time to do it here.
Now, on with the explanation:
# Get rid of any static routes
/ip route remove [find]


This removes any routes that may have been added by the vendor you purchased your router from.  There are a few that may set this up.
#turn on all interfaces and delay for 3 seconds
/interface enable [find]
:delay 3

This bit of code will enable all interfaces on the router (including the wlan card, which is not “on” by default).  The “:delay 3″ line causes a pause in the processing of the script.  This allows time for the system to load the drivers for the wlan card.
# Set SSID and band
/ interface wireless
set wlan1 mode=station ssid="SET_ME" band=2.4ghz-b/g disabled=no

This is where you will configure the parameters for the operation of the wlan card.  In this example, we set the card to operate as a 2.4GHz client in either “b” or “g” mode.  Your network may be different, so set this accordingly.  You can determine the supported bands with the following command:
/interface wireless info print
The CM9 card, for example, supports the following bands:
2ghz-b, 5ghz, 2ghz-g, 5ghz-10mhz, 5ghz-5mhz, 2ghz-10mhz, 2ghz-5mhz
#Next, we set the identity:
#Set customer name here -- no spaces or crazy characters please
/system identity
set name="client_NAME"

This is the name that will show up in the top of Winbox and as part of the prompt in terminal mode.  You will, also, see this name in the “neighbor list” of other local routers (“/ip neighbor print”).  Setting this makes it pretty easy to see which device is which when connecting to multiple routers.
# Set the wireless card to get an IP via DHCP
/ ip dhcp-client
add interface=wlan1 add-default-route=yes use-peer-dns=yes \
use-peer-ntp=yes comment="This interface talks to the tower" disabled=no

If you provide your customers with an IP address via DHCP server at the AP, then this is the code you will use to set up the client side.  If you assign your customer a static IP address, then you can add that IP below and leave this portion of the configuration out.
# This should be the IP inside the network...
# Doesn't need to be changed unless the network demands it (private network)
/ ip address
add address=192.168.7.1/24 interface=ether1 \
comment="This is the customer's gateway" disabled=no

We are assigning the CUSTOMER LAN address here.  If they are using a different range of addresses (static assignments), then you may need to alter this address and the DHCP server below.  Also, you can add the “outside interface” (wlan card) IP address assignment here if that is the way your network functions.  You just have to duplicate the last 2 lines and set the “interface” to “wlan1″ and set the address appropriately.  Also, you will have to add the default route as follows:
/ip route add gateway=10.10.10.1
Just be sure that you set the gateway appropriately for your network.
# Configuration for the DHCP server for the LAN
/ ip pool
add name="dhcp_pool1" ranges=192.168.7.100-192.168.7.200
/ ip dhcp-server
add name="dhcp1" interface=ether1 lease-time=1d address-pool=dhcp_pool1 \
bootp-support=static authoritative=yes disabled=no
/ ip dhcp-server network
add address=192.168.7.0/24 gateway=192.168.7.1 dns-server=4.2.2.3


This code does several things, but as a whole, it sets up a DHCP server on the LAN side of the network.  If you changed the LAN IP above, you will need to make adjustments in this section of the configuration.  Note that the “dns-server” setting here is the server that is sent to the LAN clients.
# You can change the DNS to be what you want
/ ip dns
set primary-dns=4.2.2.2 secondary-dns=4.2.2.3 \
allow-remote-requests=yes cache-size=2048KiB cache-max-ttl=1w

Strictly speaking, the DNS servers here are not necessary, but are advised.  Just ensure that you use working DNS servers here.  One reason you may want to set these is if you want to create a caching dns server for the LAN clients.  If you want to do this, you can set the “dns-server” parameter above to point to the 192.168.7.1 (ether1 IP) address.  Note the option above that says “allow-remote-requests=yes“.  That is not a default setting (it’s off by default), so be sure that you turn it on if you want the caching dns server to work.
/ ip firewall nat
add chain=srcnat out-interface=wlan1 src-address=192.168.7.0/24 \
action=masquerade disabled=no

This section only has to be changed if you made changes to the LAN IP address above.  This is the code that sets up the router to masquerade (NAT) traffic out the wlan port.
That’s all there is to it! Below you will find the full script ready for you to hack to fit your network.  Just copy this code to the clipboard (highlight it, then hit CTRL-C), then paste it into notepad (or other favorite text editor), make appropriate changes and save it somewhere that is convenient for you.  To use it on a router, you simply connect to the NEW router, open a “New Terminal”, RIGHT-CLICK in the window and select paste.  That’s all there is to it!  Here’s the script in it’s entirety:
# Get rid of any static routes
/ip route remove [find]

#turn on all interfaces and delay for 3 seconds
/interface enable [find]
:delay 3

# Set SSID and band
/ interface wireless
set wlan1 mode=station ssid="SET_ME" band=2.4ghz-b/g disabled=no

#Set customer name here -- no spaces or crazy characters please
/system identity
set name="client_NAME"

# Set the wireless card to get an IP via DHCP
/ ip dhcp-client
add interface=wlan1 add-default-route=yes use-peer-dns=yes \
use-peer-ntp=yes comment="This interface talks to the tower" disabled=no

# This should be the IP inside the network...
# Doesn't need to be changed unless the network demands it (private network)
/ ip address
add address=192.168.7.1/24 interface=ether1 \
comment="This is the customer's gateway" disabled=no

# Configuration for the DHCP server for the LAN
/ ip pool
add name="dhcp_pool1" ranges=192.168.7.100-192.168.7.200
/ ip dhcp-server
add name="dhcp1" interface=ether1 lease-time=1d address-pool=dhcp_pool1 \
bootp-support=static authoritative=yes disabled=no
/ ip dhcp-server network
add address=192.168.7.0/24 gateway=192.168.7.1 dns-server=4.2.2.3

# You can change the DNS to be what you want
/ ip dns
set primary-dns=68.109.202.25 secondary-dns=10.21.11.1 \
allow-remote-requests=yes cache-size=2048KiB cache-max-ttl=1w

/ ip firewall nat
add chain=srcnat out-interface=wlan1 src-address=192.168.7.0/24 \
action=masquerade disabled=no


Source : http://blog.butchevans.com/2008/06/how-to-configure-a-mikrotik-router-to-replace-cpe-router/