📖 ~1 min read
Table of contents
Symptom & Impact
nmstatectl apply fails and network desired-state automation halts.
Environment & Reproduction
Invalid route metric ranges or duplicate defaults in YAML state definition.
nmstatectl apply /tmp/state.yml
Root Cause Analysis
Schema validation catches unsupported metric values and route conflicts.
Quick Triage
Capture failing state and active routes from kernel/NM.
nmstatectl show
ip route
systemctl status NetworkManager
firewall-cmd --state
journalctl -u NetworkManager -n 60 --no-pager
Step-by-Step Diagnosis
Validate YAML and compare desired routes with active default gateways.
python -m yaml /tmp/state.yml || true
nmstatectl gc /tmp/state.yml
ip -4 route show table main

Solution – Primary Fix
Correct route metrics and remove duplicate default entries before apply.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sed -i 's/metric: 0/metric: 100/' /tmp/state.yml
nmstatectl apply /tmp/state.yml
systemctl restart NetworkManager

Solution – Alternative Approaches
Apply incremental route changes via nmcli when nmstate transactions are too broad.
nmcli connection modify eth0 ipv4.route-metric 100
nmcli connection up eth0
Verification & Acceptance Criteria
State apply returns success and effective route table matches policy.
nmstatectl show
ip route
Rollback Plan
Reapply previous known-good state file.
nmstatectl apply /root/backup/state-good.yml
Prevention & Hardening
Lint nmstate definitions in CI before rollout.
nmstatectl gc /tmp/state.yml
Related Errors & Cross-Refs
Related to DHCP/static overlap and policy routing table precedence issues.
Related tutorial: View the step-by-step tutorial for oracle-linux-10.
View all oracle-linux-10 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
nmstate schema and RHEL network automation documentation.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.