Updating your node's IPv4 and domain name

From Internet Computer Wiki
Revision as of 21:08, 5 February 2024 by Andrew.battat (talk | contribs)
Jump to: navigation, search

All Node Providers are requested to deploy at least one node in their data center with IPv4.

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

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


Requirements

  • IPv4 address
  • Domain Name

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

  1. Obtain your node operator identity:
    $ 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="gateway_ip"
    # 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 = vec {\"$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 })'
      

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