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

Thread: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

  1. #1

    Default Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Hi,

    I just upgraded a number of x86_64 boxes from 12.2 to 13.1. All of computers sit behind a firewall which can also act as a DHCP server. One of the computers is dual homed with one ethernet interface on an external network. All of the internal ethernet interfaces had static IP addresses assigned and everything worked fine. I upgraded to 13.1 and the upgrade successfully preserved the network settings at least by looking at the "Network Settings" in Yast as well as looking at the /etc/sysconfig/network/ifcfg-eth0 script. However, when the system boots, it comes up with an IP address which it shouldn't have. If I manually change the IP address to what it should be, everything works as it should. However, the proper configuration does not persist across boots. I don't know how many times I've saved the static IP address setup, only to have it change after I hit "Save" in the "Network Settings". I'm getting pretty frustrated -- the configuration looks right, but what the systems actually do is different from how they are configured.

    It seems to me that the hosts are accepting DHCP data when they should not be.

    If anyone can offer some guidance, I would greatly appreciate it. Thanks.

    Paul

  2. #2
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,277

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    /etc/sysconfig/network/ifcfg-eth0
    Read the release notes, or search this forum. The "eth0" style of naming network interfaces has changed, they now have names like "enp3s0". It is much easier to delete all the network device settings and start again. If you have a lot of machines, you could configure your DHCP server to allocate fixed/static IP addresses to each MAC.
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

  3. #3

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Quote Originally Posted by eng-int View Post
    Read the release notes, or search this forum. The "eth0" style of naming network interfaces has changed, they now have names like "enp3s0". It is much easier to delete all the network device settings and start again.
    Well, you can also disable the new naming scheme and continue to use the old one.
    From http://www.freedesktop.org/wiki/Soft...nterfaceNames/ :
    I don't like this, how do I disable this?

    You basically have four options:

    1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)
    2. You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own udev rules file and set the NAME property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
    3. You alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /usr/lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, then edit the file there and change the lines as necessary.
    4. You pass the net.ifnames=0 on the kernel command line (since v199)
    Regarding point 2, you can also use YaST to rename the interface to whatever you like (eth0 f.e.), this creates a file /etc/udev/rules.d/70-persistent-net.rules which will be respected even after future upgrades (my interfaces f.e. are still called eth0 and wlan0 even on 13.1 ).
    But I'm not sure whether it will use the current ifcfg-eth0 in this case. It could be that YaST overwrites it and you have to configure it again anyway.

    I think what I would try is to first pass the "net.ifnames=0" kernel option, use YaST->Network Devices->Network Settings->Edit to create that /etc/udev/rules.d/70-persistent-net.rules files, and then remove the kernel option again.
    Last edited by wolfi323; 16-Apr-2014 at 01:32.

  4. #4

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Thanks for the feedback. I looked at my /etc/dev/rules.d/70-persistent-net.rules file. Here is the only real line:

    <code>SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="aa:bb:cc:dd:ee", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    </code>

    (MAC address has been obscured)

    This would would seem to match "How do I disable this" point #2 from the freedesktop.org site. However, I want to go with the new way of doing things. Can I just delete the file, reboot, and hope everything comes up correctly?

    Paul

  5. #5
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,277

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Quote Originally Posted by pboyle4848 View Post
    Thanks for the feedback. I looked at my /etc/dev/rules.d/70-persistent-net.rules file. ... Can I just delete the file, reboot, and hope everything comes up correctly?
    In a clean install the file is present, but empty. I would:
    Code:
    #  cat /dev/null > /etc/udev/rules.d/70-persistent-net.rules
    But I think that if you use YaST > Network Devices
    to delete all existing interfaces then [OK]
    Go back into the Network Devices module and configure the interfaces,
    that should fix everything to the new scheme.
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

  6. #6

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    I removed the 70-persistent-net.rules and rebooted the machine. I then edited the network setting to set the static IP address to the desired value, and rebooted again. The ethernet device name came up with the new fangled device name (enp3s0), but the IP address I assigned is not the IP address which is assigned to the interface. Looking into the /etc/sysconfig/network/ifcfg-enp3s0 file shows the correct (i.e. my assigned address) IP address. But, again, this differs from the IP address actually used by the interface.

    This is minor progress, but I cannot understand why the IP address doesn't assign correctly for a static address. Could this really be a DHCP related problem?

    Also, the 70-persistent-net.rules file was not regenerated on boot up; I thought it might be.

    Paul

  7. #7
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,277

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Quote Originally Posted by pboyle4848 View Post
    I cannot understand why the IP address doesn't assign correctly for a static address. Could this really be a DHCP related problem?

    Also, the 70-persistent-net.rules file was not regenerated on boot up; I thought it might be.
    You do not need to reboot
    Code:
    # systemctl restart network.service
    #  ip addr
    Test the DHCP theory by restarting the network with the ethernet cable disconnected. I assume that you are using Traditional/ifup (not network manager) and Activate device At Boot Time (YaST Network Settings).
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

  8. #8
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,277

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Check that you do not have a rogue /etc/sysconfig/network/ifcfg-* file
    or some custom settings in /etc/sysconfig/network/dhcp

    You could try e.g.
    Code:
    :>  grep -r "192.168" /etc/
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

  9. #9

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Quote Originally Posted by eng-int View Post
    You do not need to reboot
    Code:
    # systemctl restart network.service
    #  ip addr
    Test the DHCP theory by restarting the network with the ethernet cable disconnected. I assume that you are using Traditional/ifup (not network manager) and Activate device At Boot Time (YaST Network Settings).
    Yes, I am using the traditional ifup, and the device is activated at boot time.

    When I do the systemctl command with the cable disconnected it comes up with the proper address. When I plug the cable back in and do a systemctl restart then it comes up with the wrong IP address.

    This would lead me to conclude it is an issue of DHCP client overriding the static settings. Do you agree?

    The only place in /etc/ where 192.168.xxx (where xxx is my subnet) is in the places where it should be: /etc/hosts, /etc/exports,
    /etc/sysconfig/network/routes and /etc/sysconfig/network/ifcfg-enp3S0

  10. #10

    Default Re: Upgraded 12.2 -> 13.1 now static IP addresses breakage,

    Here is some additional info I just got from this command:
    Code:
    ps aux | grep hcp
    There is a dhcp client running as shown by the output:
    Code:
    root      5549  0.0  0.0  14276  7856 ?        S    11:43   0:00 /sbin/dhclient -d -sf /usr/lib/nm-dhcp-client.action -pf /var/run/dhclient-enp3s0.pid -lf /var/lib/NetworkManager/dhclient-6d58de3d-743d-479d-bf2c-2a90d7f997c3-enp3s0.lease -cf /var/lib/NetworkManager/dhclient-enp3s0.conf enp3s0
    So, why the heck is dhclient running? Where can I turn this off?

Page 1 of 2 12 LastLast

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
  •