[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Configuring a bridged interface
Is it OK to put address modifiers for route(8) in /etc/mygate?
Whilst setting up a router that connects over an ADSL modem configured
as a bridge I discovered that OpenBSD doesn't seem to do quite the right
thing with the default route.
The problem is that, for a bridging interface, the router IP address is
the same as the host's IP address on that interface and I end up with a
routing table like
default x.x.x.x G
x.x.x.x 127.0.0.1 GH
The default route needs to be set up with something like
route add default -interface x.x.x.x
In the case of an interface configured with dhclient this can be fixed
by modifying the dhclient-script - checking to see if the router address
we've been given is the same as the IP address we've been given and
calling route(8) accordingly.
In the case of static IP addresses this seems like it could be done by
putting '-interface x.x.x.x' in /etc/mygate rather than just the IP
address. But would that break anything else? Is there anywhere else that
/etc/mygate is read other than /etc/netstart?
I suspect the answer is 'no': The man page for /etc/mygate says
"The file should contain a single line specifying the gateway address,
in dotted quad notation (e.g. 192.0.2.0)."
which is fairly unabiguous. But does it really mean it :-)
So should there be /etc/mybridge as well as /etc/mygate, which is
treated differently in /etc/netstart?