Results 1 to 10 of 10

Thread: Static IP set, but it gets a dynamic IP ???

  1. #1

    Default Static IP set, but it gets a dynamic IP ???

    Hi
    I had a computer with oepnsuse 15.1, I have just upgraded to 15.2 with a DVD image.
    It was set to use static IP ... and I think already is, but after booting some times it gets the static IP and sometimes it gets a dynamic ip

    https://susepaste.org/10677039



    Why?

    thanks.

  2. #2
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    4,902

    Default AW: Static IP set, but it gets a dynamic IP ???

    Klick in the 2. picture on modify and set the IP.

    Or post:
    Code:
    cat /etc/sysconfig/network/ifcfg-eth0
    Last edited by Sauerland; 09-Jul-2020 at 10:02.

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,713
    Blog Entries
    15

    Default Re: Static IP set, but it gets a dynamic IP ???

    Hi
    @OP, I'm assuming your system that dishes out DHCP addresses does not issue them for the range of static ip's in use?
    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!

  4. #4

    Default Re: AW: Static IP set, but it gets a dynamic IP ???

    Quote Originally Posted by Sauerland View Post
    Klick in the 2. picture on modify and set the IP.

    Or post:
    Code:
    cat /etc/sysconfig/network/ifcfg-eth0

    Code:
    tutatis:/home/fperal # cat /etc/sysconfig/network/ifcfg-eth0
    BOOTPROTO='static'
    IPADDR='192.168.2.2/24'
    NAME='RTL8153 Gigabit Ethernet Adapter'
    NETWORK=''
    PREFIXLEN='24'
    STARTMODE='auto'
    MTU='0'
    ZONE=''
    tutatis:/home/fperal #

  5. #5

    Default Re: Static IP set, but it gets a dynamic IP ???

    Quote Originally Posted by malcolmlewis View Post
    Hi
    @OP, I'm assuming your system that dishes out DHCP addresses does not issue them for the range of static ip's in use?

    no, the static IP configured is 192.168.2.2 the dynamic IPs are above 192.168.2.160, when it gets the dhcp address it get it from the pool.

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,780
    Blog Entries
    2

    Default Re: Static IP set, but it gets a dynamic IP ???

    Looks to me you're set up properly.
    Recommend
    1. Inspect your DHCP active and reserved leases for any entries using your client machine's MAC address. If you see any, remove entries. This might especially be an issue if you're running network security that integrates DHCP, DNS and Directory Services like Active Directory.

    2. Verify no other machines on your network are configured with the same machine name (should be unique on your network) or using the same MAC address.

    Again referring to integrated network security services, I wonder if somehow your pre-upgrade machine data might be stored somewhere and is confused when you login with your upgraded machine info. But, if you're not running advanced network security and your network services are all separate and simple, this is unlikely.

    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!

  7. #7

    Default Re: Static IP set, but it gets a dynamic IP ???

    Quote Originally Posted by tsu2 View Post
    Looks to me you're set up properly.
    Recommend
    1. Inspect your DHCP active and reserved leases for any entries using your client machine's MAC address. If you see any, remove entries. This might especially be an issue if you're running network security that integrates DHCP, DNS and Directory Services like Active Directory.

    2. Verify no other machines on your network are configured with the same machine name (should be unique on your network) or using the same MAC address.

    Again referring to integrated network security services, I wonder if somehow your pre-upgrade machine data might be stored somewhere and is confused when you login with your upgraded machine info. But, if you're not running advanced network security and your network services are all separate and simple, this is unlikely.

    TSU

    It happened with the same computer in two different places. I brought the server to my home to work on it and it happened twice or three times, then I switched it off, took it to my office, booted it there and it got again a DHCP address (a different one because is a different range in my office that in my home) that it has got in my home. Then I deleted the interface and create it again with the static IP (but exactly the same configuration as previously), switched it off, switched it on again, fine, static IP ok.... but I don't know if it will last, in fact now I can access the computer from my home but I don't even think on rebooting it remotely because if it changes the IP then it will be no longer accessible.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,780
    Blog Entries
    2

    Default Re: Static IP set, but it gets a dynamic IP ???

    Except in very rare configurations, the IPv6 address must use the same prefix as the gateway router you connect to.
    So, if your machine is moving from network to network,

    - You should know your IPv6 address <must> change
    - You cannot configure incoming network connections to use the IPv6 address if your machine changes locations
    - You can use a type of dynamic DNS to support using FQDN to access a resource with multiple or changing IP addresses.

    So, if IPv6 won't work for your purposes,
    Avoid using it.
    Either ignore the IPv6 error or disable it if you aren't able to set it up to support what you're doing.

    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!

  9. #9

    Default Re: Static IP set, but it gets a dynamic IP ???

    Quote Originally Posted by tsu2 View Post
    Except in very rare configurations, the IPv6 address must use the same prefix as the gateway router you connect to.
    So, if your machine is moving from network to network,

    - You should know your IPv6 address <must> change
    - You cannot configure incoming network connections to use the IPv6 address if your machine changes locations
    - You can use a type of dynamic DNS to support using FQDN to access a resource with multiple or changing IP addresses.

    So, if IPv6 won't work for your purposes,
    Avoid using it.
    Either ignore the IPv6 error or disable it if you aren't able to set it up to support what you're doing.

    TSU

    https://susepaste.org/10677039

    IPV6 is disabled (in yast)

  10. #10

    Default Re: Static IP set, but it gets a dynamic IP ???

    I chaged the network card because of errors (it went down several times) and since I did it it aparently stopped loosing the static IP, but today I have done a ip addr and I found this

    Code:
    tutatis:~ # ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
    2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 50:3e:aa:12:6b:4a brd ff:ff:ff:ff:ff:ff
        inet 192.168.2.167/24 brd 192.168.2.255 scope global dynamic noprefixroute eth1
           valid_lft 2578sec preferred_lft 2578sec
        inet 192.168.2.2/24 brd 192.168.2.255 scope global secondary noprefixroute eth1
           valid_lft forever preferred_lft forever
        inet6 fe80::c411:607b:5cad:49e2/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever

    I am almost sure I had disabled IPV6.

    And it has two IPs in the same interface eth1, the static IP I have set and another IP wich is getting through dhcp.

    Maybe the solution to this strange behaviour is to remove th dhcp-client package

Posting Permissions

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