Static IP configuration on openSUSE

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












Long-time Windows user here -- this is a beginners question, network-configuration (especially on Linux distributions) is not my area. I believe I've done my research, however. Although I might've got some of the terminology wrong.




I'm tasked with configuring a static IP network in Linux openSUSE 11.3 (32-bit, a discontinued release I believe), for which OS I'm doing this for the first time. I need to configure the network taking the following expectations into consideration:



  • network is part of the 192.168.146.0/24 domain,

  • network must support at least 21 clients,

  • subnet uses as little of the original network as possible.

After doing the calculations, this comes down to the following bitmask:



110nnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh


Where of course n network, s is subnet, h is host. This supports 30 hosts per subnet which is adequate, and from which the following subnets span:



  1. 192.168.146.0 - 192.168.146.31

  2. 192.168.146.32 - 192.168.146.63

  3. 192.168.146.64 - 192.168.146.95

  4. 192.168.146.96 - 192.168.146.127

  5. ...

I need to configure the network to use the 3rd usable subnet, and for the host I'm configuring this network on, to use the lowest possible IP address from that subnet (192.168.146.97, I believe). The network interface is eth0, and this is an internal network.



I'm certain either ifconfig or the ifcfg-eth0 file is what I need, but documentation is either sketchy, meant solely as a reference for linux experts, or just not where I should look at. I'm using the built-in Terminal window, and I of course have root access.




Long-story short, how can I configure the network so that:



  • the host I'm doing the configuration on has the static IP of 192.168.146.97, and

  • the network is 192.168.146.96 - 192.168.146.127?









share|improve this question



















  • 2




    ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
    – Mark Plotnick
    May 2 '16 at 11:48















up vote
3
down vote

favorite
1












Long-time Windows user here -- this is a beginners question, network-configuration (especially on Linux distributions) is not my area. I believe I've done my research, however. Although I might've got some of the terminology wrong.




I'm tasked with configuring a static IP network in Linux openSUSE 11.3 (32-bit, a discontinued release I believe), for which OS I'm doing this for the first time. I need to configure the network taking the following expectations into consideration:



  • network is part of the 192.168.146.0/24 domain,

  • network must support at least 21 clients,

  • subnet uses as little of the original network as possible.

After doing the calculations, this comes down to the following bitmask:



110nnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh


Where of course n network, s is subnet, h is host. This supports 30 hosts per subnet which is adequate, and from which the following subnets span:



  1. 192.168.146.0 - 192.168.146.31

  2. 192.168.146.32 - 192.168.146.63

  3. 192.168.146.64 - 192.168.146.95

  4. 192.168.146.96 - 192.168.146.127

  5. ...

I need to configure the network to use the 3rd usable subnet, and for the host I'm configuring this network on, to use the lowest possible IP address from that subnet (192.168.146.97, I believe). The network interface is eth0, and this is an internal network.



I'm certain either ifconfig or the ifcfg-eth0 file is what I need, but documentation is either sketchy, meant solely as a reference for linux experts, or just not where I should look at. I'm using the built-in Terminal window, and I of course have root access.




Long-story short, how can I configure the network so that:



  • the host I'm doing the configuration on has the static IP of 192.168.146.97, and

  • the network is 192.168.146.96 - 192.168.146.127?









share|improve this question



















  • 2




    ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
    – Mark Plotnick
    May 2 '16 at 11:48













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





Long-time Windows user here -- this is a beginners question, network-configuration (especially on Linux distributions) is not my area. I believe I've done my research, however. Although I might've got some of the terminology wrong.




I'm tasked with configuring a static IP network in Linux openSUSE 11.3 (32-bit, a discontinued release I believe), for which OS I'm doing this for the first time. I need to configure the network taking the following expectations into consideration:



  • network is part of the 192.168.146.0/24 domain,

  • network must support at least 21 clients,

  • subnet uses as little of the original network as possible.

After doing the calculations, this comes down to the following bitmask:



110nnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh


Where of course n network, s is subnet, h is host. This supports 30 hosts per subnet which is adequate, and from which the following subnets span:



  1. 192.168.146.0 - 192.168.146.31

  2. 192.168.146.32 - 192.168.146.63

  3. 192.168.146.64 - 192.168.146.95

  4. 192.168.146.96 - 192.168.146.127

  5. ...

I need to configure the network to use the 3rd usable subnet, and for the host I'm configuring this network on, to use the lowest possible IP address from that subnet (192.168.146.97, I believe). The network interface is eth0, and this is an internal network.



I'm certain either ifconfig or the ifcfg-eth0 file is what I need, but documentation is either sketchy, meant solely as a reference for linux experts, or just not where I should look at. I'm using the built-in Terminal window, and I of course have root access.




Long-story short, how can I configure the network so that:



  • the host I'm doing the configuration on has the static IP of 192.168.146.97, and

  • the network is 192.168.146.96 - 192.168.146.127?









share|improve this question















Long-time Windows user here -- this is a beginners question, network-configuration (especially on Linux distributions) is not my area. I believe I've done my research, however. Although I might've got some of the terminology wrong.




I'm tasked with configuring a static IP network in Linux openSUSE 11.3 (32-bit, a discontinued release I believe), for which OS I'm doing this for the first time. I need to configure the network taking the following expectations into consideration:



  • network is part of the 192.168.146.0/24 domain,

  • network must support at least 21 clients,

  • subnet uses as little of the original network as possible.

After doing the calculations, this comes down to the following bitmask:



110nnnnn.nnnnnnnn.nnnnnnnn.ssshhhhh


Where of course n network, s is subnet, h is host. This supports 30 hosts per subnet which is adequate, and from which the following subnets span:



  1. 192.168.146.0 - 192.168.146.31

  2. 192.168.146.32 - 192.168.146.63

  3. 192.168.146.64 - 192.168.146.95

  4. 192.168.146.96 - 192.168.146.127

  5. ...

I need to configure the network to use the 3rd usable subnet, and for the host I'm configuring this network on, to use the lowest possible IP address from that subnet (192.168.146.97, I believe). The network interface is eth0, and this is an internal network.



I'm certain either ifconfig or the ifcfg-eth0 file is what I need, but documentation is either sketchy, meant solely as a reference for linux experts, or just not where I should look at. I'm using the built-in Terminal window, and I of course have root access.




Long-story short, how can I configure the network so that:



  • the host I'm doing the configuration on has the static IP of 192.168.146.97, and

  • the network is 192.168.146.96 - 192.168.146.127?






networking opensuse ip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 2 '16 at 14:48

























asked May 2 '16 at 10:53









John Weisz

1186




1186







  • 2




    ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
    – Mark Plotnick
    May 2 '16 at 11:48













  • 2




    ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
    – Mark Plotnick
    May 2 '16 at 11:48








2




2




ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
– Mark Plotnick
May 2 '16 at 11:48





ifconfig will work, but the settings will be lost after reboot. If this is just an academic exercise, that's fine, but you'd normally use yast to set things up and store the result into files, and you'd also specify a default gateway, the address of another system on the network to use as the gateway to the rest of your organization.
– Mark Plotnick
May 2 '16 at 11:48











3 Answers
3






active

oldest

votes

















up vote
2
down vote



accepted










The file you need to make or edit is called ifcfg <interface>, where <interface>
could be e.g. eth0 or eth1.



On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.






share|improve this answer


















  • 1




    Indeed it does, thank you.
    – John Weisz
    May 2 '16 at 21:45


















up vote
0
down vote













Just as I thought, this is possible using ifconfig. On the host being configured, type:



ifconfig eth0 192.168.146.97 netmask 255.255.255.224





share|improve this answer
















  • 1




    This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
    – Bratchley
    May 2 '16 at 15:08










  • @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
    – John Weisz
    May 2 '16 at 15:25











  • yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
    – Bratchley
    May 2 '16 at 15:28

















up vote
0
down vote













I've done all the above, but still nobody can connect, and upon investigation I find that it has reverted back to a dynamic ip assigned by the modem (according to ifconfig,) and /etc/sysconfig/network/ifcfg-eth0 still contains the static ip:



# ifconfig 
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255


ifcfg-eth0 file:



BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.200'
MTU='1500'
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
ZONE=public
USERCONTROL='no'


Yast also shows the ip as static 192.168.1.200, but ifconfig says it's dynamic. What's going on, ho can I fix this?






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280552%2fstatic-ip-configuration-on-opensuse%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    The file you need to make or edit is called ifcfg <interface>, where <interface>
    could be e.g. eth0 or eth1.



    On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.






    share|improve this answer


















    • 1




      Indeed it does, thank you.
      – John Weisz
      May 2 '16 at 21:45















    up vote
    2
    down vote



    accepted










    The file you need to make or edit is called ifcfg <interface>, where <interface>
    could be e.g. eth0 or eth1.



    On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.






    share|improve this answer


















    • 1




      Indeed it does, thank you.
      – John Weisz
      May 2 '16 at 21:45













    up vote
    2
    down vote



    accepted







    up vote
    2
    down vote



    accepted






    The file you need to make or edit is called ifcfg <interface>, where <interface>
    could be e.g. eth0 or eth1.



    On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.






    share|improve this answer














    The file you need to make or edit is called ifcfg <interface>, where <interface>
    could be e.g. eth0 or eth1.



    On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 2 '16 at 13:29









    schily

    9,63131437




    9,63131437










    answered May 2 '16 at 11:44









    BeachSamurai

    7819




    7819







    • 1




      Indeed it does, thank you.
      – John Weisz
      May 2 '16 at 21:45













    • 1




      Indeed it does, thank you.
      – John Weisz
      May 2 '16 at 21:45








    1




    1




    Indeed it does, thank you.
    – John Weisz
    May 2 '16 at 21:45





    Indeed it does, thank you.
    – John Weisz
    May 2 '16 at 21:45













    up vote
    0
    down vote













    Just as I thought, this is possible using ifconfig. On the host being configured, type:



    ifconfig eth0 192.168.146.97 netmask 255.255.255.224





    share|improve this answer
















    • 1




      This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
      – Bratchley
      May 2 '16 at 15:08










    • @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
      – John Weisz
      May 2 '16 at 15:25











    • yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
      – Bratchley
      May 2 '16 at 15:28














    up vote
    0
    down vote













    Just as I thought, this is possible using ifconfig. On the host being configured, type:



    ifconfig eth0 192.168.146.97 netmask 255.255.255.224





    share|improve this answer
















    • 1




      This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
      – Bratchley
      May 2 '16 at 15:08










    • @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
      – John Weisz
      May 2 '16 at 15:25











    • yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
      – Bratchley
      May 2 '16 at 15:28












    up vote
    0
    down vote










    up vote
    0
    down vote









    Just as I thought, this is possible using ifconfig. On the host being configured, type:



    ifconfig eth0 192.168.146.97 netmask 255.255.255.224





    share|improve this answer












    Just as I thought, this is possible using ifconfig. On the host being configured, type:



    ifconfig eth0 192.168.146.97 netmask 255.255.255.224






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered May 2 '16 at 11:35









    John Weisz

    1186




    1186







    • 1




      This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
      – Bratchley
      May 2 '16 at 15:08










    • @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
      – John Weisz
      May 2 '16 at 15:25











    • yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
      – Bratchley
      May 2 '16 at 15:28












    • 1




      This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
      – Bratchley
      May 2 '16 at 15:08










    • @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
      – John Weisz
      May 2 '16 at 15:25











    • yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
      – Bratchley
      May 2 '16 at 15:28







    1




    1




    This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
    – Bratchley
    May 2 '16 at 15:08




    This is only going to affect the run-time configuration. You need to edit the files underneath /etc/sysconfig/network-scripts/ifcfg-* (in this case /etc/sysconfig/network-scripts/ifcfg-eth0) This file is read when the system is booted or the "network" service is restarted.
    – Bratchley
    May 2 '16 at 15:08












    @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
    – John Weisz
    May 2 '16 at 15:25





    @Bratchles Yes, you are right. In the end, I resorted to using yast, which provided a surprisingly convenient GUI for configuration. I believe it is writing to this same file when changes are made.
    – John Weisz
    May 2 '16 at 15:25













    yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
    – Bratchley
    May 2 '16 at 15:28




    yeah yast2 is definitely the tool to use if you're a novice. You'll want to learn how to do things the normal way but yast is an excellent example of training wheels.
    – Bratchley
    May 2 '16 at 15:28










    up vote
    0
    down vote













    I've done all the above, but still nobody can connect, and upon investigation I find that it has reverted back to a dynamic ip assigned by the modem (according to ifconfig,) and /etc/sysconfig/network/ifcfg-eth0 still contains the static ip:



    # ifconfig 
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255


    ifcfg-eth0 file:



    BOOTPROTO='static'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR='192.168.1.200'
    MTU='1500'
    NAME=''
    NETMASK='255.255.255.0'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='auto'
    ZONE=public
    USERCONTROL='no'


    Yast also shows the ip as static 192.168.1.200, but ifconfig says it's dynamic. What's going on, ho can I fix this?






    share|improve this answer


























      up vote
      0
      down vote













      I've done all the above, but still nobody can connect, and upon investigation I find that it has reverted back to a dynamic ip assigned by the modem (according to ifconfig,) and /etc/sysconfig/network/ifcfg-eth0 still contains the static ip:



      # ifconfig 
      eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255


      ifcfg-eth0 file:



      BOOTPROTO='static'
      BROADCAST=''
      ETHTOOL_OPTIONS=''
      IPADDR='192.168.1.200'
      MTU='1500'
      NAME=''
      NETMASK='255.255.255.0'
      NETWORK=''
      REMOTE_IPADDR=''
      STARTMODE='auto'
      ZONE=public
      USERCONTROL='no'


      Yast also shows the ip as static 192.168.1.200, but ifconfig says it's dynamic. What's going on, ho can I fix this?






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        I've done all the above, but still nobody can connect, and upon investigation I find that it has reverted back to a dynamic ip assigned by the modem (according to ifconfig,) and /etc/sysconfig/network/ifcfg-eth0 still contains the static ip:



        # ifconfig 
        eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255


        ifcfg-eth0 file:



        BOOTPROTO='static'
        BROADCAST=''
        ETHTOOL_OPTIONS=''
        IPADDR='192.168.1.200'
        MTU='1500'
        NAME=''
        NETMASK='255.255.255.0'
        NETWORK=''
        REMOTE_IPADDR=''
        STARTMODE='auto'
        ZONE=public
        USERCONTROL='no'


        Yast also shows the ip as static 192.168.1.200, but ifconfig says it's dynamic. What's going on, ho can I fix this?






        share|improve this answer














        I've done all the above, but still nobody can connect, and upon investigation I find that it has reverted back to a dynamic ip assigned by the modem (according to ifconfig,) and /etc/sysconfig/network/ifcfg-eth0 still contains the static ip:



        # ifconfig 
        eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255


        ifcfg-eth0 file:



        BOOTPROTO='static'
        BROADCAST=''
        ETHTOOL_OPTIONS=''
        IPADDR='192.168.1.200'
        MTU='1500'
        NAME=''
        NETMASK='255.255.255.0'
        NETWORK=''
        REMOTE_IPADDR=''
        STARTMODE='auto'
        ZONE=public
        USERCONTROL='no'


        Yast also shows the ip as static 192.168.1.200, but ifconfig says it's dynamic. What's going on, ho can I fix this?







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 17 at 12:57









        GAD3R

        22.8k154895




        22.8k154895










        answered Aug 17 at 12:34









        Russell Behne

        1




        1



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280552%2fstatic-ip-configuration-on-opensuse%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay