Answer how to convert old ifcfg route-eth rule-eth routing format to RHEL 8 format
Budget: $10 – $30 USD
Answer how to convert old ifcfg route-eth rule-eth routing format to RHEL 8 format
In the past on CentOS 6 and 7 I could easily setup the NICs by using the following commands for each NIC(I did not use NetworkManager)
ip route add 123.123.123.123/28 dev eno1 table 1
ip route add default via 123.123.123.123 table 1
ip rule add from 123.123.123.123/28 table 1 priority 100
(while using a different table number and priority for each NIC)
and to make the above manual commands persistent, convert to the corresponding files in
/etc/sysconfig/network-scripts/route-eno1
123.123.123.123/28 dev eno1 table 1
default via 123.123.123.123 table 1
/etc/sysconfig/network-scripts/rule-eno1
from 123.123.123.123/28 table 1 priority 100
However I am not really that familiar with network commands, and can't seem to figure out how to get it to work in CentOS/RHEL 8.
What are the corresponding commands in CentOS/RHEL 8 to make the above settings persistent?
The manual "ip route" and "ip rule" commands work fine.
Related links:
https://access.redhat.com/documentat...in_ifcfg_files
https://access.redhat.com/documentat...ing-networking
I have servers with multiple NICs connected to different internet lines.
OS: RHEL 8
Config that works when running(REDACTED1 and REDACTED2 are my IPs first two octets replaced text for privacy):
yum install network-scripts
systemctl stop NetworkManager
[root@localhost network-scripts]# cat route-ens3f0
REDACTED1.37.80/28 dev ens3f0 table 1
default via REDACTED1.37.94 dev ens3f0 table 1
[root@localhost network-scripts]# cat route-ens3f1
REDACTED1.99.112/28 dev ens3f1 table 2
default via REDACTED1.99.126 dev ens3f1 table 2
[root@localhost network-scripts]# cat route-ens3f2
REDACTED2.203.48/28 dev ens3f2 table 3
default via REDACTED2.203.62 dev ens3f2 table 3
[root@localhost network-scripts]# cat route-ens3f3
REDACTED3.93.0/24 dev ens3f3 table 4
default via REDACTED3.93.1 dev ens3f3 table 4
[root@localhost network-scripts]# cat rule-ens3f0
from REDACTED1.37.80/28 table 1 priority 100
[root@localhost network-scripts]# cat rule-ens3f1
from REDACTED1.99.112/28 table 2 priority 200
[root@localhost network-scripts]# cat rule-ens3f2
from REDACTED2.203.48/28 table 3 priority 300
[root@localhost network-scripts]# cat rule-ens3f3
from REDACTED3.93.0/24 table 4 priority 400
What I failed to do:
nmcli connection modify ens3f0 +ipv4.routes "REDACTED1.37.80/28 REDACTED1.37.94"
nmcli connection modify ens3f1 +ipv4.routes "REDACTED1.99.112/28 REDACTED1.99.126"
nmcli connection modify ens3f2 +ipv4.routes "REDACTED2.203.48/28 REDACTED2.203.62"
nmcli connection modify ens3f3 +ipv4.routes "REDACTED3.93.0/24 REDACTED3.93.1"
nmcli con reload ens3f0
nmcli con reload ens3f1
nmcli con reload ens3f2
nmcli con reload ens3f3
nmcli con up ens3f0
nmcli con up ens3f1
nmcli con up ens3f2
nmcli con up ens3f3
Question:
Instructions on how to convert the above so it works with NetworkManager so I don't need to do
yum install network-scripts
systemctl stop NetworkManager
To bid on this project please include the text: "I know how to convert old ifcfg route-eth rule-eth routing format to be compatible with NetworkManager"
In the past on CentOS 6 and 7 I could easily setup the NICs by using the following commands for each NIC(I did not use NetworkManager)
ip route add 123.123.123.123/28 dev eno1 table 1
ip route add default via 123.123.123.123 table 1
ip rule add from 123.123.123.123/28 table 1 priority 100
(while using a different table number and priority for each NIC)
and to make the above manual commands persistent, convert to the corresponding files in
/etc/sysconfig/network-scripts/route-eno1
123.123.123.123/28 dev eno1 table 1
default via 123.123.123.123 table 1
/etc/sysconfig/network-scripts/rule-eno1
from 123.123.123.123/28 table 1 priority 100
However I am not really that familiar with network commands, and can't seem to figure out how to get it to work in CentOS/RHEL 8.
What are the corresponding commands in CentOS/RHEL 8 to make the above settings persistent?
The manual "ip route" and "ip rule" commands work fine.
Related links:
https://access.redhat.com/documentat...in_ifcfg_files
https://access.redhat.com/documentat...ing-networking
I have servers with multiple NICs connected to different internet lines.
OS: RHEL 8
Config that works when running(REDACTED1 and REDACTED2 are my IPs first two octets replaced text for privacy):
yum install network-scripts
systemctl stop NetworkManager
[root@localhost network-scripts]# cat route-ens3f0
REDACTED1.37.80/28 dev ens3f0 table 1
default via REDACTED1.37.94 dev ens3f0 table 1
[root@localhost network-scripts]# cat route-ens3f1
REDACTED1.99.112/28 dev ens3f1 table 2
default via REDACTED1.99.126 dev ens3f1 table 2
[root@localhost network-scripts]# cat route-ens3f2
REDACTED2.203.48/28 dev ens3f2 table 3
default via REDACTED2.203.62 dev ens3f2 table 3
[root@localhost network-scripts]# cat route-ens3f3
REDACTED3.93.0/24 dev ens3f3 table 4
default via REDACTED3.93.1 dev ens3f3 table 4
[root@localhost network-scripts]# cat rule-ens3f0
from REDACTED1.37.80/28 table 1 priority 100
[root@localhost network-scripts]# cat rule-ens3f1
from REDACTED1.99.112/28 table 2 priority 200
[root@localhost network-scripts]# cat rule-ens3f2
from REDACTED2.203.48/28 table 3 priority 300
[root@localhost network-scripts]# cat rule-ens3f3
from REDACTED3.93.0/24 table 4 priority 400
What I failed to do:
nmcli connection modify ens3f0 +ipv4.routes "REDACTED1.37.80/28 REDACTED1.37.94"
nmcli connection modify ens3f1 +ipv4.routes "REDACTED1.99.112/28 REDACTED1.99.126"
nmcli connection modify ens3f2 +ipv4.routes "REDACTED2.203.48/28 REDACTED2.203.62"
nmcli connection modify ens3f3 +ipv4.routes "REDACTED3.93.0/24 REDACTED3.93.1"
nmcli con reload ens3f0
nmcli con reload ens3f1
nmcli con reload ens3f2
nmcli con reload ens3f3
nmcli con up ens3f0
nmcli con up ens3f1
nmcli con up ens3f2
nmcli con up ens3f3
Question:
Instructions on how to convert the above so it works with NetworkManager so I don't need to do
yum install network-scripts
systemctl stop NetworkManager
To bid on this project please include the text: "I know how to convert old ifcfg route-eth rule-eth routing format to be compatible with NetworkManager"