4G to wifi solution research: openwrt and ppp dial-up and rt3070
Foreword
I have n’t studied this for a long time, the main reason is that other things
have stalled. I have to start research today and finally have a breakthrough. First, before starting today, please make sure that you have installed the openwrt virtual machine correctly. Those who have not installed can refer to me 'S last blog post.
Configure the network
After powering on:
enter in the command line:vi /etc/config/network
Modify the lan ip address in the opened file to the ip address you need (to prevent conflicts with other ip addresses)
and then save and exit to
restart the network, if not, you can directly reboot like me.
Next, configure the
right button of the vm where you think it is, (I think it is the row in the lower right corner of the virtual machine)
right-click the network connection diagram to select settings, enter this page,
select the custom network, and then select network 1.
After the configuration is complete, save and leave.
Finally, configure the local connection.
Be careful not to repeat the ip.
connection
First, ping the previous ip, I am 192.168.1.5, you can configure the ping according to your own.
It ’s OK like this. If you ca n’t connect at this time, restart your device or computer. try again.
Or right-click on the network in the VM and select Disconnect to see if there is such a print.
Then right-click on the VM's network connection icon to see if there is such a print.
If it does, then ping it again. If it still fails, check the local connection Ip configuration in ip and ip configuration in openwrt.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enter the address 192.168.1.5 in the browser to enter the configuration page
as shown in the figure
or http://192.168.116.5/cgi-bin/luci/
It is basically OK to enter this page ~~ (^ _−) ☆
Conclusion
At this point we have implemented the basic environment of openwrt. The next step is to first release the virtual machine network through rt3070. This step may be completed in 1 ~ 3. (It depends on whether I am busy or not)
**=================================================**
New beginning
2020.3.6
Pinging other network cards shows network is reachable- fault repair
I found that although my own openwrt can open the configuration webpage, it cannot access the Internet,
such as pinging baidu.com and
pinging the host.
I have studied this for quite a long time, and after groping and encountering the advice of the big brother, I finally solved the problem.
The first is that the ping host appears: network is reachable. Eventually it was found that there was a missing
route. Adding routes manually in the configuration interface was completed.
At this time, route -n
you can use the instructions to see the
key points: gateway fills in the IP of the corresponding network card of your host's virtual machine . If the entry is wrong, it
will cause the ping host not to display network is reachable but to stay there. Tip
: I just entered it once and found it for a long time. I think it is not easy to find an article that can introduce the configuration of the web page function. In the future, if there is time, I will write an article that describes how to use the page. At
this time, you can ping the external network to see, such as Baidu.
If it works, then you have completed the repair.
If it is still bad address.
Then you can ping your host ip, if it can be connected at this time,
then ping Baidu's ip: 220.181.38.148
If it can be connected, then you have the same problem as me.
This problem is the DNS server configuration is wrong.
You can then nslookup www.baidu.com
look at
if you can have a normal DNS following effect (screenshot on ubuntu)
Can ping IP but not domain name
Now
the problem is solved. The problem is: you can ping the IP but not the domain name. There
are three steps:
First:
vi /etc/config/network
modify it to the following:
DNS 8.8.8.8 is Google ’s domain name server. The network speed may be slower, but it is very convenient.
Then
/etc/init.d/dnsmasq restart
restart the DNS server
by. Second, complete the restart at the
rm /etc/resolv.conf
ln -s /tmp/resolv.conf.auto /etc/resolv.conf
last reboot
click.
Now ping Baidu is OK.
Conclusion 2
This time the problem is actually a very small problem, but it takes a lot of time, which shows that the development of the product must be serious and rigorous. Every step must understand why it is done. Many strategies are suitable for the environment of the other party. Many parameters are not clearly stated, which leads to a bug when moving over, and the last step is superimposed. If you are confused about some parameters, you can leave a message. If I see it, I will explain.
Finally, I wish you all a smooth development. (σ ゚ ∀ ゚) σ…: * ☆ Ouch, it ’s good