/ / Setting up OpenWRT. Firmware and networking through a router

Configuring OpenWRT. Firmware and networking through a router

OpenWRT is a special operating system designed to be installed on small devices that have a limited set of characteristics. For example, routers.

System Information

The operating system OpenWRT is based, as well asalmost everyone else, on the Linux kernel. To manage, you use the command-line mechanism or the shell for the GUI. The system has its own repository, from which it is possible to install packages using opkg.

Of the features can be distinguished use of the JFFS2 file system. This allows you to use the OpenWRT OS in a wide variety of devices.

openwrt setup

Basic firmware has a limited setfunctions, which can be expanded by installing the necessary packages. The use of the system in routers is possible, thanks to the support of various methods of data transmission. For example, these are:

  • Static IP.
  • DHCP Client.
  • PPTP;
  • PPPoE.

Configuring OpenWRT

Many firmware do not support the graphical interface "out of the box." And this means that you need to install it. But until then, you will have to use the command line.

This will help ssh. In order to connect to the router on the OpenWRT operating system, you need to dial the following command in the terminal: ssh [email protected].

While there is no password in the system, the router will let the user go. This means that after the entrance you need to create it immediately. To do this, you have the command: passwd - the password you need.

openwrt luci setup

Now you need to connect the Internet, which, by the way, too, no. All actions will occur on the command line. To configure, you need to edit the file that is located at: etc / config / network. You can edit using the vi editor. For PPPoE, it will be enough to specify the username and password provided by the provider in it.

After saving the file, restart the network. This is done like this:

/etc/init.d/network reload

Now the network should appear, and you can finally download and install a convenient graphical interface. For this we use the mechanism of working with the packages opkg:

  • opkg update;
  • opkg install luci.

Now you need to start the web server:

  • /etc/init.d/uhttpd start;
  • /etc/init.d/uhttpd enable.

After all the manipulations, the settings of the router will be available at the same address from the browser.

Inside the administrative panel

After entering the standard IP address in the addressthe authorization window opens in which you need to specify a user name and a previously created password. The interface is a set of tabs with fields for settings.

openwrt reset

You can change or configure the network in theNetwork. It lists the available interfaces, among which it is easy to find LAN and WAN. The second and provides communication with the provider. Edit it by clicking the Edit button.

Wi-Fi

Setting up in the OpenWRT Wi-Fi network is not much different from other devices and firmware. This operation is also performed through the Network tab. It has a Wifi padding.

To create a new network, use the Add button, and to edit the existing one, use Edit. In either case, the settings are the same.

In the General Setup section, the network name in the ESSID field is set. This name will be displayed in the list of networks available for connection via any Wi-Fi device.

openwrt router setup

The Wireless Security section contains settingssecurity. In particular, you can set the authentication method and password for the connection. The remaining parameters are optional. WiFi settings in OpenWRT can be considered installed.

Additional settings

For more convenient use of Russian-languageusers of the OpenWRT configuration in Luci can be localized. This is done using the built-in firmware of the Software, located in the System tab. Here the Update Lists button is of interest. The Available packages tab displays a list of available packages. Among them you can find Luci-i18n-russian. This is the Russifier for the OpenWRT settings in Luci. On the left is the Install button, which installs the package into the system.

After the successful installation, you need to activateRussian language. You can do this on the System tab and the sub-tab. Here you need to find the Language and Style section. It contains a list of installed languages, among which you need to select Russian and click Save and Apply.

openwrt 3g modem setup

Sometimes it is useful to reset the settingsOpenWRT. This may be necessary after unsuccessful experiments with firmware or other software. There is no standard solution for this in OpenWRT. Therefore, you must perform all operations through the command line. It is necessary to execute several commands:

rm -rf / overlay / *

sync

reboot

What's going on here? In fact, the root of the file system is a virtual image, divided into two parts. One of them is used only for reading. The second - in read and write mode. That's it and you need to format it, which is done with the help of the presented commands.

Router on OpenWRT and 3g modem

Sometimes routers have the ability to connect 3G-devices to connect to the Internet. Setting up a 3G modem in OpenWRT is not as difficult as it might seem.

To do this, you need to get into the administrative panel of the router. Then connect the modem. In the "Network" tab in the list of interfaces there is a button "Add a new interface".

Then you will need to specify a new name. Latin characters can be used as available characters. The protocol used is 4G / 3G, modem - NCM. And the interface is wwan0. After specifying all the settings, click "Apply".

Now it remains to do the adjustment of the interface itself. To do this, specify the device. If the modem is one, then you need to choose the value with USB0. In the field, the APN access point is specified from the operator.

In the advanced settings of the OpenWRT routeryou need to select the MTU packet size, the modem response initialization time and many other fine settings that can be useful in case of unstable router operation.

In general, the listed facilities should be sufficientto start and run the Internet from the router. If something went wrong, then you need to look for additional information about a particular device and set the parameters in accordance with the recommended ones.

Read more: