forked from docs/doc-exports
Reviewed-by: Muller, Martin <martin.muller@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
37 lines
8.6 KiB
HTML
37 lines
8.6 KiB
HTML
<a name="sfs_01_0038"></a><a name="sfs_01_0038"></a>
|
|
|
|
<h1 class="topictitle1">Configuring DNS</h1>
|
|
<div id="body1490759105013"><p id="sfs_01_0038__p10375093214127">A DNS server is used to resolve domain names of file systems. The DNS server IP address is 100.125.4.25.</p>
|
|
<div class="section" id="sfs_01_0038__section101013319538"><h4 class="sectiontitle">Scenarios</h4><p id="sfs_01_0038__p55316600215729">By default, the IP address of the DNS server used to resolve domain names of file systems is automatically configured on ECSs when creating ECSs. No manual configuration is needed except when the resolution fails due to a change in the DNS server IP address.</p>
|
|
<p id="sfs_01_0038__p11909337165010">Windows Server 2012 is used as an example in the operation procedures for Windows.</p>
|
|
</div>
|
|
<div class="section" id="sfs_01_0038__section60237810114859"><h4 class="sectiontitle">Procedure (Linux)</h4><ol id="sfs_01_0038__ol1581081114912"><li id="sfs_01_0038__li45338061114912"><span>Log in to the ECS as user <strong id="sfs_01_0038__b84235270611308">root</strong>.</span></li><li id="sfs_01_0038__li13553756203149"><a name="sfs_01_0038__li13553756203149"></a><a name="li13553756203149"></a><span>Run the <strong id="sfs_01_0038__b18140232181594">vi /etc/resolv.conf</strong> command to edit the <strong id="sfs_01_0038__b84235270615915">/etc/resolv.conf</strong> file. Add the DNS server IP address above the existing nameserver information. See <a href="#sfs_01_0038__fig3735131720121">Figure 1</a>.</span><p><div class="fignone" id="sfs_01_0038__fig3735131720121"><a name="sfs_01_0038__fig3735131720121"></a><a name="fig3735131720121"></a><span class="figcap"><b>Figure 1 </b>Configuring DNS</span><br><span><img id="sfs_01_0038__image64563695201246" src="en-us_image_0000001567396581.png"></span></div>
|
|
<div class="p" id="sfs_01_0038__p22406822201147">The format is as follows:<pre class="screen" id="sfs_01_0038__screen1852931020934">nameserver 100.125.4.25</pre>
|
|
</div>
|
|
</p></li><li id="sfs_01_0038__li54437320151016"><span>Press <strong id="sfs_01_0038__b51116037112652">Esc</strong>, input <strong id="sfs_01_0038__b58164000112657">:wq</strong>, and press <strong id="sfs_01_0038__b6357507311271">Enter</strong> to save the changes and exit the vi editor.</span></li><li id="sfs_01_0038__li46763803151028"><span>Run the following command to check whether the IP address is successfully added:</span><p><p id="sfs_01_0038__p346907151042"><strong id="sfs_01_0038__b3122170151042">cat /etc/resolv.conf</strong></p>
|
|
</p></li><li id="sfs_01_0038__li912842151110"><span>Run the following command to check whether an IP address can be resolved from the file system domain name:</span><p><p id="sfs_01_0038__p8215585151110"><strong id="sfs_01_0038__b1941612618151321">nslookup </strong><i><span class="varname" id="sfs_01_0038__varname1981592207151321">File system domain name</span></i></p>
|
|
<div class="note" id="sfs_01_0038__note1244325016745"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="sfs_01_0038__p4488038816745">Obtain the file system domain name from the file system mount point.</p>
|
|
</div></div>
|
|
</p></li><li id="sfs_01_0038__li58551120151138"><span>(Optional) In a network environment of the DHCP server, edit the <strong id="sfs_01_0038__b842352706151353">/etc/resolv.conf</strong> file to prevent the file from being automatically modified upon an ECS startup, and prevent the DNS server IP address added in <a href="#sfs_01_0038__li13553756203149">2</a> from being reset.</span><p><ol type="a" id="sfs_01_0038__ol45020311151138"><li id="sfs_01_0038__li2529615151138">Run the following command to lock the file:<div class="litext" id="sfs_01_0038__p22766537151138"><a name="sfs_01_0038__li2529615151138"></a><a name="li2529615151138"></a><strong id="sfs_01_0038__b1195616215467">chattr +i /etc/resolv.conf</strong><div class="note" id="sfs_01_0038__note642232411748"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="sfs_01_0038__p5780092011748">Run the <strong id="sfs_01_0038__b1677135565142529">chattr -i /etc/resolv.conf</strong> command to unlock the file if needed.</p>
|
|
</div></div>
|
|
</div>
|
|
</li><li id="sfs_01_0038__li32150224151138">Run the following command to check whether the editing is successful:<p id="sfs_01_0038__p20916567151138"><a name="sfs_01_0038__li32150224151138"></a><a name="li32150224151138"></a><strong id="sfs_01_0038__b54031380151138">lsattr /etc/resolv.conf</strong></p>
|
|
<p id="sfs_01_0038__p44716069155023">If the information shown in <a href="#sfs_01_0038__fig46855620155120">Figure 2</a> is displayed, the file is locked.</p>
|
|
<div class="fignone" id="sfs_01_0038__fig46855620155120"><a name="sfs_01_0038__fig46855620155120"></a><a name="fig46855620155120"></a><span class="figcap"><b>Figure 2 </b>A locked file</span><br><span><img id="sfs_01_0038__image42821016155223" src="en-us_image_0000001567196417.png"></span></div>
|
|
</li></ol>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="sfs_01_0038__section75976550455"><h4 class="sectiontitle">Procedure (Windows)</h4><ol id="sfs_01_0038__ol74047905217"><li id="sfs_01_0038__li7010700104255"><span>Go to the ECS console and log in to the ECS running Windows Server 2012.</span></li><li id="sfs_01_0038__li47653636104358"><span>Click <span class="uicontrol" id="sfs_01_0038__uicontrol1189257975174532"><b>This PC</b></span> in the lower left corner.</span></li><li id="sfs_01_0038__li25395292416"><span>On the page that is displayed, right-click <span class="uicontrol" id="sfs_01_0038__uicontrol71018140217462"><b>Network</b></span> and choose <span class="uicontrol" id="sfs_01_0038__uicontrol1148255606174622"><b>Properties</b></span> from the drop-down list. The <strong id="sfs_01_0038__b842352706174656">Network and Sharing Center</strong> page is displayed, as shown in <a href="#sfs_01_0038__fig11811485719">Figure 3</a>. Click <span class="uicontrol" id="sfs_01_0038__uicontrol843515849174726"><b>Local Area Connection</b></span>.</span><p><div class="fignone" id="sfs_01_0038__fig11811485719"><a name="sfs_01_0038__fig11811485719"></a><a name="fig11811485719"></a><span class="figcap"><b>Figure 3 </b>Page for network and sharing center</span><br><span><img id="sfs_01_0038__image1152618144612" src="en-us_image_0000001515917256.png"></span></div>
|
|
</p></li><li id="sfs_01_0038__li520013499581"><span>In the <span class="wintitle" id="sfs_01_0038__wintitle1810118853174842"><b>Activity</b></span> area, select <span class="uicontrol" id="sfs_01_0038__uicontrol1585015777174833"><b>Properties</b></span>. See <a href="#sfs_01_0038__fig18980173031015">Figure 4</a>.</span><p><div class="fignone" id="sfs_01_0038__fig18980173031015"><a name="sfs_01_0038__fig18980173031015"></a><a name="fig18980173031015"></a><span class="figcap"><b>Figure 4 </b>Local area connection</span><br><span><img id="sfs_01_0038__image29442016151614" src="en-us_image_0000001516076828.png"></span></div>
|
|
</p></li><li id="sfs_01_0038__li20775101391119"><span>In the <span class="wintitle" id="sfs_01_0038__wintitle2066108848174929"><b>Local Area Connection Properties</b></span> dialog box that is displayed, select <span class="uicontrol" id="sfs_01_0038__uicontrol37060007017501"><b>Internet Protocol Version 4 (TCP/IPv4)</b></span> and click <span class="uicontrol" id="sfs_01_0038__uicontrol494093555175027"><b>Properties</b></span>. See <a href="#sfs_01_0038__fig146301518171620">Figure 5</a>.</span><p><div class="fignone" id="sfs_01_0038__fig146301518171620"><a name="sfs_01_0038__fig146301518171620"></a><a name="fig146301518171620"></a><span class="figcap"><b>Figure 5 </b>Local area connection properties</span><br><span><img id="sfs_01_0038__image6853722141814" src="en-us_image_0000001567316333.png"></span></div>
|
|
</p></li><li id="sfs_01_0038__li153671321182211"><span>In the dialog box that is displayed, select <span class="uicontrol" id="sfs_01_0038__uicontrol4277293817528"><b>Use the following DNS server addresses:</b></span> and configure DNS, as shown in <a href="#sfs_01_0038__fig82464042713">Figure 6</a>. The DNS server IP address is 100.125.4.25. After completing the configuration, click <span class="uicontrol" id="sfs_01_0038__uicontrol1792211319376"><b>OK</b></span>.</span><p><div class="fignone" id="sfs_01_0038__fig82464042713"><a name="sfs_01_0038__fig82464042713"></a><a name="fig82464042713"></a><span class="figcap"><b>Figure 6 </b>Configuring DNS on Windows</span><br><span><img id="sfs_01_0038__image1554312562167" src="en-us_image_0000001516396384.png"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="sfs_01_0035.html">Network Configuration</a></div>
|
|
</div>
|
|
</div>
|
|
|