Results 1 to 5 of 5

Thread: Set static IP on leap15.1 obs appliance

  1. #1

    Default Set static IP on leap15.1 obs appliance

    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?

    Thanks in advance!

  2. #2
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    430

    Default Re: Set static IP on leap15.1 obs appliance

    Hi and welcome!

    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
    Code:
    su
    or rather
    Code:
    su -l
    then
    Code:
    yast
    Or if you can't login as root
    Code:
    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:

    Code:
    systemctl status wicked
    check
    Code:
    man wicked
    config files are in
    Code:
    /etc/sysconfig/network
    Better backup any file before modifying.

    On my home server the relevant file seems to be ifcfg-eth0. After editing run
    Code:
    systemctl restart wicked

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,109

    Default Re: Set static IP on leap15.1 obs appliance

    Hello bgopelfor,

    Welcome to the openSUSE forums.

    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.

    An example is here: Using CODE tags Around your paste.

    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.
    Henk van Velden

  4. #4

    Default Re: Set static IP on leap15.1 obs appliance

    Hi, Thank you for the reply. I went back in and tried the following
    Code:
    sudo yast
    But I get "command not found" I wonder if the stripped it during the obs appliance creation, not sure though.

    I was able to confirm that wicked is running.

    So it seems my best bet is going to be the following:
    Code:
    /etc/sysconfig/network
    and editing ifcfg-etho and then restarting wicked?

    Thanks for everything!

  5. #5
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    430

    Default Re: Set static IP on leap15.1 obs appliance

    Well, without having yast that seems to be what you have to do. There is a template file which may help:

    Code:
    cat /etc/sysconfig/network/ifcfg.template
    This is my setup:

    Code:
    BOOTPROTO='static'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR='10.0.0.2/24'
    MTU=''
    NAME=''
    NETMASK=''
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='auto'
    DHCLIENT_SET_DEFAULT_ROUTE='yes'
    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:

    Code:
    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:


    Code:
    NETCONFIG_DNS_STATIC_SEARCHLIST="my_router's_hostname"
    Code:
    NETCONFIG_DNS_STATIC_SERVERS="10.0.0.1"
    I can't promise that is all. These are just the details I can identify having been set on my system.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •