User Tools

Site Tools


linux:openwrt:openwrt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux:openwrt:openwrt [2020/10/23 12:06] percylinux:openwrt:openwrt [2022/05/03 19:50] jianqing
Line 10: Line 10:
      
 ===== Update network config ===== ===== Update network config =====
-After install the image in the VMM, need to update the network config+After install the image in the VMM, need to update the network config(/etc/config/network)
   - gateway   - gateway
   - dns   - dns
  
-```+<code>
 config interface 'lan' config interface 'lan'
  option type 'bridge'  option type 'bridge'
  option ifname 'eth0'  option ifname 'eth0'
  option proto 'static'  option proto 'static'
- option ipaddr '192.168.1.18'+ option ipaddr '192.168.2.1'
  option netmask '255.255.255.0'  option netmask '255.255.255.0'
  option ip6assign '60'  option ip6assign '60'
Line 25: Line 25:
  option gateway '192.168.1.1'  option gateway '192.168.1.1'
  list dns '8.8.8.8'  list dns '8.8.8.8'
-```+ 
 +config interface 'wan' 
 +        option ifname 'eth1' 
 + option proto 'dhcp' 
 + 
 +</code>
  
 ===== Install luci ===== ===== Install luci =====
-https://openwrt.org/docs/guide-user/luci/luci.essentials +  - https://openwrt.org/docs/guide-user/luci/luci.essentials 
-``` + 
-opkg update +  opkg update 
-opkg install luci +  opkg install luci 
-```+
 ===== Install tools ===== ===== Install tools =====
 ``` ```
Line 49: Line 54:
  
 ===== Install BBR ===== ===== Install BBR =====
-``` + 
-opkg install kmod-tcp-bbr +  opkg install kmod-tcp-bbr 
-insmod kmod-tcp-bbr +  insmod kmod-tcp-bbr 
-lsmod|grep bbr +  lsmod|grep bbr 
-```+
   vim /etc/sysctl.conf   vim /etc/sysctl.conf
 And add the following: And add the following:
Line 62: Line 67:
   sysctl -p   sysctl -p
  
-```+<code>
 lsmod|grep bbr lsmod|grep bbr
 tcp_bbr                16384 35  tcp_bbr                16384 35 
-```+</code> 
 + 
 + 
 +===== Update hosts ===== 
 +  vim /etc/config/dhcp 
 + 
 +Add the `list addnhosts '/etc/myhosts'` 
 +<code> 
 +config dnsmasq                                                                                                     ...                                                                                            
 +        list addnhosts '/etc/myhosts'     
 +</code> 
 +Then add your hosts to /etc/myhosts 
 +  vim /etc/myhosts 
 +   
 +Then restart the dnsmasq service 
 +  /etc/init.d/dnsmasq restart 
 + 
 + 
 +The network eth0 doesn't work, and saw the log 
 +  device eth0 entered promiscuous mode 
 +After google, I try to disable promiscuous mode. 
 +ifconfig eth0 -promisc 
 + 
 +  - https://help.aliyun.com/document_detail/41541.html 
 +  - https://ieevee.com/tech/2016/11/24/promisc.html 
 + 
 +   
 +   
/var/www/dokuwiki/wiki/data/pages/linux/openwrt/openwrt.txt · Last modified: 2022/05/03 19:52 by jianqing