Default IPv6 route metric changed from custom value to 1 after systemd network unit restart
Issue
System has default global GW specified as XXXX:YYYY::ZZZ in file /etc/sysconfig/network.
# cat /etc/sysconfig/network
NETWORKING_IPV6=yes
IPV6_DEFAULTGW=XXXX:YYYY::ZZZ
---8<---
#systemctl restart network
# ip -6 r show | grep default
default via XXXX:YYYY::ZZZ dev ethX metric 1
The default GW metric was changed to some custom value along customer personal needs.
Lets take 2000 as an example here.
# route del -A inet6 default gw XXXX:YYYY::ZZZ dev ethX
or
# ip -6 route del ::/0 via XXXX:YYYY::ZZZdev ethX
# route add -A inet6 default gw XXXX:YYYY::ZZZ dev ethX metric 2000
or
# ip -6 route add ::/0 via XXXX:YYYY::ZZZdev ethX metric 2000
# ip -6 r show | grep default
default via XXXX:YYYY::ZZZ dev ethX metric 2000
There is again the default route with metric 1 after restarting of network service and the personal default GW route metric is lost.
#systemctl restart network
# ip -6 r show | grep def
default via XXXX:YYYY::ZZZ dev ethX metric 1
Environment
- Red Hat Enterprise Linux 6,7
- IPv6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
