Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a 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."

Is there a way around this?

Regards

Ossan

share|improve this question
    
That doesn't look like a "default" route. –  Dan Carley Jun 25 '10 at 9:25
    
Thanks Dan, I've corrected the question. –  Athanasios Dec 11 '10 at 13:26
add comment

1 Answer

up vote 1 down vote accepted

Does ip route add 192.168.1.51/32 via 192.168.1.2 accomplish what you need?

share|improve this answer
    
Thanks Kyle, it worked! Strange that the 255.255.255.255 mask didn't work. –  Athanasios May 11 '10 at 13:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.