forked from docs/doc-exports
Reviewed-by: Miskanin, Jan <jan.miskanin@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
82 lines
17 KiB
HTML
82 lines
17 KiB
HTML
<a name="evs_01_0026"></a><a name="evs_01_0026"></a>
|
|
|
|
<h1 class="topictitle1">Configuring a Virtual IP Address for the Server (Deprecated)</h1>
|
|
<div id="body1508295804297"><div class="section" id="evs_01_0026__section44945912112556"><h4 class="sectiontitle">Scenarios</h4><p id="evs_01_0026__p3434402620443">Before you use EVS replication, bind a virtual IP address to the production server and DR server, respectively. Then configure the virtual IP address as the static IP address for the servers. This virtual IP address is used to access applications on servers.</p>
|
|
<ul id="evs_01_0026__ul3567896710117"><li id="evs_01_0026__li6512116410117">If a virtual IP address has not been configured for the production server, assign one and bind it to the production server and DR server.</li><li id="evs_01_0026__li38057793101112">If a virtual IP address has been configured for the production server, bind this virtual IP address to the DR server.<div class="note" id="evs_01_0026__note98481557151510"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_01_0026__evs_01_0020_p883713341981">EVS replication APIs have been deprecated. If you need to use the replication function, see <a href="https://docs.otc.t-systems.com/en-us/usermanual/sdrs/en-us_topic_0125068221.html" target="_blank" rel="noopener noreferrer">Storage Disaster Recovery Service User Guide</a> and <a href="https://docs.otc.t-systems.com/en-us/api/sdrs/sdrs_01_0000.html" target="_blank" rel="noopener noreferrer">Storage Disaster Recovery Service API Reference</a>.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_01_0026__section3065738815149"><h4 class="sectiontitle">Prerequisites</h4><p id="evs_01_0026__p39821965151337">You have obtained the VPC, subnet, MAC address, and virtual IP address of the production server. For details, see <a href="evs_01_0025.html">Collecting ECS Information (Deprecated)</a>.</p>
|
|
</div>
|
|
<div class="section" id="evs_01_0026__section61097236151453"><h4 class="sectiontitle">Procedure</h4><p id="evs_01_0026__p49929083151453">The following operations are for reference only. For details, see <strong id="evs_01_0026__b842352706211210">Assigning a Virtual IP Address</strong> in the <em id="evs_01_0026__i842352697185425">Virtual Private Cloud User Guide</em>.</p>
|
|
<ol id="evs_01_0026__ol46708566151453"><li id="evs_01_0026__li5884586202528"><span>Log in to the management console.</span></li><li id="evs_01_0026__li2935870315121"><span>Click <span><img id="evs_01_0026__en-us_topic_0021738346_image052111582392" src="en-us_image_0237893718.png"></span> in the upper left corner and select the desired region and project.</span></li><li id="evs_01_0026__li35832000151453"><span>Under <strong id="evs_01_0026__b51052945511327">Compute</strong>, click <strong id="evs_01_0026__b61953317211327">Elastic Cloud Server</strong>.</span><p><p id="evs_01_0026__p54052547151453">The <span class="wintitle" id="evs_01_0026__wintitle16710876151453"><b>Elastic Cloud Server</b></span> page is displayed.</p>
|
|
</p></li><li id="evs_01_0026__li16180156151453"><span>In the ECS list, locate the production ECS and click the ECS name.</span><p><p id="evs_01_0026__p327822510164">The ECS details page is displayed.</p>
|
|
</p></li><li id="evs_01_0026__li21850568101640"><span>On the ECS details page, locate the VPC and click the VPC name.</span><p><p id="evs_01_0026__p11178069101641">The <strong id="evs_01_0026__b84235270619547">Virtual Private Cloud</strong> page is displayed.</p>
|
|
</p></li><li id="evs_01_0026__li617997410171"><span>In the VPC list, locate the VPC of the production ECS and click the VPC name.</span><p><p id="evs_01_0026__p13029411101818">The VPC details page is displayed.</p>
|
|
</p></li><li id="evs_01_0026__li40372184101832"><span>On the <strong id="evs_01_0026__b84235270621958">Subnets</strong> tab, locate the subnet of the production ECS and click the subnet name.</span><p><p id="evs_01_0026__p37030976103918">The subnet details page is displayed.</p>
|
|
</p></li><li id="evs_01_0026__li2413262610478"><span>Click the <strong id="evs_01_0026__b842352706195627">Virtual IP Addresses</strong> tab and check whether the production ECS is bound with a virtual IP address.</span><p><ul id="evs_01_0026__ul1172592710415"><li id="evs_01_0026__li3546035710415">If yes, perform the following operation:<ol type="a" id="evs_01_0026__ol9817683104631"><li id="evs_01_0026__li56423135104631">Locate the row that contains the virtual IP address and click <strong id="evs_01_0026__b842352706195721">Bind to Server</strong> in the <strong id="evs_01_0026__b842352706195755">Operation</strong> column. On the displayed page, bind the virtual IP address to the NIC of the DR server.<p id="evs_01_0026__p11103134641912">After the virtual IP address is bound with the DR server, the subnet details page is displayed.</p>
|
|
</li></ol>
|
|
</li><li id="evs_01_0026__li3919407110419">If no, perform the following operations:<ol type="a" id="evs_01_0026__ol66869471104449"><li id="evs_01_0026__li14886481104449">Click <strong id="evs_01_0026__b842352706155825">Assign Virtual IP Address</strong>.<p id="evs_01_0026__p2259461510455">After the application succeeds, you can view the virtual IP address in the virtual IP address list.</p>
|
|
<div class="note" id="evs_01_0026__note198012251417"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_01_0026__p1881152261417">When assigning the virtual IP address, you can select the <strong id="evs_01_0026__b842352706211710">Automatic</strong> or <strong id="evs_01_0026__b842352706211714">Manual</strong> mode based on your service requirements.</p>
|
|
</div></div>
|
|
</li><li id="evs_01_0026__li30619422104542">Locate the row that contains the virtual IP address and click <strong id="evs_01_0026__b928958184">Bind to Server</strong> in the <strong id="evs_01_0026__b153128033">Operation</strong> column. On the displayed page, bind the virtual IP address to the NIC of the production server.<p id="evs_01_0026__p450514200">After the virtual IP address is bound with the production server, the subnet details page is displayed.</p>
|
|
</li><li id="evs_01_0026__li18160194104553">Locate the row that contains the virtual IP address and click <strong id="evs_01_0026__b526597535">Bind to Server</strong> in the <strong id="evs_01_0026__b1487227701">Operation</strong> column. On the displayed page, bind the virtual IP address to the NIC of the DR server.<p id="evs_01_0026__p755911212016">After the virtual IP address is bound with the DR server, the subnet details page is displayed.</p>
|
|
</li></ol>
|
|
</li></ul>
|
|
</p></li><li id="evs_01_0026__li894545421812"><a name="evs_01_0026__li894545421812"></a><a name="li894545421812"></a><span>On the subnet details page, take note of the subnet and the IP address of the server's NIC where the virtual IP address has been bound.</span><p><div class="p" id="evs_01_0026__p17687161810222">An example is provided as follows:<ul id="evs_01_0026__ul2667031192217"><li id="evs_01_0026__li16672031192214">Subnet: 192.168.0.0/24</li><li id="evs_01_0026__li1922121132316">Bound server (NIC): ecs-001 (192.168.0.176)</li></ul>
|
|
</div>
|
|
</p></li><li id="evs_01_0026__li078010543245"><span>After a virtual IP address is bound with a server, perform the following substeps to configure the bound IP address as the static IP address:</span><p><div class="p" id="evs_01_0026__p19467315423">The following example uses CentOS 7.2 64bit as the sample OS.<div class="note" id="evs_01_0026__note13492191414316"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_01_0026__p631292618437">The configuration method varies depending on the server OS. This document is used for reference only. For detailed operations and differences, see the corresponding OS documents.</p>
|
|
<p id="evs_01_0026__p86885117165">For the Windows OS, see the <a href="https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff710457(v=ws.10)" target="_blank" rel="noopener noreferrer">Microsoft official documentation</a>.</p>
|
|
</div></div>
|
|
<ol type="a" id="evs_01_0026__ol1623112874214"><li id="evs_01_0026__li19227172834219">Log in to the server as user <strong id="evs_01_0026__b842352706212516">root</strong>.</li><li id="evs_01_0026__li1422712286426"><a name="evs_01_0026__li1422712286426"></a><a name="li1422712286426"></a>Run the following command to check the name of the NIC bound with the virtual IP address in the server:<p id="evs_01_0026__p9227152815422"><a name="evs_01_0026__li1422712286426"></a><a name="li1422712286426"></a><strong id="evs_01_0026__b222716287426">ifconfig</strong></p>
|
|
<p id="evs_01_0026__p19227728124216">You can obtain the NIC name using the NIC IP address recorded in <a href="#evs_01_0026__li894545421812">9</a>. In this example, the NIC name is <strong id="evs_01_0026__b842352706212644">eth0</strong>.</p>
|
|
</li><li id="evs_01_0026__li1222792815429">Run the following command to switch to the directory containing NIC configuration files:<p id="evs_01_0026__p1322782814215"><a name="evs_01_0026__li1222792815429"></a><a name="li1222792815429"></a><strong id="evs_01_0026__b18227132813424">cd /etc/sysconfig/network-scripts</strong></p>
|
|
</li><li id="evs_01_0026__li1759515204363">Run the following command to copy NIC configuration file <strong id="evs_01_0026__b865046205153159">eth0</strong> and change its name to <strong id="evs_01_0026__b842352706153026">eth0:1</strong>:<p id="evs_01_0026__p35961202364"><strong id="evs_01_0026__b1408203419535">cp eth0 eth0:1</strong></p>
|
|
</li><li id="evs_01_0026__li12253131618547">Perform the following operations to modify the configuration parameters of <strong id="evs_01_0026__b842352706153357">eth0:1</strong> using the vi editor:<ol class="substepthirdol" id="evs_01_0026__ol4254116155417"><li id="evs_01_0026__li17255516175417">Run the following command to open the <strong id="evs_01_0026__b584438482">ifcfg-eth0:1</strong> file:<p id="evs_01_0026__p1825911616548"><strong id="evs_01_0026__b325951685410">vi ifcfg-<strong id="evs_01_0026__b1834720205616">eth0:1</strong></strong></p>
|
|
</li><li id="evs_01_0026__li125991618542">Press <strong id="evs_01_0026__b12975163063013">i</strong> to enter editing mode.</li><li id="evs_01_0026__li11261131665411">Configure the parameters according to the following example:<pre class="screen" id="evs_01_0026__screen6261916145412">BOOTPROTO=static
|
|
DEVICE=eth0:1
|
|
NAME=eth0:1
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
IPADDR=192.168.0.176
|
|
NETMASK=255.255.255.0</pre>
|
|
<div class="p" id="evs_01_0026__p126641619541">Configuration descriptions of the <strong id="evs_01_0026__b216587153">NAME</strong>, <strong id="evs_01_0026__b8202">IPADDR</strong>, and <strong id="evs_01_0026__b1282322442">NETMASK</strong> fields:<ul id="evs_01_0026__ul8268516165420"><li id="evs_01_0026__li182688161543"><strong id="evs_01_0026__b1831603538">NAME</strong>: Specifies the NIC name recorded in <a href="#evs_01_0026__li1422712286426">10.b</a>.</li><li id="evs_01_0026__li122691416175410"><strong id="evs_01_0026__b43104234">IPADDR</strong>: Specifies the NIC IP address recorded in <a href="#evs_01_0026__li894545421812">9</a>.</li><li id="evs_01_0026__li12271101610545"><strong id="evs_01_0026__b1662825791">NETMASK</strong>: Specifies the subnet recorded in <a href="#evs_01_0026__li894545421812">9</a>.<p id="evs_01_0026__p627511695410">In this example, the subnet mask has 24 bits. Therefore, enter <strong id="evs_01_0026__b323433571">255.255.255.0</strong> for <strong id="evs_01_0026__b457364200">NETMASK</strong>.</p>
|
|
</li></ul>
|
|
</div>
|
|
</li><li id="evs_01_0026__li18275416155412">Press <strong id="evs_01_0026__b298015304303">Esc</strong>, enter <strong id="evs_01_0026__b1540128216">:wq</strong>, and press <strong id="evs_01_0026__b19801630203015">Enter</strong>.<p id="evs_01_0026__p19277101675410">The system saves the configurations and exits the vi editor.</p>
|
|
</li></ol>
|
|
</li><li id="evs_01_0026__li1769912298374">Run the following command to delete unnecessary NIC files from the <strong id="evs_01_0026__b842352706213320">/etc/sysconfig/network-scripts</strong> directory:<p id="evs_01_0026__p13783144014383"><strong id="evs_01_0026__b842352706213337">rm</strong> <em id="evs_01_0026__i1157162078213346">Name of the unnecessary NIC file</em></p>
|
|
<p id="evs_01_0026__p11256413134018">In this example, run the following commands:</p>
|
|
<p id="evs_01_0026__p5841172412387"><strong id="evs_01_0026__b17867935173814">rm ifcfg-eth1</strong></p>
|
|
<div class="note" id="evs_01_0026__note7203172517406"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_01_0026__p11935165466">Before deleting the unnecessary NIC files, you are advised to back up the files.</p>
|
|
<p id="evs_01_0026__p320482574011">If multiple unnecessary NIC files exist, delete them individually. Ensure that the <strong id="evs_01_0026__b842352706213536">/etc/sysconfig/network-scripts</strong> directory contains only the in-use NIC file.</p>
|
|
</div></div>
|
|
</li><li id="evs_01_0026__li1884218317114">Run the following command to check whether the <strong id="evs_01_0026__b842352706153458">70-persistent-ipoib.rules</strong> file exists in the <strong id="evs_01_0026__b84235270615359">/etc/udev/rules.d/</strong> directory:<div class="p" id="evs_01_0026__p1447732054212"><strong id="evs_01_0026__b17068764414">ls /etc/udev/rules.d/70-persistent-ipoib.rules</strong><ul id="evs_01_0026__ul8449119124211"><li id="evs_01_0026__li16449119134210">If yes, use the vi editor to configure the NIC information, including the NIC name and MAC address, for production and DR servers.<ol class="substepthirdol" id="evs_01_0026__ol17365417125016"><li id="evs_01_0026__li10365191795010">Run the following command to open the <strong id="evs_01_0026__b1033076247">70-persistent-ipoib.rules</strong> file:<p id="evs_01_0026__p13179134495110"><strong id="evs_01_0026__b9375748195111">vi /etc/udev/rules.d/70-persistent-ipoib.rules</strong></p>
|
|
</li><li id="evs_01_0026__li7104115320518">Press <strong id="evs_01_0026__b1988133063013">i</strong> to enter editing mode.</li><li id="evs_01_0026__li134511318185216">Add NIC information for the DR server based on that of the production server. For details, see the following example:<pre class="screen" id="evs_01_0026__screen645271811526">ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=={mac}, NAME="eth0"
|
|
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=={mac}, NAME="eth1"
|
|
|
|
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=={mac}, NAME="eth0"
|
|
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=={mac}, NAME="eth1"</pre>
|
|
<p id="evs_01_0026__p19460151820524">Configuration descriptions of the <strong id="evs_01_0026__b276944286">ATTR{address}</strong> and <strong id="evs_01_0026__b703423211">NAME</strong> fields:</p>
|
|
<ul id="evs_01_0026__ul182512052145813"><li id="evs_01_0026__li6251952205817"><strong id="evs_01_0026__b842352706154037">ATTR{address}</strong>: specifies the MAC address of server's NIC.</li><li id="evs_01_0026__li18250145218588"><strong id="evs_01_0026__b1676872349">NAME</strong>: Specifies the NIC name recorded in <a href="#evs_01_0026__li1422712286426">10.b</a>.<div class="note" id="evs_01_0026__note155184424711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="evs_01_0026__p19520542078">a. Ensure that the <strong id="evs_01_0026__b842352706154215">NAME</strong> (NIC name) values of the production and DR servers are consistent. The <strong id="evs_01_0026__b84235270615441">ATTR{address}</strong> (MAC address) value can be obtained in <a href="evs_01_0025.html">Collecting ECS Information (Deprecated)</a>.</p>
|
|
<p id="evs_01_0026__p144632214530">b. Replace <strong id="evs_01_0026__b596910411519">{mac}</strong> with the MAC address during operation.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</li><li id="evs_01_0026__li3967344267">Press <strong id="evs_01_0026__b11995123033015">Esc</strong>, enter <strong id="evs_01_0026__b445346091">:wq</strong>, and press <strong id="evs_01_0026__b129951830133012">Enter</strong>.<p id="evs_01_0026__p49691644563">The system saves the configurations and exits the vi editor.</p>
|
|
</li></ol>
|
|
</li><li id="evs_01_0026__li1144911198420">If no, go to <a href="#evs_01_0026__li145676502016">10.h</a>.</li></ul>
|
|
</div>
|
|
</li><li id="evs_01_0026__li145676502016"><a name="evs_01_0026__li145676502016"></a><a name="li145676502016"></a>Run the following command to restart the network service for the configuration to take effect:<p id="evs_01_0026__p657010500019"><a name="evs_01_0026__li145676502016"></a><a name="li145676502016"></a><strong id="evs_01_0026__b21889236116">service network restart</strong></p>
|
|
</li></ol>
|
|
</div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="evs_01_0023.html">Managing EVS Replication (Deprecated)</a></div>
|
|
</div>
|
|
</div>
|
|
|