How to network in a boxchinese.docx
- 文档编号:23439451
- 上传时间:2023-05-17
- 格式:DOCX
- 页数:34
- 大小:40.76KB
How to network in a boxchinese.docx
《How to network in a boxchinese.docx》由会员分享,可在线阅读,更多相关《How to network in a boxchinese.docx(34页珍藏版)》请在冰豆网上搜索。
Howtonetworkinaboxchinese
如何脚本的OracleSolaris11区域网络在a-Box的配置创建
November20112011年11月
byJeffMcMeekin杰夫McMeekin
Throughthis"network-in-a-box"example,learnhowtoefficientlycreateOracleSolarisZonesbycloningthemandusescriptstosetupavirtualnetwork.通过这种“网络在一个盒”的例子,学习如何有效地通过克隆他们创建的OracleSolaris区域,并使用脚本来设置一个虚拟的网络。
Introduction简介
ThisarticleexplainshowtoscriptthecreationofOracleSolarisZoneswithanemphasisonnetworkconfiguration.本文介绍了如何编写脚本创建的OracleSolaris网络配置的重点区域。
ItcovershowtomostefficientlycreateOracleSolarisZones,whichisthroughcloningthem,andhowtoconfigurenetworkinginterfacesformaximumflexibilitysotheOracleSolarisZonescanbemigratedbetweensystems.它涵盖了如何最有效地创建的OracleSolaris区域,通过克隆他们,以及如何配置网络接口,所以可以在系统之间迁移的OracleSolaris区域最大的灵活性。
OTNisallabouthelpingyoubecomefamiliarenoughwithOracletechnologiestomakeaninformeddecision.OTN是所有帮助你变得足够熟悉Oracle技术做出明智的决定。
Articles,softwaredownloads,documentation,andmore.文章,软件下载,文档,以及更多。
Joinupandgetthetechnicalresourcesyouneedtodoyourjob.注册并获得您需要的技术资源,做你的工作。
Example:
NetworkinaBox例如:
在箱网
OracleSolaris11providesnewnetworkingfeaturesfornetworkvirtualization.OracleSolaris11提供网络虚拟化的的新的网络功能。
Networkvirtualizationtakesservervirtualizationtothenextlevelbyprovidingtheabilitytovirtualizeentirenetworktopologiesofservers,routers,switches,andfirewallsallrunningonasingleplatformandrequiringnoadditionalinvestmentinnetworkinghardware.网络虚拟化提供整个网络的虚拟化能力的服务器虚拟化到一个新的水平的拓扑结构,服务器,路由器,交换机,以及所有在单一平台上运行,无需额外投资在网络硬件的防火墙。
Networkvirtualizationcanbeusedforavarietyofpurposes,fromprototyping,todevelopingandtesting,toservicedeployment.网络虚拟化,可用于多种用途,从原型开发和测试,部署服务。
Inthefollowingexamplewewillwalkthroughcreatinganentirenetworktopologythatwillruninasinglesystem.在下面的例子中,我们将通过创建一个完整的网络拓扑结构,将运行在一个单一的系统。
Figure1showsanexampleofamultitieredapplication.图1显示了一个多层应用程序的例子。
Inthisexample,therearetwoWebserversrunningondedicatedsystemsthatareexposedtotheexternalnetwork,andthereareseveraldatabaseserversrunningondedicatedsystemsthatarenotdirectlyconnectedtotheexternalnetwork.在这个例子中,有两个Web服务器暴露在外部网络的专用系统上运行,并有几个不直接连接到外部网络上的专用系统上运行的数据库服务器。
Figure1.图1。
NetworktoBeVirtualizedonaSingleServer在一台服务器虚拟化的网络
AgoodplacetostarttheprocessofconfiguringthisphysicalscenarioonasingleOracleSolaris11system,wouldbetonamealltheentitiesthatwemustconfigure.一个良好的开端上配置一个OracleSolaris11系统的物理情景的过程中,将名称,我们必须配置的所有实体。
Sowewillredrawthediagramasavirtualscenario,asshowninFigure2,withanemphasisonallthecomponentandinterfacenamesand,whereappropriate,IPaddresses.因此,我们将重绘作为一个虚拟场景图,如图2所示,强调所有的组件和接口名称,并在适当情况下,IP地址。
Figure2.图2。
ConvertingfromaPhysicalTopologytoaVirtualNetwork-In-a-BoxTopology从物理拓扑转换为一个虚拟网络中的a-Box的拓扑
TheWebserversshareaback-endetherstubcalledwebswitch0intheFigure2.Web服务器共享后端etherstub称为webswitch0在图2。
Technically,anetherstubisnotavirtualswitch,buteffectivelyitallowsaswitchtobecreated.从技术上讲,etherstub是不是一个虚拟交换机,但有效的,它允许创建一个开关。
Solabelinganetherstubasaswitchmakesthediagramclearwithoutaddingextradetails.因此,标签etherstub作为一个开关,无需添加额外的细节图。
Thedatabaseserversalsoshareaback-endetherstub,labeleddbswitch0.数据库服务器共享后端etherstub,dbswitch0标记。
ThenetworkwillbeconfiguredsothedatabaseserversrunningindedicatedOracleSolarisZones(zdb1,zdb2,andzdb3)havenodirectaccesstothephysicalnetwork,whichsecurelyinsulatesthemfromoutsidecommunications.该网络将配置,所以数据库服务器运行在专用的OracleSolaris区域(zdb1,zdb2,zdb3)不能直接访问到物理网络,安全隔离外界的通信。
Thesinglephysicalinterfaceisrepresentedinthisexampleasnet0.单个物理接口是代表在这个例子作为NET0。
Forthevphys1andvphys2VNICaddresses,youshoulduseaddressesthatareknownoutsidethevphyssubnet(129.200.9)ifyouareactuallygoingtoinstallaWebserverinthezweb1andzweb2zones.对于vphys1和vphys2VNIC地址,你应该使用外vphys子网(129.200.9)如果你要安装一个Web服务器在zweb1zweb2区的地址。
Step1:
CreatetheEtherstubs第1步:
创建Etherstubs
Inthisstep,wecreatethetwoetherstubsthatareusedtoenablecommunicationbetweenthedatabasezonesandbetweentheWebserverzonesshowninFigure2.在这一步,我们创建了两个用于etherstubs,使数据库之间的区域,如图2所示的Web服务器区之间的沟通。
Let'sstartbylookingatthephysicalnetwork:
让我们先通过物理网络:
#dladmshow-phys#dladm显示物理学
LINKMEDIASTATESPEEDDUPLEXDEVICELINK媒体状态速双工设备
net0Ethernetup1000fullbge0NET0以太网高达1000全bge0
Forthissystem,thereisonlyonephysicalinterface,bge0.对于这个系统,只有一个物理接口,bge0。
Notethatthelinknameisnet0.请注意,链接的名称是net0。
Bydefault,OracleSolaris11createsalinknamednet0forthefirstphysicalinterface,onenamednet1forthesecondphysicalinterface,andsoon.默认情况下,Oracle的Solaris11中创建的第一个物理接口命名为NET0一个环节,一个命名为第二个物理接口NET1等。
ThisisausefulsimplificationbecausewenolongerhavetoworryabouttheactualphysicalNIChardwareandthelinknamesforvarioushardwareplatforms.这是一个有用的简化,因为我们再也不用担心实际物理NIC硬件和各种硬件平台的链接名称。
Whenwewanttoconfigureanythingtodowiththisphysicalinterface,wewillusenet0.当我们要配置什么做这个物理接口,我们将使用NET0。
Westartbycreatingtwoetherstubsthatwillenablethevirtualswitchingtooccurtomatchourdiagramedarchitecture:
我们开始创建两个etherstubs,使虚拟交换发生,以配合我们的框图如下架构:
#dladmcreate-etherstubwebswitch0#dladm创建etherstubwebswitch0
#dladmcreate-etherstubdbswitch0#dladm创建etherstubdbswitch0
InOracleSolaris11,eachOracleSolarisZonecomeswithaVNICalreadyenabled,thatis,anothernet0.在OracleSolaris11中,每个OracleSolaris区域已经启用了VNIC,就是另一个NET0。
Forthepurposesofthisexample,wenametheVNICsinFigure2toreflecttheirplaceintheoverallarchitecture.对于这个例子的目的,我们在图2中的VNICs,以反映其在整体架构中的地位。
Soratherthanlabelalltheinterfacesinthediagramnet0,net1,andsoon,weusemoredescriptivenames,suchasvdb1,vdb2,andsoon.因此,而不是标签所有接口在图NET0,NET1,等等,我们使用更具描述性的名称,例如作为vdb1vdb2,等等。
Thereisalargerissuehere:
whetherornottodefinetheVNICsintheglobalzone.这里有一个更大的问题:
是否要在全局区域中定义的VNICs。
InthepreviousOracleSolaris11Expressrelease,youhadtodefinealltheVNICsfromtheglobalzone.在以前的OracleSolaris11Express发行版,你必须定义所有的VNICs从全局区域。
Inthiscase,therearenineVNICs,sotherewouldbeninedladmcreate-vnicstatements.在这种情况下,有9个VNICs,所以将有9个dladm创建VNIC陈述。
However,withanemphasisonbuildingfordynamicenvironmentsinwhichOracleSolarisZonescanbemigratedbetweensystems,amuchbetterapproachtoVNICcreationistocreatetheVNICsusedbyazoneinthatzone.然而,与OracleSolaris区域的,可以在系统之间迁移的动态环境建设为重点,VNIC创造一个更好的方法是创建在该区域的区域使用VNICs。
Whenthezonegoesaway,theVNICsgoaway.当区消失,VNICs消失。
Evenmoreimportant,whenthezoneismigratedtoanothersystem,thezonecarriestheinformationabouttheinterfacesitexpects.更重要的是,区域时,迁移到另一个系统,区进行有关的接口,它预计的信息。
Inourexample,theglobalzonedoesneedtoprovidesomethings,forexample,theetherstubsaredefinedintheglobalzone.在我们的例子中,全局区域并需要提供一些东西,例如,etherstubs是定义在全局区域。
Buttherestofthenetworkingconfigurationisdynamicbecausetheconfigurationiscarriedwithintheindividualnon-globalzones,nottheglobalzone.但其余的网络配置是动态的,因为个别非全局区域,而不是全局区域内进行配置。
Afterconfiguringalltheetherstubs,checkthesetup:
配置所有的etherstubs后,请检查设置:
#dladmshow-etherstub-Z#dladm显示etherstub-Z
LINKZONELINK区
dbswitch0globaldbswitch0全球
webswitch0globalwebswitch0全球
Step2:
CreatetheZFSPoolforStoringtheOracleSolarisZones第2步:
创建ZFS池,用于存储在OracleSolaris区域
WearegoingtocreateasingleOracleSolarisZoneandthen,toreducethetimetocreateadditionalones,wewillclonethefirsttomakethezonesneededforourexample.我们将建立一个单一的OracleSolaris区域,然后,以减少时间,以创造更多的的,我们将克隆首先要使我们的例子中所需要的区域。
ClonedzonesrequiresharingaZFSdataset,socreatingthedatasetisthefirststep:
克隆区域需要共享的ZFS数据集,数据集的第一步是:
#zfscreate-omountpoint=/zonefsrpool/zonefs创建-O#ZFS挂载点=/zonefsrpool/zonefs
#chmod700/zonefs#CHMOD700/zonefs
Step3:
CreateanOracleSolarisZoneforCloning第三步:
创建一个OracleSolaris区域进行克隆
WithOracleSolaris11,itismuchfastertocloneanOracleSolarisZonethantocreateonefromscratch,becausebuildinganimagefrompackagestakeslongerthan,inessence,copyinganexistingzone.使用OracleSolaris11中,这是克隆的OracleSolaris区域比从头开始创建一个更快的,因为建设从包图像花费的时间比在本质上,复制一个现有的区域。
Duringthecreationofthefirstzone,thereisanOracleSolaris11optimizationthatcausesthepackagestobecachedonthelocalsystem,sosubsequentzonecreationdoesnotnecessarilyinvolvethepackagerepository.期间创造的第一个区域,是导致的包缓存在本地系统上的OracleSolaris11的优化,所以随后的区域创建不一定涉及包库。
Evenwiththatoptimization,cloningisstillfaster.即使与优化,克隆仍然较快。
WewillusethecloningtechniqueinthisexampletofirstcreateoneOracleSolarisZoneandthencloneitsixtimes.在这个例子中,我们将使用克隆技术,首先创建一个OracleSolaris区域,然后克隆它的六倍。
First,configuretheOracleSolarisZonewewillclone,zclone,asfollows:
首先,配置OracleSolaris区域,zclone,我们将克隆如下:
#zonecfg-zzclone#使用zonecfg-Zzclone
zclone:
Nosuchzoneconfiguredzclone:
没有这样的区域配置
Use'create'tobeginconfiguringanewzone.使用'创建'开始配置一个新的区域。
zonecfg:
zclone>create使用zonecfg:
zclone>创建
create:
Usingsystemdefaulttemplate'SYSdefault'创建:
使用系统默认模板“SYSdefault
zonecfg:
zclone>setzonepath=/zonefs/zclone使用zonecfg:
zclone>设置的zonepath=/zonefs/zclone
zonecfg:
zclone>setip-type=exclusive使用zonecfg:
zclone>设置IP类型=独家
zonecfg:
zclone>verify使用zonecfg:
zclone>验证
zonecfg:
zclone>commit使用zonecfg:
zclone>提交
zonecfg:
zclone>exit使用zonecfg:
zclone>退出
Thedefaultsettingforip-typeforOracleSolaris11isnowexclusive,meaningeachOracleSolarisZonehasitsownIPstack.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- How to network in boxchinese