diff --git a/src/main/java/com/intel/jndn/management/NFD.java b/src/main/java/com/intel/jndn/management/NFD.java
index 58d5d70..026faca 100644
--- a/src/main/java/com/intel/jndn/management/NFD.java
+++ b/src/main/java/com/intel/jndn/management/NFD.java
@@ -17,6 +17,7 @@
 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.LocalControlHeader;
 import com.intel.jndn.management.types.RibEntry;
 import com.intel.jndn.utils.Client;
 import com.intel.jndn.utils.SegmentedClient;
@@ -232,6 +233,46 @@
   }
 
   /**
+   * Enable a local control feature on the given forwarder. See
+   * http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature
+   *
+   * @param forwarder
+   * @param header
+   * @return
+   * @throws Exception
+   */
+  public static boolean enableLocalControlHeader(Face forwarder, LocalControlHeader header) throws Exception {
+    // build command name
+    Name command = new Name("/localhost/nfd/faces/enable-local-control");
+    ControlParameters parameters = new ControlParameters();
+    parameters.setLocalControlFeature(header.getNumericValue());
+    command.append(parameters.wireEncode());
+
+    // send command and return
+    return sendCommandAndErrorCheck(forwarder, new Interest(command));
+  }
+
+  /**
+   * Disable a local control feature on the given forwarder. See
+   * http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Disable-a-LocalControlHeader-feature
+   *
+   * @param forwarder
+   * @param header
+   * @return
+   * @throws Exception
+   */
+  public static boolean disableLocalControlHeader(Face forwarder, LocalControlHeader header) throws Exception {
+    // build command name
+    Name command = new Name("/localhost/nfd/faces/disable-local-control");
+    ControlParameters parameters = new ControlParameters();
+    parameters.setLocalControlFeature(header.getNumericValue());
+    command.append(parameters.wireEncode());
+
+    // send command and return
+    return sendCommandAndErrorCheck(forwarder, new Interest(command));
+  }
+
+  /**
    * Register a route 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/RibMgmt for
diff --git a/src/main/java/com/intel/jndn/management/types/LocalControlHeader.java b/src/main/java/com/intel/jndn/management/types/LocalControlHeader.java
new file mode 100644
index 0000000..4a2aee2
--- /dev/null
+++ b/src/main/java/com/intel/jndn/management/types/LocalControlHeader.java
@@ -0,0 +1,36 @@
+/*
+ * jndn-management
+ * Copyright (c) 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 3, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
+ * more details.
+ */
+package com.intel.jndn.management.types;
+
+/**
+ * Define constants for local control header options. See
+ * http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public enum LocalControlHeader {
+
+  INCOMING_FACE_ID(1),
+  NEXT_HOP_FACE_ID(2),
+  CACHING_POLICY(3);
+
+  LocalControlHeader(int value) {
+    value_ = value;
+  }
+
+  public final int getNumericValue() {
+    return value_;
+  }
+  private final int value_;
+}
diff --git a/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java b/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java
new file mode 100644
index 0000000..a8116fb
--- /dev/null
+++ b/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java
@@ -0,0 +1,56 @@
+/*
+ * jndn-management
+ * Copyright (c) 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 3, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
+ * more details.
+ */
+package com.intel.jndn.management;
+
+import com.intel.jndn.management.types.LocalControlHeader;
+import com.intel.jndn.utils.Client;
+import java.util.logging.Logger;
+import net.named_data.jndn.Data;
+import net.named_data.jndn.Face;
+import net.named_data.jndn.Name;
+import net.named_data.jndn.encoding.EncodingException;
+import net.named_data.jndn.security.KeyChain;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Test functionality for LocalControlHeader
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class LocalControlHeaderTest {
+
+  private static final Logger logger = Logger.getLogger(IntegrationSuite.class.getName());
+
+  /**
+   * Integration test to run on actual system
+   *
+   * @param args
+   * @throws EncodingException
+   */
+  public static void main(String[] args) throws Exception {
+    // setup forwarder face
+    Face forwarder = new Face("localhost");
+    KeyChain keyChain = IntegrationSuite.buildTestKeyChain();
+    forwarder.setCommandSigningInfo(keyChain, keyChain.getDefaultCertificateName());
+    
+    // enable incoming face ID header
+    boolean success = NFD.enableLocalControlHeader(forwarder, LocalControlHeader.INCOMING_FACE_ID);
+    assertTrue(success);
+    
+    // use and verify
+    Data data = Client.getDefault().getSync(forwarder, new Name("/localhop/nfd"));
+    long faceId = data.getIncomingFaceId();
+    logger.info("Face ID for this client on the forwarder: " + faceId);
+  }
+}
