Take a look at /etc/rc.d/rc.local. The file states, "Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure that this script will be executed during boot."
Please note that you must run
chmod +x /etc/rc.d/rc.localto ensure that this script will be executed during boot.
So...:
chmod +x /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local Then place your commands above the last line, touch /var/lock/subsys/local.
touch /var/lock/subsys/local /etc/iproute2/rt_tables /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/route-eth0 /etc/sysconfig/network-scripts/route-eth1 /etc/sysconfig/network-scripts/rule-eth0 /etc/sysconfig/network-scripts/rule-eth1 /etc/iproute2/rt_tables /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/route-eth0 /etc/sysconfig/network-scripts/route-eth1 /etc/sysconfig/network-scripts/rule-eth0 /etc/sysconfig/network-scripts/rule-eth1 # # reserved values # 255 local 254 main 253 default 0 unspec # # local # 128 mynet # # reserved values # 255 local 254 main 253 default 0 unspec # # local # 128 mynet NETWORKING=yes HOSTNAME=hostname.sld.tld GATEWAY=10.10.10.1 NETWORKING=yes HOSTNAME=hostname.sld.tld GATEWAY=10.10.10.1 THE EL 7.x /etc/sysconfig/network-scripts/ifcfg-eth0 file, without "HWADDR"HWADDR and "UUID". This configures a static IP address for eth0 without using NetworkManagerNetworkManager.
DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTOCOL=none IPADDR=10.10.10.140 NETMASK=255.255.255.0 NETWORK=10.10.10.0 BROADCAST=10.10.10.255 DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTOCOL=none IPADDR=10.10.10.140 NETMASK=255.255.255.0 NETWORK=10.10.10.0 BROADCAST=10.10.10.255 THE EL 7.x /etc/sysconfig/network-scripts/ifcfg-eth1 file, without "HWADDR"HWADDR and "UUID"UUID. This configures a static IP address for eth1 without using NetworkManagerNetworkManager.
192.168.100.0/24 dev eth1 table mynet default via 192.168.100.1 dev eth1 table mynet 192.168.100.0/24 dev eth1 table mynet default via 192.168.100.1 dev eth1 table mynet from 192.168.100.0/24 lookup mynet from 192.168.100.0/24 lookup mynet dnf install network-scripts dnf install network-scripts