Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Ethernet Configuration lost on shutdown, ifconfig IP address not permanent
AH7
post Apr 30 2006, 08:52 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 8
Joined: 13-February 04
From: London, England
Member No.: 2,368



Sometime back, I configured my small Debian linux server to use a fixed IP address on my network.

Coming back to the server after a short absence, I needed to reconfigure the fixed IP address for a new network. To do this I use the command:

ifconfig eth0 192.168.2.nn

All well and good. I can then fire up PuTTY to find the server and off I go. Only one problem though, everytime I shutdown, I need to reconfigure the fixed ethernet adddress again. My previous configuration is always lost. I have tried "doctoring" my etc/hosts file with an entry showing the server name and the assigned IP address. This doesn't seem to make any difference.

Any help to permanently configure my ethernet card would be gratefuly received !!!

AH7


--------------------
<Alex 7>
Go to the top of the page
 
+Quote Post
michaelk
post Apr 30 2006, 12:58 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



The ifconfig command does not save settings to a configuration file.
/etc/hosts is a local file for resolving URLs to IP address it does not effect any other configuration file.

Check your /etc/network/interfaces file. Modify it to look like the following for the lines relating to eth0. It would be wise to save the file prior to changing it just in case something goes awry.

auto eth0
iface eth0 inet static
address 192.168.0.2.xx
netmask 255.255.255.0

Change xx to match your actual IP address.
Go to the top of the page
 
+Quote Post
AH7
post May 1 2006, 04:49 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 8
Joined: 13-February 04
From: London, England
Member No.: 2,368



Many thanks....

When I configured etc/network/interfaces it had a line of comment explaining that the file had been setup automatically as part of the Debian install I did. I must have provided the fixed IP address but, unfortunately, I hadn't remembered and/or wasn't aware of the file it changed !

Still in very early stages of getting to grips with Linux but am already sure that it well worth the time and effort !

Thanks again for your help !

AH7


--------------------
<Alex 7>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 11th December 2017 - 05:31 PM