You are not logged in.

#1 2009-05-26 14:12:59

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

setting up ad hoc wireless network

Hi guys and gals,

Past weekend I went on a biking trip with some friends and of course we shared some music to play in our chalet. Sharing it with an external HD was no sweat, but I tried to set up a wireless network to share certain folders wirelessly and I failed miserably.

How does one go about this? If I'm not mistaken the necessary steps are these:

Server:
1. Switch on the wireless card as master (cmd?)
2. Allocate static IP-addresses to the server in the same range as the clients (ifconfig wlan0 address 192.168.0.x netmask 255.255.255.0)
3. Config samba and start the service (/etc/rc.d/smb start)

Client:
1. Switch on the wireless card (ifconfig wlan0 up)
2. Allocate static IP-addresses to all clients in the same range (ifconfig wlan0 address 192.168.0.y netmask 255.255.255.0)
3. Config samba-client and open your filebrowser.

That should be it, no?

I was able to ping the other computer, but that was it...

THX!

Offline

#2 2009-05-26 17:17:47

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: setting up ad hoc wireless network

Was your /etc/hosts.deny blocking it?

Offline

#3 2009-05-26 18:31:51

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: setting up ad hoc wireless network

FYI - the phrase "ad hoc wireless network" has a specific meaning, and refers to a wifi network in which there is no designated access point. All devices in an ad hoc network are configured to use Ad-Hoc mode e.g.

iwconfig wlan0 mode Ad-Hoc

Your description above refers to the creation of the more usual managed wifi network with an access point created by configuring one device as the master.

zenlord wrote:

1. Switch on the wireless card as master (cmd?)

iwconfig wlan0 mode Master

You need to set up the ESSID here as well - not sure if you did that, as you didn't mention it.

zenlord wrote:

That should be it, no?

No - if you're using static IP addresses, you also need to manually configure your routing requirements. On Arch, this is typically handled by the ROUTES directive in /etc/rc.conf.

Offline

#4 2009-05-27 08:57:31

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: setting up ad hoc wireless network

tomk wrote:

FYI - the phrase "ad hoc wireless network" has a specific meaning, and refers to a wifi network in which there is no designated access point. All devices in an ad hoc network are configured to use Ad-Hoc mode e.g.
Your description above refers to the creation of the more usual managed wifi network with an access point created by configuring one device as the master.

Thx for clearing that out - I didn't know that ad-hoc mode and master mode were different things...

tomk wrote:

if you're using static IP addresses, you also need to manually configure your routing requirements. On Arch, this is typically handled by the ROUTES directive in /etc/rc.conf.

OK, so starting a dhcpserver on the 'master'-pc would be easier
So:

# ifconfig wlan0 address 192.168.0.1
# /etc/rc.d/dhcpcd start
# iwconfig wlan0 mode Master essid NetworkShare
# /etc/rc.d/smb start

And then let the other laptops scan for essid NetworkShare would suffice? Thx!

Offline

#5 2009-05-27 09:10:14

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: setting up ad hoc wireless network

As far as I know, you have to use hostapd to make use of the master mode, and only some cards support it. Considering that, you should set mode on both PCs to ad-hoc.

Offline

#6 2009-05-27 12:03:25

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: setting up ad hoc wireless network

It is a D-link DWA652 which uses the ath9k-driver, so master mode is supported. I'll check out hostapd - thx!

Zl.

Offline

#7 2009-05-27 15:57:04

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: setting up ad hoc wireless network

zenlord wrote:

OK, so starting a dhcpserver on the 'master'-pc would be easier
So:

# ifconfig wlan0 address 192.168.0.1
# /etc/rc.d/dhcpcd start

dhcpcd is the DHCP client daemon, not a DHCP server. You would have to install and configure dhcpd, provided by the dhcp package in the extra repo. IMO static addressing and routes would be easier in this particular case.

Offline

#8 2009-05-29 12:34:55

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: setting up ad hoc wireless network

tomk wrote:

dhcpcd is the DHCP client daemon, not a DHCP server. You would have to install and configure dhcpd, provided by the dhcp package in the extra repo.

You're right. I have always found it confusing that the dhcpcd-package is a dhcp client...

Thx for your help!

Offline

Board footer

Powered by FluxBB