LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2014, 06:37 AM   #1
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Rep: Reputation: 0
wlan0 does not assign an IP addres if eth0 aldready has one


Hello,

I am facing with a problem I don't know how to solve.

In my device, let's call it C1, I have the following situation: eth0 and wlan0 interfaces can both have an IP address.

wlan0 works in Ad-Hoc mode, it has its own ESSID "MY_WLAN".

From an another computer, let's call it C2, when I try to connect to C1 through "MY_WLAN" network, if in C1 the eth0 has IP addres, wlan0 does not assign any IP address.

I am using udhcpd for wlan0 dhcp configuration.

I am not using network managaer.

This is my /etc/network/interface:

Code:
iface wlan0 inet dhcp
      pre-up wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -B
      post-up /usr/bin/confwifi.sh; udhcpd /etc/udhcpcd.conf;

iface gw inet dhcp
iface default inet dhcp
iface adhoc inet static

        address 192.168.2.2
        netmask 255.255.255.0

        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1


#auto eth0
allow-hotplug eth0
iface eth0 inet manual
post-up /usr/bin/confeth.sh
/usr/bin/confwifi.sh is just an ifconfig and an IP address, and it can change depending if I want to connect wlan to another router as Managed mode.

And this is my /etc/udhcpd.conf file

Code:
#start address
start           192.168.2.3

#end address
end             192.168.2.254

option dns 192.168.2.2
option subnet 255.255.255.0
option router 192.168.2.2

#interface to listen on
interface	wlan0

#maximum number of leases
max_leases	64

Thank you for your help.
Simon

Last edited by mr.simo; 07-28-2014 at 04:05 AM.
 
Old 07-25-2014, 08:03 AM   #2
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Try running dhclient in C1.... May be its not runnning currently

Or else release eth0 from dhclient...and then start dhclient back

Follow these cmds:

dhclient -r eth0
dhclient -v eth0


Also chck wth wireshark wheter dhcp pkts are captured at C1 LAN interface...
 
Old 07-28-2014, 04:03 AM   #3
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Original Poster
Rep: Reputation: 0
Hello SIG_SEGV,

Thank you for your reply.

I finally solved adding running again udhcpd after configuring eth0.

Code:
allow-hotplug eth0
iface eth0 inet dhcp
post-up /usr/bin/confeth.sh; killall udhcpd; udhcpd /etc/udhcpcd.conf;
It is solved now.


Last edited by mr.simo; 07-28-2014 at 04:07 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0 and wlan0 vs wlan0 problem player107 Linux - Wireless Networking 3 02-25-2013 09:54 AM
[SOLVED] firewall accepting rules from public h/w mac addres not from dyanmic ip mac hw addres sanjay87 Linux - Server 2 03-06-2012 05:04 AM
dhcpcd wlan0 doesn't assign ip address dnaEnhanced Slackware 1 02-01-2006 02:34 PM
ping6 error "conect: cannot assign requested addres lamsteven Linux - Networking 0 06-30-2005 07:57 PM
Determining IP addres for eth0 failed nutthick Fedora 2 11-14-2004 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration