LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2009, 02:47 PM   #16
dudearcher
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0

Wait a second...

OK, I got to the Internet. After about 30 seconds, it cut out. . I ran the same sequence of commands I post above, and it worked. For about 10 seconds. . I made sure the firewalls on the xp computer will let the Linux connection through, so that's not the problem.

Sorry for posting too soon.
 
Old 08-12-2009, 03:05 PM   #17
dudearcher
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Yea your wifi isn't configured at all make sure your interfaces file shows

Code:
iface wlan0 inet static
    address 192.168.0.3
    broadcast 192.168.0.255
    network 192.168.0.0
    gateway 192.168.0.1
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.
I configured the /etc/network/interfaces file as shown and ifup gives me an error saying that iface wlan0 does not have all the variables.

Help would be extremely appreciated.
 
Old 08-12-2009, 04:27 PM   #18
dudearcher
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
I messed around with it (im not even sure what I did), and now I can see the wifi in wicd. However, it gives my signal as -1% even though I am right next to the computer and it will not connect.
 
Old 08-12-2009, 04:30 PM   #19
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
See if you can find a native linux driver for your WifI card, also maybe take the laptop a little away from the router and see if that improves signal. I know it seems counter intuitive, however, sometimes being right next to the router decreases the performance.
 
Old 08-12-2009, 07:05 PM   #20
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
I know this is fixed, but for future refrence I'd like to suggest something.
When working with routers/switches you don't really need to worry about what's connecting to the router/switch.. (well more so router, but if you can connect through the switch and see the router your good). I say this because if you get an ip from the router then the connection from router -> object it's routing too is good. And I'm saying this because towards the top of the post you said you could change the routers settings with the laptop?

It should go such as this correct?:

Sprint (ICS) -> Hosting Device (router/pc tower/modem) -> Router -> Other PCs

You don't have to change any of the router's settings in this scenario... Just have a router route to a router to a router to a router... That's the beauty of it all, the router can get a connection from 192.168.0.1 even if it's "broadcast" IP is the same, why? Because the two IPs are on different subnets, so there is no IP conflict.
Code:
"I changed the IP address to 192.168.0.254 so it wouldn't interfere with XP's ICS default 192.168.0.1."
That's what most people screw up, thinking because they have the same IP they need to change it, not entirely true if they are on different subnets. Most of the time if you enable ICS you have to A) Make sure other devices/computers can turn it on and off B) Make sure the subnet and IP are static (though it should give an error if they aren't). If you have wireless with your PC you shouldn't even need a router, you can do ICS with a standard NIC card and it works just fine, just do ad-hoc.

Code:
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.
Also another note on this, WHY!? I'm sorry, if you want the router to give internet you should always have it plugged into the WAN and not Port 1, that's just making things crazy difficult. Yes it gives the network internet...but then your losing the routing powers of the router, might as well make it a switch at that point because really that's what your doing. =( Your not giving the router itself internet your giving it's network internet which is a completly different topic.

I'd suggest going back to defaults on the router, making sure it's set to recive DHCP replies on 192.168.0.1 (IP of your tower) and send on it's default 192.168.0.1 for both LAN/WAN. You will also want to make sure it's not being set as a gateway and as a router. I know for a lot of routers they have a WAN tab, it allows you to do dhcp release/renew, that's why I would suggest you always plug in to the WAN port. That way the router gets it's own IP and then uses NAT to address traffic outward.

Last edited by mushroomboy; 08-12-2009 at 07:07 PM. Reason: Spell check
 
Old 08-13-2009, 08:33 AM   #21
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
Woah, Mushroomboy, first the issue is not really resolved it connected and now is no longer connected, unless he has not given us an update. Secondly you would be right about networking if things were on a seperate network or subnetwork, This is based on netmask. In the case of most residential WiFi routers they are set to some variant of the private class C network range, for dlinks for instance it is 192.168.0.x with a subnet mask of 255.255.255.0 indicating that the first three numbers in the ip address denote network address and the last number indicates host ID/number with this network mask you have a potential of 254 device addresses with .255 being broadcast and .1 usually reserved for gateway/router. Windows ICS also works similarly I believe by deafault ICS sets up a private class C network with the netmask of 255.255.255.0 Now lets say he plugged in the ICS machine to the WAN interface on the router and the ICS machine had IP address of 192.168.0.1 with netmask 255.255.255.0 and then the router LAN side had the same IP address and netmask. Traffic for the ICS machine would never leave the LAN side and fail, why? because of the way routing works. Basically it works by a router only knowing what networks is connected to it, and where to go to get to a network it knows nothing about. Having a WAN side network with the same subnet and a LAN side network with same subnet screws it all up. Because the routers local network is 192.168.0.x with netmask of 255.255.255.0 it will try to find any address you access on that within the LAN. Now lets say he changes the LAN side of the router to 192.168.10.x then he would have no issue. The reason I said do not have the ICS machine attached to the WAN port is because they are on the same subnet and because I imagine he wants file sharing between the two machines, which can work trhough a routed interface, however, you usually loose any browsing ability and name resolution on the network unless it is an ICANN registered name. For instance with SMB browsing (Windows file sharing) I could access a computer on a seperate subnet but I generally need to know the ip address and type it manually I cannot usually browse for the machine across subnets unless the router is a Windows machine or Samba machine that is doing some fancy footwork.

In this whole situation though it seems as though his issue has not been the router, or the way things were plugged into it, or even his network config (Well except he tried to use the same IP on the same subnet on his eth0 and wlan0 without creating a bridged interface with them) but it appears initially he had no signal because his WiFi in his laptopn was not on. After using iwconfig to set some stuff it came to life, however, it looks like the driver may be an issue using ndiswrapper as he is now seeing networks but the signal is, pardon my language, piss poor and he is not able to connect.

Dudearcher--
Maybe an idea, if it is not your ndiswrapper driver, perhaps you may want to try wpa_supplicant to connect it looks like you are using a .deb based distro and debian based distros have a nice way to use wpa_supplicant built in with networking. Google for "wpa_supplicant roaming profiles Debian" Then remove wicd and install wpa_supplicant, follow the tutorial and you should be up, as far as a GUI to cennect to networks and browse then get the wpa_gui which is a front end for wpa_supplicant that is well GUI. I use it with my laptop, and I regret trying wicd because my setup worked great with wpa_supplicant and after installing wicd I screwed it up, however, that said I do not dislike wicd, I do use it on my work laptop and it works quite well.
 
Old 08-13-2009, 08:39 AM   #22
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
dudearcher--

assuming that the issue isn't with your driver, then wpa_supplicant should work really well. Just thought though that you might want to google your card/chipset and see if there are any powersave issues with linux or if the card gets turned off for powersaving and or wireless gain.
 
Old 08-13-2009, 09:06 AM   #23
dudearcher
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks so much for helping. I am now totally confused. This morning I booted up my laptop and tried to connect via wireless. I could ping the router and xp computer, but even when I added the route I had no Internet. So I tried a wired connection. Same problem. Finally, I went back to the crossover and it was the same problem. Now I can't even install wpa_supplicant. I am thoroughly confused.
 
Old 08-13-2009, 10:41 AM   #24
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
check route again, No internet means one of three things

There is no default route set up,
The default Route is wrong
or
The Internet connection on the XP machine is no good

My guess is you have internet on the XP machine.
so...

check route if you are connected by WiFi you should see a default route using the XP machine as the gateway on the wlan0 interface.

If connected by cabling then you should see a default using the XP machine going out through the eth0 interface. If you see two default routes one wlan0 and one eth0 delete them both

route del default

do that twice and then check route to make sure there are no default routes then add one. If you are adding the route via your wired interface make sure your wlan0 is not connected to a network. Otherwise the default route might go over the wlan0 interface.
 
Old 08-13-2009, 02:25 PM   #25
dudearcher
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Wow, this seems to be dragging on forever. Anyway, I got the wired connection working again (I thought it had something to do with route, but I wasn't sure what). Now when I try to connect from the wireless I get a send_request: Network is down error. The network is not down. Is this something to do with my adapter? I tried finding a native linux driver like you suggested, and I found rtl-wifi, but I can't get it to compile. I reinstalled the ndiswrapper driver now too. I am now installing wpa_supplicant and crossing my fingers...
 
Old 08-13-2009, 03:21 PM   #26
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
I hope that wpa_supplicant resolves your issue for you, I found it to work great on mine I have used it with a broadcom chipset with ndiswrapper, and on an intel 3945 with the iwlwifi-firmware and native linux driver. When testing your wifi, since you are connecting to the same network, make sure you do a ifdown eth0 before using the wifi this will clear the routing table of eth0 information.
 
Old 08-13-2009, 04:09 PM   #27
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
This is exactly why I said to put it in the WAN port... I've done a similar experiment, only mine went like this:

Internet > Host PC via wirless > ICS to router via wireless > router to linux via wired

When I would reboot I would loose internet and it would be a pain to say the least. Now I've learned better... The reason you have problems is because the 1-x ports on a router aren't ment to recieve IP, but if your connecting your Host PC via ICS to the router your PC is supposed to be giving the router an IP.... which shouldn't happen on ports 1-x. If you want file sharing just set up the router as a switch and disable routing in general. Still say to plug the ICS into the WAN of the router, then the router is acting as a stand alone switch/AP.

What he should have done is buy an AP not a router, plug the AP into the host pc and connect wireless to that.
[edit] I guess getting a router is smart though, in case he doesn't want to do ICS through the computer... =)

Last edited by mushroomboy; 08-13-2009 at 04:14 PM.
 
Old 08-14-2009, 07:16 AM   #28
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
Commercial router for home tend to be less expensive than APs too, however even with routing enable the 4 ports ont the router for LAN should operate just as a switch and his router really never comes into play, because his default gateway is set as the ICS machine. I admit if he plugged the ICS machine into the WAN and turned on DHCP on the LAN interface of the router then set his laptop wireless to take DHCP and then set the network to different subnet of the router LAN like 192.168.20.0 it might have been a little easier to setup. But running a DHCP server on the ICS machine tied to the Ethernet connection would have been just as easy. But this issue seems to be more regarding the wireless on and connecting to the router with the laptop. I guarantee you that were he using a windows OS on the second laptop he would not have had these issues with his setup (after he changed wireless and ethernet to seperate IP addresses) His issue is either in his wireless config or his driver, no in the network setup.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Etch Stable & xgl (Yeah, I know....) kterry Linux - Software 6 02-12-2009 03:52 PM
Best distro? (yeah, yeah...I know, but read on!) jiml8 Linux - Software 15 08-03-2008 08:15 AM
ICS-- wired Ubuntu 7.10 to vista over ad hoc wifi hydroscrog Linux - Wireless Networking 3 01-10-2008 08:24 PM
Sprint s720 airprime usbserial debian KNx2 Linux - Hardware 0 07-30-2007 01:38 PM
Windows ICS & ad-hoc WiFi cumptrnrd Linux - Wireless Networking 1 03-07-2006 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration