Enable remote boot of your Centos server

Source: Internet
Author: User
Tags centos server
If our servers are not deployed locally (usually hosted in the IDC), and there are more than one server in the IDC, when one of them is disabled, then we can remotely connect to a server that has not been shut down and start the instance remotely. Run the yum command to install the software required for remote boot: How does yuminstallwol perform remote boot? Step 1: First determine your l

If our servers are not deployed locally (usually hosted in the IDC), and there are more than one server in the IDC, when one of them is disabled, then we can remotely connect to a server that has not been shut down and start the instance remotely.

Use the yum command to install the software required for remote boot: yum install wol

 

How does one remotely start the instance?

Step 1: First, determine whether your linux server supports remote boot? Log on to the target server and run the ethtool command to print the Nic information.
[Root @ localhost lhd] # ethtool eth0
Settings for eth0:
Supported ports: [tp mii]
Supported link modes: 10 baseT/Half 10 baseT/Full
100 baseT/Half 100 baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10 baseT/Half 10 baseT/Full
100 baseT/Half 100 baseT/Full
Advertised auto-negotiation: Yes
Speed: 100 Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes

As you can see, ethtool lists all the Nic information. we only care about these two items:
Supports Wake-on: pumbg
Wake-on: d
If the value of wake-on is d, wake on lan is disabled.
If the value is g, wake on lan is enabled.

Because wake on lan is disabled on this machine, use the following command to enable it:
[Root @ localhost lhd] # ethtool-s eth0 wol g

Run the ethtool command to view the information and you will find that:
Wake-on: g

OK. The Nic of the target machine supports remote boot. The local MAC address is as follows:
[Root @ localhost lhd] # ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 03: 0D: 1D: 1F: 97
Inet addr: 192.168.6.101 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 34470 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 35377 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 fig: 1000
RX bytes: 31559763 (30.0 MiB) TX bytes: 5340032 (5.0 MiB)
Interrupt: 5 Base address: 0x2c00


Record the HWaddr 00: 03: 0D: 1D: 1F: 97 item. now you can try to disable the target machine.


Step 2: Start the instance

Now we need to log on to the machine that has installed the wakeonlan software, and run the following command on it:

Wol 00: 03: 0D: 1D: 1F: 97
Later, you will find that the target machine has been started and can be logged on.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.