Summarize the basic operation method of OpenWrt system

Source: Internet
Author: User
Tags ssh server

1. Which folder is the OPENWRT system compiled firmware located in?
[Email protected]:/work/openwrt/trunk/bin/ramips# ls

2. Build SMB server, implement virtual machine and Windows shared folder, create a shared directory for SMB server: In order to realize the copy of the compiled firmware into the inside
sudo mkdir/home/ald/smb (path to see your own username, my own is ALD user)

3, Winows get firmware, open run port input \\ specific IP address view own IP virtual machine (if virtual machine and PC Ping pass)

4, modify the IP address of the OPENWRT system
#vi Etc/config/network

5, the source code to modify the OPENWRT system IP address, easy to burn each firmware does not need to change
[Email protected]:~/smb# cd/work/openwrt/trunk/package/base-files/files/bin/
[Email protected]:/work/openwrt/trunk/package/base-files/files/bin# vim config_generate
Case $ in
LAN) uci-q Batch <<eof
Set network.$1.type= ' Bridge '
Set network.$1.proto= ' static '
Set network.$1.ipaddr= ' ' <---modify this
Set network.$1.netmask= ' '
Set network.$1.ip6assign= ' 60 '

6, LAN and WAN conversion

[Email protected]:/# vi/etc/config/network

Config Switch_vlan
Option Device ' rt305x '
Option VLAN ' 1 '
Option Ports ' 0 1 2 3 6t '

Config Switch_vlan
Option Device ' rt305x '
Option VLAN ' 2 '
Option ports ' 4 6t '
Note: The above indicates that ports 0, 1, 2, 3 belong to Vlan0 and Port 4 belongs to Vlan1. The default configuration Vlan0 is Lan,vlan1 for WAN.

7. Configure support Web interface for OPENWRT
# cd/home/linux/openwrt/trunk/
# Make Menuconfig
Compile Luci, # make v=99, enter the development Board IP address on the Web page

8, the Development Board as a wireless access point (AP Mode), for other devices to connect it


Comment out the option disable 1
Restart Network/etc/init.d/network restart

9, in the source to enable the WiFi signal, the Development Board as a wireless access point (AP Mode), burning the firmware does not need to change
[Email protected]:/work/openwrt/trunk/package/kernel/mac80211/files/lib/wifi$ VI

Comment The option disabled 1 out #option disabled 1

10, modify the WiFi name (SSID name),
[Email protected]:/work/openwrt/trunk/package/kernel/mac80211/files/lib/wifi$ VI
Change option SSID OpenWrt to option SSID * * * * *, others can search to get WiFi name called * * *

11, the Development Board as a wireless access point (AP Mode), can also be set through the Web interface
Select Network->wifi after logging into the Web interface to edit the AP

12, the Development Board as a site (STA mode), that is, the client, you can search for the surrounding WiFi connection
After landing the Web interface, select Network->wifi inside the settings, click "Edit" to modify the wireless network card operating mode, from "Access point AP" to "Client clients (WDS)" mode, and then click "Keep & Apply
Go to "network", "Wireless" Interface again, click "Scan" Search button, side can find the surrounding Wi-Fi signal

13, the Development Board as a relay station, that is to receive other WiFi signal (STA mode) and then put these WiFi signals as their own launch (AP mode)
1. Enter (the IP address of your own development Board) in the browser to login to the Web interface
2, click "Network (nerwork)", "Wireless (WiFi)", enter the Operation interface
3, click "Edit" to modify the wireless network card operating mode, from the "Access point AP" to the client-side (WDS) mode, and then click on "Save & Apply"
4. Re-enter the "Network"-"Wireless" interface click on the "Search (Scan)" button
5. Click Join Network, add the WiFi you want to connect to, enter the password, and click "Submit".
6. In the next screen, keep the default configuration, click "Save & Apply",
7, when the configuration is complete, display the connection information, there is a signal that the connection is successful, the client mode (STA) is configured to complete.
8. Once again enter the "Network" and "Wireless" interface, click the Add button
9, in the popup interface, set the SSID and other information, select mode for access point, Network Select LAN, and then "Keep & Apply"
10, once again into the "network" and "wireless" interface, we see two SSID, a working and client mode for connecting WiFi, a
Work with Master mode for making WiFi
11, the Development Board and Windows share files
Add SSH server, function is can implement the Development Board with Windows shared files in Ubuntu configuration
#make Menuconfig
Select Network->ssh->openssh-sftp-server
Exit #make v=99-j 3 admin rights execution
12, the Development Board access to the virtual machine Ubuntu file, the implementation of the virtual machine file content copied to the Development Board
1, the premise of the realization of PC, virtual machine, Development Board of the three ping pass
2. Install SSH Network Service in Ubuntu
$sudo apt-get Install Openssh-server version shows $ ssh–v
3, the Development Board login Virtual Machine ubuntu command, login success after the user name, host name will become Ubuntu
SSH [email protected] where servername is the user name of Ubuntu, ServerIP is the IP address of Ubuntu.
4, we want to download files from Ubuntu to the Development Board, the download is very simple:
SCP Source (server destination file path) target (user name @ User ip: file path) such as:
SCP/HOME/ALD/TEST/A.C [Email protected]:/
5. Return to the Development Board command exit

Summarize the basic operation method of OpenWrt system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.