diff --git a/daemon/face/ethernet.cpp b/daemon/face/ethernet.cpp
new file mode 100644
index 0000000..af11a3a
--- /dev/null
+++ b/daemon/face/ethernet.cpp
@@ -0,0 +1,52 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Named Data Networking Project
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "ethernet.hpp"
+
+#include <stdio.h>
+
+namespace nfd {
+namespace ethernet {
+
+std::string
+Address::toString(char sep) const
+{
+  char s[18]; // 12 digits + 5 separators + null terminator
+  ::snprintf(s, sizeof(s), "%02x%c%02x%c%02x%c%02x%c%02x%c%02x",
+             elems[0], sep, elems[1], sep, elems[2], sep,
+             elems[3], sep, elems[4], sep, elems[5]);
+  return std::string(s);
+}
+
+Address
+Address::fromString(const std::string& str)
+{
+  Address a;
+  int n, ret;
+
+  // colon-separated
+  ret = ::sscanf(str.c_str(), "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx%n",
+                 &a[0], &a[1], &a[2], &a[3], &a[4], &a[5], &n);
+  if (ret >= 6 && str.c_str()[n] == '\0')
+    return a;
+
+  // dash-separated
+  ret = ::sscanf(str.c_str(), "%hhx-%hhx-%hhx-%hhx-%hhx-%hhx%n",
+                 &a[0], &a[1], &a[2], &a[3], &a[4], &a[5], &n);
+  if (ret >= 6 && str.c_str()[n] == '\0')
+    return a;
+
+  return Address();
+}
+
+std::ostream&
+operator<<(std::ostream& o, const Address& a)
+{
+  return o << a.toString();
+}
+
+} // namespace ethernet
+} // namespace nfd
diff --git a/daemon/face/ethernet.hpp b/daemon/face/ethernet.hpp
index f12b3fb..573ea56 100644
--- a/daemon/face/ethernet.hpp
+++ b/daemon/face/ethernet.hpp
@@ -56,8 +56,25 @@
   bool
   isNull() const;
 
+  /**
+   * @brief Converts the address to a human-readable string
+   *
+   * @param sep A character used to visually separate the octets,
+   *            usually a dash (the default value) or a colon
+   */
   std::string
   toString(char sep = '-') const;
+
+  /**
+   * @brief Creates an Address from a string containing an Ethernet address
+   *        in hexadecimal notation, with colons or dashes as separators
+   *
+   * @param str The string to be parsed
+   * @return Always an instance of Address, which will be null
+   *         if the parsing fails
+   */
+  static Address
+  fromString(const std::string& str);
 };
 
 /// Returns the Ethernet broadcast address (FF-FF-FF-FF-FF-FF)
@@ -125,21 +142,8 @@
          elems[3] == 0x0 && elems[4] == 0x0 && elems[5] == 0x0;
 }
 
-inline std::string
-Address::toString(char sep) const
-{
-  char s[18]; // 12 digits + 5 separators + null terminator
-  ::snprintf(s, sizeof(s), "%02x%c%02x%c%02x%c%02x%c%02x%c%02x",
-             elems[0], sep, elems[1], sep, elems[2], sep,
-             elems[3], sep, elems[4], sep, elems[5]);
-  return std::string(s);
-}
-
-static std::ostream&
-operator<<(std::ostream& o, const Address& a)
-{
-  return o << a.toString();
-}
+std::ostream&
+operator<<(std::ostream& o, const Address& a);
 
 } // namespace ethernet
 } // namespace nfd
