NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

default route on other subnet


I need to use a gateway which is reachable by the network interface, but
not on the same subnet.  The network FAQ has a little chapter on this,
but it doesn't work here.  It's on a xen guest has a different subnet
than the linux dom0 (routing, not briding).
        ifconfig xennet0 <guest IP> netmask up
        route add -host <dom0 IP> -link xennet0 -iface
        route add default -ifa <guest IP> <dom0 IP>

Note. network works with that netbsd guest otherwise (using a dummy
bridge for example)

Note. the equivalent trick works on linux guests,
        ifconfig eth0 <guest IP> netmask up
        route add -net <dom0 IP> netmask eth0
        route add default gw <dom0 IP>

There was also a big thread on the matter two years ago
but I should probably avoid the common-netmask trick because I would
have to use something close to /16.  And I can't change the /24 netmask
of the dom0.


Home | Main Index | Thread Index | Old Index