Description of VLAN Types in Huawei OLT

In Huawei OLT, there are several types of VLAN, briefly describe them:

1) Standard VLAN
Ethernet ports in the Standard VLAN see each other, Ethernet ports of different VLANs are isolated from each other.

2) Smart VLAN
Smart VLAN can have many service ports that are isolated from one another in one VLAN, service ports in different VLANs are also isolated from each other. This type I usually use when setting up Huawei OLT.

3) MUX VLAN
One MUX VLAN can only contain one service port. service ports in different MUX VLANs are isolated from each other.

4) Super VLAN
Super VLAN is based on the 3 level, contains the subvlans (mux or smart), which can interact via arp-proxy.

Installing and using ioping

ioping – a simple tool for monitoring disk I/O delays in real time, similar to ping showing network latency.

You can install in Ubuntu / Debian using the command:

sudo apt-get install ioping

Here is an example of a run with 10 requests for a delay test to the / tmp directory:

ioping -c 10 /tmp

An example of a query with an interval of 0.2ms and an increased query size:

ioping -i 0.2 -c 10 -s 1M -S 5M /tmp

Test to disk:

ioping -R /dev/sda
ioping -RL /dev/sda

I’ll describe the possible startup options:
-c count (stop after the specified number of requests)
-w deadline (stop after the specified amount of time)
-p period (display raw statistics after each specified number of requests)
-P period (display raw statistics after each specified number of seconds)
-i interval (the interval between requests in seconds)
-s size (request size (4k))
-S size (size of the working set)
-k (after the command is finished, leave (do not delete) the working file ioping.tmp)
-L (sequential operations instead of random ones, this will also set the query size to 256k (like -s 256k))
-A (asynchronous I/O)
-C (cached I/O)
-D (straight I/O)
-B (do not display execution information, it will only appear when the command is finished in raw format)
-q (do not display execution information, it will be displayed only when the command completes)
-h (display help)
-v (view version)

How to enable SMTP without SSL on port 25 in iRedMail / Postfix

To allow the sending of messages on the mail server without encryption via port 25, you need to open the Postfix configuration file, for example, in the nano editor (in which Ctrl+X to exit, y/n to save or cancel changes):

sudo nano /etc/postfix/main.cf

And uncomment two lines:

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

And leave the commented line:

#smtpd_tls_auth_only=yes

Reload Postfix to apply the changes:

sudo service postfix restart

After that it will be possible to send messages via SMTP through port 25 without SSL, and as usual through 587 with SSL.

See also:
Allow insecure connections to POP3 / IMAP iRedMail

Adding vlan to Ubuntu for ABillS

Here is an example of adding a VLAN to Ubuntu Server for ABillS.

Switch to the root user:

sudo su

First of all, install the vlan package and load the 8021q module:

apt-get install vlan
modprobe 8021q

To autorun it after restarting the system, open the file /etc/modules, for example, in the text editor nano (Ctrl+X to exit, y/n to save or cancel changes):

nano /etc/modules

And add if it’s not there:

8021q

Create a script:

nano /etc/network/vlan.sh

Add content to it (in IFACE we specify the network interface for vlan, in VLANS – the VLAN list):

#!/bin/bash
IFACE="eth1"
VLANS="51,200-350,700-1000"

  /sbin/vconfig set_name_type VLAN_PLUS_VID_NO_PAD
  VLANS=`echo ${VLANS} | sed 'N;s/\n/ /' |sed 's/,/ /g'`
  for i in $VLANS; do
    if [[ $i =~ - ]]; then
      IFS='-' read -a start_stop <<< "$i"
      for cur_iface in `seq ${start_stop[0]} ${start_stop[1]}`;
      do
        echo "${cur_iface}";
        /sbin/vconfig add ${IFACE} ${cur_iface}
        /sbin/ifconfig vlan${cur_iface} up
      done
    else
    echo "$i";
      /sbin/vconfig add ${IFACE} ${i}
      /sbin/ifconfig vlan${i} up
    fi;
  done

We make the script executable:

chmod +x /etc/network/vlan.sh

Run the script:

/etc/network/vlan.sh

To autorun the script, open the configuration of the network interfaces:

nano /etc/network/interfaces

And add at the end of the line:

post-up /etc/network/vlan.sh

See also my articles:
Configuring VLANs in Ubuntu
Install and configure accel-ppp (IPoE) for ABillS

The solution of error “ERROR 1067 (42000) at line 211: Invalid default value for ‘blablabla'”

I noticed once when importing a sql file the following error:

ERROR 1067 (42000) at line 211: Invalid default value for ‘blablabla’

It arises because new versions of MySQL server use strict mode and parameters such as NO_ZERO_DATE do not allow entering date values like ‘0000-00-00’ into the database.

Connect to mysql server:

mysql -u root -p

Execute a query that displays the values of sql_mode:

show variables like 'sql_mode';

Copy the string with these values and exit mysql:

exit

Open the configuration file for example in the text editor nano (Ctrl+X for exit, y/n for saving or canceling the changes):

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

I did not have sql_mode = in the file, so at the end of the file I inserted the line with the previously copied values, removing NO_ZERO_IN_DATE, NO_ZERO_DATE from it, in my case, the following happened:

sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Restart mysql to apply the changes:

sudo service mysql restart

Done, now when importing this error should not be.

The solution to the error “Service virtual port has existed already”

I noticed once on Huawei MA5683T when I added the service port for ONT the following error:

Failure: Service virtual port has existed already

As reported by the error, the service port is already registered for this ONT.
In my case, there was simply a misprint in ONT ID, it was accidentally indicated by the wrong one, after specifying the correct service port, it was registered.

And if you need to register several service port for one ONT, then see my article – Adding an ONT with trunk port to Huawei SmartAX MA5683T

Adding an ONT with trunk port to Huawei SmartAX MA5683T

Here is an example of adding ONT so that at the output of the ethernet port all VLANs are tagged.
Suppose OLT is configured for my article – Configuring Huawei SmartAX MA5683T through the console.
ONT for the test I’ll take TP-Link GP110 with the configured mode transparent and off DHCP, well, in fact with other single-port ethernet ONT setting is similar.

Continue reading “Adding an ONT with trunk port to Huawei SmartAX MA5683T”

How to disable Windows 10 updates

I’ll describe several options for disabling Windows 10 updates:

1) Disable the update service.
Open the “ Services ” window through the Control Panel, or press the Win+R key combination and in the “ Run ” window, enter:

services.msc

In the list of services, usually at the end, we find “ Windows Update” , click on it with the left mouse button twice, in the opened window, select “ Startup Type: Disabled “and click the” Stop “button, then click” OK “and close the windows.

2) You can disable the automatic downloading of drivers from the Internet.
Using the Win+R keys, open the “ Run ” window and enter:

rundll32 newdev.dll,DeviceInternetSettingUi

In the window that opens, select “ No, give the option to select “, then for example “ Never install drivers from Windows Update ” and click the “ Save “.

3) You can hide updates by running the official utility Show or hide updates and tapping “Hide updates“.

4) You can also turn on the “ Set as limit connection ” radio button for any network connection by going to “ Settings ” – “ Network and Internet ” and selecting the network connection, after that Windows will not download updates via this network connection.

5) Open the “Local Group Policy Editor” by pressing the Win+R keys and typing:

gpedit.msc

Select “ Computer Configuration ” -> “ Administrative Templates ” -> “ Windows Components ” -> “ Windows Update “, then on the right” Set up automatic updates “. In the window that opens, select “ Enabled ” and the desired option, for example, “ Download notification and Automatic installation “.