diff --git a/tools/nfdc/strategy-choice-module.cpp b/tools/nfdc/strategy-choice-module.cpp
index e5fe584..9e0031f 100644
--- a/tools/nfdc/strategy-choice-module.cpp
+++ b/tools/nfdc/strategy-choice-module.cpp
@@ -43,6 +43,19 @@
     .setTitle("show strategy choice of an entry")
     .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES);
   parser.addCommand(defStrategyShow, &StrategyChoiceModule::show);
+
+  CommandDefinition defStrategySet("strategy", "set");
+  defStrategySet
+    .setTitle("set strategy choice for a name prefix")
+    .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES)
+    .addArg("strategy", ArgValueType::NAME, Required::YES, Positional::YES);
+  parser.addCommand(defStrategySet, &StrategyChoiceModule::set);
+
+  CommandDefinition defStrategyUnset("strategy", "unset");
+  defStrategyUnset
+    .setTitle("clear strategy choice at a name prefix")
+    .addArg("prefix", ArgValueType::NAME, Required::YES, Positional::YES);
+  parser.addCommand(defStrategyUnset, &StrategyChoiceModule::unset);
 }
 
 void
@@ -84,6 +97,58 @@
 }
 
 void
+StrategyChoiceModule::set(ExecuteContext& ctx)
+{
+  auto prefix = ctx.args.get<Name>("prefix");
+  auto strategy = ctx.args.get<Name>("strategy");
+
+  ctx.controller.start<ndn::nfd::StrategyChoiceSetCommand>(
+    ControlParameters().setName(prefix).setStrategy(strategy),
+    [&] (const ControlParameters& resp) {
+      ctx.out << "strategy-set ";
+      text::ItemAttributes ia;
+      ctx.out << ia("prefix") << resp.getName()
+              << ia("strategy") << resp.getStrategy() << '\n';
+    },
+    [&] (const ControlResponse& resp) {
+      if (resp.getCode() == 404) {
+        ctx.exitCode = 7;
+        ctx.err << "Unknown strategy: " << strategy << '\n';
+        ///\todo #3887 list available strategies
+        return;
+      }
+      ctx.makeCommandFailureHandler("setting strategy")(resp); // invoke general error handler
+    },
+    ctx.makeCommandOptions());
+
+  ctx.face.processEvents();
+}
+
+void
+StrategyChoiceModule::unset(ExecuteContext& ctx)
+{
+  auto prefix = ctx.args.get<Name>("prefix");
+
+  if (prefix.empty()) {
+    ctx.exitCode = 2;
+    ctx.err << "Unsetting default strategy is prohibited\n";
+    return;
+  }
+
+  ctx.controller.start<ndn::nfd::StrategyChoiceUnsetCommand>(
+    ControlParameters().setName(prefix),
+    [&] (const ControlParameters& resp) {
+      ctx.out << "strategy-unset ";
+      text::ItemAttributes ia;
+      ctx.out << ia("prefix") << resp.getName() << '\n';
+    },
+    ctx.makeCommandFailureHandler("unsetting strategy"),
+    ctx.makeCommandOptions());
+
+  ctx.face.processEvents();
+}
+
+void
 StrategyChoiceModule::fetchStatus(Controller& controller,
                                   const function<void()>& onSuccess,
                                   const Controller::DatasetFailCallback& onFailure,
