无线网络问题,请教

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
hujj1
帖子: 14
注册时间: 2007-05-11 7:00

#16

帖子 hujj1 » 2008-06-10 14:50

高手帮帮我呀
lew0001
帖子: 31
注册时间: 2008-06-06 21:45

#17

帖子 lew0001 » 2008-06-10 16:20

to hujj1:
你的有线网卡和无线网卡怎么同样的IP地址?

如果你确认你的无线网络设置没错的话,先关闭有线网卡。
关闭有线网卡
ifdown eth0
要打开的话执行
ifup eth0

执行下面的命令试试
ifdown ath0
iwconfig ath0 essid FAST
iwconfig ath0 mode managed
iwconfig ath0 ap 00:1D:0F:88:02:BE
ifup ath0
执行完了再执行
ping 192.168.1.1

如果能ping通说明无线网络通了,不行就多试几次
ifdown ath0
ifup ath0
ping 192.168.1.1

还是不行的话,执行dmesg | grep ath0,把结果帖上来再分析
hujj1
帖子: 14
注册时间: 2007-05-11 7:00

#18

帖子 hujj1 » 2008-06-10 21:31

hujj@ubuntu:~$ ifdown eth0
ifdown: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ ifup eth0
ifup: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ ifdown ath0
ifdown: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ iwconfig ath0 essid=FAST
iwconfig: unknown command "essid=FAST"
hujj@ubuntu:~$ iwconfig ath0 essid FAST
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device ath0 ; Operation not permitted.
hujj@ubuntu:~$ iwconfig ath0 mode managed
Error for wireless request "Set Mode" (8B06) :
SET failed on device ath0 ; Operation not permitted.
hujj@ubuntu:~$ iwconfig ath0 ap 00:1D:0F:88:02:BE
Error for wireless request "Set AP Address" (8B14) :
SET failed on device ath0 ; Operation not permitted.
hujj@ubuntu:~$ ifup ath0
ifup: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.40 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.580 ms(注释:这两个是我接了有线上网的情况下,PING通了)

--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.580/0.991/1.402/0.411 ms
hujj@ubuntu:~$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.198 icmp_seq=25 Destination Host Unreachable
From 192.168.1.198 icmp_seq=26 Destination Host Unreachable
From 192.168.1.198 icmp_seq=27 Destination Host Unreachable
From 192.168.1.198 icmp_seq=29 Destination Host Unreachable
From 192.168.1.198 icmp_seq=30 Destination Host Unreachable
From 192.168.1.198 icmp_seq=31 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
32 packets transmitted, 0 received, +6 errors, 100% packet loss, time 31008ms
, pipe 3
hujj@ubuntu:~$ ifdown ath0
ifdown: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ ifup ath0
ifup: failed to open statefile /var/run/network/ifstate: Permission denied
hujj@ubuntu:~$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.198 icmp_seq=2 Destination Host Unreachable
From 192.168.1.198 icmp_seq=3 Destination Host Unreachable
From 192.168.1.198 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3999ms
, pipe 3
hujj1
帖子: 14
注册时间: 2007-05-11 7:00

#19

帖子 hujj1 » 2008-06-10 21:34

hujj@ubuntu:~$ ifconfig
ath0 Link encap:以太网 硬件地址 00:03:2f:12:34:56
inet 地址:192.168.1.188 广播:192.168.1.255 掩码:255.255.255.0
inet6 地址: fe80::203:2fff:fe12:3456/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)

eth0 Link encap:以太网 硬件地址 00:0f:b0:f2:64:85
inet 地址:192.168.1.198 广播:192.168.1.255 掩码:255.255.255.0
inet6 地址: fe80::20f:b0ff:fef2:6485/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:2988 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:2426 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:3847897 (3.6 MB) 发送字节:341583 (333.5 KB)
中断:22

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 跃点数:1
接收数据包:2574 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:2574 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:129852 (126.8 KB) 发送字节:129852 (126.8 KB)

wifi0 Link encap:未指定 硬件地址 00-03-2F-12-34-56-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:11484 错误:0 丢弃:0 过载:0 帧数:617
发送数据包:275 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:199
接收字节:941513 (919.4 KB) 发送字节:12106 (11.8 KB)
中断:23

hujj@ubuntu:~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID:"FAST" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power:15 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm
Rx invalid nwid:11802 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

hujj@ubuntu:~$ iwlist scanning
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wifi0 Interface doesn't support scanning.

ath0 Scan completed :
Cell 01 - Address: 00:1D:0F:88:02:BE
ESSID:"FAST"
Mode:Master
Frequency:2.437 GHz (Channel 6)
Quality=24/70 Signal level=-71 dBm Noise level=-95 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100

hujj@ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.198
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.101.224.68
dns-search ubuntu


iface ath0 inet static
address 192.168.1.188
netmask 255.255.255.0
gateway 192.168.1.1
wireless-key s:hujj123456789
wireless-essid FAST

auto ath0
hujj@ubuntu:~$


谢谢!!!
lew0001
帖子: 31
注册时间: 2008-06-06 21:45

#20

帖子 lew0001 » 2008-06-10 21:52

晕,执行每条设置命令前面都要加sudo,第一条要执行的时候会提示输入密码,这样才有权限执行
sudo ifdown ath0
sudo iwconfig ath0 essid FAST
sudo iwconfig ath0 mode managed
sudo iwconfig ath0 ap 00:1D:0F:88:02:BE
sudo ifup ath0
hujj1
帖子: 14
注册时间: 2007-05-11 7:00

#21

帖子 hujj1 » 2008-06-10 22:36

谢谢,谢谢,终于看到上无线网了,不知道可否再解释这些命令的作用,是不是一定要禁用有线卡无线卡才能用,谢谢!!!
lew0001
帖子: 31
注册时间: 2008-06-06 21:45

#22

帖子 lew0001 » 2008-06-10 22:58

应该不用禁用有线网卡吧

sudo ifdown ath0 先停止无线网卡
sudo iwconfig ath0 essid FAST 设置ssid
sudo iwconfig ath0 mode managed 设置模式
sudo iwconfig ath0 ap 00:1D:0F:88:02:BE 设置AP的mac地址,可能最关键的是这个设置,linux好象自己老是找不对
sudo ifup ath0 重新启动无线网卡,它会从/etc/network/interfaces读取其它设置
hujj1
帖子: 14
注册时间: 2007-05-11 7:00

#23

帖子 hujj1 » 2008-06-11 0:15

重启后又上不网了,晕倒了

重启后就连网卡设置的地方都只有有线和MODEM的那种了,后来我到受限硬件看了,勾选了,但是显示未启用,先禁用再启用后系统提示重启,重启后还是没有用

不知道是什么原因呀????????



谢谢!!!
rliandes
帖子: 46
注册时间: 2008-04-29 12:57

#24

帖子 rliandes » 2008-06-13 12:19

弱弱的问一句,怎么查看无限路由的ssid?AP的mac地址是无线路由的,还是无线网卡的,在哪里查看?
回复