Networking DOCA SDK Documentation

General Network and NVUE Configuration

NVIDIA DOCA™ HBN supports flat-file network configuration and NVIDIA® user experience (NVUE). Use the configuration method that matches the deployment workflow.

Flat-File Network Configuration

Configure network interfaces and FRRouting (FRR) in the following files:

  • /etc/network/interfaces

  • /etc/frr/frr.conf

  • /etc/frr/daemons

For FRR configuration concepts and syntax, refer to the NVIDIA® Cumulus® Linux FRRouting documentation.

NVUE Configuration

This section describes HBN-specific NVUE behavior. It assumes familiarity with the NVUE documentation.

NVUE Service

HBN installs NVUE by default and enables the NVUE service at startup.

NVUE REST API

By default, the NVUE REST API listens only on localhost. Before exposing the API to another network, change the default credentials and restrict access with the network controls used by the deployment.

Manage the REST API Service

Enable the REST API service:

nv set system api state enabled

Disable the REST API service:

nv set system api state disabled

Bind the service to a specific address:

nv set system api listening-address <localhost|ipv4|ipv6|0.0.0.0>

Binding to 0.0.0.0 exposes the API on all available addresses. Use this setting only when required, and restrict access to trusted management networks.

Query the REST API

The following example queries BGP information. Replace the credentials and management address with deployment-specific values.

The example uses --insecure for an environment with an untrusted development certificate. Do not use this option when the server presents a certificate trusted by the client.

curl -u 'username:password' --insecure https://<mgmt-ip>:8765/nvue_v1/vrf/default/router/bgp
{
  "configured-neighbors": 2,
  "established-neighbors": 2,
  "router-id": "10.10.10.201"
}

For API resources and request syntax, refer to the NVUE API documentation.

NVUE REST API in NVIDIA DOCA Platform Framework

This section explains how to provide external access to the HBN NVUE REST API in an NVIDIA DOCA™ Platform Framework (DPF) deployment.

By default, the API is accessible only from within the cluster through localhost. External access requires a Kubernetes NodePort service and an HBN API listening address that accepts non-local connections.

Exposing the API through NodePort and binding it to 0.0.0.0 increases the attack surface. Change the default credentials before enabling external access, and restrict the NodePort with firewall rules, security groups, or network policies appropriate for the deployment.

Enable External Access

  1. Add the NodePort configuration under spec.serviceConfiguration.helmChart.values in the DPUServiceConfiguration resource:

YAML
service:
  type: NodePort
  nodePort: 30765

  1. Set the API listening address. The following example binds the API to all HBN addresses:

YAML
configuration:
  startupYAMLJ2: |
    - set:
        system:
          api:
            listening-address:
              0.0.0.0: {}

  1. Verify that the API is reachable:

Bash
curl -k -u 'username:password' https://<node-ip>:<node-port>/nvue_v1/interface/

  1. Display the NodePort service:

Bash
kubectl get svc -n <namespace>

Example DPUServiceConfiguration Manifest

The following example enables the NodePort service, creates an HBN user from a Kubernetes Secret, and binds the NVUE REST API to all HBN addresses. Replace the namespace, port, secret, username, version metadata, and other values with those for the deployment.

YAML
---
apiVersion: svc.dpu.nvidia.com/v1alpha1
kind: DPUServiceConfiguration
metadata:
  name: doca-hbn
  namespace: dpf-operator-system
spec:
  deploymentServiceName: "doca-hbn"
  serviceConfiguration:
    helmChart:
      values:
        service:
          nodePort: 30765
          type: NodePort
        configuration:
          user:
            create: true
            password:
              secretKey: password
              secretName: hbn-user-password
            credentialSource: hashed
            username: nvidia
          perDPUValuesYAML: |
            - hostnamePattern: "*"
          startupYAMLJ2: |
            - header:
                model: bluefield
                nvue-api-version: nvue_v1
                rev-id: 1.0
                version: HBN <version>
            - set:
                system:
                  api:
                    listening-address:
                      0.0.0.0: {}

Configure NVUE REST API Credentials

Do not access the DPU cluster directly in a DPF deployment. Create the credential on the host cluster and propagate it through the DPF configuration.

Beginning with HBN 3.6.0, the Secret can contain a SHA-512 password hash ($6$...), which is recommended, or a plaintext password, which is deprecated. Set credentialSource to match the Secret content.

  1. Create the credential Secret in the host cluster.

    To store a SHA-512 password hash generated by openssl passwd -6, run:

Bash
kubectl -n dpf-operator-system create secret generic hbn-user-password \
  --from-literal=password="$(openssl passwd -6)"

To store a plaintext password, run the following command. Plaintext credentials are deprecated and planned for removal in a future release no earlier than 2027 H1.

Bash
kubectl -n dpf-operator-system create secret generic hbn-user-password \
  --from-literal=password=<new-password>

  1. Label the Secret so that DPF makes it available to the DPU cluster:

Bash
kubectl -n dpf-operator-system label secret hbn-user-password \
  dpu.nvidia.com/image-pull-secret=""

  1. Reference the Secret from the HBN Helm values:

YAML
configuration:
  user:
    create: true
    username: "your-username"
    password:
      secretName: "hbn-user-password" # Must match the Secret name from Step 1
      secretKey: "password"           # Must match the key in the Secret
    credentialSource: "hashed"        # Use hashed or plaintext to match the Secret content
    # Optional settings
    shell: "/bin/bash"
    homeDir: "/home/your-username"
    additionalGroups: ["group1", "group2"]
    uid: "1000"
    gid: "1000"

User Configuration Options

Option

Required

Description

create

Yes

Enables user creation or update. The default value is false.

username

Yes

Specifies the user to create or update.

password.secretName

Yes

Specifies the Kubernetes Secret that stores the credential.

password.secretKey

Yes

Specifies the key in the Secret that contains the credential.

credentialSource

No

Specifies how HBN interprets the Secret value. Use hashed for a SHA-512 crypt hash in the form $6$.... Use plaintext for a plaintext password. The default value is plaintext, which is deprecated. Any other value causes Helm chart rendering to fail. This option requires a doca-hbn image version 3.6.0 or later.

shell

No

Specifies the user shell, such as /bin/bash.

homeDir

No

Specifies the user home directory.

additionalGroups

No

Specifies additional groups for the user.

uid

No

Specifies the user ID.

gid

No

Specifies the group ID.

Credential Handling in HBN 3.6.0 and Later
  • The referenced Secret key is mounted in the HBN container as the read-only file /run/secrets/hbn-user/credential with mode 0400.

  • The container receives the credential location and type through HBN_USER_CREDENTIAL_FILE and HBN_USER_CREDENTIAL_SOURCE.

  • The password is not passed through HBN_USER_PASSWORD and does not appear in the rendered pod manifest, command-line arguments, or dpf-create-user log output.

  • For credentialSource: hashed, HBN accepts only SHA-512 crypt hashes in the form $6$... (an optional rounds= value must be between 1000 and 999999999). It rejects plaintext values, account-lock markers, other hash formats, empty values, and multiline values without creating or updating the user. The dpf-create-user program exits with an error that is described in HBN Service Troubleshooting.

  • For credentialSource: plaintext, the container logs a deprecation warning at startup, and the Helm chart prints the same warning in the release notes.

  • Enabling configuration.user.create with a doca-hbn image earlier than 3.6.0 causes Helm chart rendering to fail because those images expect the removed HBN_USER_PASSWORD variable.

NVUE CLI

For NVUE command syntax and workflow, refer to the NVUE CLI documentation.

NVUE Startup Configuration

When you save the network configuration through NVUE, HBN writes it to /etc/nvue.d/startup.yaml.

At startup, the nvued-startup process applies the saved configuration and then exits. An EXITED state therefore indicates that the startup process completed:

Bash
# supervisorctl status nvued-startup
nvued-startup                    EXITED    Apr 17 10:04 AM

Run nv config apply startup to apply the saved startup configuration. Run nv config save to save the running configuration to /etc/nvue.d/startup.yaml.

Last updated: