diff --git a/README.md b/README.md index a32d6465..b8ac7b96 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. diff --git a/fw/README.md b/fw/README.md index 9165379a..eb702800 100644 --- a/fw/README.md +++ b/fw/README.md @@ -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 diff --git a/tools/dvc/README.md b/tools/dvc/README.md new file mode 100644 index 00000000..a4c3fda2 --- /dev/null +++ b/tools/dvc/README.md @@ -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 +``` diff --git a/tools/nfdc/README.md b/tools/nfdc/README.md new file mode 100644 index 00000000..34cad28b --- /dev/null +++ b/tools/nfdc/README.md @@ -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=`: The remote URI of the face. +- `local=`: The local URI of the face. +- `cost=`: The cost of the face. +- `persistency=`: The persistency of the face (`persistent` or `permanent`). +- `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=|`: 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=`: The name prefix of the route. +- `face=|`: The next hop face ID to forward packets to. +- `cost=`: The cost of the route. +- `origin=`: The origin of the route (default=255). +- `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=`: The name prefix of the route. +- `face=|`: The next hop face ID of the route. +- `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=`: The name prefix to set the strategy for. +- `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=`: The name prefix to unset the strategy for. + +```bash +# Unset the strategy for /example +ndnd fw strategy unset prefix=/example +```