LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ad-hoc mesh wireless network and DHCP problem (https://www.linuxquestions.org/questions/linux-newbie-8/ad-hoc-mesh-wireless-network-and-dhcp-problem-889821/)

davidlt 07-04-2011 06:48 AM

ad-hoc mesh wireless network and DHCP problem
 
I moved from Managed to Ad-hoc netwrok type. I have Ethernet interface (eth0 and eth1), both on 169.254.0.0 subnet and I have wireless (wlan0) interface on 10.2.2.0 subnet. After moving to Ad-hoc it's like DHCP is not working anymore.

Example:
I am with my MacBook on my local router with on 192.168.0.0 subnet (IP: 192.168.1.65) and I switch to my device running Linux with Ad-hoc network configured. It looks like my MacBook still wants to have old IP (lease) from my local router and not take new from linux device (ad-hoc network), but Linux machine keeps offering to MacBook correct new IP.

No avahi-daemon, no avahi-autoip, no olsrd is running on Linux machine.

I had managed to make it work for awhile, after it was not able to renew lease for 192.168.1.65 it was taking 10.2.2.20, but I cannot reproduce it.

I create ad-hoc network like this (libertas driver):
Code:

ip link set wlan0 down
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel 4
iwconfig wlan0 essid 'TestMeNow'
iwconfig wlan0 key 1234567111
ip link set wlan0 up

I noticed that WEP is not working with libertas, but it is working with libertas_tf (very unstable).

Code:

2011-07-04T16:37:49.000000+02:00 overo dhcpd: DHCPREQUEST for 192.168.1.65 from 00:1b:63:04:29:ea via wlan0: ignored (not authoritative).
2011-07-04T16:37:50.000000+02:00 overo dhcpd: DHCPREQUEST for 192.168.1.65 from 00:1b:63:04:29:ea via wlan0: ignored (not authoritative).
2011-07-04T16:37:52.000000+02:00 overo dhcpd: DHCPREQUEST for 192.168.1.65 from 00:1b:63:04:29:ea via wlan0: ignored (not authoritative).
2011-07-04T16:37:57.000000+02:00 overo dhcpd: DHCPDISCOVER from 00:1b:63:04:29:ea via wlan0
2011-07-04T16:37:58.000000+02:00 overo dhcpd: DHCPOFFER on 10.2.2.20 to 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:37:58.000000+02:00 overo dhcpd: DHCPDISCOVER from 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:37:58.000000+02:00 overo dhcpd: DHCPOFFER on 10.2.2.20 to 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:38:01.000000+02:00 overo dhcpd: DHCPDISCOVER from 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:38:01.000000+02:00 overo dhcpd: DHCPOFFER on 10.2.2.20 to 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:38:08.000000+02:00 overo dhcpd: DHCPDISCOVER from 00:1b:63:04:29:ea (david-mac) via wlan0
2011-07-04T16:38:08.000000+02:00 overo dhcpd: DHCPOFFER on 10.2.2.20 to 00:1b:63:04:29:ea (david-mac) via wlan0


wapa17 07-19-2011 03:25 PM

First try with a static IP (new IP-range of course) on the WLAN, so you can see if MAC can connect.

tekhead2 07-19-2011 03:34 PM

By definition an adhoc network structure has no DHCP nor centralization so there is no DHCP because there is no router. You are only able to use static IP's only on adhoc network types as there is no gateway, and no real routing. The diagram of a regular network is similar to a tree, but the topology of an adhoc network is more like a circle and less like a star as the traditional network diagrams would show. So you will have to configure IP address for each node of the network. I suppose in theory you could attempt to enable a DHCP server, but it would be really weird.


All times are GMT -5. The time now is 10:51 AM.