Static route in conflict with a default route

Posted by Ossan Sokiv on Server Fault See other posts from Server Fault or by Ossan Sokiv
Published on 2010-05-11T13:21:53Z Indexed on 2010/05/11 13:25 UTC
Read the original article Hit count: 567

Filed under:
|
|

Hi guys,

I have a default route configured.

192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.1

I'd like to add a static route to pass traffic destined for 192.168.1.51 via a load balancer's redundant virtual interface at 192.168.1.2.

ip route add 192.168.1.51 mask 255.255.255.255 via 192.168.1.2

When I try to add the static route I get this error.

Error: either "to" is duplicate or "default" is garbage."

It doesn't want to add the static route because it's in conflict with the default route. Is there a way around this?

Regards

Ossan

© Server Fault or respective owner

Related posts about route

Related posts about static-routes