Hi all,
I just changed DSL provider, switching from ADSL1 to ADSL2, so also had to
install a new modem.
The new provider requires me to PPP, but the modem can take care of that,
and forwards the
public IP to my OpenBSD box.
The external NIC is set up with just 'dhcp' in the hostname.if file.
The problem is that the default gateway that is supplied by the DHCP server
is not in the same
subnet as the IP address (some weird PPP thing?). If I connect a Window$ box
this doesn't seem
to be a problem, but my OpenBSD box (3.8) doesn't like it, it seems. No
default gateway is assigned, even when I literally put it in /etc/mygate
(which I would prefer not to, in case it's
dynamic).
I also did some manual tweaking of the routing table, and even managed to
get a situation where it
accepted that IP as the default gateway (via the assigned IP address of the
external interface), but
it didn't work (i.e. no ping to the gateway, couldn't ping "through" the
gateway to the internet either). Traceroute gives me nothing but *s.
I can see that the DHCP server does provide the gateway's IP in
/var/db/dhcp.leases.
Any ideas?
Cheers,
Dimitri
ADDON
I modified /sbin/dhclient-script to set the default gateway in the
add_new_routes function:
add_new_routes() {
route delete default >/dev/null 2>&1
for router in $new_routers; do
# NEW STUFF
route add -host $router -iface $new_ip_address >/dev/null 2>&1
route add default $router
# OLD STUFF
# if [ "$new_ip_address" = "$router" ]; then
# route add default -iface $router >/dev/null 2>&1
# else
# route add default $router >/dev/null 2>&1
# fi
# 2nd and subsequent default routers error out, so
explicitly
# stop processing the list after the first one.
break
done
if [ -n "$new_static_routes" ]; then
set $new_static_routes
while [ $# -gt 1 ]; do
route add $1 $2
shift; shift
done
fi
}
This resulted in the same routing table that I managed to get manually, but
it still didn't work.