WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] switch to static ip

To: "Marco Mandl" <marco.mandl@xxxxxx>
Subject: Re: [Xen-users] switch to static ip
From: "Henning Sprang" <henning_sprang@xxxxxx>
Date: Sun, 22 Apr 2007 18:59:32 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 22 Apr 2007 09:58:25 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=rL0+uSDhM+IXUDJSG4JNglalfZ7MQ5uJc0TK2Z0Ql0O1aW75qOqyhR15JkPRcGQa1OXzBiCfFtHpFx0hl76Zmyp0LoKX1dhWg1OqpAEtCivkFs1U+4cMqoLDT8q1eroPv2R0wkFUAzL7splF5yKq17RJm0oytH6vOZkXsK96XnM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Twrf7E4ya0ZGtsYr2MsEmgLvH3tqmpiQY0IjfvlJwhabviKelLqQpDPahQCx18FOkwHqADJ5/uIA3wU6R39g5PDNABEXzN89LP5hRNNQ+WwoxOfHffRfWU80MTVpo94+3fnci+sP3ALnPvv6CadddVSxnv+582XoZjsOVyWp3WY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <pan.2007.04.20.21.45.53.76591@xxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <pan.2007.04.20.21.45.53.76591@xxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 4/20/07, Marco Mandl <marco.mandl@xxxxxx> wrote:
Hello,

I migrated a sarge installation into a domU. I did this using dhcp. That
worked fine.

Dhcp makes migrating domU's from real hardware to a Xen domU?
Interesting, I thought it's just delivering IP configurations :)


But now I want to switch to static ip address.

In the corresponding xmdomain.cfg I change:
#dhcp = 'dhcp'
#vif  = [ '' ]
dhcp = "off"
ip = "192.168.17.16"
netmask = "255.255.255.0"
#broadcast = "192.168.17.255"
#network = "192.168.17.0"
gateway = "192.168.17.1"

The "ip", "gateway" and "netmask" settings only affect the Xen
networking scripts, mainly in routed, but probably also in nated mode
(never used natted mode myself). They do not actually change the
configuration of your DomU's interfaces.

I even tried to changed the /etc/network/interfaces of the domU:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
name Ethernet LAN card
address 192.168.17.16
netmask 255.255.255.0
broadcast 192.168.17.255
network 192.168.17.0
gateway 192.168.17.1

That is the way to go - configure a static IP in the domU itself.

But there is no eth0 in domU:
$ sudo ifconfig -s
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
lo    16436 0      1461      0      0      0    1461      0      0      0 LRU

Network of dom0 seems to be ok:

What am I doing wrong?

Apart from the things said, look at the "vif" config line - why did
you comment it out?
If you tell Xen that your VM shouldn't have a network interface, it
will not have one.

Read the Xen manual about configuring network cards, and look at the
example configs to correct this  (hint: try just  commenting the vif
line back in).

Henning

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>