Difference between revisions of "Updating your node's IPv4 and domain name"

From Internet Computer Wiki
Jump to: navigation, search
m
m
 
(20 intermediate revisions by one other user not shown)
Line 1: Line 1:
All Node Providers are requested to deploy at least one node in their data center with IPv4.
+
'''All Node Providers are requested to deploy two nodes with IPv4 (public) and a domain name for every data center they operate in.''' Node Providers should deploy IPv4 to the '''first two nodes in their first rack'''.
  
 
Node Providers are able to add, update, or remove a node’s IPv4 and domain name configuration in one of two ways:
 
Node Providers are able to add, update, or remove a node’s IPv4 and domain name configuration in one of two ways:
Line 18: Line 18:
 
*[[Node Deployment Guide|Current (Gen-2) Node Deployment Guide (without an HSM)]]
 
*[[Node Deployment Guide|Current (Gen-2) Node Deployment Guide (without an HSM)]]
  
Please note that you '''must reconfigure the IC-OS installation image for every IPv4 node you deploy.''' This means that you cannot use a single IC-OS installation image to deploy multiple nodes like you are able to do when just configuring IPv6 nodes. After each IPv4 node deployment, you must plug your IC-OS Installation USB stick back into your laptop and return to step 6 in the node deployment guide to reconfigure your installation image.
+
Please note that you '''must use a unique IPv4 address for each node you deploy.''' This means that you cannot use a single IC-OS installation image to deploy multiple nodes (like you are able to do when just configuring IPv6 nodes). After each IPv4 node deployment, you must plug your IC-OS Installation USB stick back into your laptop and return to step 6 in the node deployment guide to reconfigure your installation image.
 +
 
 +
Additionally, make sure to use the [https://dashboard.internetcomputer.org/releases latest IC-OS release], or your IPv4 deployment may fail.
  
 
==Method #2: Configure IPv4 via dfx (no redeployment required)==
 
==Method #2: Configure IPv4 via dfx (no redeployment required)==
  
#Obtain your node operator identity:<syntaxhighlight lang="shell">
+
#Obtain your node operator identity from your <code>node_operator_private_key.pem</code> file:<syntaxhighlight lang="shell">
 
$ dfx upgrade
 
$ dfx upgrade
 
$ dfx identity import node_operator node_operator_private_key.pem --storage-mode=plaintext
 
$ dfx identity import node_operator node_operator_private_key.pem --storage-mode=plaintext
Line 36: Line 38:
 
# example: IPV4_ADDRESS="12.15.1.89"
 
# example: IPV4_ADDRESS="12.15.1.89"
  
$ IPV4_GATEWAY="gateway_ip"
+
$ IPV4_GATEWAY="xxx.xxx.xxx.xxx"
 
# example: IPV4_GATEWAY="12.15.1.1"
 
# example: IPV4_GATEWAY="12.15.1.1"
  
Line 43: Line 45:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#Submit IPv4 dfx commands to add/update IPv4 configuration and domain name:<syntaxhighlight lang="shell">
 
#Submit IPv4 dfx commands to add/update IPv4 configuration and domain name:<syntaxhighlight lang="shell">
// to add/update your IPv4 configuration:
+
# to add/update your IPv4 configuration:
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly "(record { gateway_ip_addrs = vec {\"$IPV4_GATEWAY\"}; prefix_length = $IPV4_PREFIX_LENGTH : nat32; ip_addr = \"$IPV4_ADDRESS\"; node_id = principal \"$NODE_ID\" })"
+
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly "(record { ipv4_config = opt record { gateway_ip_addr = \"$IPV4_GATEWAY\"; prefix_length = $IPV4_PREFIX_LENGTH : nat32; ip_addr = \"$IPV4_ADDRESS\"}; node_id = principal \"$NODE_ID\" })"
 
 
 
 
//  to add/update your domain name:
 
</syntaxhighlight>
 
$  dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly "(record { node_id = principal \"$NODE_ID\"; domain = opt \"$DOMAIN\" })"
 
</syntaxhighlight>
 
  
##Dfx command to ''remove'' your node’s IPv4 configuration and domain name:<syntaxhighlight lang="shell">
+
# to add/update your domain name:
// to remove your IPv4 configuration:
+
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly "(record { node_id = principal \"$NODE_ID\"; domain = opt \"$DOMAIN\" })"
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly '(record { ipv4_config = null; node_id = principal \"$NODE_ID\" })'
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
##Dfx command to ''remove'' your node’s IPv4 configuration and domain name <syntaxhighlight lang="shell">
 +
# to remove your IPv4 configuration:
 +
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly "(record { ipv4_config = null; node_id = principal \"$NODE_ID\" })"
  
// to remove your domain name:
+
# to remove your domain name:
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly '(record { node_id = principal \"$NODE_ID\"; domain = null })'
+
$ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly "(record { node_id = principal \"$NODE_ID\"; domain = null })"
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 14:34, 2 April 2024

All Node Providers are requested to deploy two nodes with IPv4 (public) and a domain name for every data center they operate in. Node Providers should deploy IPv4 to the first two nodes in their first rack.

Node Providers are able to add, update, or remove a node’s IPv4 and domain name configuration in one of two ways:

  • Method #1: IC-OS installation image configuration (redeployment required)
    • This method is designed for nodes that onboarded using a Nitrokey HSM.
  • Method #2: dfx commands (no redeployment required)
    • This method is designed for nodes that onboarded without using a Nitrokey HSM.


Requirements

Method #1: Configure IPv4 via IC-OS Installation (redeployment required)

To redeploy a node with IPv4 and domain name configuration, follow the node deployment guide of your choice, making sure to add the IPv4 and domain name configuration in step 6:

Please note that you must use a unique IPv4 address for each node you deploy. This means that you cannot use a single IC-OS installation image to deploy multiple nodes (like you are able to do when just configuring IPv6 nodes). After each IPv4 node deployment, you must plug your IC-OS Installation USB stick back into your laptop and return to step 6 in the node deployment guide to reconfigure your installation image.

Additionally, make sure to use the latest IC-OS release, or your IPv4 deployment may fail.

Method #2: Configure IPv4 via dfx (no redeployment required)

  1. Obtain your node operator identity from your node_operator_private_key.pem file:
    $ dfx upgrade
    $ dfx identity import node_operator node_operator_private_key.pem --storage-mode=plaintext
    
  2. Set IPv4 variables:
    $ NODE_ID="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxx"
    # example: NODE_ID="pqjny-likm7-sjqik-x5m6r-doehn-djdf4-siihl-pnloo-gh3tb-ox6dy-dae"
    
    $ IPV4_PREFIX_LENGTH="xx"
    # example: IPV4_PREFIX_LENGTH="24"
    
    $ IPV4_ADDRESS="xxx.xxx.xxx.xxx"
    # example: IPV4_ADDRESS="12.15.1.89"
    
    $ IPV4_GATEWAY="xxx.xxx.xxx.xxx"
    # example: IPV4_GATEWAY="12.15.1.1"
    
    $ DOMAIN="xxx.xxx.xxx"
    # example: DOMAIN="node1.example.com"
    
  3. Submit IPv4 dfx commands to add/update IPv4 configuration and domain name:
    # to add/update your IPv4 configuration:
    $ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly "(record { ipv4_config = opt record { gateway_ip_addr = \"$IPV4_GATEWAY\"; prefix_length = $IPV4_PREFIX_LENGTH : nat32; ip_addr = \"$IPV4_ADDRESS\"}; node_id = principal \"$NODE_ID\" })"
    
    # to add/update your domain name:
    $ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly "(record { node_id = principal \"$NODE_ID\"; domain = opt \"$DOMAIN\" })"
    
    1. Dfx command to remove your node’s IPv4 configuration and domain name
      # to remove your IPv4 configuration:
      $ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_ipv4_config_directly "(record { ipv4_config = null; node_id = principal \"$NODE_ID\" })"
      
      # to remove your domain name:
      $ dfx canister --network ic --identity node_operator call rwlgt-iiaaa-aaaaa-aaaaa-cai update_node_domain_directly "(record { node_id = principal \"$NODE_ID\"; domain = null })"