Cannot read MAC in a Zone Container

Hi,

I have an app which reads MAC address. I read that Solaris 10 8/07 offers the solution to set MAC address for each container but I cannot find how to do that in any docs I found on Sun :frowning: do you know how ?

True that installed I only have Solaris 10 5/08. In a container zone it generates errors:

bash-3.00# ifconfig -a
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 172.16.151.101 netmask ffffff00 broadcast 172.16.151.255

bash-3.00# ./myapp
open device fail = /dev/e1000g
Error:[Error] Can't get any mac address infomation. check your network card.

bash-3.00# ls -al /dev/e1000g*
crw-rw-rw- 1 root root 87, 1 Feb 24 18:21 /dev/e1000g0
bash-3.00#

The network card is e1000g0 not e1000g

Logged in as global:
[X4200-Sol10(root):/dev] ls -al e1000g*
lrwxrwxrwx 1 root root 32 Aug 21 2008 e1000g -> ../devices/pseudo/clone@0:e1000g
lrwxrwxrwx 1 root root 56 Aug 21 2008 e1000g0 -> ../devices/pci@0,0/pci1022,7450@1/pci8086,1011@1:e1000g0
lrwxrwxrwx 1 root root 58 Aug 21 2008 e1000g1 -> ../devices/pci@0,0/pci1022,7450@1/pci8086,1011@1,1:e1000g1
lrwxrwxrwx 1 root root 56 Aug 21 2008 e1000g2 -> ../devices/pci@0,0/pci1022,7450@1/pci8086,1011@2:e1000g2
lrwxrwxrwx 1 root root 58 Aug 21 2008 e1000g3 -> ../devices/pci@0,0/pci1022,7450@1/pci8086,1011@2,1:e1000g3

When I created the zone:
zonecfg:xenon-zone> add net
zonecfg:xenon-zone:net> set address=172.16.151.101
zonecfg:xenon-zone:net> set physical=e1000g0
zonecfg:xenon-zone:net> end
zonecfg:xenon-zone> add device
zonecfg:xenon-zone:device> set match=/dev/e1000g0
zonecfg:xenon-zone:device> end

Thanks,
Bianca

go for the latest solaris 10 (11/08 aka update 6) release and use the "ip-instance=exclusiv" in your zone configuration.

Solaris 10 8/07: Exclusive-IP Non-Global Zones (System Administration Guide: Solaris Containers-Resource Management and Solaris Zones) - Sun Microsystems

don't know if this solves your problem, but you can give it a try...

btw. your solaris release is newer then 8/07 ;).

Thanks. I really thought that I had an older version ... as I didn;t know how Solaris updates are named.

Bianca

have a look at:

# cat /etc/release
                       Solaris 10 10/08 s10x_u6wos_07b X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 27 October 2008