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 18.104.22.168/24 and network 2 is 22.214.171.124/24. Both are routed to eth0 by my ISP. Gateway is 126.96.36.199. My host ip is 188.8.131.52/24 (eth0) So I can configure default gateway manually with
ip route add default dev eth0 ip route add default via 184.108.40.206
and then internet connection works properly. How do I configure it in /etc/sysconfig/network-scripts/ifcfg-eth0 ?
I tried to set GATEWAY=220.127.116.11 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.