This section describes how to create an IP resource. The IP resource creates and protects a virtual IP address that can be switched between cluster nodes.

System Configuration

The environment created in this guide is a two-node configuration as shown below.

Prepare a virtual IP address that can be pinged (10.1.6.100 in the above figure).
Also prepare a system that can be pinged (10.1.6.90 in the above).

Check for a ping response using the following command:

# ip -4 addr add 10.1.6.100/24 dev ens192
 
# ping -c3 -I 10.1.6.100 10.1.6.90

There should be a ping response.

Once the ping response is verified, remove the IP address from the interface.

# ip -4 addr delete 10.1.6.100/24 dev ens192

Restrictions:

  • Make sure that the virtual IP address you are trying to create is unique.
  • Make sure that there is a system (other than the cluster nodes) that can respond to pings on the same network as the virtual IP address.

Note: IP resources use ping to validate the health of the network. Therefore, you need a system outside the cluster that can respond to pings.

Perform the following steps on target1

  1. Creating a resource
    Execute the following command:
[target1]# lkcli resource create ip --tag ip-tag --ipaddr 10.1.6.100 

Resource Settings

Item Input Value
--tag Tag name
--ipaddr Virtual IP address
  1. Configuring a ping list
    Run the following command to configure a ping list.
[target1]# lkcli resource config ip --tag ip-tag --pinglist 10.1.6.90

Then bring the resource in service.

[target1]# lkcli resource restore --tag ip-tag
  1. Extending a resource
    Execute the following command:
[target1]# lkcli resource extend ip --tag ip-tag --dest target2

Resource Settings

Item Input Value
--tag Tag name of the created resource
--dest Backup node name
  1. Setting up a ping list for the extended resource
    Run the following command to set up a ping list for the extended resource as well.
[target1]# lkcli resource config ip --tag ip-tag --pinglist 10.1.6.90 --remote target2
  1. Checking the resource
    After creating and extending the resource, run the following command.
    The resource information is displayed.
[target1]# lkcli status -q
LOCAL    TAG     ID             STATE     PRIO  PRIMARY
target1  ip-tag  IP-10.1.6.100  ISP          1  target1

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment