这是我的 /etc/network/interfaces 文件内容
代码: 全选
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.2.11
netmask 255.255.255.0
gateway 192.168.2.1
iface wifi0 inet static
address 192.168.2.11
netmask 255.255.255.0
gateway 192.168.2.1
wireless-key restricted 362880BBBB
wireless-essid TP-LINK
auto wifi0
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
auto eth0
这是我用iwconfig命令看到的结果
代码: 全选
linphy@linphy-laptop:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 IEEE 802.11b ESSID:"TP-LINK" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:1D:0F:59:A4:A0
Bit Rate:11 Mb/s Sensitivity=1/3
Retry short limit:8 RTS thr:off Fragment thr:off
Power Management:off
wlan0 IEEE 802.11b ESSID:"TP-LINK" Nickname:""
Frequency:2.437 GHz Access Point: 00:1D:0F:59:A4:A0
Bit Rate:11 Mb/s Sensitivity=1/3
Retry short limit:8 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=62/70 Signal level=-33 dBm Noise level=-96 dBm
Rx invalid nwid:0 Rx invalid crypt:184 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2094 Missed beacon:0
irda0 no wireless extensions.
这是我查看IP分配情况看到的结果
代码: 全选
linphy@linphy-laptop:~$ sudo lshw -C network
*-network:0 DISABLED
description: Wireless interface
product: Prism 2.5 Wavelan chipset
vendor: Intersil Corporation
physical id: 2
bus info: pci@0000:02:02.0
logical name: wifi0
version: 01
serial: 00:05:3c:08:46:4b
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list logical wireless ethernet physical
configuration: broadcast=yes driver=hostap firmware=1.4.9 ip=192.168.2.11 latency=64 module=hostap_pci multicast=yes wireless=IEEE 802.11b
*-network:1
description: Ethernet interface
product: 82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
vendor: Intel Corporation
physical id: 8
bus info: pci@0000:02:08.0
logical name: eth0
version: 41
serial: 00:d0:59:be:d4:5b
size: 100MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.23-k4-NAPI duplex=full firmware=N/A ip=192.168.2.12 latency=66 link=yes maxlatency=56 mingnt=8 module=e100 multicast=yes port=MII speed=100MB/s
这是我用ifconfig命令看到的结果
代码: 全选
linphy@linphy-laptop:~$ ifconfig
eth0 Link encap:以太网 硬件地址 00:d0:59:be:d4:5b
inet 地址:192.168.2.12 广播:192.168.2.255 掩码:255.255.255.0
inet6 地址: fe80::2d0:59ff:febe:d45b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:611 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:66 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:37224 (36.3 KB) 发送字节:8921 (8.7 KB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 跃点数:1
接收数据包:3068 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:3068 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:155809 (152.1 KB) 发送字节:155809 (152.1 KB)
wifi0 Link encap:未指定 硬件地址 00-05-3C-08-46-4B-00-00-00-00-00-00-00-00-00-00
inet 地址:192.168.2.11 广播:192.168.2.255 掩码:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:452 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:7 错误:0 丢弃:119 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:38428 (37.5 KB) 发送字节:684 (684.0 B)
中断:11