Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision Next revisionBoth sides next revision | ||
| zh:docs:guide-user:network:wifi:mesh:80211s [2020/12/30 08:54] – translate installation dependencies and basic configuration shorile | zh:docs:guide-user:network:wifi:mesh:80211s [2023/04/06 02:12] – 修复wireless中ifname配置项 shorile | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | + | ====== 基于802.11的无线mesh网状网络 ====== |
| - | ====== 802.11s based wireless mesh network ====== | + | [[wp> |
| - | + | ||
| - | [[wp> | + | |
| 该视频是使用OpenWRT构建简单网状网络的一个很好的入门教程: | 该视频是使用OpenWRT构建简单网状网络的一个很好的入门教程: | ||
| - | ===== Status | + | ===== 现状 |
| 802.11s 在 OpenWrt 19.07 及更高版本稳定工作, | 802.11s 在 OpenWrt 19.07 及更高版本稳定工作, | ||
| - | :!: There appears to be an ARP relay bug (confirmed in v19.07.4) | + | :!: 有一个ARP中继错误 |
| - | ===== Config ===== | + | |
| - | 如果默认安装了这些,就需要删除: | + | |
| + | ===== 配置 ===== | ||
| + | |||
| + | 如果需要运行加密的mesh网路, | ||
| + | |||
| + | 在写这篇文档的时候, | ||
| + | |||
| + | * wpad-mesh-openssl (精简版以节省空间) | ||
| + | * wpad-openssl (完整大版本) | ||
| + | * wpad-mesh-wolfssl (精简版以节省空间) | ||
| + | * wpad-wolfssl (完整大版本) | ||
| + | * wpad-mesh-mbedtls(精简版本以节省空间) | ||
| + | * wpad-mbedtls (完整大版本) | ||
| + | |||
| + | 如果默认安装了这些,就需要删除这些加密功能较少的组件: | ||
| < | < | ||
| # opkg remove wpad-mini | # opkg remove wpad-mini | ||
| # opkg remove wpad-basic | # opkg remove wpad-basic | ||
| + | # opkg remove wpad-basic-wolfssl | ||
| + | # opkg remove wpad-basic-openssl | ||
| + | # opkg remove wpad-basic-mbedtls | ||
| </ | </ | ||
| - | + | 安装依赖项 (改为'' | |
| - | 安装依赖项 (改为'' | + | |
| + | < | ||
| + | # opkg install wpad-mesh-wolfssl | ||
| + | </ | ||
| + | 或者 | ||
| < | < | ||
| # opkg install wpad-mesh-openssl | # opkg install wpad-mesh-openssl | ||
| </ | </ | ||
| + | 或者 | ||
| + | < | ||
| + | # opkg install wpad-mesh-mbedtls | ||
| + | </ | ||
| + | 这样安装只是提供mesh网络的加密 | ||
| + | |||
| + | 建议安装wpad-wolfssl | ||
| + | < | ||
| + | # opkg install wpad-wolfssl | ||
| + | </ | ||
| + | 或者 | ||
| + | < | ||
| + | # opkg install wpad-openssl | ||
| + | </ | ||
| + | 或者 | ||
| + | < | ||
| + | # opkg install wpad-mbedtls | ||
| + | </ | ||
| + | 就可以把加密提供于mesh、ap等所有网络中了 | ||
| + | |||
| + | **说明:** | ||
| + | - [[https:// | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | ==== 无线网络配置 ==== | ||
| 编辑 ''/ | 编辑 ''/ | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * 按下面的形式增加 '' | * 按下面的形式增加 '' | ||
| Line 38: | Line 83: | ||
| option network ' | option network ' | ||
| option device ' | option device ' | ||
| + | option disabled ' | ||
| + | option network ' | ||
| + | option ifname ' | ||
| option mode ' | option mode ' | ||
| option mesh_id ' | option mesh_id ' | ||
| - | option encryption ' | + | option encryption ' |
| option key ' | option key ' | ||
| </ | </ | ||
| - | **注意:** 客户端设备的访问是通过桥接‘ap’和‘mesh’接口来实现的。 | + | **注意:** 客户端设备的访问是通过桥接‘ap’和‘mesh’接口来实现的,这一点很重要,选项option network ' |
| + | 您要加入mesh网络的每个设备都必须以相同的方式进行配置,即相同的mesh_id,相同的通道channel,相同的密钥。 | ||
| + | 这种无线wireless配置可能足以满足组建两三个较近的mesh节点的“mesh”网络。 但是,由大量mesh网状节点组成的有机、自主自我管理的mesh网络需要额外的配置。 | ||
| - | For a complete list of mesh parameters you can inspect the values of the following variables in [[https:// | + | 此配置应该足以启动mesh网络,因此您现在可以重新初始化wifi并查看它是否有效: |
| + | |||
| + | 重载网络 | ||
| + | < | ||
| + | # / | ||
| + | </ | ||
| + | 查看它是否有效 | ||
| + | < | ||
| + | # wifi | ||
| + | # iw dev mesh0 info | ||
| + | </ | ||
| + | 应该可以看到类似于以下内容的输出: | ||
| + | < | ||
| + | Interface mesh0 | ||
| + | ifindex 10 | ||
| + | wdev 0x3 | ||
| + | addr 12: | ||
| + | type mesh point | ||
| + | wiphy 0 | ||
| + | channel 2 (2417 MHz), width: 20 MHz, center1: 2417 MHz | ||
| + | txpower 28.00 dBm | ||
| + | multicast TXQ: | ||
| + | qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets | ||
| + | 0 0 129166 0 0 0 0 9107016 129167 | ||
| + | </ | ||
| + | |||
| + | 如果你想在你的mesh网格上运行一个像OLSR这样的路由协议,就禁用 802.11s的内置路由选项 '' | ||
| + | |||
| + | 对于网格参数的完整列表,您可以检查以下变量的值 | ||
| * MP_CONFIG_INT | * MP_CONFIG_INT | ||
| * MP_CONFIG_BOOL | * MP_CONFIG_BOOL | ||
| * MP_CONFIG_STRING | * MP_CONFIG_STRING | ||
| - | Alternatively, | + | 或者也可以用以下命令 |
| < | < | ||
| # iw dev < | # iw dev < | ||
| </ | </ | ||
| - | to obtain a list of available | + | 来获取可用mesh网格参数表, 不过没文档. |
| - | Then reinitialize wifi and see if it worked: | + | 然后重启无线网络看它的工作情况: |
| < | < | ||
| Line 65: | Line 143: | ||
| </ | </ | ||
| - | ===== Wireless Hardware Support | + | ===== 无线硬件支持 |
| - | :!: Support for 802.11s (type mesh) depends on wireless driver. Most up to date open source drivers work. | + | :!: 支持 |
| - | Use the following to determine if your hardware supports | + | 使用以下方法来确定你的硬件是否支持 |
| < | < | ||
| Line 86: | Line 164: | ||
| - | Example: ath9k in router | + | 例如: ath9k的路由器 |
| < | < | ||
| ... | ... | ||
| Line 96: | Line 174: | ||
| ...</ | ...</ | ||
| - | Example: ath9k_htc USB Stick | + | 例如: ath9k_htc的USB外设 |
| < | < | ||
| ... | ... | ||
| Line 104: | Line 182: | ||
| ...</ | ...</ | ||
| - | ===== Using the command line CLI ===== | + | ===== 使用命令行方式 |
| - | iw is a new nl80211 | + | iw 是一种新的基于 |
| - | Create a new interface " | + | 创建新的 |
| < | < | ||
| - | Confirm that the new interface | + | 确认新 |
| < | < | ||
| | | ||
| - | Bring up your mesh0 interface | + | 打开你的 |
| < | < | ||
| - | Assign the interface an IP address. ie: 10.0.0.x | + | 为接口配置IP地址。 如: 10.0.0.x |
| < | < | ||
| - | By default, mesh points | + | 默认情况下, mesh points |
| - | ===== Verify | + | ===== 验证 |
| - | Use the iw command to display peer links or a table of reachable nodes in your mesh | + | 使用iw命令显示对等链路或mesh网格中可达节点的表 |
| < | < | ||
| iw dev $MESH_IFACE station dump | iw dev $MESH_IFACE station dump | ||
| Line 132: | Line 210: | ||
| </ | </ | ||
| - | Example: | + | 例如: |
| < | < | ||
| Station 00: | Station 00: | ||
| Line 158: | Line 236: | ||
| </ | </ | ||
| - | ===== Block single peer from meshing | + | ===== 封锁处于mesh网格中单个节点 |
| - | //This may require the iw-full | + | //需要 |
| - | Block a peer from meshing using its MAC address | + | |
| + | 通过MAC地址封锁处于mesh网格中的节点 | ||
| < | < | ||
| iw dev $MESH_IFACE station set $MAC_TO_BLOCK plink_action block | iw dev $MESH_IFACE station set $MAC_TO_BLOCK plink_action block | ||
| </ | </ | ||
| - | Verify using section above (iw dev $MESH_IFACE station dump) | + | 验证以上是否生效 |
| < | < | ||
| mesh plink: | mesh plink: | ||
| </ | </ | ||
| - | Unblock: | + | 解除: |
| < | < | ||
| iw dev $MESH_IFACE station set $MAC_TO_UNBLOCK plink_action open | iw dev $MESH_IFACE station set $MAC_TO_UNBLOCK plink_action open | ||
| </ | </ | ||
| - | according to [[https:// | + | 根据 |
| - | ===== More background | + | ===== 更多资料 |
| * [[http:// | * [[http:// | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||