Since last June I have been working on IP Instances project (part of Crossbow ), which we
put back into Nevada on Jan 19/20 (depends on what part of the little earth you stand on)
and backported to S10u4 just recently. My boss, Markus has mentioned it on his blog on
Jan 22
For information on IP Instances, we have two excellent documentations, they are:
IP Instances Overview and Usage Document
and
IP Instances Internal Design Document
(Our Architect, Erik Nordmark wrote them, though my name is listed in the first one, what I
wrote is just a tiny tiny part :-) )
Basically, w.r.t user experience, the most interesting part of IP Instances is that a zone
can own it's own network interfaces, so even in a zone, one can play with network interfaces
just like on a physical machine.
With IP Instances, now we have two types of zones:
shared-IP zones: today's S10 behavior
exclusive-IP zones: new, introduced by IP Instances project
If you look at the output of zonecfg info, you will find a new property:
ip-type
which could be "shared" or "exclusive", correspond to shared-IP zones and exclusive-IP zones.
The Syntax of zone network configuration has been changed. Now what zonecfg does for an
exclusive-IP zone is only assigning interfaces, the network setup is done INSIDE the zone,
just like what we do for a physical machine, that is, now it is the job/right of the non-global
zone root to play with it.
Here's an example: machine with bge0 and bge1 configuring zone test0 to use bge1.
zonecfg -z test0
test0: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test0> create
zonecfg:test0> set zonepath=/export/test0
zonecfg:test0> set ip-type=exclusive
zonecfg:test0> add net
zonecfg:test0:net> set physical=bge1
zonecfg:test0:net> end
zonecfg:test0> exit
Then a zoneadm -z test0 install and zoneadm -z test0 boot
Then zlogin -C test0 to the zone test0's console and go through the set up process.
!Note: only GLDv3 drivers work with exclusive-IP zones at this time, sorry about that. :-(
But, you don't have to wait a long time, since with Nemo Unification and Vanity Naming of Clearview integrated in the near
future, we will be able to support all drivers.
To set up an exclusive-IP zone is the same as the global zone, and the most easy way will
be using sysidcfg, once you install the zone, or done a sys-unconfig in the zone, you can put
a file named sysidcfg
under the zone's /etc directory, with contents like this:
system_locale=C
terminal=xterms
security_policy=NONE
root_password="encrypted_password(same as the one will be in shadow)"
nfs4_domain="your nfs domain"
name_service=NIS{
domain_name="your nis domain"
name_server="name_server's name(name_server's ip)"
}
timezone="your time zone"
network_interface=primary
{hostname="name of the zone"
default_route="default route"
ip_address="ip address of the interface"
netmask="net mask of the interface"
protocol_ipv6="yes or no"}
And boot the zone, you will then have a working zone with everything setup!
Now, zlogin to the zone, and you can just do anything you like:
ifconfig bge1 plumb/unplumb/up/down/...
snoop -d bge1
etc...
One thing, in zonecfg you can also set physical to a VLAN, say, bge33001, then when the zone
boots, that VLAN will be created on the fly for the zone, and the set up process will be the
same as for a physical network interface...
Isn't it just fun?
put back into Nevada on Jan 19/20 (depends on what part of the little earth you stand on)
and backported to S10u4 just recently. My boss, Markus has mentioned it on his blog on
Jan 22
For information on IP Instances, we have two excellent documentations, they are:
IP Instances Overview and Usage Document
and
IP Instances Internal Design Document
(Our Architect, Erik Nordmark wrote them, though my name is listed in the first one, what I
wrote is just a tiny tiny part :-) )
Basically, w.r.t user experience, the most interesting part of IP Instances is that a zone
can own it's own network interfaces, so even in a zone, one can play with network interfaces
just like on a physical machine.
With IP Instances, now we have two types of zones:
shared-IP zones: today's S10 behavior
exclusive-IP zones: new, introduced by IP Instances project
If you look at the output of zonecfg info, you will find a new property:
ip-type
which could be "shared" or "exclusive", correspond to shared-IP zones and exclusive-IP zones.
The Syntax of zone network configuration has been changed. Now what zonecfg does for an
exclusive-IP zone is only assigning interfaces, the network setup is done INSIDE the zone,
just like what we do for a physical machine, that is, now it is the job/right of the non-global
zone root to play with it.
Here's an example: machine with bge0 and bge1 configuring zone test0 to use bge1.
zonecfg -z test0
test0: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test0> create
zonecfg:test0> set zonepath=/export/test0
zonecfg:test0> set ip-type=exclusive
zonecfg:test0> add net
zonecfg:test0:net> set physical=bge1
zonecfg:test0:net> end
zonecfg:test0> exit
Then a zoneadm -z test0 install and zoneadm -z test0 boot
Then zlogin -C test0 to the zone test0's console and go through the set up process.
!Note: only GLDv3 drivers work with exclusive-IP zones at this time, sorry about that. :-(
But, you don't have to wait a long time, since with Nemo Unification and Vanity Naming of Clearview integrated in the near
future, we will be able to support all drivers.
To set up an exclusive-IP zone is the same as the global zone, and the most easy way will
be using sysidcfg, once you install the zone, or done a sys-unconfig in the zone, you can put
a file named sysidcfg
under the zone's /etc directory, with contents like this:
system_locale=C
terminal=xterms
security_policy=NONE
root_password="encrypted_password(same as the one will be in shadow)"
nfs4_domain="your nfs domain"
name_service=NIS{
domain_name="your nis domain"
name_server="name_server's name(name_server's ip)"
}
timezone="your time zone"
network_interface=primary
{hostname="name of the zone"
default_route="default route"
ip_address="ip address of the interface"
netmask="net mask of the interface"
protocol_ipv6="yes or no"}
And boot the zone, you will then have a working zone with everything setup!
Now, zlogin to the zone, and you can just do anything you like:
ifconfig bge1 plumb/unplumb/up/down/...
snoop -d bge1
etc...
One thing, in zonecfg you can also set physical to a VLAN, say, bge33001, then when the zone
boots, that VLAN will be created on the fly for the zone, and the set up process will be the
same as for a physical network interface...
Isn't it just fun?

发表于 William Hathaway 在 2007年05月05日, 03:20 上午 CST #
发表于 Donghai 在 2007年05月27日, 05:19 下午 CST #