startup debian wireless

http://www.cnblogs.com/eaglet/archive/2011/11/01/2231021.html

通过 Windows 7 共享上网

Posted on 2011-11-01 09:41 eaglet 阅读(1448) 评论( 0) 编辑 收藏

要实现多台机器共享上网通常有两种方法,一种是通过路由器共享上网,一种是通过软网关共享上网。在某些情况下,比如要通过3G,或4G无线网卡共享上网,我们需要特殊的3G或4G无线路由器才能共享,在没有这种路由器的情况下,我们只能通过软件共享上网。windows 7 提供了这样的共享功能,而且配置非常简单。下面我就把我如何配置办公室的共享上网的步骤写下来,供大家参考。

在开始这篇文章之前,我先介绍一下我的网络环境。

办公室里面有一台台式电脑,操作系统是 windows 7 professional 64bit。 通过 4G 无线网卡上网,上网速度为 20Mbps(下行)/16Mbps(上行)。一台无线路由器,若干办公电脑和网络打印机。没有有线的上网线路。其实普通的 ADSL2+ 的下行速度在我们这里最高只能达到10Mbps,还不如 4G 无线网卡的速度快。注:中国大陆地区目前好像还没有开通4G无线网络,不过无所谓,电脑只要能上网就可以进行共享。

我的目标就是让所有的设备都通过4G无线网卡访问 internet.

首先考虑的是通过路由器来共享,但由于 4G 无线网络在澳大利亚刚刚开通才一个月,还没有相应的无线路由器,找到一个3G的无线路由器 NetComm 的 N3G002W。如下图所示:

image

测试了一下,不支持4G无线网卡,只支持3G的,不过3G的无线网卡上网速度实在太慢了,放弃这个想法。

既然不能通过路由器共享,接下来就只能通过软网关来共享上网了。一开始我并不知道 windows 7 自带有类似的功能,在网上找了两个软网关,一个是WinRoute,这个软件是收费的,399美元,而且从网站说明上看,不支持 windows 7. 还有一个是 AnyRouter,这个软件有免费版本,但界面是中文的(公司里面只有我能看懂中文) ,而且从网站说明上看好像也不支持 windows 7。看来都不符合我的要求。还是 google 吧。一搜不要紧,发现windows 7 本身就自带 internet share 的功能,叫 ICS (Internet Connection Sharing)。 参见 Using ICS (Internet Connection Sharing)

下面就把我的设置步骤说明一下,很简单。

首先进入 Control Panel->Network and Internet->Network and Sharing Center,如下图

image

这里有个 Telstra Mobile 的网络适配器,这个就是我前面说的 4G 无线网卡的网络适配器,那个台式机就是通过这个无线网卡上网的。点圆圈里面那个蓝色链接再点 Properites(中文系统这里应该是 属性)。进入到这个网络适配器的属性配置。

image

在属性设置中,选第二个tab->Sharing (共享),然后将我红圈部分选中就可以了。下面有一个 Home networking connection 要选择一下,这个设置的意思是通过哪个网络适配器进行共享。通常情况下我们都是通过本地的以太网网卡进行共享,在这里我选择的是本地网络的网络适配器。

点OK后,会有个提示,说本地网络适配器的IP地址将被强行改为 192.168.137.1,这是因为要做软网关,需要一个固定IP地址,windows 7 就强行把这个地址固定在了192.168.137.1 上了。点确认,设置结束。

下面的工作就是配置路由器了。

路由器的链接方法是用直连网线连接路由器的LAN 口和上面那个 windows 7 的台式机的本地网卡。可能也可以连WAN 口,然后配置为级联,不过我没有试过。

路由器的配置方法如下:

首先路由器的IP网段要设置为 192.168.137.* 这个网段(当然也可以用级联),直接改了路由器的本地IP地址为 192.168.137.2 ,这样网段就一致了。

然后就是配置网关和DNS 地址,这两个地址都设置为 192.168.137.1,即指向 windows 7 的软网关,如下图所示:

image

有的路由器还要手工设置一下 DHCP 的地址范围,比如设置为 192.168.137.100 – 192.168.137.254

配置好后,重启路由器。

打开我的笔记本电脑,用无线网卡连接无线路由器自动获取IP地址后,测试了一下,可以正常访问internet 了。至此配置结束。




http://www.linuxweblog.com/xp-internet-connection-sharing

Windows XP Internet Connection Sharing with Linux

 

On the XP box, you need to enable Internet Connection Sharing. This should be in your network connections, and probably in the properties of your Dial Up connection. Once this is done, then you need to make sure that both computers have network cards installed and working. After enabling ICS, it should set your Network card to a static IP address of 192.168.0.1 . This is a private IP (doesn't get routed over the internet) and is used for internal networks.

The next step is to configure your linux box. You need to have router or a share hub, but if you only have 2 computers and wanted to connect them up and share the internet connection, you need to use the twisted/cross cable to connect them up. Then configure the network information as follows:

IP Address: 192.168.0.x (where x is any number between 2 and 254)
Subnet Mask: 255.255.255.0
Gateway: 192.168.0.1

The gateway is very important as it tells the linux how to find the route through to the internet.

In your linux shell prompt type the below:

#ifconfig eth0 192.168.0.2 netmask 255.255.255.0
#route add -net default gw 192.168.0.1

To make sure that the two machines are networked, you can go to a command line and type 'ping 192.168.0.1' and press enter. Press CTRL+C to cancel the ping command.

However you still won't be able to type an address into your browser and have it find the internet. You need to go to your ISP's homepage or contact their support to find their DNS settings. You will need to enter the two (Primary and Secondary DNS) in your linux box (/etc/resolv.conf on redhat). Now your linux machine should be able to:

1. find the route to the internet and
2. resolve names to IP addresses in order to search the internet.

On the other hand, if you are currently on cable/dsl and still want to go through the linux box, you can still do the same thing. However, you have to have two network cards in your XP box and one in your linux box. Configure the first card for your cable/dsl connection, then share the connection. The second card should be assigned IP 192.168.0.1 .

If you are using ZoneAlarm, ICS is not supported in the free version. The way around it is to set the internet and trusted zone to medium.



This page describes how to enable support for WiFi devices based on the Ralink RT2501USB chipset on Debian systems.

Drivers

The Ralink RT2501USB wireless LAN chipset is supported by three native drivers:

  • rt73 (Legacy driver)
    • Released by Ralink under the GPL.
    • Not generally recommended for use.
  • rt73 (Enhanced legacy driver)
    • Previously maintained by the rt2x00 project.
    • Source previously packaged in rt73-source, removed from Debian to resolve bug 563432.

  • rt73usb (Next-generation driver)

    • The recommended driver to use.
    • Source previously packaged in rt2x00-source, removed from Debian to resolve bug 474189.

    • Introduced in Linux 2.6.24.

The next-generation driver is maintained by the rt2x00 project. Supported devices are listed at the end of this page.

This page only details installation of the next-generation driver (rt73usb). It requires non-free firmware for device operation, which can be provided by installing thefirmware-ralink package.

{i} The RT2501USB is not to be confused with the RT2500USB, which is supported bydifferent drivers.

{i} Ralink 802.11n USB devices are supported by thert2870sta driver.

Installation

As drivers from the rt2x00 project are included in the mainline Linux kernel, the rt73usb driver is present on your system.

Firmware is required for device operation:

  1. Add a "non-free" component to /etc/apt/sources.list for your Debian version. For example:

    # Debian Squeeze/6.0
    deb http://ftp.us.debian.org/debian squeeze main contrib non-free
  2. Update the list of available packages, then install the firmware-ralink and wireless-tools packages:

    aptitude update
    aptitude install firmware-ralink wireless-tools
  3. Connect the device to your system. The rt73usb kernel module isautomatically loaded for supported devices.

  4. Verify your device has an available interface:

    iwconfig
  5. Configure your wireless interface as appropriate.

Troubleshooting
  • Examine the kernel ring buffer (dmesg(1)) to verify the required firmware files are being loaded by the driver. Lack of firmware is the usual reason for the "SIOCSIFFLAGS: No such file or directory" error message.

Supported Devices

The page HowToIdentifyADevice/USB explains how to identify a USB device.

The following list is based on the alias fields of modinfo rt73usb in Debian 2.6.32 (2.6.32-45) kernel images.

  • USB: 0411:00D8 BUFFALO INC. (formerly MelCo., Inc.) WLI-U2-SG54HP
    USB: 0411:00F4 BUFFALO INC. (formerly MelCo., Inc.) (Device name unknown)
    USB: 0411:0116 BUFFALO INC. (formerly MelCo., Inc.) (Device name unknown)
    USB: 0411:0119 BUFFALO INC. (formerly MelCo., Inc.) (Device name unknown)
    USB: 0471:200A Philips (or NXP) Wireless Network Adapter
    USB: 04BB:093D I-O Data Device, Inc. (Device name unknown)
    USB: 04E8:4471 Samsung Electronics Co., Ltd (Device name unknown)
    USB: 050D:7050 Belkin Components F5D7050 Wireless G Adapter v1000/v2000 [Intersil ISL3887]
    USB: 050D:705A Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]
    USB: 050D:905B Belkin Components F5D9050 Wireless G+ MIMO Network Adapter v3000 [Ralink RT2573]
    USB: 050D:905C Belkin Components F5D9050 Wireless G+ MIMO Network Adapter v4000 [Ralink RT2573]
    USB: 0586:3415 ZyXEL Communications Corp. G-210H 802.11g Wireless Adapter
    USB: 06F8:E002 Guillemot Corp. (Device name unknown)
    USB: 06F8:E010 Guillemot Corp. HWGUSB2-54-LB
    USB: 06F8:E020 Guillemot Corp. HWGUSB2-54V2-AP
    USB: 0769:31F3 Surecom Technology Corp. RT2573
    USB: 07AA:002E Corega K.K. CG-WLUSB2GPX [Ralink RT2571W]
    USB: 07B8:B21B AboCom Systems Inc HWU54DM
    USB: 07B8:B21C AboCom Systems Inc RT2573
    USB: 07B8:B21D AboCom Systems Inc RT2573
    USB: 07B8:B21E AboCom Systems Inc RT2573
    USB: 07B8:B21F AboCom Systems Inc WUG2700
    USB: 07D1:3C03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT2571W]
    USB: 07D1:3C04 D-Link System WUA-1340
    USB: 07D1:3C06 D-Link System DWA-111 802.11bg Wireless Adapter [Ralink RT2571W]
    USB: 07D1:3C07 D-Link System DWA-110 Wireless G Adapter(rev.A1) [Ralink RT2571W]
    USB: 0812:3101 (Vendor name unknown) (Device name unknown)
    USB: 08DD:0120 Billionton Systems, Inc. (Device name unknown)
    USB: 0B05:1723 ASUSTek Computer, Inc. WL-167G v2 802.11g Adapter [Ralink RT2571W]
    USB: 0B05:1724 ASUSTek Computer, Inc. RT2573
    USB: 0CDE:001C Z-Com 802.11b/g Wireless Network Adapter
    USB: 0DB0:4600 Micro Star International 802.11b/g Turbo Wireless Adapter
    USB: 0DB0:6874 Micro Star International RT2573
    USB: 0DB0:6877 Micro Star International RT2573
    USB: 0DB0:A861 Micro Star International RT2573
    USB: 0DB0:A874 Micro Star International RT2573
    USB: 0DF6:0024 Sitecom Europe B.V. (Device name unknown)
    USB: 0DF6:0027 Sitecom Europe B.V. (Device name unknown)
    USB: 0DF6:002F Sitecom Europe B.V. (Device name unknown)
    USB: 0DF6:90AC Sitecom Europe B.V. WL-172 Wireless Network USB Adapter 54g Turbo
    USB: 0DF6:9712 Sitecom Europe B.V. WL-113 rev 2 Wireless Network USB Adapter
    USB: 0EB0:9021 NovaTech RT2573
    USB: 1044:8008 Chu Yuen Enterprise Co., Ltd GN-WB01GS
    USB: 1044:800A Chu Yuen Enterprise Co., Ltd GN-WI05GS
    USB: 1371:9022 CNet Technology Inc. CWD-854 [RT2573]
    USB: 1371:9032 CNet Technology Inc. CWD-854 rev F
    USB: 13B1:0020 Linksys WUSB54GC v1 802.11g Adapter [Ralink RT73]
    USB: 13B1:0023 Linksys WUSB54GR
    USB: 13B1:0028 Linksys WUSB200 802.11g Adapter [Ralink RT2671]
    USB: 1472:0009 Huawei-3Com Aolynk WUB320g
    USB: 148F:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
    USB: 148F:2671 Ralink Technology, Corp. RT2601/RT2671 Wireless Adapter
    USB: 148F:9021 Ralink Technology, Corp. RT2501USB Wireless Adapter
    USB: 14B2:3C10 Ralink Technology, Corp. (Device name unknown)
    USB: 14B2:3C22 Ralink Technology, Corp. Conceptronic C54RU v3 802.11bg Wireless Adapter [Ralink RT2571W]
    USB: 15A9:0004 Gemtek WUBR-177G [Ralink RT2571W]
    USB: 1631:C019 Good Way Technology RT2573
    USB: 1690:0722 Askey Computer Corp. [hex] RT2573
    USB: 1740:3701 Senao EUB-3701 EXT 802.11g Wireless Adapter [Ralink RT2571W]
    USB: 1740:7100 Senao (Device name unknown)
    USB: 18C5:0002 AMIT Technology, Inc. CG-WLUSB2GO
    USB: 18E8:6196 Qcom RT2573
    USB: 18E8:6229 Qcom RT2573
    USB: 18E8:6238 Qcom (Device name unknown)
    USB: 1B75:7318 Ovislink Corp. (Device name unknown)
    USB: 2019:AB01 PLANEX GW-US54HP
    USB: 2019:AB50 PLANEX GW-US54Mini2
    USB: 6933:5001 (Vendor name unknown) (Device name unknown)
    USB: 7167:3840 (Vendor name unknown) (Device name unknown)
    USB: 7392:7318 Edimax Technology Co., Ltd (Device name unknown)
    USB: 7392:7618 Edimax Technology Co., Ltd (Device name unknown)

See Also

http://rt2x00.serialmonkey.com/ - rt2x00 project homepage.



Got too many RX errors


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值