Skip to content

Commit

Permalink
docs: update for nfdc and dvc
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Jan 2, 2025
1 parent 2275939 commit 4303776
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ ndnd fw run yanfd.config.yml
A full configuration example can be found in [fw/yanfd.sample.yml](fw/yanfd.sample.yml).
Note that the default configuration may require root privileges to bind to multicast interfaces.

Once started, you can use the [Forwarder Control](tools/nfdc/README.md) tool to manage faces and routes.

## 📡 Distance Vector Router

The `ndnd/dv` package implements `ndn-dv`, an NDN Distance Vector routing daemon.
Expand All @@ -76,6 +78,8 @@ ndnd dv run dv.config.yml
A full configuration example can be found in [dv/dv.sample.yml](dv/dv.sample.yml).
Make sure the network and router name are correctly configured and the forwarder is running.

Once started, you can use the [DV Control](tools/dvc/README.md) tool to create and destroy neighbor links.

## 📚 Standard Library

The `ndnd/std` package implements `go-ndn`, a standard library for NDN applications.
Expand Down
1 change: 0 additions & 1 deletion fw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ yanfd /etc/ndn/yanfd.yml
```

*Runtime configuration* is performed via the [NFD Management Protocol](https://redmine.named-data.net/projects/nfd/wiki/Management).
At the moment, this requires the installation of the [NFD](https://github.com/named-data/NFD) package to obtain the `nfdc` configuration utility.

## Building from source

Expand Down
24 changes: 24 additions & 0 deletions tools/dvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DV Control Reference

This is the detailed reference for the ndn-dv routing daemon control tool.

## `ndnd dv link create`

The link create command creates a new neighbor link. A new permanent face will be created for the neighbor if a matching face does not exist.

```bash
# Create a UDP neighbor link
ndnd dv link create udp://suns.cs.ucla.edu

# Create a TCP neighbor link
ndnd dv link create tcp4://hobo.cs.arizona.edu:6363
```

## `ndnd dv link destroy`

The link destroy command destroys a neighbor link. The face associated with the neighbor will be destroyed.

```bash
# Destroy a neighbor link by URI
ndnd dv link destroy udp://suns.cs.ucla.edu
```
129 changes: 129 additions & 0 deletions tools/nfdc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Forwarder Control Reference

This is the detailed reference for the NDNd forwarder control tool, and implements the NFD Management Protocol.

You can also use the [nfdc](https://docs.named-data.net/NFD/24.07/manpages/nfdc.html) tool from the NFD project to manage the NDNd forwarder.

## `ndnd fw status`

The status command shows general status of the forwarder, including its version, uptime, data structure counters, and global packet counters.

## `ndnd fw face list`

The face list command prints the face table, which contains information about faces.

## `ndnd fw face create`

The face create command creates a new face. The supported arguments are:

- `remote=<uri>`: The remote URI of the face.
- `local=<uri>`: The local URI of the face.
- `cost=<cost>`: The cost of the face.
- `persistency=<persistency>`: The persistency of the face (`persistent` or `permanent`).
- `mtu=<mtu>`: The MTU of the face in bytes.

```bash
# Create a UDP face with the default port
ndnd fw face create remote=udp://suns.cs.ucla.edu

# Create a TCP face over IPv4
ndnd fw face create remote=tcp4://suns.cs.ucla.edu:6363

# Create a peramanent TCP face with a cost of 10
ndnd fw face create remote=tcp://suns.cs.ucla.edu cost=10 persistency=permanent
```

## `ndnd fw face destroy`

The face destroy command destroys a face. The supported arguments are:

- `face=<face-id>|<face-uri>`: The face ID or remote URI of the face to destroy.

```bash
# Destroy a face by ID
ndnd fw face destroy face=6

# Destroy a face by remote URI
ndnd fw face destroy face=tcp://suns.cs.ucla.edu
```

## `ndnd fw route list`

The route list command prints the existing RIB routes.

## `ndnd fw route add`

The route add command adds a route to the RIB. The supported arguments are:

- `prefix=<prefix>`: The name prefix of the route.
- `face=<face-id>|<face-uri>`: The next hop face ID to forward packets to.
- `cost=<cost>`: The cost of the route.
- `origin=<origin>`: The origin of the route (default=255).
- `expires=<expires>`: The expiration time of the route in milliseconds.

If a face URI is specified and the face does not exist, it will be created.

```bash
# Add a route to forward packets to a new or existing UDP face
ndnd fw route add prefix=/ndn face=udp://suns.cs.ucla.edu

# Add a route with a permanent TCP face (face options must appear before "face=")
ndnd fw route add prefix=/ndn persistency=permanent face=tcp://suns.cs.ucla.edu

# Add a route to forward packets to face 6
ndnd fw route add prefix=/example face=6

# Add a route with a cost of 10 and origin of "client"
ndnd fw route add prefix=/example face=6 cost=10 origin=65
```

## `ndnd fw route remove`

The route remove command removes a route from the RIB. The supported arguments are:

- `prefix=<prefix>`: The name prefix of the route.
- `face=<face-id>|<face-uri>`: The next hop face ID of the route.
- `origin=<origin>`: The origin of the route (default=255).

```bash
# Remove a route by prefix, face and origin
ndnd fw route remove prefix=/example face=6 origin=65
```

## `ndnd fw fib list`

The fib list command prints the existing FIB entries.

## `ndnd fw cs info`

The cs info command prints information about the content store.

## `ndnd fw strategy list`

The strategy list command prints the currently selected forwarding strategies.

## `ndnd fw strategy set`

The strategy set command sets a forwarding strategy for a name prefix. The supported arguments are:

- `prefix=<prefix>`: The name prefix to set the strategy for.
- `strategy=<strategy>`: The forwarding strategy to set.

```bash
# Set the strategy for /example to "multicast"
ndnd fw strategy set prefix=/example strategy=/localhost/nfd/strategy/multicast/v=1

# Set the strategy for /example to "best-route"
ndnd fw strategy set prefix=/example strategy=/localhost/nfd/strategy/best-route/v=1
```

## `ndnd fw strategy unset`

The strategy unset command unsets a forwarding strategy for a name prefix. The supported arguments are:

- `prefix=<prefix>`: The name prefix to unset the strategy for.

```bash
# Unset the strategy for /example
ndnd fw strategy unset prefix=/example
```

0 comments on commit 4303776

Please sign in to comment.