1. List all links on the system
# dladm show-link
LINK CLASS MTU STATE OVER
e1000g0 phys 1500 up --
e1000g2 phys 1500 unknown --
e1000g3 phys 1500 unknown --
e1000g1 phys 1500 up --
vnic1 vnic 1500 up e1000g0
vnic2 vnic 1500 up e1000g0

2. Create a VNIC on a physical interface
# dladm create-vnic -l e1000g1 vnic3
# dladm create-vnic -l e1000g0 vnic4

3. List all links
# dladm show-link
LINK CLASS MTU STATE OVER
e1000g0 phys 1500 up --
e1000g2 phys 1500 unknown --
e1000g3 phys 1500 unknown --
e1000g1 phys 1500 up --
vnic1 vnic 1500 up e1000g0
vnic2 vnic 1500 up e1000g0
vnic3 vnic 1500 up e1000g1
vnic4 vnic 1500 up e1000g0

4. List only VNICs
# dladm show-vnic
LINK OVER SPEED MACADDRESS MACADDRTYPE VID
vnic1 e1000g0 1000 2:8:20:2d:f4:fb random 1
vnic2 e1000g0 1000 2:8:20:32:9:10 random 0
vnic3 e1000g1 1000 2:8:20:15:4:e5 random 0
vnic4 e1000g0 1000 2:8:20:71:ff:bd random 0

5. Create a local zone
# mkdir -p /export/zones/sapzone
# chmod 700 /e# zonecfg -z sapzone
sapzone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:sapzone> create
zonecfg:sapzone> set zonepath=/export/zones/sapzone
zonecfg:sapzone> set autoboot=true
zonecfg:sapzone> set ip-type=exclusive
zonecfg:sapzone> add net
zonecfg:sapzone:net> set physical=vnic3
zonecfg:sapzone:net> end
zonecfg:sapzone> verify
zonecfg:sapzone> commit
zonecfg:sapzone> info
zonename: sapzone
zonepath: /export/zones/sapzone
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address not specified
physical: vnic3
defrouter not specified
zonecfg:sapzone> exit

# zoneadm -z sapzone install
# zoneadm -z sapzone boot

# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
9 sapzone running /export/zones/sapzone native excl

# zlogin -C sapzone

Host name: sapzone
IP address: 10.6.221.18
System part of a subnet: Yes
Netmask: 255.255.255.0
Enable IPv6: No
Default Route: Detect one upon reboot

root password: empass12

# cat /etc/hosts
::1 localhost
127.0.0.1 localhost
10.6.221.18 sapzone loghost
129.146.44.59 nfsserver
10.6.221.135 scsSID
10.6.221.138 dbSID

# hostname
sapzone
# zonename
sapzone

# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic3: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:15:4:e5
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

check the status of network service, make sure the service is in the manual mode
# svcs svc:/network/physical
STATE STIME FMRI
disabled 15:44:30 svc:/network/physical:nwam
online 15:44:36 svc:/network/physical:default

Re-assign vnic to vnic4
# zonecfg -z sapzone
zonecfg:sapzone> remove net
zonecfg:sapzone> add net
zonecfg:sapzone:net> set physical=vnic4
zonecfg:sapzone:net> end
zonecfg:sapzone> verify
zonecfg:sapzone> commit
zonecfg:sapzone> info
zonename: sapzone
zonepath: /export/zones/sapzone
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address not specified
physical: vnic4
defrouter not specified
zonecfg:sapzone> exit

# zoneadm -z sapzone reboot

# zlogin sapzone
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128
# ifconfig vnic4 plumb

# ifconfig vnic4 10.6.221.18 netmask 255.255.255.0 up
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128
# svcs svc:/network/physical
STATE STIME FMRI
disabled 16:07:42 svc:/network/physical:nwam
maintenance 16:07:48 svc:/network/physical:default

# svcadm -v enable -r telnet

# ifconfig vnic4:1 plumb
# ifconfig vnic4:1 10.6.221.135 netmask 255.255.255.0 up
# ifconfig vnic4:2 plumb
# ifconfig vnic4:2 10.6.221.138 netmask 255.255.255.0 up
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
vnic4:1: flags=1000843 mtu 1500 index 2
inet 10.6.221.135 netmask ffffff00 broadcast 10.6.221.255
vnic4:2: flags=1000843 mtu 1500 index 2
inet 10.6.221.138 netmask ffffff00 broadcast 10.6.221.255
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

# echo scsSID > /etc/hostname:vnic4:1
# echo dbSID > /etc/hostname:vnic4:2

Edit /etc/vfstab
nfsserver:/download - /sapnfs nfs - yes soft,rw,bg,vers=3

# mkdir /sapnfs
# mount /sapnfs
# mount |grep sapnfs
/sapnfs on nfsserver:/download remote/read/write/setuid/nodevices/soft/bg/vers=3/xattr/zone=sapzone/dev=6140023 on Fri Apr 3 16:30:04 2009

# uname -a
SunOS sapzone 5.11 snv_111 sun4v sparc SUNW,SPARC-Enterprise-T5220
# file sapacosprep
sapacosprep: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
# file libsapacosprep.so
libsapacosprep.so: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped

# LD_LIBRARY_PATH=/sapacosprep/bin; export LD_LIBRARY_PATH

==== test case ====
# mount |grep sapnfs
/sapnfs on nfsserver:/download remote/read/write/setuid/nodevices/soft/bg/vers=3/xattr/zone=sapzone/dev=6140023 on Fri Apr 3 16:30:04 2009
# ./sapacosprep -a umount -f nfsserver:/download -m /sapnfs -v 1
# mount |grep sapnfs

# ./sapacosprep -a mount -f nfsserver:/download -m /sapnfs -v 1
# mount |grep sapnfs
/sapnfs on nfsserver:/download remote/read/write/setuid/nodevices/soft/bg/vers=3/xattr/zone=sapzone/dev=6140024 on Fri Apr 3 16:38:28 2009

# ./sapacosprep -a ifdown -h scsSID -v 1

# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
vnic4:2: flags=1000843 mtu 1500 index 2
inet 10.6.221.138 netmask ffffff00 broadcast 10.6.221.255
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

# ./sapacosprep -a ifdown -h dbSID -v 1
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

# ./sapacosprep -a ifup -i vnic4 -h scsSID -v 1
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
vnic4:1: flags=1000843 mtu 1500 index 2
inet 10.6.221.135 netmask ff000000 broadcast 10.255.255.255
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

# ./sapacosprep -a ifup -i vnic4 -h dbSID -v 1
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic4: flags=1000843 mtu 1500 index 2
inet 10.6.221.18 netmask ffffff00 broadcast 10.6.221.255
ether 2:8:20:71:ff:bd
vnic4:1: flags=1000843 mtu 1500 index 2
inet 10.6.221.135 netmask ff000000 broadcast 10.255.255.255
vnic4:2: flags=1000843 mtu 1500 index 2
inet 10.6.221.138 netmask ff000000 broadcast 10.255.255.255
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128




Read More about [Create Crossbow VNIC for Container & ACC sapacosprep ...