View Issue Details

IDProjectCategoryView StatusLast Update
0012288CentOS-7NetworkManagerpublic2017-02-24 22:29
Reportervilleww Assigned To 
Status newResolutionopen 
Platformany x86_64OSCentOSOS Version7.3.1611
Product Version7.3.1611 
Summary0012288: Cannot add static blackhole routes with /etc/sysconfig/network-scripts/route-$NAME scripts
DescriptionIn CentOS/RHEL6, it's possible to add blackhole routes with /etc/sysconfig/network-scripts-route/route-$NAME scripts.

These do not work anymore with CentOS7/RHEL7.

NetworkManager[686]: <warn> ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-ens192" fails: Missing IP4 route destination address in record: 'blackhole'
Steps To ReproduceAdd a route script to e.g. /etc/sysconfig/network-scripts/route-ens192 with a blackhole route:


Try to apply the changes:
# ifdown ens192; ifup ens192

Blackhole route not added, the NetworkManager error in Description can be found in /var/log/messages
TagsNo tags attached.




2017-02-24 06:00

reporter   ~0028679

I don't think blackhole routing will be implemented in near future
since NetworkManager D-bus interface can't handle blackhole routes
(only d.e.s.t/mask ne.xt.ho.p metric).

Meanwile you could get away with /etc/NetworkManager/dispatcher.d/ scripts
mentioned in NetworkManager(8):

Prepare /etc/NetworkManager/dispatcher.d/pre-up.d/50-blackhole file
ip route add blackhole
exit 0 ;#ignore dup error
chmod +x 50-blackhole

and "nmcli conn up eth0" will kick the script.
I think you won't delete blackhole routes, so don't need if-"down" script.

Issue History

Date Modified Username Field Change
2016-11-30 11:39 villeww New Issue
2017-02-24 06:00 kabe Note Added: 0028679