- 论坛徽章:
- 2
|
回复 4# yulemi
示例 19-3 通过创建区域和 VNIC 配置基本虚拟网络
本示例整合了以前提供的用于创建区域和 VNIC 以配置虚拟网络的所有步骤。该示例使用 zone1 作为样例区域
该示例基于以下假定:
VNIC:vnic1
区域名称:zone1
区域主目录:/home/export/zone-name。
VNIC 区域指定:vnic1 指定给 zone1
IP 地址:vnic1 使用 192.168.3.80
物理接口 IP 地址:192.168.3.70
路由器地址:192.168.3.25
global# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet unknown 1000 full bge0
global# dladm show-lnk
LINK CLASS MTU STATE BRIDGE OVER
net0 phys 1500 up -- --
net1 phys 1500 unknown -- --
global# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
global # ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/? static ok 127.0.0.1/8
net0/v4addr static ok 192.168.3.70/24
global # dladm create-vnic -l net0 vnic1
global # dladm show-vnic
LINK OVER SPEED MACADDRESS MACADDRTYPE
vnic1 net0 1000 Mbps 2:8:20:5f:84:ff random
global # ipadm create-ip vnic1
global # ipadm create-addr -T static -a 192.168.3.80/24 vnic1/v4address
global # ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/? static ok 127.0.0.1/8
net0/v4addr static ok 192.168.3.70/24
vnic1/v4address static ok 192.168.3.80/24
global # cat /etc/hosts
::1 localhost
127.0.0.1 localhost
192.168.3.70 loghost #For net0
192.168.3.80 zone1 #using vnic1
global # zonecfg -z zone1
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/export/home/zone1
zonecfg:zone1> seet autoboot=true
zonecfg:zone1> set ip-type=exclusive
zonecfg:zone1> add net
zonecfg:zone1:net> set physical=vnic1
zonecfg:zone1:net> end
zonecfg:zone1> verify
zonecfg:zone1> info
zonename: zone1
zonepath: /export/home/zone1
brand: native
autoboot: true
net:
address not specified
physical: vnic1
zonecfg:zone1> commit
zonecfg:zone1> exit
global#
global# zoneadm -z zone1 verify
WARNING: /export/home/zone1 does not exist, so it could not be verified.
When 'zoneadm install' is run, 'install' will try to create
/export/home/zone1, and 'verify' will be tried again,
but the 'verify' may fail if:
the parent directory of /export/home/zone1 is group- or other-writable
or
/export/home/zone1 overlaps with any other installed zones.
global# zoneadm -z zone1 install
Preparing to install zone
Creating list of files to copy from the global zone.
.
.
Zone is initialized.
global# zoneadm list -iv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- zone1 installed /export/home/zone1 native excl
global# zoneadm -z zone1 boot
global# zoneadm list -v
ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 zone1 running /export/home/zone1 native excl
zlogin -C zone1
What type of terminal are you using?
.
.
.
Sun Workstation
9) Televideo 910
10) Televideo 925
11) Wyse Model 50
12) X Terminal Emulator (xterms)
13) CDE Terminal Emulator (dtterm)
14) Other
Type the number of your choice and press Return: 13
.
(More prompts)
..根据系统提示提供信息。提供以下网络信息:
Hostname: zone1
IP address: 192.168.3.80
System part of a subnet: Yes
Netmask: 255.255.255.0
Enable IPv6: No
Default route: 192.168.3.70
Router IP address: 192.168.3.25接下来的步骤
您可以使用各种工具观察网络通信流量和获得区域使用情况的统计数据。
这个是官方的文档;不过没有10下面的详细,没办法;只有这样的! |
|