宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

用这个就是想无线打印,打印机也不连电脑共享,就连上openwrt。

首先是刷机:

我是W720N,https://openwrt.org/toh/tp-link/tl-wr720n,官方说支持到17.01.5。只是打印,就不再编译了。

其次是中继到原有的无线网络,要求同网段。

https://bandwh.com/net/28.html   openwrt通过中继桥设置同网段无线中继

https://oldwiki.archive.openwrt.org/doc/recipes/relayclient   带有中继(伪桥)的路由客户端

也就是安装luci-proto-relay 设置新接口中继桥。

SSH登录上去

更新组件包package
opkg update
安装组件
opkg install luci-app-p910nd
opkg install kmod-usb-printer

到服务去打开打印服务器

windows添加tcp/ip打印机,192.168.1.1:9100  带端口

手机可以用printbot 来打印,添加打印机 不需要填端口

详细说明:

刷机:

http://downloads.openwrt.org/releases/17.01.5/targets/ar71xx/generic/openwrt-17.01.5-ar71xx-generic-tl-wr720n-v3-squashfs-sysupgrade.bin

就刷这个包

Step 1: Information to Note 注意事项

Your Main Router’s WPA2 encryption key (aka “WiFi password”)

Your Main Router’s subnet (In my example, I will use 172.16.16.0/16 which means my subnet mask is 255.255.0.0)

Your Main Router’s SSID (aka “WiFi network name”)

找到你主路由的wifi密码。或者说上级路由的wifi密码

上级网络的子网,我的实验环境是 10.0.0.1/24,255.255.255.0

上级无线路由的无线名

Step 2: Initial Set-up 初始设置

Power on your Client Router

Connect an Ethernet (RJ45) cable from your Computer to your Client Router.

Set your computer to have a Static IP address of 192.168.1.5 and a Gateway of 192.168.1.1

In System > Administration, make sure you have the packages luci-proto-relay and relayd-bridge installed.

打开子路由电源。
使用网线连接电脑和子路由LAN口。
设置电脑IP地址:192.168.1.5,网关192.168.1.1。
通过Administration–Software–Installed packages确认已安装uci-proto-relay and relayd-bridge。
luci-proto-relay and relayd-bridge 可以在联网以后检查是否安装。

Step 3: Joining the Main Router’s WiFi

Open your browser, and go to http://192.168.1.1/

Go to the page Network > WiFi

Beside your preferred radio, such as Radio1 (801.11an)click Scan.

Select your Main Router’s SSID (ex: Eagle)

Enter your PSK (Wi-Fi password).

Create a NEW Network called “wwan” or anything else you like (ex: “Quack“)

Firewall-Zone should be set to “lan“.

打开浏览器访问 http://192.168.1.1/

进入网络设置 Network > WiFi

在 802.11bgn (radio0),右边 点击Scan.

选择你主路由的无线名,点击右边的Join Network。

.

 “wwan” 或输入你喜欢的名字。

Firewall-Zone 选择”lan“.

Step 4: Create the WiFi Client Interface 编辑WIFI客户端类型

Go to the page Network > Interfaces

Edit the above interface (called “wwan“, “Quack” or whatever you chose)

Set Protocol/Mode = DHCP Client

菜单 Network > Interfaces

编辑你的网络(名字应该是”wwan“, 或你自己设置的名字)

设置Protocol/Mode = DHCP Client

这时候应该已经能上网了,安装插件
System–Software–Update lists   更新软件包列表

Available packages (luci-proto-relay)    — Install 安装

   — Install 安装

   — Install 安装

Step 5: Create Bridge Interface 创建桥接

Go to the page Network > Interfaces

Create a new Interface called “stabridge

Set Protocol/Mode = Relay Bridge

Relay between “lan” and “wwan“, “Quack” or whatever you chose)

Local IPv4 Address for the Bridge = “172.16.16.154

进入 Network > Interfaces

创建一个新接口  Add new Interfaces — 

设置 Protocol/Mode = Relay Bridge (中继桥)

同时选择”lan” 和”wwan“, 或你自己定义的。

Local IPv4 Address 给桥设置IP地址 “10.0.0.4

Step 6: Update the “lan” Interface 编辑LAN类型

Go to the page Network > Interfaces

Beside “lan“, click Edit.

Set IPv4 Gateway to the IP address of your Main Router (in my case, it’s 172.16.16.1)

Set Custom DNS to also be the IP address of your Main Router (in my case, it’s 172.16.16.1)

Under the section of DHCP Server, CHECK OFF “Ignore Interface

 Network > Interfaces

选择”lan“, 点击Edit.

设置IPv4 Gateway 到你的主路由IP(在我这个示例中10.0.0.1)

设置Custom DNS 一样到主路由IP(在我这个示例中10.0.0.1)

DHCP Server – General Setup – Ignore interface Disable DHCP for this interface.  选购,关闭LAN接口的DHCP.

Step 7: Allow Firewall Forwarding 允许防火墙转发

Go to the page Network > Firewall

Scroll down to “Zones”. Beside “lan“, click Edit.Set Forward = Accept. (Input & Output should already be set to Accept)

Set Covered Network = “lan” (default) & “wwan“, “Quack” or whatever you chose)

“Zones” – “lan“, 点击 Edit.

设置 Forward = Accept.

设置 Input = Accept
设置 output = Accept

勾选 Covered Network = “lan” 和 “wwan“, 或你自定义的。

 Network > Firewall

“Zones” – “lan“, 点击 Edit.设置 Forward = Accept.

设置 Input = Accept
设置 output = Accept
勾选 Covered Network = “lan” 和 “wwan“, 或你自定义的。

Step 8: Set a DHCP Reservation in the Main Router’s Settings 在主路由设置子路由静态DHCP

In your Main Router, set a static DHCP reservation for your Client Router’s MAC Address. Use the SAME IP address as in Step 5-5 (In my case, it would be 172.16.16.154)

在主路由绑定子路由的MAC地址到静态DHCP 在我的例子是10.0.0.4

Step 9: Reboot Your Client Router  重启子路由

Go to the page System > Reboot > Reboot Now

On your computer, clear your static IP settings, and let the IP be retrieved automatically.

Your Client Router should now be accessible at the address of 172.16.16.154 or whatever you chose.

Your computer should also have an IP address in the same subnet as your Main Router (In my case, it’s 172.16.16.#

If you set your computer to the same static IP address settings as in Step 2-3, you should still be able to connect to the client router at 192.168.1.1

 System > Reboot > Reboot Now

在电脑取消静态IP,改为DHCP获取IP地址

你应该可以通过桥地址 ,子路由静态DHCP地址来访问子路由

Step 10: Enable p910nd – Printer server  打开P910nd打印服务器

Services-p910nd – Printer server  勾选enable

sane-backends-all  这个包是扫描仪用的

SANE (Scanner Access Now Easy) is a universal scanner interface. . Metapackage for selecting all SANE Backends

————恢复内容开始————

用这个就是想无线打印,打印机也不连电脑共享,就连上openwrt。

首先是刷机:

我是W720N,https://openwrt.org/toh/tp-link/tl-wr720n,官方说支持到17.01.5。只是打印,就不再编译了。

其次是中继到原有的无线网络,要求同网段。

https://bandwh.com/net/28.html   openwrt通过中继桥设置同网段无线中继

https://oldwiki.archive.openwrt.org/doc/recipes/relayclient   带有中继(伪桥)的路由客户端

也就是安装luci-proto-relay 设置新接口中继桥。

SSH登录上去

更新组件包package
opkg update
安装组件
opkg install luci-app-p910nd
opkg install kmod-usb-printer

到服务去打开打印服务器

windows添加tcp/ip打印机,192.168.1.1:9100  带端口

手机可以用printbot 来打印,添加打印机 不需要填端口

详细说明:

刷机:

http://downloads.openwrt.org/releases/17.01.5/targets/ar71xx/generic/openwrt-17.01.5-ar71xx-generic-tl-wr720n-v3-squashfs-sysupgrade.bin

就刷这个包

Step 1: Information to Note 注意事项

Your Main Router’s WPA2 encryption key (aka “WiFi password”)

Your Main Router’s subnet (In my example, I will use 172.16.16.0/16 which means my subnet mask is 255.255.0.0)

Your Main Router’s SSID (aka “WiFi network name”)

找到你主路由的wifi密码。或者说上级路由的wifi密码

上级网络的子网,我的实验环境是 10.0.0.1/24,255.255.255.0

上级无线路由的无线名

Step 2: Initial Set-up 初始设置

Power on your Client Router

Connect an Ethernet (RJ45) cable from your Computer to your Client Router.

Set your computer to have a Static IP address of 192.168.1.5 and a Gateway of 192.168.1.1

In System > Administration, make sure you have the packages luci-proto-relay and relayd-bridge installed.

打开子路由电源。
使用网线连接电脑和子路由LAN口。
设置电脑IP地址:192.168.1.5,网关192.168.1.1。
通过Administration–Software–Installed packages确认已安装uci-proto-relay and relayd-bridge。
luci-proto-relay and relayd-bridge 可以在联网以后检查是否安装。

Step 3: Joining the Main Router’s WiFi

Open your browser, and go to http://192.168.1.1/

Go to the page Network > WiFi

Beside your preferred radio, such as Radio1 (801.11an)click Scan.

Select your Main Router’s SSID (ex: Eagle)

Enter your PSK (Wi-Fi password).

Create a NEW Network called “wwan” or anything else you like (ex: “Quack“)

Firewall-Zone should be set to “lan“.

打开浏览器访问 http://192.168.1.1/

进入网络设置 Network > WiFi

在 802.11bgn (radio0),右边 点击Scan.

选择你主路由的无线名,点击右边的Join Network。

.

 “wwan” 或输入你喜欢的名字。

Firewall-Zone 选择”lan“.

Step 4: Create the WiFi Client Interface 编辑WIFI客户端类型

Go to the page Network > Interfaces

Edit the above interface (called “wwan“, “Quack” or whatever you chose)

Set Protocol/Mode = DHCP Client

菜单 Network > Interfaces

编辑你的网络(名字应该是”wwan“, 或你自己设置的名字)

设置Protocol/Mode = DHCP Client

这时候应该已经能上网了,安装插件
System–Software–Update lists   更新软件包列表

Available packages (luci-proto-relay)    — Install 安装

   — Install 安装

   — Install 安装

Step 5: Create Bridge Interface 创建桥接

Go to the page Network > Interfaces

Create a new Interface called “stabridge

Set Protocol/Mode = Relay Bridge

Relay between “lan” and “wwan“, “Quack” or whatever you chose)

Local IPv4 Address for the Bridge = “172.16.16.154

进入 Network > Interfaces

创建一个新接口  Add new Interfaces — 

设置 Protocol/Mode = Relay Bridge (中继桥)

同时选择”lan” 和”wwan“, 或你自己定义的。

Local IPv4 Address 给桥设置IP地址 “10.0.0.4

Step 6: Update the “lan” Interface 编辑LAN类型

Go to the page Network > Interfaces

Beside “lan“, click Edit.

Set IPv4 Gateway to the IP address of your Main Router (in my case, it’s 172.16.16.1)

Set Custom DNS to also be the IP address of your Main Router (in my case, it’s 172.16.16.1)

Under the section of DHCP Server, CHECK OFF “Ignore Interface

 Network > Interfaces

选择”lan“, 点击Edit.

设置IPv4 Gateway 到你的主路由IP(在我这个示例中10.0.0.1)

设置Custom DNS 一样到主路由IP(在我这个示例中10.0.0.1)

DHCP Server – General Setup – Ignore interface Disable DHCP for this interface.  选购,关闭LAN接口的DHCP.

Step 7: Allow Firewall Forwarding 允许防火墙转发

Go to the page Network > Firewall

Scroll down to “Zones”. Beside “lan“, click Edit.Set Forward = Accept. (Input & Output should already be set to Accept)

Set Covered Network = “lan” (default) & “wwan“, “Quack” or whatever you chose)

“Zones” – “lan“, 点击 Edit.

设置 Forward = Accept.

设置 Input = Accept
设置 output = Accept

勾选 Covered Network = “lan” 和 “wwan“, 或你自定义的。

 Network > Firewall

“Zones” – “lan“, 点击 Edit.设置 Forward = Accept.

设置 Input = Accept
设置 output = Accept
勾选 Covered Network = “lan” 和 “wwan“, 或你自定义的。

Step 8: Set a DHCP Reservation in the Main Router’s Settings 在主路由设置子路由静态DHCP

In your Main Router, set a static DHCP reservation for your Client Router’s MAC Address. Use the SAME IP address as in Step 5-5 (In my case, it would be 172.16.16.154)

在主路由绑定子路由的MAC地址到静态DHCP 在我的例子是10.0.0.4

Step 9: Reboot Your Client Router  重启子路由

Go to the page System > Reboot > Reboot Now

On your computer, clear your static IP settings, and let the IP be retrieved automatically.

Your Client Router should now be accessible at the address of 172.16.16.154 or whatever you chose.

Your computer should also have an IP address in the same subnet as your Main Router (In my case, it’s 172.16.16.#

If you set your computer to the same static IP address settings as in Step 2-3, you should still be able to connect to the client router at 192.168.1.1

 System > Reboot > Reboot Now

在电脑取消静态IP,改为DHCP获取IP地址

你应该可以通过桥地址 ,子路由静态DHCP地址来访问子路由

Step 10: Enable p910nd – Printer server  打开P910nd打印服务器

Services-p910nd – Printer server  勾选enable

https://openwrt.org/docs/guide-user/services/scanner_server/saned

扫描的说明文件

还没搞定