Network-Scripts Error

Latest response

I am having some issues with my scripts not wanting to add the default gateway.

I have multiple websites running on my server they are all configured correctly as they have worked perfectly in the past. However what is happening lately is that we are changing our service provider so I need to update the default gateway in the scripts as we move the sites to our new provider.

They run fine once they have been moved however some of them refuse to add the old gateway!
I get the below error
Error adding default gateway 10.36.208.244 for eth0:3

I have 9 interfaces configured like this.

My eth0 files look like the following

DEVICE=eth0:3
IPADDR=10.36.208.187
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
GATEWAY=10.36.208.244

It worked fine in the past. But for the last couple of days it has been randomly complaining about this which causes the sites to be offline!

Responses

Try put the GATEWAY directive in the main interface file ifcfg-eth0 instead of the alias interface file eth0:3

Hi Jamie,

I do have it in the main interface but what is happening is as we move the sites the gateway has to change so I do it per site but then the original gateway is giving this error.... I do however suspect it is due to the fact that our service provider "breaks" the link to the specified site so we can move it that it then affects all the others.

Thanks for your comment and input.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.