3

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

1
  • That doesn't look like a "default" route.
    – Dan Carley
    Jun 25, 2010 at 9:25

1 Answer 1

3

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

1
  • Thanks Kyle, it worked! Strange that the 255.255.255.255 mask didn't work.
    – Athanasios
    May 11, 2010 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .