Difference between revisions of "Virtual nics omnios"
From Asenjo
(Created page with "Category:Omnios using crossbow (nice when you only have 1 phys nic, so from inside the non-global zones you can up/down/configure it) https://blogs.oracle.com/mandalika/...") |
|||
Line 49: | Line 49: | ||
obviously we have no phys link, so now dladm show-phys, the rest is the same | obviously we have no phys link, so now dladm show-phys, the rest is the same | ||
− | <code>< | + | <code><pre> |
# dladm show-link | # dladm show-link | ||
LINK CLASS MTU STATE BRIDGE OVER | LINK CLASS MTU STATE BRIDGE OVER |
Revision as of 14:38, 13 June 2014
using crossbow (nice when you only have 1 phys nic, so from inside the non-global zones you can up/down/configure it)
https://blogs.oracle.com/mandalika/entry/controlling_virtual_network_interfaces_in
http://en.wikipedia.org/wiki/OpenSolaris_Network_Virtualization_and_Resource_Control
1st, get the real nic on the system
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
bge0 Ethernet up 1000 full bge0
then create a vnic on top of that
# dladm create-vnic -l bge0 vnic1
check it's there:
# dladm show-vnic
LINK OVER SPEED MACADDRESS MACADDRTYPE VID
vnic1 bge0 1000 2:8:20:ae:f6:c0 random 0
create a zone and assign it the new vnic:
global # zonecfg -z sapacc
sapacc: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:sapacc> create
zonecfg:sapacc> set zonepath=/export/zones/sapacc
zonecfg:sapacc> set autoboot=false
zonecfg:sapacc> set ip-type=exclusive
zonecfg:sapacc> add net
zonecfg:sapacc:net> set physical=vnic1
zonecfg:sapacc:net> end
zonecfg:sapacc> verify
zonecfg:sapacc> commit
zonecfg:sapacc> exit
install the zone, boot it, and then log in and configure the vnic using the instructions on http://omnios.omniti.com/wiki.php/GeneralAdministration
obviously we have no phys link, so now dladm show-phys, the rest is the same
# dladm show-link
LINK CLASS MTU STATE BRIDGE OVER
vnic1 vnic 1500 up -- ?
and finally:
# ifconfig vnic1
vnic1: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 3
inet 192.168.0.173 netmask ffffff00 broadcast 192.168.0.255
ether 2:8:20:ae:f6:c0
yes, using dhcp with just one phys nic in the omnios host