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.

We need to set up an OpenBSD host to use a default gateway that's outside of it's subnet. This is all I need to do on Linux (not the actual IPs) to achieve it:

ifconfig eth0 33.33.33.33/31 up
route add 33.33.33.254 dev eth0
route add default gw 33.33.33.254

The problem is that we don't know the proper equivalent of the middle command in OpenBSD. The man page says:

If the destination is directly reachable via an interface requiring no intermediary system to act as a gateway, the -iface modifier should be specified;

Sadly we can't seem to figure out how to make it work with that. This is a virtual host on an OVH server, they have documentation for many other operating systems showing how to do it here: http://help.ovh.co.uk/BridgeClient

share|improve this question
1  
That's not how routing works. By definition, the gateway must reside on the same subnet. If it's working on a Linux host, it's either a bug or some other fluke. –  EEAA Oct 20 '13 at 12:13
1  
Sounds like OVH's bizarre network again. You might not be able to get help anywhere else. –  Michael Hampton Oct 20 '13 at 15:52
    
@cnst Congrats, this was by far the least helpful of the 3 comments. Seriously, shilling another hosting company without even knowing our requirements? Good job. –  kshade Nov 25 '13 at 9:17
    
@kshade, online.net is one of the most well known, oldest and biggest ISPs in France; what are your requirements? –  cnst Nov 25 '13 at 18:21
    
I agree that saying 'use $this provider instead' is not the answer. But I am absolutely confused. As I understand it you do need to have the DG on one of your local subnets. Even if that means creating an alias for your sole NIC and thus using two local networks. The old one, and one with only your host and the DG. –  Hennes Nov 30 '13 at 0:24

1 Answer 1

Try setting up an alias on the interface instead:

ifconfig eth0 alias 33.33.33.254

OpenBSD will probably have a different interface name then eth0 depending on the driver used.

share|improve this answer

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.