LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Deepin (https://www.linuxquestions.org/questions/linux-deepin-101/)
-   -   ad-hoc ether network w/o dhcp (https://www.linuxquestions.org/questions/linux-deepin-101/ad-hoc-ether-network-w-o-dhcp-4175470247/)

alexdy 07-19-2013 05:39 PM

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?

michaelk 07-20-2013 06:56 AM

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

alexdy 07-21-2013 12:56 PM

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?

michaelk 07-21-2013 02:25 PM

I am not familiar enough with ahcpd but have you tried to manually set an IP address via the ifconfig command?

alexdy 07-25-2013 05:03 AM

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

alexdy 07-25-2013 06:53 PM

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

Ser Olmy 07-25-2013 07:38 PM

Quote:

Originally Posted by alexdy (Post 4996834)
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.

alexdy 07-26-2013 08:54 AM

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


All times are GMT -5. The time now is 09:53 AM.