LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-29-2015, 11:38 AM   #1
supermario
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
eth1 closes automatically


I am connecting two computers ( Ubuntu and Raspberry ) via an ethernet cable. The interface on Ubuntu is eth1 ( because I am using a USB Ethernet port ) and on the Raspberry is eth0. I have given both the computers a static network IP ( 192.168.22.160 on ubuntu and 192.168.22.161 to raspberry ). I route the network packages on the eth1 on ubuntu via the command

sudo ifconfig eth1 192.168.22.160/24

and then ssh in the raspberry. Everything works fine and I can access the raspberry filesystem from ubuntu. However, if I leave the connection for a while, it automatically closes. I saw the /val/log/syslog and it says

warn ( eth1 ) : DHCPv4 request timed out
more messages in between
ntpd: Deleting interface #87 eth1....

What am I doing wrong? I am a newbie, so further reading links etc would also be helpful.
 
Old 10-29-2015, 01:26 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You probably have a network config utility like NetworkManager or similar running that doesn't know you're trying to use a static IP on that interface, so it's resetting it to DHCP. If you want to manually set the NIC configuration then you'll need to shut the default tool off, otherwise you'll need to skip ifconfig and use the default tool to set the static IP, it's probably in your task bar somewhere.
 
1 members found this post helpful.
Old 10-30-2015, 04:37 AM   #3
supermario
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, it worked. The front end GNOME3 is using the default tool ( nm-connection-editor ) and was resetting the DHCP. I have since added the new interface with static IP using the mentioned default tool. But what happens to the entries in etc/network/interfaces? Would it be overwritten with the new configuration by the nm-connection-editor or does this default tool does not even look in this file? If not, where does nm-connection-editor stores the network information. I am using Ubuntu 14.04 trusty x86_64.
 
Old 10-30-2015, 10:17 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I don't use Ubuntu, but from what I've read NM should ignore any interfaces that are configured in /etc/network/interfaces. So if you add an entry in /etc/network/interfaces and then restart NM (service network-manager restart), it should leave it alone.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is there any firewall that automatically closes ports when you're done using them? 55443 Linux - Security 1 05-27-2013 01:18 AM
ssh putty closes automatically khanahmedabbas General 4 11-30-2011 05:15 AM
VNC Closes automatically pnbalaji Linux - Software 2 03-29-2005 12:31 PM
Browser automatically closes by itself........ emailssent Linux - General 10 10-13-2004 07:24 PM
mozilla automatically closes before opening bwall Linux - Software 12 08-18-2003 09:32 AM

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

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