---
name: "ng_hub"
section: "4"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/ng_hub"
---

# ng\_hub(4)

packet distribution netgraph node

## NAME

**ng\_hub** – packet distribution netgraph node

## SYNOPSIS

**#include \<netgraph/ng\_hub.h\>**

## DESCRIPTION

The **hub** node type provides a simple mechanism for distributing packets over several links. Packets received on any of the hooks are forwarded out the other hooks. Packets are not altered in any way.

## HOOKS

A **hub** node accepts any request to connect, regardless of the hook name, as long as the name is unique.

## CONTROL MESSAGES

This node type supports the generic control messages, plus the following:

- NGM\_HUB\_SET\_PERSISTENT (**setpersistent**)

  This command sets the persistent flag on the node, and takes no arguments.

## SHUTDOWN

This node shuts down upon receipt of a NGM\_SHUTDOWN control message, or when all hooks have been disconnected. Setting the persistent flag via a NGM\_HUB\_SET\_PERSISTENT control message disables automatic node shutdown when the last hook gets disconnected.

## SEE ALSO

[netgraph(4)](/netgraph/4.md), [ng\_bridge(4)](/ng_bridge/4.md), [ng\_ether(4)](/ng_ether/4.md), [ng\_one2many(4)](/ng_one2many/4.md), [ngctl(8)](/ngctl/8.md), [nghook(8)](/nghook/8.md)

## HISTORY

The **ng\_hub** node type appeared in FreeBSD 5.3.

## AUTHORS

Ruslan Ermilov ⟨*ru@FreeBSD.org*⟩
