I have two subnets routed to my server from ISP. I have only one gateway ip. The gateway is on the same VLAN as my IP address. For example netowrk 1 is 184.108.40.206/24 and network 2 is 220.127.116.11/24. Both are routed to eth0 by my ISP. Gateway is 18.104.22.168. My host ip is 22.214.171.124/24 (eth0) So I can configure default gateway manually with
ip route add default dev eth0 ip route add default via 126.96.36.199
and then internet connection works properly. How do I configure it in /etc/sysconfig/network-scripts/ifcfg-eth0 ?
I tried to set GATEWAY=188.8.131.52 but it doesn't work. Tried to set GATEWAY and GATEWAYDEV in /etc/sysconfig/network and it does only what first command from listing above do.