Solaris zone with full working NIC

I want a solaris zone,wich can get ip from dhcp external server
i configure my zone

net:
    address not specified
    allowed-address not specified
    configure-allowed-address: true
    physical: vnic1
    defrouter not specified

vnic is linked to net0

dladm
net0                phys      1500   up       --
vnic1               vnic      1500   up       net0
prova2/vnic1        vnic      1500   up       net0

on zone i create vnic1

ipadm create-ip vnic1
ipadm create-addr -T dhcp  vnic1/v4

et voil�...nothing happen :confused:

Can someone help me please?
Thanks

---------- Post updated at 12:25 PM ---------- Previous update was at 12:13 PM ----------

Work with static address..but i can ping only global
zone and no external net
Of course i added route.

Impossible, to my knowledge, in Solaris 10 without an exclusive aka dedicated interface from the Global zone.

Please see:

It shows how to dedicate a physical interface.

We tried to do the same thing you are trying to do and we're not able to accomplish it.

Thanks,tomorrow i will try.

---------- Post updated 31-10-13 at 10:56 AM ---------- Previous update was 30-10-13 at 07:41 PM ----------

I follow this howto

http://www.alekz.net/archives/449

and make
on global zone
# dladm create-vnic -l net0 vnic1

zone is configured

ip-type: exclusive

net:
    address not specified
    allowed-address not specified
    configure-allowed-address: true
    physical: vnic1
    defrouter not specified

booting zone and configure as usual the ip

ipadm create-ip vnic1
ipadm create-addr -T static -a 192.168.0.222/24 vnic1/v4
route add default 192.168.0.1

and...
ping only the global zone :mad:

Can you paste a copy of the zone's xml? (/etc/zones) or

zonecfg -z ZONENAME export

both would do it.

ifconfig -a

and

netstat -rn

from the global and local would also possibly help.

I agree with plmachiavel. unless you set the zone as IP-exclusive and dedicate a physical nic to it you can't use DHCP.

Sure.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN" "file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
    DO NOT EDIT THIS FILE.  Use zonecfg(1M) instead.
-->
<zone name="prova2" zonepath="/raid1/zones/prova2" autoboot="false" brand="solaris" ip-type="exclusive">
  <network physical="vnic1" configure-allowed-address="true"/>
</zone>

globalzoneifconfig -a

 ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
net0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 192.168.0.241 netmask ffffff00 broadcast 192.168.0.255
        ether 8:0:27:a5:af:7f 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128 
net0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 2
        inet6 fe80::a00:27ff:fea5:af7f/10 
        ether 8:0:27:a5:af:7f 

route global zone

 netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              192.168.0.1          UG        2         14 net0      
127.0.0.1            127.0.0.1            UH        2        536 lo0       
192.168.0.0          192.168.0.241        U         7        798 net0            

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
localhost                   localhost                   UH      2      20 lo0   
fe80::/10                   fe80::a00:27ff:fea5:af7f    U       2       0 net0

zoneifconfig -a

ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
vnic1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.0.222 netmask ffffff00 broadcast 192.168.0.255
        ether 2:8:20:17:15:b5 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128 
vnic1: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 2
        inet6 ::/0 
        ether 2:8:20:17:15:b5 

zoneroute

netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              192.168.0.1          UG        1          0           
solaris              solaris              UH        4        292 lo0       
192.168.0.0          192.168.0.222        U         3          3 vnic1     

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
solaris                     solaris                     UH      2       0 lo0 

---------- Post updated 04-11-13 at 04:38 AM ---------- Previous update was 03-11-13 at 09:50 AM ----------

I forgot one important thing...global zone is a virtualbox
guest,probably is this the problem.

You could create a new NIC for the Global and then assign it to the local.

I can't help with virtualbox, I've never used it before. But again, to my opinion, you need a device dedicated to your local to accomplish what you're describing.