How to set up VIP (virtual IP) under Linux

Source: Internet
Author: User

When doing ha, you need to design a virtual IP for the server, that is, a host corresponding to multiple IP addresses? It just sounded so amazing, it was possible.
I looked at the link below.
http://hi.baidu.com/pbottle/item/7175d29702a0a0bd83d29533

The alias is referenced at eth0 and the subnet mask is set
Ifconfig eth0:0 166.111.69.100 netmask 255.255.255.0 up
Ifconfig viewing the information at this time

Click (here) to collapse or open

  1. Eth0 Link encap:ethernet HWaddr 08:00:27:64:59:11
  2. inet addr:166.111.69.17 bcast:166.111.69.255 mask:255.255.255.0
  3. Inet6 ADDR:2402:F000:1:4412:A00:27FF:FE64:5911/64 Scope:global
  4. Inet6 ADDR:FE80::A00:27FF:FE64:5911/64 Scope:link
  5. Up broadcast RUNNING multicast mtu:1500 metric:1
  6. RX packets:597673 errors:0 dropped:0 overruns:0 frame:0
  7. TX packets:215472 errors:0 dropped:0 overruns:0 carrier:0
  8. collisions:0 txqueuelen:1000
  9. RX bytes:67285933 (67.2 MB) TX bytes:22782158 (22.7 MB)
  10. eth0:0 Link encap:ethernet HWaddr 08:00:27:64:59:11
  11. inet addr:166.111.69.100 bcast:166.111.69.255 mask:255.255.255.0
  12. Up broadcast RUNNING multicast mtu:1500 metric:1
  13. Lo Link encap:local Loopback
  14. inet addr:127.0.0.1 mask:255.0.0.0
  15. Inet6 addr::: 1/128 scope:host
  16. Up LOOPBACK RUNNING mtu:16436 metric:1
  17. RX packets:843 errors:0 dropped:0 overruns:0 frame:0
  18. TX packets:843 errors:0 dropped:0 overruns:0 carrier:0
  19. collisions:0 txqueuelen:0
  20. RX bytes:67174 (67.1 kb) TX bytes:67174 (67.1 KB)

Then find another machine to ping the VIP (eth0:0) to see the results.
Write in the/etc/rc.local also can, write here not afraid of power after the machine can not be normal use.

How to set up VIP (virtual IP) under Linux

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.