Last active
December 11, 2015 06:58
-
-
Save holys/4562794 to your computer and use it in GitHub Desktop.
设置WDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 设置WDS |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TP-Link WR740N 和 TP-Link WR703N 组成WDS
WDS的原理
设备
准备工作
登录到路由管理界面,找到无线设置--> 基本设置
设置好SSID, 信道选特定的值,可以随意,总之要具体的值.
开启WDS功能, 扫描目标路由. 找到你的目标, 选14:E6:E4:31:8E:F2加密方式, 填密码, 具体如下图.
主路由设置完毕,需要重启才生效.
ssh 进去 openwrt系统.
配置主要参考这里
一共是4个文件需要修改, 分别是
192.168.1.2config dhcp lan处 添加option ignore 1, 即client禁用dhcp功能config zonelan 处 修改option forward值为ACCEPT./etc/config/wireless
root@OpenWrt:/etc/config# cat wireless config wifi-device radio0 option type mac80211 option channel 11 option macaddr 8c:21:0a:da:99:36 option hwmode 11ng option htmode HT20 list ht_capab SHORT-GI-20 list ht_capab SHORT-GI-40 list ht_capab RX-STBC1 list ht_capab DSSS_CCK-40 # REMOVE THIS LINE TO ENABLE WIFI: #option disabled 1 config wifi-ifce option device radio0 option ssid Holy option mode wds option wds 1 option network lan option bssid 14:E6:E4:31:8E:F2 option encryption psk2 option key 'your_password' config wifi-iface option device radio0 option network lan option mode ap option ssid OpenWRT option encryption psk2 option key 'your_password'/etc/config/network
/etc/config/dhcp
config dnsmasq option domainneeded 1 option boguspriv 1 option filterwin2k 0 # enable for dial on demand option localise_queries 1 option rebind_protection 1 # disable if upstream must serve RFC1918 addresses option rebind_localhost 1 # enable for RBL checking and similar services #list rebind_domain example.lan # whitelist RFC1918 responses for domains option local '/lan/' option domain 'lan' option expandhosts 1 option nonegcache 0 option authoritative 1 option readethers 1 option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' #list server '/mycompany.local/1.2.3.4' #option nonwildcard 1 #list interface br-lan #list notinterface lo #list bogusnxdomain '64.94.110.11' config dhcp lan option interface lan option start 100 option limit 150 option leasetime 12h option ignore 1 config dhcp wan option interface wan option ignore 1/etc/config/firewall
文件内容比较长,这里贴出主要内容.
... config zone option name lan option network 'lan' option input ACCEPT option output ACCEPT option forward ACCEPT ...最后, 重启client 路由器. 如无意外, 手机连接到client路由器(本身是没有插网线的), 发现可以上网了 !!!
个人对原理不太懂, 于是有个疑问, 为什么在client路由上ping 不了外网呢,比如
baidu.com?