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] About MAC address

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] About MAC address
From: Stephen Liu <satimis@xxxxxxxxx>
Date: Fri, 19 Sep 2008 17:33:54 +0800 (CST)
Delivery-date: Fri, 19 Sep 2008 02:34:32 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=o5FgcR9BHFJASaNZo67AGj9EYj9X0eHuqpkS5CCrqh6RYCK5zUMUZU24LhE3aHOhPrTKL2ufU9kI8dpbfr15jcB5ctwjCYULA5T6wM2wcDJeeKn8TaqZsDn9YItHlJQQeVkkNTkHvTxrum8wFyXklcUD6ajpTXjNYSzXvnzZdMQ=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1221814974.4386.27.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
--- "Nemeth, Tamas" <nice@xxxxxxxxxxxxxxx> wrote:

> Hi!
> 
> Sorry, i don't know anything about debian, but a mac address
> in /etc/network/interfaces is strange for me.
> 
> It's possibly for the domU to change the mac address of any virtual
> interface by the command "ip link set ethX address
> XX:XX:XX:XX:XX:XX",
> or similar. Xen will not notice the change. The mac address provided
> by
> xen is like a default mac address of a real card, and can be changed
> (until the next reboot of the domU). Maybe some script in you domU
> system do this change during boot?
> 
> Anyway, the udev system may persistently link mac addresses and
> device
> names (i.e. eth0, eth1). Take a look
> at /etc/udev/rules.d/70-persistent-net.rules or something like this.
 

Hi Tamas,


I don't have "70-persistent-net.rules" here.


# ls /etc/udev/rules.d/
020_permissions.rules       z25_persistent-net.rules
025_libgphoto2.rules        z45_persistent-net-generator.rules
025_libsane.rules           z50_run.rules
udev.rules                  z55_hotplug.rules
xen-backend.rules           z60_alsa-utils.rules
z20_persistent-input.rules  z60_xserver-xorg-input-wacom.rules
z20_persistent.rules        z75_cd-aliases-generator.rules
z25_persistent-cd.rules     z99_hal.rules
* end *


# cat /etc/udev/rules.d/z25_persistent-net.rules
....
# PCI device 0x10de:0x0373 (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0e:a6:f9:a3:5b",
NAME="eth0"
* end *


There is only ONE NIC here.


$ cat /etc/udev/rules.d/z45_persistent-net-generator.rules
# These rules generate rules to keep network interface names unchanged
# across reboots write them to
/etc/udev/rules.d/z25_persistent-net.rules.
#
# The default name for this file is z45_persistent-net-generator.rules.

ACTION!="add",                         
GOTO="persistent_net_generator_end"
SUBSYSTEM!="net",                      
GOTO="persistent_net_generator_end"

# ignore the interface if a name has already been set
NAME=="?*",                            
GOTO="persistent_net_generator_end"

# ignore "secondary" raw interfaces of the madwifi driver
KERNEL=="ath*", ATTRS{type}=="802",    
GOTO="persistent_net_generator_end"

# provide nice comments for the generated rules
SUBSYSTEMS=="pci", \
 ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}"
SUBSYSTEMS=="usb", \
 ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}"
SUBSYSTEMS=="ieee1394", \
 ENV{COMMENT}="Firewire device $attr{host_id}"
SUBSYSTEMS=="xen", \
 ENV{COMMENT}="Xen virtual device"
ENV{COMMENT}=="", \
 ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})"
ATTRS{driver}=="?*", \
 ENV{COMMENT}="$env{COMMENT} ($attr{driver})"

# ignore interfaces without a driver link like bridges and VLANs
KERNEL=="eth*|ath*|wlan*|ra*|sta*", DRIVERS=="?*",\
        IMPORT{program}="write_net_rules $attr{address}"

ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"

LABEL="persistent_net_generator_end"
* end *


B.R.
Stephen 



Send instant messages to your online friends http://uk.messenger.yahoo.com 

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

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