Re: Ad-hoc network: cannot ping other machine



On Mon, 2011-10-10 at 20:15 -0500, Patrick McMunn wrote:
> I was just excited to successfully create an ad-hoc network between
> two Linux machines at all, even if ICS wasn't enabled. It is so easy
> with Windows. Wireless networking with Linux has been a headache for
> me.

It should be painless on Linux, but sometimes stuff gets in the way :(

> But anyway, I tried creating an internet connection sharing setup, and
> NetworkManager will not connect to the network I'm trying to create.
> Here's the setup:
> 
> [Wireless]
> SSID: share
> Mode: Ad-hoc
> Band: b/g
> Channel: 10
> BSSID: <blank>
> Restrict to Interface: Any
> Cloned MAC Address: <blank>
> MTU: Automatic

Looks fine.

> [Wireless Security]
> Security: None
> 
> [IPv4 Address]
> Method: Shared
> "IPv4 is required for this connection" checkbox is selected
> 
> [IPv6 Address]
> Method: Disabled
> 
> /etc/NetworkManager/nm-system-settings.conf
> [main]
> plugins=ifnet,keyfile
> 
> [ifnet]
> managed=true
> auto_refresh=false
> 
> Fortunately, the created connection appears in the GUI (there is often
> a problem with created connections not appearing in the GUI), and I
> click on it. The status says "Configuring interface" for a few seconds
> then "Setting network address for just a moment" and then goes back to
> "Not connected."
> 
> To try to get some feedback, I ran dmesg. The first time shows:
> [  133.491149] wlan0: Trigger new scan to find an IBSS to join
> [  137.008034] wlan0: Trigger new scan to find an IBSS to join
> [  141.008084] wlan0: Trigger new scan to find an IBSS to join
> [  142.299155] wlan0: Creating new IBSS network, BSSID 12:e3:2c:72:57:15
> [  144.242036] wlan0: no IPv6 routers present

NM dumps it's output to syslog's daemon facility, so can you paste in
the relevant parts of /var/log/messages or /var/log/daemon.log?

Dan

> Subsequent attempts have the same message but omit "no IPv6 routers
> present" and a different BSSID.
> 
> I also ran avahi-daemon from a root console and tried to connect. Upon
> starting it, I get
> localhost patrick # avahi-daemon
> Process 5268 died: No such process; trying to remove PID file.
> (/var/run/avahi-daemon//pid)
> Found user 'avahi' (UID 103) and group 'avahi' (GID 1009).
> Successfully dropped root privileges.
> avahi-daemon 0.6.30 starting up.
> Successfully called chroot().
> Successfully dropped remaining capabilities.
> Loading service file /services/sftp-ssh.service.
> Loading service file /services/ssh.service.
> System host name is set to 'localhost'. This is not a suitable mDNS
> host name, looking for alternatives.
> Joining mDNS multicast group on interface wlan0.IPv6 with address
> fe80::211:50ff:fef5:592f.
> New relevant interface wlan0.IPv6 for mDNS.
> Joining mDNS multicast group on interface eth0.IPv6 with address
> fe80::211:95ff:fefd:cbd9.
> New relevant interface eth0.IPv6 for mDNS.
> Network interface enumeration completed.
> Registering new address record for fe80::211:50ff:fef5:592f on wlan0.*.
> Registering new address record for fe80::211:95ff:fefd:cbd9 on eth0.*.
> Registering HINFO record with values 'I686'/'LINUX'.
> Server startup complete. Host name is linux.local. Local service
> cookie is 3616907344.
> Service "linux" (/services/ssh.service) successfully established.
> Service "linux" (/services/sftp-ssh.service) successfully established.
> 
> Then after attempting to create the ICS network avahi-daemon reports:
> Joining mDNS multicast group on interface wlan0.IPv4 with address 10.42.43.1.
> New relevant interface wlan0.IPv4 for mDNS.
> Registering new address record for 10.42.43.1 on wlan0.IPv4.
> Withdrawing address record for 10.42.43.1 on wlan0.
> Leaving mDNS multicast group on interface wlan0.IPv4 with address 10.42.43.1.
> Interface wlan0.IPv4 no longer relevant for mDNS.
> 
> Why is it that when I create a normal ad-hoc network, it creates an IP
> address of 169.254.x.x but always tries to create an IP of 10.42.43.1
> when attempting ICS? Could that be part of the problem?
> 
> Anyway, I hope this helps. If you can get ICS working for me I could kiss you.
> 
> P.S. I'm currently running kernel 3.0.6 and I'm using dhcpcd with
> zeroconf support through Avahi enabled. My wireless card in the
> desktop in a Belkin PCI card with a Broadcom 4318 chipset. I'm using
> the kernel's b43 driver with Broadcom's wl firmware.
> 
> On 10/10/11, Dan Williams <dcbw redhat com> wrote:
> > On Sat, 2011-10-08 at 23:54 -0500, Patrick McMunn wrote:
> >> I just wanted to let anyone who runs across this know that I was able
> >> to resolve the issue. I checked the output of dmesg on the laptop, and
> >> I saw a message "disassociating by local choice (reason=3)" After
> >> doing a Google search and finding this was a widely reported problem,
> >> some of the proposed solutions included disabling power management on
> >> the laptop's wifi card, disabling wpa_supplicant, and changing the
> >> channel the connection is using. I was unable to disable
> >> wpa_supplicant. If I killed the process, it respawned. If I
> >> uninstalled wpa_supplicant completely, NetworkManager refused to work
> >> at all. I ended up manually specifying the connection to use channel
> >> 10 as one person recommended, and voila! I was able to connect, and
> >> each machine was able to ping the other. Now if I can just get
> >> internet connection sharing working....
> >
> > NM uses wpa_supplicant for wifi control, so yeah, you'd need it.  WRT
> > channel 10 vs. channel 3, that's very interesting; it could be that the
> > driver for your wifi card is somewhat stupid; I've noticed a lot of
> > variability in the quality of Ad-Hoc mode support in kernel wifi
> > drivers.  For example, in certain kernel versions Ad-Hoc + WPA simply
> > doesn't work.  At all.  But we'd do best to investigate deeper into the
> > kernel driver here.
> >
> > Second, for ICS, you want to choose "Shared to other computers" as the
> > IPv4 connection  method in the Ad-Hoc network you're creating.  If
> > that's an option in the KDE network config (that appears to be what
> > you're using...).  The method "Link-Local" will only do Link-local, it
> > won't start up ICS.
> >
> > Dan
> >
> >> On 10/8/11, Patrick McMunn <doctorwhoguy gmail com> wrote:
> >> > I'm using NetworkManager 0.9.1.90 (just installed yesterday; I've been
> >> > using 0.9.0 for a while) and KNetworkManager from git. I have never
> >> > been able to get a working ad-hoc network between two Linux machines -
> >> > only when I create it with Windows and connect to it with a Linux
> >> > machine.
> >> >
> >> > Here's my setup in KNetworkManager:
> >> > SSID: 1337
> >> > Mode: Ad-Hoc
> >> > Band: b/g
> >> > Channel: 3
> >> > BSSID: <blank>
> >> > Restrict to Interface: Any
> >> > Cloned MAC Address: <blank>
> >> > MTU: Automatic
> >> >
> >> > IPv4 Address: Link-Local
> >> > IPv6 Address: disabled
> >> >
> >> > results of route from command line of desktop computer
> >> >
> >> > Kerne IP routing table
> >> > Destination     Gateway         Genmask         Flags Metric Ref
> >> > Use Iface
> >> > loopback        *               255.0.0.0       U     0      0        0
> >> > lo
> >> > link-local      *               255.255.0.0     U     2      0        0
> >> > wlan0
> >> > 224.0.0.0       *               240.0.0.0       U     0      0        0
> >> > wlan0
> >> >
> >> > Settings are the same on desktop and laptop computers. Link-Local is
> >> > the only setting that will work at all under IPv4 settings. DHCP
> >> > results: attempts to connect but fails. I have dhcpcd set to fallback
> >> > to zeroconf, but that doesn't work with NM. I haven't had any luck
> >> > with static IPs either.
> >> >
> >> > When using Link-Local, however, I can connect to the network easily.
> >> > Then I can walk over to my laptop, use KNetworkManager's scan feature
> >> > and identify the essid I created on the desktop. I have to change IPv4
> >> > settings to Link-Local, but everything else is usually identified
> >> > correctly. Then I save and can connect - apparently. If I look at the
> >> > network usage statistics of KNetworkManager, the graph indicates
> >> > network activity for a few moments at the time I attempt to join the
> >> > network, but then it goes back to zero never to do anything else. I
> >> > cannot ping either machine from the other. I have tried this with no
> >> > encryption at all for troubleshooting and with WPA Personal just to
> >> > see what would happen - both with the exact same results (when I tried
> >> > encryption, it even asked for my passphrase before connecting, so that
> >> > seemed to work).
> >> >
> >> > Once I get this solved, I want to be able to share internet connection
> >> > over wifi.
> >> >
> >> > Any ideas what's wrong?
> >> >
> >> > --
> >> > Patrick McMunn
> >> >
> >> > - Learn more about the Catholic Faith: http://www.catholic.com/
> >> > - Pray with the Church: http://www.universalis.com/
> >> _______________________________________________
> >> networkmanager-list mailing list
> >> networkmanager-list gnome org
> >> http://mail.gnome.org/mailman/listinfo/networkmanager-list
> >
> >
> >
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]