ICS with XP, Sprint, and Debian (oh yeah, over wifi)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ICS with XP, Sprint, and Debian (oh yeah, over wifi)
Hi,
I have been working all afternoon and this evening trying to get this wifi internet connection sharing setup. What I am trying to do is this:
Where I live, we don't have DSL, cable, or WAN, and satellite is not an option. So the fastest internet connection I can get that is still affordable is a Sprint mobile broadband connection. I have an XP computer set up that connects to the mobile broadband. I have a laptop that I would like to connect via wifi. It is running Debian squeeze/sid. I looked at getting a router that would generate wifi from the mobile broadband modem, but it was $150, and I wanted to keep this as cheap as possible. I bought a Netgear WGR164 router that is connected to the XP computer via wire. I have ICS (internet connection sharing) setup on XP because before I connected the two computers with a crossover cable. For my laptop, I got a Netgear WG111v2 usb adapter. I managed to get it setup (i think) using ndiswrapper. After messing around all afternoon, I was able to change the router's settings from my laptop. I changed the IP address to 192.168.0.254 so it wouldn't interfere with XP's ICS default 192.168.0.1. After I changed it I could access the setting from the XP computer but not from my laptop. When I try to ping the router from my laptop I get a Destination Host Unreachable. From the XP computer I am able to ping the router just fine. My /etc/network/interfaces looks like this:
Code:
auto lo
iface lo inet loopback
#This was the crossover cable connection
auto eth0
iface eth0 inet dhcp
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver #Sprint nameservers
allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
Ok, if I read your post correctly, you originally had the two computers connected via crossover cable, you have now added a wifi router that is connected to the XP machine via a network cable. And you are connecting to the wifi router from the linux machine via wifi, or do you have a network cable connecting it to the wifi router at this time as well?
Some possibilities:
Check to make sure that the XP machine is not plugged into the WAN port of the wifi router otherwise you are likely causing a network routing issue at the router.
If you are connected to the router from the linux machine using Wifi, I notice that the ifconfig output shows that there is no address assigned to the wlan interface. In addition I note that in your interfaces file that you have both eth0 and wlan0 setup with the same ip adddress information and that you setup the interfaces to use dhcp try changing the ip address and network information of the interface you are not using to something different and try changing the dhcp in the iface descriptor to static. Furthermore if you are connecting by wifi is it encrypted? and what are you using to connect to the wifi? If it is encrypted remove all encryption and get it working that way first. Any advice on utility you are using to connect to the wifi i.e network manager, wicd, iwconfig, wpa_supplicant will be mostly utility dependent. Can you get networking if you do connect the linux machine to the router by network cable. Lastly try changing the default router by using the ip address instead of the name of the XP machine.
Thanks for the reply. To start, the XP computer is plugged into port 1 of the router. I changed the eth0 interface to static and I changed the wlan0 interface's ip to 192.168.0.3. Still no luck. I tried plugging my laptop into the router with a network cable and, behold, the Internet! So I know the XP computer is set up right, I just need the linux machine configured.
So I've played around with it a little more. Now when I disconnect the network cable, plug in the wifi adapter, and try to ping the router, I get connect: Network is unreachable. ? I tried plugging the cable back in and I get the same error. What did I do? Its really important that I get this done because I am programming a free program for a local preschool that needs it done ASAP.
Disable your eth0 with ifdown eth0 then try ifdown wlan0 followed by an ifup wlan0 then run ifconfig make sure the output for ifconfig shows the ip address information you entered, if it does not then your interfaces file config isn't taking for the wlan for some reason. If the ifconfig output looks good run route and see the output you should see a line that says
Code:
default 192.168.0.1 (Stuff I don't recall) wlan0
The key here is that the default route tells the system where to route traffic not destined for a computer on your network (in this case the 192.168.0.x) if you do not have a default route listed or it is not routed over your wlan interface you have no Internet. If the ifconfig is ok and there is no default route but there is a route for the 192.168.0.0 then you can run
Code:
route add default gw 192.168.0.1
That will add the default route, confirm that it took by running route then try accessign the internet.
I think the crux of your issue lays with your routing table. Or perhaps the connection to your WiFi. What do you use to manage your WiFi on the linux machine? If nothing install wicd or network manager, or even wpa_supplicant. We can configure the WiFi that way. It will also tell us if we are getting any wifi signal, etc....
OK, ifconfig doesn't seem to show my changes. The route command shows no routes at all, and trying to add the default route gives me an error. I'll try and install wicd. I still can't ping the router.
Then save the changes and run ifdown wlan0 then ifup wlan0, if the changes are not reflected in the ifconfig output for interface wlan0 then I see the issue being with either the ndiswrapper or with he wifi configuration. wicd should let you see what networks are available if you see no networks then the issue is likely with your driver or ndiswrapper. Also you should check to make sure there isn't a native kernel driver for the card, or that you can' tuse another driver like the wext with the wpa_supplicant.
then the driver isn't configured properly, you should see if there is a native kernel driver and make sure you have ndiswrapper loaded as a kernel module and that you have the appropriate windows driver to use with the ndiswrapper if you are going to/have to stay with it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.