Mikrotik SMB – file server configuration

I will use the Mikrotik RB951G-2HnD router as an example.

Connect the media to the USB router.
Let’s look at the status:

store disk print

Format it:

store disk format-drive 1

Reboot the router:

reboot

Add storage:

store add name=share disk=usb1 type=user-manager activate=yes comment="test"

Add share:

ip smb share add name=test max-sessions=15 directory=/test disabled=no comment="test share"

Example of disabling share:

ip smb share disable

Enabling smb:

enable smb

I will give examples of some commands:
ip smb print (view parameters)
ip smb set allow-guests yes/no (allows connection to guest users without entering a password, standard yes)
ip smb set comment TEXT (comment, standard MikrotikSMB)
ip smb set domain NAME (setting the name of the workgroup, standard MSHOME)
ip smb set enabled yes/no (SMB on/off, standard no)
ip smb set interfaces all/wlan1/bridge-local/… (installation of interfaces on which SMB will be started, standard all)

ip smb users add read-only=no name=LOGIN password=PASSWORD disabled=no (user creation)
ip smb users disable (disabling the user)
ip smb users enable (user activation)
ip smb users print (view the list of users)
ip smb users remove (deletion of the user)
ip smb users set read-only=no name=LOGIN password=PASSWORD (user change)

ip smb share enable
ip smb share print (view share list)
ip smb share remove
ip smb share set (changing the parameters of the share)

To get help, use the “?” character on the command line.
To go to the level above – “..”.

Example of configuring the firewall for smb:

add action=accept chain=input disabled=no dst-port=137-138 protocol=udp src-address-list=smb-allow
add action=accept chain=input disabled=no dst-port=137,139 protocol=tcp src-address-list=smb-allow
ip firewall address-list add address=1.1.1.1 disabled=no list=smb-allow

Official documentation:
wiki.mikrotik.com/wiki/Manual:IP/SMB
wiki.mikrotik.com/wiki/Manual:Store

You can also connect a hard drive to the router via the USB-SATA adapter.

Hard Reset Ergo A500 Best

In order to fully reset the settings on the Ergo A500 Best smartphone to the factory settings and erase the user data, perform several steps:

1) Turn off the device.

2) Press the Volume Up and Power Button simultaneously until the menu appears.

3) Press the Volume Up key to select “Recovery” and confirm the selection with the Volume Down key.
Should appear robot android.

4) Press the Volume Up and Power Button again at the same time.
The recovery menu should appear.

5) By the menu, you can move the volume up and down keys.
In this way, select “wipe data/factory reset” and confirm the selection with the power key.
In the next window, select “Yes – delete all user data” and confirm with the power key.
Let’s wait until the data is erased and the settings are reset.
At the end, in the same way, we select Reboot to reboot the device.

Done.

SNMP OIDs for the HP 5800 Switch

I’ll list some of the OIDs I used:
Determine the OID of the processor load by running the command in Linux:

snmpwalk -v 2c -c сommunity host .1.3.6.1.4.1.25506.2.6.1.1.1.1.6
snmpwalk -v 2c -c сommunity host .1.3.6.1.2.1.47.1.1.1.1.7

As a result of the execution of the first command, a list of OIDs will be displayed, those in which a value greater than 0 means CPU loading. If the switches are stacked, then the OID with a value greater than zero will be greater than one. The second team is looking at the description, ours will be “Board”.

Determine the OID of memory usage:

snmpwalk -v 2c -c сommunity host .1.3.6.1.4.1.25506.2.6.1.1.1.1.8

Determine the OID of the temperature:

snmpwalk -v 2c -c сommunity host .1.3.6.1.4.1.25506.2.6.1.1.1.1.12

OID to view the ARP list:

.1.3.6.1.2.1.3.1.1

We look in what vlan are ip:

.1.3.6.1.2.1.2.2.1.2

See also:
SNMP OID and MIB for interfaces

When is it necessary to activate Long Range PtP Link Mode on airMAX?

In normal mode, airMAX sends a confirmation frame (ACK) after receiving the data frame, but at longer distances, it is better to disable this mechanism by setting the Long Range PtP Link Mode checkbox in the settings.

Depending on the channel width, the distance at which you want to turn on the Long Range PtP Link Mode can be different.

40MHz: 16.5 miles (26.5 km)
20MHz: 35.6 miles (57.3 km)
10MHz: 72.3 miles (116 km)
5MHz: 144.7 miles (232.9 km)

Note: this information does not apply to airOS 7, there is another timeout ACK algorithm.

Manual “Basic configuration commands BDCOM P3310B”

Format: PDF
Size: ~ 2 MB
Language: English
Download manual “Basic configuration commands BDCOM P3310B”
https://files.ixnfo.com/Manuals/BDCOM/P3310/BDCOM_P3310B_Basic_Configuration_Commands.pdf

Format: PDF
Size: ~ 1 MB
Language: Russian
Download Quick Setup Guide for BDCOM P3310B
https://files.ixnfo.com/Manuals/BDCOM/P3310/Manual_P3310_Rus_22022013.pdf

See also my article – Configuring BDCOM P3310B-2AC EPON

Monitoring the number of Ubiquiti sector clients by SSH from Zabbix

On the test I’ll give an example of getting the number of clients connected to the usual sectoral antenna Ubiquiti AirMax Rocket M5.
We will receive the data via SSH.

To test once we connect to the device (the first time when connecting, type yes and press enter):

sudo -u zabbix ssh -p 22 admin@192.168.0.55

Now in Zabbix we add the data element to the template or host, for example with the name “Template Ubiquiti Rocket M5 Sector”:

Name: any
Type: SSH agent
Key: ssh.run[clients,,22,utf8]
Authentication method: Password
Username: NAME
Password: PASSWORD
Executed script: the command executed on the device (see below)

Example of the command displayed the number of connected clients:

wstalist |grep "mac" |wc -l

Accordingly, we create a graph for the data element, as well as the trigger:

Name: On the sector antenna {HOST.NAME} > 40 clients
Expression: {Template Ubiquiti Rocket M5 Sector:ssh.run[clients,,22,utff8].last(#1)}>40

See also:
Configuring SSH checks in Zabbix

Configuring PIM on MikroTik

Here is an example of configuring PIM on two MikroTik routers:

Let us configure the first MikroTik.
Add a pim interface and check:

routing pim interface add
routing pim interface p

Add the IP address of RP (this MikroTik):

routing pim rp add address=IP-ADDRESS

Let’s specify from which IP multicast traffic is allowed:

routing pim interface set alternative-subnets=238.0.0.0/24,239.0.0.0/24

Let’s configure the second MikroTik.
Add a pim interface to the uplink WAN port, I have ether1:

routing pim interface add interface=ether1
routing pim interface p

Add the IP address of the RP (the first MikroTik):

routing pim rp add address=IP-АДРЕС

Let’s specify the route of the multicast source: (first MikroTik):

ip route add 239.0.0.0/24 via IP-АДРЕС

Done.