Hi,

My hosting ISP is using a routing model where every machine has
a IP address with a /32 mask and uses a default route specificed at
the link level.

For Linux machines it means something like this with iproute2:

  ip link set eth0 up
  ip addr add 91.224.149.DDD/32 dev eth0
  ip route add default via 91.224.148.0 dev eth0 onlink

For OpenBSD this setup maps to

hostname.em0:

    inet 92.224.149.DDD/32
    ! route add 91.224.148.0/32 -link -iface em0

/etc/mygate:

    91.224.148.0

While this works when configured manually (an ARP request is generated
by the route add -link command and both the ARP and route entries show
up), it tends to not beeing stable (ie the default route disapears):

1. on boot while I explicitely see the '! route' command output in
  dmesg -s, the default route doesn't work after the boot, the /32
  route has disapeared once the machine reaches the login: prompt to
  let me connect on console and check it. If I run the command manualy
  again, the route becomes active again and is useable.
  So it seems that something flushes the ARP table after executing the
  route command in /etc/hostname.if

2. but if I quiese the network for 20mn to let the ARP entry for the
  router time out, then again the associated route disapears.

I can work around these problems by putting a permanent ARP entry for
the router in rc.local, but I'd like to know if there isn't some kind
of bug that needs to be fixed there.

This kind of routing setup seems popular among cloud style VM hosting
providers, and with the growing support for running OpenBSD as a
guest, I guess this is going to become a more frequent issue.
-- 
Matthieu Herrb

Attachment: signature.asc
Description: PGP signature

Reply via email to