Interface as a default gateway
Karl Auer
kauer at biplane.com.au
Sun Mar 15 02:05:24 UTC 2015
On Sat, 2015-03-14 at 21:41 -0400, Tom H wrote:
> On Sat, Mar 14, 2015 at 6:41 PM, Karl Auer <kauer at biplane.com.au> wrote:
> >> 1) It would have to be "ip r add 0.0.0.0/0 via ip_add_of_eth0 dev eth0".
> > The address may not be needed. That is "ip r add 0.0.0.0/0 dev eth0" may
> > also work. I'm not sure with a virtual network.
> I meant to "ip r add 0.0.0.0/0 via ip_add_of_gateway dev eth0"
Even so - the "via" address may not be needed. Specifying just the
interface means that packets for the target network will be shipped out
the interface, regardless of addressing. It's typically seen on
point-to-point links, where there is only one place for an outbound
packet to go. On ethernet I'm not sure - there may need to be a
destination address for ARP (IPv4) or ND (IP6) to work with.
> As I said, I haven't used VB in a while but I remember that there was
> a "bridged" setting that I used to use whereby VB seemed to create a
> bridge and add wlan0 to it, and the VMs had addresses in the same
> subnet as my lan.
If you have a DHCP server in your LAN and you bridge the VM interfaces
to your host interfaces, and the VM interfaces do DHCP, then naturally
the VM interfaces will get addresses from the DHCP server and those
addresses will be in the same subnet as your host interfaces. I suspect
that's what was happening. Just a guess though. Dunno what "adding a
bridge" means - with bridged mode you specify on a VM-by-VM basis what
host interface they are bridged to.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882
More information about the ubuntu-users
mailing list