LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-07-2008, 06:49 AM   #1
Waldorf
LQ Newbie
 
Registered: Dec 2005
Location: Radomsko in Poland
Distribution: Debian
Posts: 11

Rep: Reputation: 0
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

Last edited by Waldorf; 03-07-2008 at 06:51 AM.
 
Old 03-07-2008, 07:09 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 03-07-2008, 07:27 AM   #3
Waldorf
LQ Newbie
 
Registered: Dec 2005
Location: Radomsko in Poland
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 03-07-2008, 07:36 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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?
 
Old 03-07-2008, 09:00 AM   #5
Waldorf
LQ Newbie
 
Registered: Dec 2005
Location: Radomsko in Poland
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
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.

Last edited by Waldorf; 03-07-2008 at 09:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing to a server based on subdomain jantman Linux - Networking 13 12-04-2006 10:08 AM
Routing from OpenVPN server jjge Linux - Networking 1 08-29-2006 09:34 AM
linux server routing gigsz Linux - Networking 3 12-16-2005 04:21 AM
Name Server Routing Problem carloconcillado Linux - Networking 2 06-15-2005 10:26 AM
samba server and routing sambanewbie Linux - Networking 1 11-21-2002 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration