Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

  1. #1

    Default Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Hi All...
    Thanks for your help in advance as I am a new user here, I hope to learn a lot and provide future support to beginners.

    I installed opensuse leap 42.3 and it assigned my machine a IP address of 10.0.0.x/24. After installing, I was able to browse the internet and ping external sites like google.com. I wanted to assign a internal static IP address this machine, so I went into YAST > Network Settings and set a static IP address of 10.0.0.xyz and subnet to 255.255.255.0 and provided a host name and then clicked on 'NEXT.' I assume it set the static IP address to what I wanted because when I did a 'ip addr show' within the terminal it displayed the static IP i wanted. Following this, I did a ping cmd, but whenever I would ping anything like google.com, cnn.com it would say unknown host. I'm not sure why. Did I not set the IP correctly? I noticed when I set the static IP address within the network Settings dialog there was a section under there called 'Additional Addresses.' I left this blank. Can someone please shed some light on this for me? I'm trying to do this correctly because eventually I want to install 2 or 3 vms and will want to give each vm their static IP so I can access it externally.

    Any help would be greatly appreciated.

    I was trying to post some images here to show what i did, but wasn't sure how. It was asking me for image url and the screenshots I have are on my local machine.


    Thanks,
    AJ

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Well internal addresses are setup in the router. The router either assigns address's dynamically (DHCP) or statically in which case you have to tell the router what addresses to assign. Generally you don't need tot tell the computer the address just that it is assigned DHCP or not ie static.

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,704
    Blog Entries
    1

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Further to what gogalthorp mentioned, I would recommend reconfiguring to use DHCP address from the router, and then configure the router to reserve that address for your machine (using its unique MAC address). Then you effectively end up with a static local IP address.

  4. #4

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    AFAIK (or rather, learned so far), a DHCP server provides a client all necessary IP configuration to be able to connect, and this includes IP address, subnet mask, gateway address, and at least one DNS address.

    I haven't tried Yast for this kind of things, but at first sight it would look for me like you only provided the first two elements above mentioned, and somehow Yast didn't ask for the rest (unless they were under the "Additional addresses" section?). If either gateway or DNS are missing pinging any website would certainly give errors similar to those you got.

    As a side note, I recently learned DHCP protocol itself is seemingly not able (or designed) to distinguish static IP addresses configured in clients as already in use, only those provided directly by DHCP itself. Correct me if wrong please.
    This would mean if one manually sets a static IP address from the PC itself, router will not recognize this address as "in use" since it was not given by router itself, and it could give that same address to a newly joined client device in the LAN, causing IP conflict. So in this regard it would probably be good idea to set static IP for your PC from router, just like advised.

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    A bit of a weakeness using YaST to configure static addresses is that all the things you need to configure aren't on one page.
    More than likely you didn't set your Default Gateway in the Routers tab.
    You also generally need to set your DNS in the DNS tab.

    Main alternative is to enable Network Manager, then configure your static address, DG and DNS.

    Technically speaking, configuring a DHCP Reserved Lease isn't configuring a static address, but accomplishes the common goal of an assigned and configured address that won't change.

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Thank you everyone for your feedback.

    So the way I understand it is that, I should leave my pc settings as-is on DHCP and not mess with them, but rather in my router assign a static ip address to the MAC Address of my machine? Am I following this correctly?

    Additionally, so you know what I was doing, I have provided links to the 4 screenshots on how I was setting a static IP address for my machine. I was under the impression I could do it from here without messing with my router. If we can't set the static ip from here in network settings then when and what is this used for. bit confused on that.

    https://paste.opensuse.org/83092375

    https://paste.opensuse.org/24571871

    https://paste.opensuse.org/53869981

    https://paste.opensuse.org/92094005

    Thanks again for your help guys..

    - AJ

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,704
    Blog Entries
    1

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Quote Originally Posted by aj_suse View Post
    Thank you everyone for your feedback.

    So the way I understand it is that, I should leave my pc settings as-is on DHCP and not mess with them, but rather in my router assign a static ip address to the MAC Address of my machine? Am I following this correctly?
    It's one way of ensuring that your machine gets the same IP address (based on it's MAC address), and it saves you having to get the network configuration right.

    Additionally, so you know what I was doing, I have provided links to the 4 screenshots on how I was setting a static IP address for my machine. I was under the impression I could do it from here without messing with my router. If we can't set the static ip from here in network settings then when and what is this used for. bit confused on that.
    It is possible to configure a static IP address, but then you need to make sure you also set a default gateway and valid DNS server as well.

    Here's the openSUSE reference guide on the subject...
    https://doc.opensuse.org/documentati....basicnet.yast

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Hi
    If the router doesn't work properly setting MAC address for IP allocation, then you can always set a small range of ip addresses for DHCP in the router, then set your static ip address on the system.

    Is this the wireless or ethernet interface your setting? Your also using wicked rather than NetworkManager?

    Connect VM's over which interface?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    Quote Originally Posted by aj_suse View Post
    Thank you everyone for your feedback.

    So the way I understand it is that, I should leave my pc settings as-is on DHCP and not mess with them, but rather in my router assign a static ip address to the MAC Address of my machine? Am I following this correctly?

    Additionally, so you know what I was doing, I have provided links to the 4 screenshots on how I was setting a static IP address for my machine. I was under the impression I could do it from here without messing with my router. If we can't set the static ip from here in network settings then when and what is this used for. bit confused on that.

    https://paste.opensuse.org/83092375

    https://paste.opensuse.org/24571871

    https://paste.opensuse.org/53869981

    https://paste.opensuse.org/92094005

    Thanks again for your help guys..

    - AJ
    These screenshots indicate you are configuring your wired connection using DHCP, not setting a static address network configuration(perhaps your first screenshot setting a static address wasnt locked in?), or at least your first and last screenshots conflict with each other.

    If you wanted to configure a statiic address, then your second and third screenshots are incorrect, since they don't set a default gateway and DNS Servers.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,795

    Default Re: Can't set static IP in opensuse leap on OpenSuse Leap 42.3

    There are many ways to do these things as shown above. I won't go into all the different solutions mentioned above to get the same IP address all the time, because they all will work when properly done. All have their pros and cons. I will only show what I do.

    I configure in YaST:
    1. Not to use Network Manager, but to use wicked.
    2. Not to use DHCP.
    3. Configure IP address, netmask, default router, host name and domain name and DNS servers in the appropriate tabs that are visible in YaST.


    That is all.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

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