wifi 测试

# iwconfig

eth1 IEEE 802.11b/g ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power=18 dBm
Retry short limit:8 RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Next, you will set up the interface

# ifconfig eth1 up

eth1 Link encap:Ethernet HWaddr 00:13:E0:C3:0C:3C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

and you can scan for an AP

# iwlist eth1 scan

Cell 04 - Address: 00:18:84:81:46:E2
ESSID:"MyPlace"
Mode:Managed
Frequency:2.427 GHz (Channel 4)
Quality=100/100 Signal level=-39 dBm Noise level=-96 dBm
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s

Now, is time to associate to your AP

# iwconfig eth1 txpower auto essid MyPlace channel 4

eth1 IEEE 802.11b/g ESSID:"MyPlace"
Mode:Managed Frequency:2.427 GHz Access Point: 00:18:84:81:46:E2
Bit Rate:0 kb/s Tx-Power=13 dBm
Retry short limit:8 RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality=97/100 Signal level=-43 dBm Noise level=-94 dBm
Rx invalid nwid:0 Rx invalid crypt:3109 Rx invalid frag:0
Tx excessive retries:13 Invalid misc:3315 Missed beacon:0

and get and ip address

# udhcpc -i eth1
udhcpc (v1.9.1) started
Sending discover...
Sending select for 192.168.10.216...
Lease of 192.168.10.216 obtained, lease time 43200
adding dns 192.168.10.1

manual config


ifconfig wlan0 192.168.1.100 netmask 255.255.255.0

route add defaulte gw 192.168.1.1


Last, you can test the network interface.

# ping -c 1 192.168.10.1

PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: seq=0 ttl=64 time=16.327 ms

--- 192.168.10.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 16.327/16.327/16.327 ms
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值