通过添加 net 或 anet 资源,内核区域可提供对内核区域的网络访问。有关这两种资源类型的详细信息,请参见Oracle Solaris Zones 介绍 中的区域网络接口。
专用 IP 区域必须用于内核区域。有关专用 IP 区域的更多信息,请参见创建和使用 Oracle Solaris 区域 中的专用 IP 区域网络地址。
您可以提供其他 MAC 地址,以支持嵌套区域或内核区域托管非全局 solaris 和 solaris10 标记区域的区域。有关嵌套区域的更多信息,请参见管理嵌套区域。
您可以选择指定网络设备 ID 来在区域内部标识 VNIC 地址和确定网络接口在内核区域中的显示顺序。此过程类似于将 NIC 从一个物理插槽移到另一个物理插槽。
有关如何设置网络区域资源的一般信息,请参见创建和使用 Oracle Solaris 区域 中的第 1 章 如何规划和配置非全局区域。
示例 1-7 将其他网络资源添加到内核区域本示例说明如何将网络资源添加到内核区域 kzone1。将 ID 设置为 3 以确定 anet 接口在内核区域中的显示顺序。
global# zonecfg -z kzone1 zonecfg:kzone1> add anet zonecfg:kzone1:anet> set id=3 global# zonecfg:kzone1:anet> end zonecfg:kzone1> exit示例 1-8 从内核区域中移除网络设备
本示例说明如何从内核区域 kzone1 中移除网络设备。列出有关现有 anet 资源的信息并删除值为 1 的 anet 设备。
global# zonecfg -z kzone1 info anet anet: lower-link: auto allowed-address not specified allowed-dhcp-cids not specified link-protection: mac-nospoof mac-address: random mac-prefix not specified mac-slot not specified vlan-id not specified priority not specified rxrings not specified txrings not specified mtu not specified maxbw not specified rxfanout not specified vsi-typeid not specified vsi-vers not specified vsi-mgrid not specified etsbw-lcl not specified cos not specified id: 0 anet: lower-link: auto allowed-address not specified allowed-dhcp-cids not specified link-protection: mac-nospoof mac-address: default mac-prefix not specified mac-slot not specified vlan-id not specified priority not specified rxrings not specified txrings not specified mtu not specified maxbw not specified rxfanout not specified vsi-typeid not specified vsi-vers not specified vsi-mgrid not specified etsbw-lcl not specified cos not specified id: 1 global# zonecfg -z kzone1 remove anet id=1