You are not logged in.
Pages: 1
I have 2 machines.. I'm trying to set up an ad-hoc network between them.
I am trying to follow along in the wiki here https://wiki.archlinux.org/index.php/ad-hoc_networking
So far, I have been able to create an ad-hoc network on one machine. When I run
iw dev interface info
on the host it shows up just fine.
Additionlly, running
iw dev interface scan
on the client shows my ssid. However, on the client I am unable to actually connect to the network.
When I run
iw dev interface connect ssid freq
I get this message:
command failed: Operation not supported (-95)
I made sure to stop netctl before trying this. Does anyone have a good resource on configuring an ad-hoc network in arch?
For the record, I did ensure that my card does in fact support ibss:
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Last edited by kibblech (2018-09-21 03:43:03)
Offline
For what it's worth, I seem to have fixed that issue by following the advice in this post:
https://bbs.archlinux.org/viewtopic.php?id=174221
Specifically, add these two lines to the netctl profile that is auto generated by wifi-menu
AdHoc=yes
WPADriver=wext
A little more background--
I have a media server that I was looking to share locally (and wirelessly) in scenarios where I may or may not have a router or wifi
So, the fist goal was to share files through ssh / ftp
Then, after that was working the second goal was to funnel the internet from host --> client. I have a ralink network adapter for the host in addition to its internal card. I am connected to the internet through the ralink adapter and the adhoc through the internal card. In my notes, I call the ralink adapter eth1 and the internal card eth0
At any rate.. here are the notes that I wrote for myself on how to do this:
#---------------------------------
# server 1st:
#---------------------------------
iw eth0 set type ibss
ip link set eth0 up
iw eth0 ibss join testnet 2412
ip addr add dev eth0 192.168.100.1/24
#---------------------------------
# testnet should now appear on other devices as a network
#---------------------------------
#---------------------------------
# i'm really not sure this is necessary..
# i was just using static ip's so probs not
#---------------------------------
cat /etc/dhcpd.conf
>>> option domain-name "supernet.example";
>>> option domain-name-servers 192.168.1.1;
>>> default-lease-time 600;
>>> max-lease-time 7200;
>>> authoritative;
>>> log-facility local7;
>>> subnet 192.168.100.0 netmask 255.255.255.0 {
>>> range 192.168.100.10 192.168.100.20;
>>> option routers 192.168.100.1;
>>> }
#---------------------------------
systemctl start dhcpd4
#---------------------------------
#---------------------------------
# now client:
#---------------------------------
# this will fail, keep the profile
sudo wifi-menu
# edit the profile to make it like this
cat /etc/netctl/testnet
>>> Description='Automatically generated profile by wifi-menu'
>>> Interface=eth0
>>> Connection=wireless
>>> Security=none
>>> ESSID=testnet
>>> IP=static
>>> Address=('192.168.100.2/24')
>>> Gateway=('192.168.100.1')
>>> DNS=('192.168.100.1')
>>> AdHoc=yes
>>> WPADriver=wext
#---------------------------------
# now test from client side:
#---------------------------------
ping 192.168.100.1
ssh !$
#---------------------------------
# server side one more time to forward things
# this assumes that you have eth1 connected to the internet
# and eth0 connected to adhoc
#---------------------------------
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
Last edited by kibblech (2018-09-21 03:41:07)
Offline
Pages: 1