NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
default gateway on different subnet
Hello,
what is the proper NetBSD equivalent for the following two linux
route-commands in a situation where one host has not just one network
interface but also the problem that the default gateway is not on his
subnet:
ifconfig eth0 200.2.116.140 netmask 255.255.255.0
route add -net 200.2.117.0 netmask 255.255.255.240 dev eth0
route add default gw 200.2.117.1
My first guess was the following (vr0 = eth0):
ifconfig vr0 inet 200.2.116.140 netmask 255.255.255.0
route add -net 200.2.117.0 -netmask 255.255.255.240 -link vr0 -iface
route add default 200.2.117.1
but it didn't work. Unfortunately I also can't tell why exactly because
the machine is located in a datacenter far away from here and I have to
rely on a few notes made by busy technicians. What I do know is that the
NetBSD-image always boots up successfully (according to eyewitness
account ;).
After digging through the archives I also found this, but it didn't work
either:
ifconfig vr0 inet 200.2.116.140 netmask 255.255.255.0
route add -host 200.2.117.1 -link vr0 -iface
route add default -ifa 200.2.116.140 200.2.117.1
(http://mail-index.netbsd.org/netbsd-help/2006/12/15/0000.html)
I tried to reproduce the scenario on a similar qemu-setup and found out
that adding the other subnet fails with `Network unreachable' while
adding a host works as expected (at least that's what `route show' told
me).
Any help is greatly appreciated,
Petar
P.S. That's how the linux routing table looks like, when the Debian
rescue-image is loaded:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
200.2.117.0 0.0.0.0 255.255.255.240 U 0 0 0
eth0
200.2.116.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 200.2.117.1 0.0.0.0 UG 0 0 0
eth0
Home |
Main Index |
Thread Index |
Old Index