need some basic networking concepts to build an access between two machines
I have posted a thread in wireless sub-forum, and soon found it's not a wireless problem.
My aim is to let my iPad to access my Linux box's http, ftp, samba servers directly through wifi, by making the box's wifi card working under Master mode. The expected AP was built. (And some "bridge" thing.) My iPad found the SSID presetted by the Linux box, got a dynamic IP from the upper level router. And it could access the Internet. But the iPad can't access the Linux box's own http or ftp server. Now the Linux box is a simple wired-wireless converting machine, namely, a wireless AP. But what I need is more than that. I need to access the Linux box itself, its http and ftp servers. So, what do I need to do? What kind of function does the Linux box need? What should it be? A router? A DHCP server? I don't have clear concepts about this. I checked some books. But some are too old, some are aiming to build enterprises-level routers, not a simple two-machine thing. So educate me, tell me about some basic concepts. Thanks a lot. If you are really interested, the lousy thread I have posted about wireless AP is here: http://www.linuxquestions.org/questi...own-ap-914167/ And sorry for my English. |
Quote:
Similarly - if you want to be able to ssh from your iphone into the linux box - then the linux box should have a ssh server (sshd) running. If you wish to serve web pages - then a web server facility is required. Ditto ftp, etc. etc. etc. Do you understand the general idea? A lot of distros "minimal" installations will provide enough for the machine to be a basic "client". Just like a Ms windows installation (unless the name ends in "server"). The basic "desktop distro" allows one to use client programs - web browsers, dhcp clients, smbclient, nfs-client ssh-client, etc. But, unlike ms windows - you don't have to "buy something different to serve". You just install the "server packages" that you need. Yes, there are some distros which follow the MS marketing model - but generally - even if you installed a Ubuntu Server or Redhat Enterprise - all you are getting is a bundle of packages pre-installed. You can still add more. Any linux box can be a "server" - it just depends on the packages/software you install. Dave |
Dave,
Thank you for replying. I have tested DHCP server, and iPad has got an expected IP, but it can't ping the DHCP server's IP. That's the problem. I also tested with static IP, hostapd said the authentication is correct, but I couldn't ping the Linux box too. (Of course I can't type "ping" with an iPad. I pinged from a windows machine. Same thing.) And if accesed from the upper level router, the sshd, http, ftp server have always been working well. So, I guess it's a net-subnet or LAN protocol problem, the "second layer", not a server problem. I followed the simple instructions here: http://wiki.linuxquestions.org/wiki/...l_area_network with almost the same steps: Code:
$ iwconfig ath0 mode Master So I guess I missed some protocols, or I simply misunderstood the concepts about subnet or LAN. Thanks anyway. And sorry for my English. I have been careful about it. |
OK - I think I understand what you are asking now. Yes, from what you say - it appears that it is probably a subnet-type issue.
So, you said "almost the same". So, what is the "difference"? First you must use static IP's. Dhcp can come later. Let's do it with the Linux AP server and a windows box first. Ignore the IPAD for a moment. Prove that the AP function is working correctly. Did you:-
Some questions/thoughts - Is your Linux host wifi card in the list of approved/capable "Master mode" cards? What is the card model? What distribution of linux are you using? is it Slackware? - Which version/release? Wifi Driver name and version please. In a cmd window - run Code:
ipconfig/all Quote:
Quote:
Davd |
Dave,
Thank you for your detailed reply. Quote:
Quote:
Another command "iw list" shows: Code:
# iw list Code:
# iwconfig My linux distribution is slackware13.37, with a new kernel 2.6.38.7. Except for hostapd, all drivers and software mentioned here come from the slackware. Quote:
Code:
brctl addbr br0 Code:
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE Code:
echo 1 > /proc/sys/net/ipv4/ip_forward Quote:
Code:
C:\Documents and Settings\ibm>ipconfig/all Quote:
Quote:
Quote:
Quote:
As for the Windows machine, there are no firewall software icons in the system tray, and I didn't find any suspicious task in "tasks". My checking method is: if I simply switch it to another wifi hot-spot, it can ping this new wifi router immediately. (Both DHCP and static modes.) As for the Linux machine, I haven't intentionally added any software for this. From slackware? I am not sure. I checked, there is no file named rc.firewall in /etc/rc.d/ directory. But is "iptables" a firewall tool? I am not sure too. I don't have enough knowledge about this. I will try to make this part clear. Quote:
Thanks again. |
My understanding of your setup is;
A) Linux box - running as a server with wifi card installed. B) Ipad C) Windows XP box with wifi card - available for testing D) "some box" behaving as Wifi AP and router - available for testing. You wish to use (A) as an access point thereby eliminating (D). TESTING. With (D) installed and working as an access point you have..... 1. tested with (A) as a client.... it connects to the internet through (D) - worked. 2. tested "server services" like ssh on (A) by using (C) as a client. This worked. 3. tested (B) as a client to (A) - this worked. TESTING with (D) removed and (A) configured as an AP you have.... 1. tested with (A) as a client.... it connects to the internet through where ??? 2. tested "server services" like ssh on (A) by using (C) as a client. Cannot connect. 3. tested (B) as a client to (A) - Cannot connect. But then you told me about your BRIDGE thing. Ahhhh! it is starting to become clearer. Perhaps I didn't ask you the correct questions. I apologise. Allow me to explain what this code does Code:
brctl addbr br0 It is saying "create a bridge named "br0". Add and interface called eth0 and an interface called wlan0. So now - you have 2 network cards - eth0 and wlan0 and they are connected inside your computer. Just as if they had a wire running between them. The code Code:
echo 1 > /proc/sys/net/ipv4/ip_forward If the eth0 interface was connected to the internet... then - effectively - this setup has become a bridge between the wifi network and the internet. I asked you if your lan card supported "MASTER MODE". You said Quote:
So... you have 2 lan interface cards in your linux box. One is wired and the other is wireless. Is that correct? Anyway - I fear the point is moot because I found this Quote:
The 3090 driver at the ralink website is 2009_0903_RT3090_Linux_STA_v2.2.0.1. Which is older :( But I then "hunt" some more. And I found THIS. In here it says Quote:
I strongly suggest you follow the examples given by Mr Denilson at THIS. I suspect that you will find your solution there ** IF ** the point about "master mode" not working except with hostpad is true. I cannot help you further as someone has borrowed my wifi card from my server. Dave |
Dave,
Thanks to your posts, I finally got this job done. Your explanation about my "bridge thing" reminded me that there had been a line about "br0" in the configuration file of hostapd, which wasn't supposed to be there if I intended not to test router at first. I removed the line, it worked. That's it. My concepts about these thing were not clear enough when I did it. Then you helped me to make it clearer. Thank you, Dave. The following are just to answer some question marks in your last post. In your last post, all you understood about my machines, my aim and my testings, are almost completely correct. Quote:
Quote:
Thanks again! |
So has anyone managed to get "Master" mode working on the RT3090?
|
All times are GMT -5. The time now is 06:31 AM. |