Default IPv6 route metric changed from custom value to 1 after systemd network unit restart

Solution Verified - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content