LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-09-2008, 10:29 AM   #1
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Rep: Reputation: 0
VM and IP Addresses (FC9)


I've set up a fully-virtualized windows xp vm guest on an FC9 installation using the Virtual Machine Manager. My router provides DHCP, and the system has a single NIC (wired). The FC9 host has a typical IP address within the normal range for my network (192.168.1.XXX). The windows vm guest comes up with an IP address like 192.168.122.XXX, and the gateways are also different (192.168.1.x vs. 192.168.122.x). I selected "normal" network option when setting up the vm -- the bridged option is greyed out (I assume because only one NIC in the system).

My issue is that I can't connect to my windows VM from any other machines on the network besides the FC9 host. I can connect outwards from the windows VM (internet, pinging other machines, RDC, etc.), but not the other way. Disabling any windows firewalls doesn't help.

What do I need to do on the FC9 host to be able to see my windows vm guest from other systems? Or is there some simple way to get the windows vm onto the same subnet(?) as the rest of the systems on my network (assuming that would resolve this issue)?

I'm limited on my network and linux knowledge, so as much detail that you can provide with instructions or requests is appreciated. Thanks!
 
Old 12-09-2008, 12:17 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pigwig View Post
What do I need to do on the FC9 host to be able to see my windows vm guest from other systems? Or is there some simple way to get the windows vm onto the same subnet(?) as the rest of the systems on my network (assuming that would resolve this issue)?
The only way I know of to get the other systems to see an address that is not on their subnet is to add routes to the route tables for the other systems.

For Linux:
Code:
$ route add -net 192.168.122.0 dev ethN
where N is the number of the desired Ethernet interface.

For Windows:
Code:
C:\> route add 192.168.122.0 mask 255.255.255.0 192.168.1.N
where N is the last octet of the IP address of the desired Ethernet interface.
 
Old 12-09-2008, 01:21 PM   #3
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
For Linux:
Code:
$ route add -net 192.168.122.0 dev ethN
where N is the number of the desired Ethernet interface.
Okay, I am getting the following error in FC9 when I try this as root:

[root@localhost user]# /sbin/route add -net 192.168.122.0 dev eth0
SIOCADDRT: Invalid argument

I tried eth0, eth1... Sorry I am a newb, so simple things are sometimes challenging...

Thanks
 
Old 12-09-2008, 01:46 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pigwig View Post
Okay, I am getting the following error in FC9 when I try this as root
My bad. Try this:
Code:
route add -net 192.168.122.0 netmask 255.255.255.0 dev eth0
 
Old 12-09-2008, 02:11 PM   #5
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
My bad. Try this:
Code:
route add -net 192.168.122.0 netmask 255.255.255.0 dev eth0
Thanks, that worked better. I'm going to have to play around with this later tonight and see if I can tweek it to get RDC to work. I still couldn't connect after running these, but maybe I've note quite done this correctly. I'll post back with results later. Thx.
 
Old 12-09-2008, 08:38 PM   #6
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
My bad. Try this:
Code:
route add -net 192.168.122.0 netmask 255.255.255.0 dev eth0
Running this command completely kills the network/internet connection on the Windows VM guest machine. Here is a dump from my terminal window with a before and after netstat on the FC9 host. Did this prevent traffic from going over the virbr0 (I'm guessing that's a virtual bridge) connection?


[root@localhost user]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost user]# /sbin/route add -net 192.168.122.0 netmask 255.255.255.0 dev eth0
[root@localhost user]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost user]#
 
Old 12-10-2008, 01:26 PM   #7
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pigwig View Post
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
If you have an interface with that subnet already on it, you do not need the "route" command. All traffic for that subnet should go through virbr0.

What is the output if "ifconfig -a"?
 
Old 12-10-2008, 06:04 PM   #8
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
If you have an interface with that subnet already on it, you do not need the "route" command. All traffic for that subnet should go through virbr0.

What is the output if "ifconfig -a"?
eth0 Link encap:Ethernet HWaddr 00:21:97:8E:7B:CB
inet addr:192.168.1.31 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::221:97ff:fe8e:7bcb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:433 errors:0 dropped:0 overruns:0 frame:0
TX packets:343 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:173113 (169.0 KiB) TX bytes:73363 (71.6 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3922 errors:0 dropped:0 overruns:0 frame:0
TX packets:3922 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:196260 (191.6 KiB) TX bytes:196260 (191.6 KiB)

pan0 Link encap:Ethernet HWaddr 8E:8F:AF:23:A1:3C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

virbr0 Link encap:Ethernet HWaddr 5E:7B:40:91:B9:11
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::30cf:a6ff:fedb:27f7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2272 (2.2 KiB) TX bytes:5802 (5.6 KiB)

vnet0 Link encap:Ethernet HWaddr 5E:7B:40:91:B9:11
inet6 addr: fe80::5c7b:40ff:fe91:b911/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:2564 (2.5 KiB) TX bytes:2561 (2.5 KiB)


Then, from within the windows VM guest, here is the IPCONFIG:

Windows IP Configuration

Host Name . . . . . . . . . . . . : WinXP123
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : My NIC Description
Physical Address. . . . . . . . . : 00-16-3E-21-15-0C
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.122.181
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.122.1
DHCP Server . . . . . . . . . . . : 192.168.122.1
DNS Servers . . . . . . . . . . . : 192.168.122.1
Lease Obtained. . . . . . . . . . : Wednesday, December 10, 2008 3:43:37
PM
Lease Expires . . . . . . . . . . : Wednesday, December 10, 2008 4:43:37
PM
 
Old 12-11-2008, 11:20 AM   #9
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Did you ever try adding a route on the Windows machines? They should send their traffic for 192.168.122.0 to the IP address of the FC9 machine. It looks like the FC9 machine is acting as a gateway for the Windows VM. If so, all the other Windows machines on the network need to send their 192.168.22.0 traffic to the FC9 IP address.

Once again, the command on Windows would be
Code:
C:\>route add 192.168.122.0 mask 255.255.255.0 192.168.1.31
 
Old 12-11-2008, 12:06 PM   #10
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
Did you ever try adding a route on the Windows machines? They should send their traffic for 192.168.122.0 to the IP address of the FC9 machine. It looks like the FC9 machine is acting as a gateway for the Windows VM. If so, all the other Windows machines on the network need to send their 192.168.22.0 traffic to the FC9 IP address.

Once again, the command on Windows would be
Code:
C:\>route add 192.168.122.0 mask 255.255.255.0 192.168.1.31
I had added the route initially, but that was along with the change to the linux system hosting the winxp guest (the change that seemed to clobber the internet on the vm winxp guest). Now, if I add the route to the another system w/o making that change, I see a little progress. I'm still missing something, but getting warmer. I can't get an RDC connection going, but pinging the windows vm guest from another windows system with the route added at least brought this response from the fc9 host:

Pinging 192.168.122.181 with 32 bytes of data:
Reply from 192.168.1.31: Destination port unreachable.

Seems like some sort of route change is needed on the fc9 host, perhaps just a little different flavor from the first stab at it maybe.

Thx
 
Old 12-11-2008, 12:59 PM   #11
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pigwig View Post
Seems like some sort of route change is needed on the fc9 host, perhaps just a little different flavor from the first stab at it maybe.
You might need some iptables magic. Look at some of the HOWTOs at Netfilter HOWTOs.
 
Old 12-11-2008, 05:25 PM   #12
pigwig
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
You might need some iptables magic. Look at some of the HOWTOs at Netfilter HOWTOs.
Thanks for the help & tip -- I'll check it out.
 
  


Reply



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
FC9 with Motif -> No FC9 with lesstif ->? ezrider Fedora 2 12-07-2008 12:40 PM
Error Reboot ing FC9 2.6.26.3-29.fc9.x86_64 usdave Fedora 2 10-04-2008 07:52 AM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 1 02-09-2008 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:47 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