NetBSD-Users archive

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

Re: Questions about NetBSD and virtual networks



Michael van Elst writes:

 > Your guest OS knows how to reach the world via its default gateway
 > but the world doesn't know how to reach the guest OS. Everything
 > else on your local network including your router only knows about
 > 192.168.0.0/24 and will fall back to their default route (probably the
 > internet connection) to reach other networks including 192.168.1.0/24.
 > 
 > Your router needs to know about 192.168.1.0/24 and maybe needs a
 > NAT configuration for it.
 > 
 > If you then use different networks, it is usually better to route
 > than to switch. I.e. disable the bridge and configure ip forwarding.

I think I understand what you are saying, but this will kind of
circumvent what I am trying to do. Furthermore, the facility to add
routes in my router (a D-Link DIR-655) has been disabled in my current
firmware (odd choice by D-Link!) and I have not yet found a firmware
version with this functionality.

Is there some way to establish this routing functionality on the
NetBSD host, preferably on the bridge?

I have tried routed without any success. With an empty /etc/gateways
file:

root%asus.immnet.dk@localhost:/VM/Linux-1 # routed -dt
-- 17:15:08 --
Tracing actions started
Add interface re0  192.168.0.3    -->192.168.0.0/24  
RCVBUF=61440
turn on RIP
Add interface lo0  127.0.0.1      -->127.0.0.1/32    <LOOPBACK> <PASSIVE> 
Add interface tap0 192.168.1.1    -->192.168.1.0/24  
Add    192.168.1.0     -->192.168.1.1      metric=0  tap0 <IF> 
Add    127.0.0.1/32    -->127.0.0.1        metric=0  lo0 <IF> 
Add    192.168.0.0     -->192.168.0.3      metric=0  re0 <IF> 
send all routes and inhibit dynamic updates for 4.347 sec
exiting with signal 2
root%asus.immnet.dk@localhost:/VM/Linux-1 # 


How should the above output be interpreted?

Add 192.168.1.0 -->192.168.1.1 (All traffic to 192.168.1.0/24 goes to
192.168.1.1?)
Add 192.168.0.0 -->192.168.0.3 (All traffic to 192.168.0.0/24 goes to
192.168.0.3?)


An additional question: If eveything on my local network (except the
guest OS) knows nothing about the 192.168.1.0/24 network, how come I
can ssh from the host (192.168.0.3) to the guest OS (192.168.1.10)?

Is that because all devices (and nothing else) on the virtual bridge
can be seen by each other?

Kind regards
  Ib-Michael
-- 
Email: i.m.martinsen(at)gmail.com
Running NetBSD/i386 v5.1


Home | Main Index | Thread Index | Old Index