栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

OpenWrt IN Raspberry pi 4B

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

OpenWrt IN Raspberry pi 4B

Here I gonna show you how to install an OpenWrt into raspberry pi 4B which contains a powerful processor. Then it's much faster than a standard TP-Link router and helps us to handle the multi-linker scenario.

What you need:

  • Raspberry Pi 4B
  • 8GB TF or higher density
  • TF card reader
  • Up-to 2A usb-c power adapter

The soft needs to be pre-install:

  • BalenaEcther
  • Putty
  • Vmware Ubuntu(or other linux OS)
  • Download the OpenWrt 

OpenWrt Firmware SelectorOpenWrt Firmware SelectorOpenWrt Firmware SelectorOpenWrt Firmware SelectorOpenWrt Firmware SelectorOpenWrt Firmware SelectorOpenWrt Firmware Selector

 Install the img to TF card using balenaEctcher

                            

  • Check your existed router to see what's the network ipaddress and dns
    • DNS

      202.96.134.33

      202.96.128.86

                                      

  • IP ADDRESS(Router internal Ip)

192.168.31.1

 So we need to set the OpenWrt statis to same network:

192.168.31.XXX

There're 3 ways to modify:
  1. SSH via Putty

  2. Plug to Ethernet cable directly to PC and enter the file system(ssh or LuCi)

  3. HDMI to display and control by keyboard

I will show how to use SSH to set it up

Connect the raspberry pi 4B to the PC and disable all other networks

        you'll see the default IP address: 192.168.1.1

                                           

 Type the hostname as:192.168.1.1(just use the port 22)

        login as : root 

        Enter

                                

    

 BOOM! 

  Modify the /etc/config/network

                                  

Change the ipaddr to 192.168.31.188 

As far as the ipaddr is in the range of 192.168.31.xx, the OpenWrt will be assigned to same network as the router network. (If you wanna use the pi to dial to modem, that will be another case)

Esc+:wq+Enter to save the changes

Type reboot and check the new IP address  

And you see it's already 192.168.31.188

Now you can unplug the ethernet cable and plug to the router's LAN

And log in the LuCi server

 IPv4 gateway : 192.168.31.1(router is the gateway)-> Save

 Advanced Settings->Use custom servers: the dns we checked in the router->Save

The error shown in the top should be caused without password, use Putty to log in and type :

passwd

-----

------

Edit->Add the wifi password

Enable SSID OpenWrt -> Save

Finally, try to connect the devices to OpenWrt wifi SSID, and it's already linked to the internet 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/944109.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号