The method of configuring OpenWRT routing is detailed

  

OpenWRT is an embedded Linux system. Friends who want to understand the embedded Linux system are blessed. Today, Xiaobian wants to introduce the basic configuration of OpenWRT routing. Let's learn together.

chnroutes routing table

This routing table contains all the IP segments assigned to mainland China, according to http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic- The latest automatic update every day makes it possible to access the domestic address without going through the VPN.

Imagine if you can connect your home's route directly to the VPN. All the devices connected to WiFi at home can directly achieve the effect of the Fan wall. It should be very cool. So recently, a Netgear WNDR3800 second-hand route was returned from a certain treasure. VPN + chnroutes was successfully configured in DD-WRT and OpenWRT, respectively, and finally OpenWRT was selected.

DD-WRT vs OpenWRT

Regarding DD-WRT and OpenWRT, I chose OpenWRT mainly because there are too many software integrated in DD-WRT ROM, most of them are not used, and jffs2 should be configured. To save the script file, the general configuration is saved in nvram, and the wireless is unstable, and the 5G frequency band is often not searchable (of course, it may be the support problem of my router model). OpenWRT's configuration file syntax is unified, the configuration is stored in the file system, and the ROM itself only integrates the necessary components, very small, can only install the required things, the WEB management interface is also optional installation, simple and powerful, after several days Use has been relatively stable.

Configuration

Children's shoes that have been configured with OpenWRT can skip 1. Brush ROM and 2. Initial configuration

1. Brush ROM

a. First make sure your device is supported by OpenWRT (see the list of supported devices here: http://wiki.openwrt.org/toh/start), then download the compiled ROM here: http://downloads .openwrt.org/. The latest stable version is attitude_adjustment (12.09), I downloaded the trunk version.

b. Look for the flashing method on the wiki page of the corresponding device on the OpenWRT website. Generally, it is directly brushed in the official web firmware upgrade page of the router (my WNDR3800 Wiki page is: http://wiki.openwrt. Org/toh/netgear/wndr3800)

2. Initial configuration

a. After the router is started, some models do not have a Wifi module installed. You need to connect to the LAN port with a network cable first. configured as static 192.168.1.x, then telnet to 192.168.1.1, change the root password, then ssh connected to the reference: http: //wiki.openwrt.org/doc/start#configuring.openwrt

b. Configure the WAN port and connect the route to the Internet. See http://wiki.openwrt.org/doc/howto/internet.connection.

For example, to configure PPPoE:

The code is as follows:

uci set network.wan.proto=pppoe

uci set network.wan.username=&lsquo ;[email protected]

uci set network.wan.password=‘yourpassword’

uci commit network

ifup wan

c. Install the LuCI web management interface and set the boot to start automatically. Reference: http://wiki.openwrt.org/doc/howto/luci.essentials

The code is as follows:

opkg update

opkg install luci

/etc/init.d/uhttpd start

/etc/init.d/uhttpd enable

d. Browser input router LAN side IP (mostly 192.168.1.1), and other configurations were Wifi

Previous 12 Next total 2

Copyright © Windows knowledge All Rights Reserved