Scope being set to Link on 169.254.0.0

Issues related to configuring your network
Post Reply
Merlin75
Posts: 3
Joined: 2017/09/06 21:34:30

Scope being set to Link on 169.254.0.0

Post by Merlin75 » 2017/09/06 21:52:27

Okay I've searched and searched, the internet and these forums. And the documentation.

The problem is, and I know it's not meant to be used, but I'm trying to use 169.254.0.0/23 in a lab environment.
This has worked fine in all other flavors of linux, and other versions of CentOS, even works fine in Windows (bleh), but in 7 it's not working.

First off, I've disabled "predictable names" ... because they seem to be anything but, in favor of the old eth# naming.
Second, I do have NOZEROCONF=YES in /etc/sysconfig/network to prevent the 169.254.0.0/16 null route from being added.

When I set the ifcfg-eth0 file as follows:
DEVICE=eth0
ONBOOT=yes
IPADDR =169.254.0.42
PREFIX=23

and even if I add
SCOPE=global

then I execute 'ip a' to see what the scope is, it shows as scope link!
2: eth0: <blahblah>
link/ether (MAC)
inet 169.254.0.42/23 scope link eth0
valid_lft forever preferred_lft forever

No matter what I do at this stage, adding default routes, static routes, etc, I can ping anything else on the 169.254.0.0/23 network, but I can't get out.

if I execute these commands, everything works:
ip addr del 169.254.0.42/23 dev eth0
ip addr add 169.254.0.42/23 scope global dev eth0

How can I force the scope to be global without having to manually (or through cron) run these commands in the event of an interface flap, reboot, or power outage and recovery?

Thanks much!

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Scope being set to Link on 169.254.0.0

Post by hunter86_bg » 2017/09/07 04:08:37

Have you tried 'nmcli' or 'nmtui'?
In RHEL7/CentOS7 the recommended way is to use NetworkManager.service .

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Scope being set to Link on 169.254.0.0

Post by TrevorH » 2017/09/07 06:26:04

Why did you turn off NOZEROCONF= when it's the very thing you're trying to do?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Scope being set to Link on 169.254.0.0

Post by jlehtone » 2017/09/07 07:08:01

Merlin75 wrote:The problem is, and I know it's not meant to be used, but I'm trying to use 169.254.0.0/23 in a lab environment.
Why do you want to use that range even though you know that it is subset of 169.254.0.0/16?

If I had a lab, I would choose a subrange from the three private IPv4 ranges and set dnsmasq on some 24/7 machine to DHCP settings for all others.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Scope being set to Link on 169.254.0.0

Post by aks » 2017/09/07 18:58:23


Post Reply