Hello, i need read mac address in /etc/xend/scripts/vif-bridge but in this file i can only read ip and vif how can i read mac address on this file? thanks, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Aug 30, 2011 at 03:14:40PM +0430, Farshid Hajizeinalabedin wrote:> Hello, > i need read mac address in /etc/xend/scripts/vif-bridge but in this file i > can only read ip and vif how can i read mac address on this file? > thanks,Well, you know the vif name, so use "ifconfig" or "ip" commands to get the mac? -- Pasi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Aug 30, Pasi Kärkkäinen wrote:> On Tue, Aug 30, 2011 at 03:14:40PM +0430, Farshid Hajizeinalabedin wrote: > > Hello, > > i need read mac address in /etc/xend/scripts/vif-bridge but in this file i > > can only read ip and vif how can i read mac address on this file? > > thanks, > > Well, you know the vif name, so use "ifconfig" or "ip" commands to get the mac?Its provided in the /sys/class/net/${vif}/address file. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sat, Sep 03, Farshid Abediny wrote:> Hello Olaf, > but in that file did not put correct mac it is like : e:ff:ff:ff:ff:ffDoes ''ip a'' or ''ifconfig -a'' show a different MAC address for your interface? Olaf> On Tue, Aug 30, 2011 at 5:53 PM, Olaf Hering <olaf@aepfle.de> wrote: > > On Tue, Aug 30, Pasi Kärkkäinen wrote: > > > On Tue, Aug 30, 2011 at 03:14:40PM +0430, Farshid Hajizeinalabedin wrote: > > > Hello, > > > i need read mac address in /etc/xend/scripts/vif-bridge but in this > file i > > > can only read ip and vif how can i read mac address on this file? > > > thanks, > > > > Well, you know the vif name, so use "ifconfig" or "ip" commands to get > the mac? > > Its provided in the /sys/class/net/${vif}/address file. > > Olaf > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sat, Sep 03, Farshid Abediny wrote:> Hello, > yes it is, > and also i am using solusvm (solusvm.com) > can you guide me how can i find mac ?Please keep Xen-devel@lists.xensource.com in cc list. Please post the output from your systems. ''ip a'' and ''head /sys/class/net/*/address '' from dom0 and from the domU. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sat, 2011-09-03 at 13:12 +0100, Olaf Hering wrote:> On Sat, Sep 03, Farshid Abediny wrote: > > > Hello, > > yes it is, > > and also i am using solusvm (solusvm.com) > > can you guide me how can i find mac ? > > Please keep Xen-devel@lists.xensource.com in cc list. > > Please post the output from your systems. > ''ip a'' and ''head /sys/class/net/*/address '' from dom0 and from the domU.The mac address of a vifX.Y device in dom0 is almost always fe:ff:ff:ff:ff. This is the largest valid MAC address and is chosen because the bridge will take on the lowest MAC of all it''s ports under some circumstances so using fe:..... ensures it is never the MAC of a VIF. Presumably the original poster wants the MAC of the ethX device within the guest? /etc/xen/scripts/vif-nat has an example of how to do this: # grep mac /etc/xen/scripts/vif* /etc/xen/scripts/vif-nat: mac=$(xenstore_read "$XENBUS_PATH/mac") Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel