LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing from VM to server (https://www.linuxquestions.org/questions/linux-networking-3/routing-from-vm-to-server-626383/)

Waldorf 03-07-2008 06:49 AM

routing from VM to server
 
Hi
I've got a problem with routing.

I made a little network for testing. There are three computers:
- gateway (debian etch) to the internet (eth0 my_isp_addr, eth1 10.10.10.1)
- serwer (debian etch)with openldap,bind,samba (eth0 10.10.10.2)
- access point (10.10.10.4)
- client (debian etch)(eth0 10.10.10.5, tap0 10.10.10.6)

Gateway, serwer and access point are connected to switch. client is connected with access point.


internet
|
V
eth0
(gw)
eth1-10.10.10.1
|
V
(switch)->eth0-10.10.10.2(serwer)
|
V
10.10.10.4(Access Point)
|
V
eth0 10.10.10.5
(client)
( tap0 10.10.10.6)
(virtualbox with windows XP connected to tap0 as 10.10.10.7)

On client I set up virtualbox Virual Machine with windows XP. I want this windows Xp(10.10.10.7) to connect to samba on 10.10.10.2. I need separate IP addres because my client is also authenticating to samba. So i've created tap0 virtual interface use by windows. I can't use bridging 'cause my wireless card does not support it.
First problem was i couldn connect to 10.10.10.{2,1} with ssh no route. so I added: ip route add 10.10.10.7 via 10.10.10.6 dev tap0. and without problems i can connect to 10.10.10.{2,1} i can even ping 10.10.10.7. But when i'm pinging from 10.10.10.2 or 10.10.10.1 to windows 10.10.10.7 "destination unreachable". pings to 10.10.10.5 and 6 are ok. Te sam is pinging from windows 10.10.10.7 to 10.10.10.{1,2} unreachable, 10.101.10.{6,7} are ok.
How to make winXP seen by 10.10.10.{1,2} and backwards.
thanx for any help

my clients routing table:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.10.7 10.10.10.6 255.255.255.255 UGH 0 0 0 tap0
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 10.10.10.1 0.0.0.0 UG 0 0 0 eth0

acid_kewpie 03-07-2008 07:09 AM

well by default you won't be able to route through the host machine, that'd be enabled with a "echo 1 > /proc/sys/net/ipv4/ip_forward" but really if you can't bridge it'd *VERY* strongly urge you to use a proper seperate network, e.g. 10.10.11.0/24 and route to that.

Waldorf 03-07-2008 07:27 AM

thanx for reply. I've put on ip_forwarding. I thought about separate network but i wondered if there is any possibility to do it in the way i want.

acid_kewpie 03-07-2008 07:36 AM

well the most specific route at a given metric is the one that is used, so if you set a /32 route then sure it should take precedence over the /24. So have you got routing on the server to point the .7 ip via the vm host?

Waldorf 03-07-2008 09:00 AM

these are my first steps with rooting. it rather as side effect of testing ldap and samba.
I just want to connect windows XP with samba PDC. When i was installing virtual machine i clould choose nated network with host (it-s very limited), internal network only inside VM, and Host Interface Networking with which i had to create virual interface. So choose last opion because "it looks like the guest's network card is connected to the TAP interface with a network cable" so i assigned 10.10.10.7 to windows interface and 10.10.10.6 to tap0. And it works as i wrote. but don't know how to force 10.10.10.7(windows) to connect 10.10.10.2. I also have to remeber about real interface eth0 10.10.10.5 of linux client where VM is running.


All times are GMT -5. The time now is 05:36 AM.