LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 03-20-2009, 12:09 PM   #1
b_whelan
LQ Newbie
 
Registered: Aug 2005
Location: Steyning, Sussex, England
Distribution: RedHat Fedora
Posts: 8

Rep: Reputation: 0
Can't set virtual server to use fixed IP address


Whilst configuring my first Fedora 10 virtual laptop I used DHCP connections to connect to the outside world. I now want to configure the virtual systems to each have a fixed IP address so that they can be accessed from PCs over a network. (I don't actually need to connect to the Internet.) I have tried several times and looked on the Internet but can't seem to get things right. The link appears to start but I can't connect in or out between the virtual system and base Fedora installation on the machine.

My current configuration file contains:

(I had to type this info because I can't set up a shared file are without a network connection!)

DEVICE=eth0 I tried pan0 but there was a HW address problem

I removed the HW address in this version of the file

ONBOOT=yes

BOOTPROTO=none

TYPE=Ethernet

USERCTL=no

IPV6INIT=no

NETMASK=255.255.255.0

IPADDR=217.154.nnn.nnn

NM_CONTROLLED=yes

PEERDNS=yes

GATEWAY=217.154.yyy.yyy

DNS1=zzz.zzz.zzz.1

DNS2=zzz.zzz.zzz.2


Any suggestions? Thanks, Brendan
 
Old 03-20-2009, 01:11 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,697
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
How about defining a bit better what you mean by "virtual system"? Are you running VMware or something similar?
 
Old 03-20-2009, 02:23 PM   #3
b_whelan
LQ Newbie
 
Registered: Aug 2005
Location: Steyning, Sussex, England
Distribution: RedHat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
All Fedora 10

Thanks for the response. My systems are all Fedora 10 i.e. the base server and the virtual images within that server. Brendan
 
Old 03-20-2009, 04:05 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,697
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Quote:
My systems are all Fedora 10 i.e. the base server and the virtual images within that server.
OK, lets try this again. I understand your host is a Fedora 10 server. However, you haven't said what you are using to run the virtual machines. The reason I'm asking is that it is highly likely that the solution to your problem depends on how you are running your virtual machines. The usual suspects are Xen, Virtualbox and VMware. These provide the environment that your virtual Fedora machines run inside.
 
Old 03-20-2009, 04:15 PM   #5
b_whelan
LQ Newbie
 
Registered: Aug 2005
Location: Steyning, Sussex, England
Distribution: RedHat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
I am using KVM, the default within Fedora 10 for virtual applications. Is there anything else you need to know?
 
Old 03-21-2009, 07:11 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,697
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Thanks. I'm not familiar with KVM, but we should be able to narrow down where the problem is. I'm going to assume that your using bridged networking, but if you are using NAT, please say so. There are really three things you need to look at in your VM and make sure they are right:

1) The fixed IP address. Does it show up correctly in ifconfig and is it the correct address?

2) The gateway. Look at the output of route -n on both your host and VM. They should both be pointing to the same IP address for a gateway, and that is likely the IP address of your router.

3) Your /etc/resolv.conf file. You need to have at least one nameserver in your /etc/resolv.conf file. The /etc/resolv.conf file on your host should serve as a guide.

One quick test to try is to try to connect to linuxquestions.org using the name, and then try to connect with the IP address (75.126.162.205). If the IP works, but the name fails, then you have a DNS problem. If neither work, either the route and/or IP address are goofed up or there is a basic problem with KVM networking.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up a virtual FTP server with pam-mysql LXer Syndicated Linux News 0 02-08-2008 06:20 PM
VMware Server virtual network. How does one set it up? cwizardone Slackware 7 11-04-2007 01:51 PM
Mail Server fixed IP address needed for Sendmail and Tripwire mazinoz Linux - Security 5 03-19-2006 01:08 AM
i have taken a domain name. how to set it up on my virtual dedicated server phpsharma Linux - General 4 03-15-2005 07:30 PM
LAN/WAN IP address and http to virtual server behind DSL modem E-Rick Linux - Networking 3 10-19-2004 10:01 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration