Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-01-2013, 11:03 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2013
Posts: 12
Rep: 
|
editing /etc/network/int... for static IP. have to manually restart eth0 to work?
so I edited /etc/network/interfaces like so:
Quote:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auth eth0
iface eth0 inet static
address 192.168.1.105
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.1.1
|
When I tried it it seemed to work when I shut down and restarted the interface. Problem is when my machine starts up I have to go over, log in as root and I do ifdown eth0, ifup eth0 to get it to work. It won't set up correctly upon startup. This isn't good as I prefer to ssh into the machine as I'm not always home.
|
|
|
|
03-01-2013, 11:10 AM
|
#2
|
|
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,380
|
What is happening with the interface before you restart it? Have you looked at whether the IP is even being assigned by the system?
|
|
|
|
03-01-2013, 12:07 PM
|
#3
|
|
Senior Member
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 1,731
|
It sounds like your network might be currently managed by something like NetworkManager, which doesn't use the /etc/network/interfaces config file. You might be able to go into the system settings to switch it to the "legacy" network management, which would then use your config with ifup and ifdown like you expect. Otherwise, you edited it in the wrong place and instead need to look into what your distro is currently uses for network management and set up the static ip there.
|
|
|
|
03-01-2013, 12:18 PM
|
#4
|
|
Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Lenny (5.0), Squeeze (6.0), Wheezy (7.0), Sid (unstable)
Posts: 277
Rep:
|
If it turns out the interface is being managed by NetworkManager, Changed the line "managed=true" for the interface if it exists to "managed=false" in /etc/NetworkManager/NetworkManager.conf.
|
|
|
|
03-01-2013, 12:20 PM
|
#5
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
Please try checking / editing your interfaces file here:
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.1.105
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.1.1
It looks like you have a typo.
|
|
|
1 members found this post helpful.
|
03-02-2013, 12:11 PM
|
#6
|
|
LQ Newbie
Registered: Jan 2013
Posts: 12
Original Poster
Rep: 
|
Last guy got it. Thanks
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:03 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|