Interface as a default gateway
Tom H
tomh0665 at gmail.com
Tue Mar 17 20:26:28 UTC 2015
On Sat, Mar 14, 2015 at 10:05 PM, Karl Auer <kauer at biplane.com.au> wrote:
> 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.
Absolutely but in this case it's needed.
>> 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.
My laptop only has a wifi NIC and I cannot bridge it - "add it to the
bridge" in my previous post.
Somehow VB can do so - or fake it in some way - and acquire a dhcp
address from the lan, as you describe.
More information about the ubuntu-users
mailing list