Although you can now access the CLI OP,But can not do anything,To use WEB access OP,We need to give OP to install on your web page,But only if we want toGive OP connected to the network。
Topology as follows:
Configuration
First, let's giveVANA port configurationIPaddress,MakeONAccess to Internet。According to my topology,mineVANPort should be usedDHCPThe most appropriate way
byWEEditor to modifyVANInterface parameters
[warning]
Command is as follows:
vi / cd etc / config / network
[/warning]
1 2 3 4 5 6 7 8 |
//我们用‘方向键’把光标移到红框处,按i键开始编辑,把这些参数写进去。 config 'interface' 'wan' option 'ifname' 'eth1' option 'proto' 'dhcp' option 'defaultroute' '1' option 'peerdns' '0' //编辑完之后按ESC键推出编辑模式,按“冒号”然后输入wq,回车即可。 //wq表示“保存、退出” |
As shown below:
[warning]
Enter ifconfig to see the OP's WAN port to obtain IP address
[/warning]
Validation and Troubleshooting
uspingone timewww.qq.comTry,Found nowhere,againping 114.114.114.114one time,I found through the。this meansDNShas a problem。As shown below
Why is this? Let's analyze:
Because the OP's LAN address is 192.168.1.1,And my home router gateway is 192.168.1.1,Both addresses repeat,Therefore, the DNS request to the home router can not be disposed of down interception OP,So there is no DNS。
Solution is simple,The OP LAN port address is set to 192.168.2.0/24 network segment。(Distinguished like。)
Continue to use this command to edit the configuration file,vi /etc/config/network
[warning]
Note To modify but not wan lan,Do not make mistakes。Then use the reboot command to restart just to make the changes take effect。
[/warning]
Original article written by LogStudio:R0uter's Blog » Basic settings OpenWRT tutorial series interface
Reproduced Please keep the source and description link:https://www.logcg.com/archives/596.html