LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin
User Name
Password
Linux Deepin This forum is for the discussion of Linux Deepin.

Notices


Reply
  Search this Thread
Old 07-19-2013, 05:39 PM   #1
alexdy
LQ Newbie
 
Registered: Jul 2013
Posts: 12

Rep: Reputation: Disabled
Question ad-hoc ether network w/o dhcp


there's an option in dhcp to assign private subnet address when client can't get responce from dhcp server. I'm getting different behavior apparently when I connect network storage directly to eth port - the link would not establish with default automatic neither when manually enter ipv4 address.
I can't get my data from backup)!
is it a bug?
 
Old 07-20-2013, 06:56 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Ad-hoc network is typically known as link-local where an IP address is automatically assigned in the 169.254.xxx.xxx 255.255.0.0 network if a DHCP sever is not found. Without knowing what type of network storage like make/model it is difficult to provide much help. Is it capable of link-local addressing?

Most ethernet adapters are capable of auto detecting a connection but you might need to use a crossover capable if connecting a device directly to your computer. If you do not see the link lights illuminated on both adapters then a crossover cable is required. If they are illuminated then you should be able to configure static IP address on each device like:

192.168.0.1 netmask 255.255.255.0
and
192.168.0.2 netmask 255.255.255.0
 
Old 07-21-2013, 12:56 PM   #3
alexdy
LQ Newbie
 
Registered: Jul 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
it's auto-sensing on both NIC, and the cable I use worked when tried with Windows and Mageia 3 on that PC. Yes, the storage does get 169.154.x.x IP when there is no DHCP server to answer request - it's the default setting of it, and I can't change it right away 'cause I can't get to it)
anyway, when I change to such (169.254.y.y) address on the PC NIC, the GUI won't let me save it unless I enter gateway address. that's not absolutely necessary, but even when I enter NIC address as gateway connection wouldn't establish.
I found ahcpd package in repository, maybe I should use that somehow?
 
Old 07-21-2013, 02:25 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I am not familiar enough with ahcpd but have you tried to manually set an IP address via the ifconfig command?
 
Old 07-25-2013, 05:03 AM   #5
alexdy
LQ Newbie
 
Registered: Jul 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
no, I just had a thought it could work out that way, or it may not, and decided to ask here)
will try&post the result
 
Old 07-25-2013, 06:53 PM   #6
alexdy
LQ Newbie
 
Registered: Jul 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
well, after
Quote:
sudo ifconfig eth0 169.254.101.100
I was able to establish a connection via smb to that storebox
but it dropped after less than a minute. and the address I set for eth0 wasn't there then
tried several time, all the same, connection soon drops and address vanishes
 
Old 07-25-2013, 07:38 PM   #7
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Quote:
Originally Posted by alexdy View Post
well, after

I was able to establish a connection via smb to that storebox
but it dropped after less than a minute. and the address I set for eth0 wasn't there then
tried several time, all the same, connection soon drops and address vanishes
Since IP addresses don't disappear by themselves, this must be caused by a process running in the background.

Kill any instances of dhclient or dhcpcd and make sure NetworkManager isn't running.
 
Old 07-26-2013, 08:54 AM   #8
alexdy
LQ Newbie
 
Registered: Jul 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
yes, understandable, and it was actually what I suspected that some of the daemons initiates periodical check of network interfaces re-establishing when something is not suiting him. now he's angry with my blatant ifconfig assign)
suppose if I disable services you mentioned, then the reconnect would stop and ifconfig'ed address would remain.. and I'd also have to write a route for http to that device by its name (because I do not know it's IP)? still, even if that would work it won't be true solution, 'cos I'd mess with distro' services..
will try though
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 12.04 box mysteriously switches from static ether config to dhcp kodekata Linux - Networking 1 07-18-2012 05:52 PM
ad-hoc mesh wireless network and DHCP problem davidlt Linux - Newbie 2 07-19-2011 03:34 PM
ad hoc network using firewire SaintDanBert Linux - Networking 2 04-24-2010 10:01 PM
ad hoc network torger Ubuntu 5 07-22-2006 02:51 PM
How to interconnect an ad-hoc network with an infrastructure network tonydeb Linux - Wireless Networking 3 08-08-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin

All times are GMT -5. The time now is 03:47 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