LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I change my network config files in SuSe to make my IP permanent (https://www.linuxquestions.org/questions/linux-networking-3/how-do-i-change-my-network-config-files-in-suse-to-make-my-ip-permanent-766782/)

Pooh 11-04-2009 07:23 AM

How do I change my network config files in SuSe to make my IP permanent
 
Hi,

I am running Suse Linux. Last night we had a thunderstorm and my network card went. So i installed a new card, and managed to change the IP address correctly by using the command:

ifconfig eth1 x.x.x.x netmask x.x.x.x up

I then changed my gateway with the following command:

route add –net x.x.x.x netmask x.x.x.x eth1

Everything works 100%. But where are the network config files in Suse to set it permanently, and how do i do this? I tried navigating but can't find it.

Everytime the machine reboots it needs to be reset.

Thanks,

kbp 11-04-2009 07:44 AM

The most foolproof way would be to use yast, chances are that your network config file is named after the mac address of your old card and therefore is not working. If you run 'ifconfig -a' as root you will see the mac address of the new card, you should be able to rename the file /etc/sysconfig/network/ifcfg-eth... accordingly. Try yast first ...

cheers

Pooh 11-04-2009 07:46 AM

there is no GUI installed on this system, and I don't know how to install Yast using the command line. I have typed yast, but it just skips to the next line. So i don't think it is installed.

Pooh 11-04-2009 07:50 AM

under /etc/sysconfig/network/ i have a file named ifcfg-eth-id-00:19:d1:23:46:46

if i go vi ifcfg-eth-id-00:19:d1:23:46:46, it gives me a blank file.

kbp 11-04-2009 08:56 AM

If you use tab completion it should escape the ':'s, you're actually editing a new file

You only need to rename it in any case... unless you want to change the ip address ?

Jim Bengtson 11-04-2009 09:16 AM

If you just want to set a static IP address, read this:

http://www.thewebmasterscafe.net/web...tos-linux.html

salasi 11-04-2009 02:53 PM

Quote:

Originally Posted by Pooh (Post 3744144)
there is no GUI installed on this system, and I don't know how to install Yast using the command line. I have typed yast, but it just skips to the next line. So i don't think it is installed.

The correct name is yast2, so you probably won't get anything if you type yast as a user (actually you might; you might get an error message telling you that it is /sbin/yast, but is root only, depending on SuSE version).

If you don't have yast installed at all, you'll find it a bit difficult to manage the system in the long term; I guess you can use zypper to install and remove packages, if you need to, but I haven't tried that method.

Pooh 11-06-2009 02:12 AM

Thanks for the responses. I managed to get Yast started by typing startx. And then i can go into Yast from the GUI, however i am unable to open anything in yast. it thinks a bit then does nothing.

I am currently running opesuse 10.2, Would upgrading to 11.1 solve my issues?


All times are GMT -5. The time now is 10:01 PM.