diff --git a/src/main/java/com/intel/jndn/management/NFD.java b/src/main/java/com/intel/jndn/management/NFD.java
index 8f8cdab..e05b2a9 100644
--- a/src/main/java/com/intel/jndn/management/NFD.java
+++ b/src/main/java/com/intel/jndn/management/NFD.java
@@ -14,6 +14,7 @@
 import com.intel.jndn.management.types.StatusDataset;
 import com.intel.jndn.management.types.ControlResponse;
 import com.intel.jndn.management.types.FaceStatus;
+import com.intel.jndn.management.types.FibEntry;
 import com.intel.jndn.management.types.RibEntry;
 import com.intel.jndn.utils.Client;
 import java.io.IOException;
@@ -89,7 +90,7 @@
     interest.setChildSelector(Interest.CHILD_SELECTOR_RIGHT);
     interest.setInterestLifetimeMilliseconds(DEFAULT_TIMEOUT);
 
-		// TODO verify that all faces are being returned; right now they don't
+    // TODO verify that all faces are being returned; right now they don't
     // match up with the results from nfd-status-http-server but no 
     // additional segments are present;  
     // see http://redmine.named-data.net/projects/nfd/wiki/StatusDataset
@@ -104,6 +105,36 @@
   }
 
   /**
+   * Retrieve a list of FIB entries and their NextHopRecords from the given
+   * forwarder; calls /localhost/nfd/fib/list which requires a local Face (all
+   * non-local packets are dropped).
+   *
+   * @param forwarder Only a localhost Face
+   * @return
+   * @throws Exception
+   */
+  public static List<FibEntry> getFibList(Face forwarder) throws Exception {
+    // build management Interest packet; see http://redmine.named-data.net/projects/nfd/wiki/StatusDataset
+    Interest interest = new Interest(new Name("/localhost/nfd/fib/list"));
+    interest.setMustBeFresh(true);
+    interest.setChildSelector(Interest.CHILD_SELECTOR_RIGHT);
+    interest.setInterestLifetimeMilliseconds(DEFAULT_TIMEOUT);
+
+    // TODO verify that all faces are being returned; right now they don't
+    // match up with the results from nfd-status-http-server but no 
+    // additional segments are present;  
+    // see http://redmine.named-data.net/projects/nfd/wiki/StatusDataset
+    // send packet
+    Data data = Client.getDefault().getSync(forwarder, interest);
+    if (data == null) {
+      throw new Exception("Failed to retrieve list of fib entries from the forwarder.");
+    }
+
+    // parse packet
+    return StatusDataset.wireDecode(data.getContent(), FibEntry.class);
+  }
+
+  /**
    * Retrieve a list of routing entries from the RIB; calls
    * /localhost/nfd/rib/list which requires a local Face (all non-local packets
    * are dropped)
@@ -250,6 +281,31 @@
   }
 
   /**
+   * Unregister a route on a forwarder; see
+   * http://named-data.net/doc/NFD/current/manpages/nfdc.html for command-line
+   * usage and http://redmine.named-data.net/projects/nfd/wiki/RibMgmt for
+   * protocol documentation. Ensure the forwarding face is on the local machine
+   * (management requests are to /localhost/...) and that command signing has
+   * been set up (e.g. forwarder.setCommandSigningInfo()
+   *
+   * @param forwarder
+   * @param route
+   * @return
+   */
+  public static boolean unregister(Face forwarder, Name route) throws Exception{
+     // build command name
+    ControlParameters controlParameters = new ControlParameters();
+    controlParameters.setName(route);
+
+    // build command name
+    Name command = new Name("/localhost/nfd/rib/unregister");
+    command.append(controlParameters.wireEncode());
+
+    // send the interest
+    return sendCommandAndErrorCheck(forwarder, new Interest(command));
+  }
+
+  /**
    * Set a strategy on the forwarder; see
    * http://named-data.net/doc/NFD/current/manpages/nfdc.html for command-line
    * usage and http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
diff --git a/src/test/java/com/intel/jndn/management/FaceStatusTest.java b/src/test/java/com/intel/jndn/management/FaceStatusTest.java
index e5fbab7..42bba95 100644
--- a/src/test/java/com/intel/jndn/management/FaceStatusTest.java
+++ b/src/test/java/com/intel/jndn/management/FaceStatusTest.java
@@ -14,6 +14,8 @@
 import com.intel.jndn.management.types.FaceStatus;
 import com.intel.jndn.utils.Client;
 import java.util.List;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
 import junit.framework.Assert;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Face;
@@ -21,8 +23,6 @@
 import net.named_data.jndn.Name;
 import net.named_data.jndn.encoding.EncodingException;
 import net.named_data.jndn.util.Blob;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.junit.Test;
 import static org.junit.Assert.*;
 
@@ -34,7 +34,7 @@
  */
 public class FaceStatusTest {
 
-  private static final Logger logger = LogManager.getLogger();
+  private static final Logger logger = Logger.getLogger(FaceStatusTest.class.getName());
 
   /**
    * Test encoding/decoding
diff --git a/src/test/java/com/intel/jndn/management/IntegrationSuite.java b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
new file mode 100644
index 0000000..d968df0
--- /dev/null
+++ b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
@@ -0,0 +1,43 @@
+/*
+ * File name: IntegrationSuite.java
+ * 
+ * Purpose: Tests to run with a local NFD as part of integration testing; will
+ * not run in the maven test phase, must be run manually.
+ * 
+ * © Copyright Intel Corporation. All rights reserved.
+ * Intel Corporation, 2200 Mission College Boulevard,
+ * Santa Clara, CA 95052-8119, USA
+ */
+package com.intel.jndn.management;
+
+import java.util.logging.Logger;
+import junit.framework.Assert;
+import net.named_data.jndn.Face;
+import net.named_data.jndn.Name;
+
+/**
+ * Tests to run with a local NFD as part of integration testing; will not run in
+ * the maven test phase, must be run manually.
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class IntegrationSuite {
+
+  private static final Logger logger = Logger.getLogger(IntegrationSuite.class.getName());
+
+  public static void main(String[] args) throws Exception {
+    Face face = new Face();
+    Assert.assertTrue(NFD.pingLocal(face));
+    
+    // grab datasets
+    Assert.assertFalse(NFD.getFaceList(face).isEmpty());
+    Assert.assertFalse(NFD.getFibList(face).isEmpty());
+    Assert.assertFalse(NFD.getRouteList(face).isEmpty());
+    
+    // create a new route
+    Assert.assertTrue(NFD.register(face, "contentstore://", new Name("/my/cache/route"), 999));
+    
+    // remove the route
+    Assert.assertTrue(NFD.unregister(face, new Name("/my/cache/route")));
+  }
+}
