HI, in our production environment we have an OBS appliance that is running. We need to change the static IP address but I am having a hard time finding out how. Sorry for a novice questions if so.
I see many references to yast and yast2 but it does not appear our appliance has those installed each time we try we get command not found. Since this is an appliance I am a little hesitant to install things. Also there is no GUI.
So can anyone recommend the easiest way to switch this from DHCP to static? Let me know and I will give it a try. Is there a config file I can edit that would take care of this? Any other preferred method?
On the CLI yast would be the easiest way to setup network. Strange it isn’t there. Are you sure you have root permission? (root = administrator) If not you will very likely not be able to modify the required config files, either.
For static IP addresses you should use wicked for your network setup. The alternative is NetworkManager which is more suitable for WiFi. I have tried to setup a static IP address in NetworkManager GUI without success.
Try
su
or rather
su -l
then
yast
Or if you can’t login as root
sudo yast
You need the root password in either case.
If you can access yast move to “system” => “network settings”. You can find your network interface and modify the settings. If you set a static IP you may have to disable DHCP (I never tried otherwise). You will then have to add a static route and DNS …
If you have root credentials but really no yast, check as root if wicked is running:
systemctl status wicked
check
man wicked
config files are in
/etc/sysconfig/network
Better backup any file before modifying.
On my home server the relevant file seems to be ifcfg-eth0. After editing run
Let me please first tell you about a very important feature here.
There is an important, but not easy to find feature on the forums.
Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.
Then, please do not say things like “each time we try we get command not found”, but show exactly what happens using copy/paste between the CODE tags as explained. When you only tell things, we will treat that as your conclusion of facts, but your conclusion may be wrong and we want to see the facts to make our own conclusion.
And a small explanatation: as yast2 is the GUI interface, you will not be able to use it in a non-GUI environment. In the CLI one uses yast (as explained by @kasi024). It will use the ncurses interface on the terminal.
I am mostly relying on yast, so I only have to do such editing once in a while. Checking my server, there is another file “ifroute-eth0” which is containing just one line - the default route via may fritz box:
default 10.0.0.1 - eth0
I made the IP addresses up - you will know your router’s IP address I hope. There is also the file “config”. For my server there is the DNS resolution set static: