diff --git a/rib/rib-entry.cpp b/rib/rib-entry.cpp
index ff646fa..d59338d 100644
--- a/rib/rib-entry.cpp
+++ b/rib/rib-entry.cpp
@@ -238,6 +238,39 @@
   return candidate;
 }
 
+ndn::PrefixAnnouncement
+RibEntry::getPrefixAnnouncement(time::milliseconds minExpiration,
+                                time::milliseconds maxExpiration) const
+{
+  const Route* bestAnnRoute = nullptr;
+  auto entryExpiry = time::steady_clock::TimePoint::min();
+
+  for (const Route& route : *this) {
+    if (route.expires) {
+      entryExpiry = std::max(entryExpiry, *route.expires);
+      if (route.announcement) {
+        if (bestAnnRoute == nullptr || *route.expires > *bestAnnRoute->expires) {
+          bestAnnRoute = &route;
+        }
+      }
+    }
+    else {
+      entryExpiry = time::steady_clock::TimePoint::max();
+    }
+  }
+
+  if (bestAnnRoute != nullptr) {
+    return *bestAnnRoute->announcement;
+  }
+
+  ndn::PrefixAnnouncement ann;
+  ann.setAnnouncedName(m_name);
+  ann.setExpiration(ndn::clamp(
+    time::duration_cast<time::milliseconds>(entryExpiry - time::steady_clock::now()),
+    minExpiration, maxExpiration));
+  return ann;
+}
+
 std::ostream&
 operator<<(std::ostream& os, const RibEntry& entry)
 {
diff --git a/rib/rib-entry.hpp b/rib/rib-entry.hpp
index 161ebd4..60da09b 100644
--- a/rib/rib-entry.hpp
+++ b/rib/rib-entry.hpp
@@ -165,6 +165,22 @@
   const Route*
   getRouteWithLowestCostAndChildInheritByFaceId(uint64_t faceId) const;
 
+  /** \brief Retrieve a prefix announcement suitable for readvertising this route.
+   *
+   *  If one or more routes in this RIB entry contains a prefix announcement, this method returns
+   *  the announcement from the route that expires last.
+   *
+   *  If this RIB entry does not have a route containing a prefix announcement, this method creates
+   *  a new announcement. Its expiration period reflects the remaining lifetime of this RIB entry,
+   *  confined within [\p minExpiration, \p maxExpiration] range. The caller is expected to sign
+   *  this announcement.
+   *
+   *  \warning (minExpiration > maxExpiration) triggers undefined behavior.
+   */
+  ndn::PrefixAnnouncement
+  getPrefixAnnouncement(time::milliseconds minExpiration = 15_s,
+                        time::milliseconds maxExpiration = 1_h) const;
+
   const_iterator
   begin() const;
 
diff --git a/rib/rib.cpp b/rib/rib.cpp
index 542a582..5385cf1 100644
--- a/rib/rib.cpp
+++ b/rib/rib.cpp
@@ -113,12 +113,10 @@
         scheduler::cancel(entryIt->getExpirationEvent());
       }
 
+      *entryIt = route;
+
       // No checks are required here as the iterator needs to be updated in all cases.
       entryIt->setExpirationEvent(route.getExpirationEvent());
-
-      entryIt->flags = route.flags;
-      entryIt->cost = route.cost;
-      entryIt->expires = route.expires;
     }
   }
   else {
diff --git a/rib/route.cpp b/rib/route.cpp
index 08e469b..04999bb 100644
--- a/rib/route.cpp
+++ b/rib/route.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,11 +29,33 @@
 namespace nfd {
 namespace rib {
 
-Route::Route()
-  : faceId(0)
-  , origin(ndn::nfd::ROUTE_ORIGIN_APP)
-  , cost(0)
-  , flags(ndn::nfd::ROUTE_FLAGS_NONE)
+const uint64_t PA_ROUTE_COST = 2048; ///< cost of route created by prefix announcement
+
+static time::steady_clock::TimePoint
+computeExpiration(const ndn::PrefixAnnouncement& ann)
+{
+  time::steady_clock::Duration validityEnd = time::steady_clock::Duration::max();
+  if (ann.getValidityPeriod()) {
+    auto now = time::system_clock::now();
+    if (!ann.getValidityPeriod()->isValid(now)) {
+      validityEnd = time::steady_clock::Duration::zero();
+    }
+    else {
+      validityEnd = ann.getValidityPeriod()->getPeriod().second - now;
+    }
+  }
+  return time::steady_clock::now() +
+    std::min(validityEnd, time::duration_cast<time::steady_clock::Duration>(ann.getExpiration()));
+}
+
+Route::Route(const ndn::PrefixAnnouncement& ann, uint64_t faceId)
+  : faceId(faceId)
+  , origin(ndn::nfd::ROUTE_ORIGIN_PREFIXANN)
+  , cost(PA_ROUTE_COST)
+  , flags(ndn::nfd::ROUTE_FLAG_CHILD_INHERIT)
+  , expires(computeExpiration(ann))
+  , announcement(ann)
+  , annExpires(*expires)
 {
 }
 
@@ -44,7 +66,8 @@
          lhs.origin == rhs.origin &&
          lhs.flags == rhs.flags &&
          lhs.cost == rhs.cost &&
-         lhs.expires == rhs.expires;
+         lhs.expires == rhs.expires &&
+         lhs.announcement == rhs.announcement;
 }
 
 std::ostream&
@@ -61,7 +84,10 @@
   else {
     os << ", never expires";
   }
-  os << ")";
+  if (route.announcement) {
+    os << ", announcement: (" << *route.announcement << ')';
+  }
+  os << ')';
 
   return os;
 }
diff --git a/rib/route.hpp b/rib/route.hpp
index 5ad4d79..8106406 100644
--- a/rib/route.hpp
+++ b/rib/route.hpp
@@ -30,6 +30,7 @@
 
 #include <ndn-cxx/encoding/nfd-constants.hpp>
 #include <ndn-cxx/mgmt/nfd/route-flags-traits.hpp>
+#include <ndn-cxx/prefix-announcement.hpp>
 
 #include <type_traits>
 
@@ -41,7 +42,15 @@
 class Route : public ndn::nfd::RouteFlagsTraits<Route>
 {
 public:
-  Route();
+  /** \brief default constructor
+   */
+  Route() = default;
+
+  /** \brief construct from a prefix announcement
+   *  \param ann a prefix announcement that has passed verification
+   *  \param faceId the face on which \p ann arrived
+   */
+  Route(const ndn::PrefixAnnouncement& ann, uint64_t faceId);
 
   void
   setExpirationEvent(const scheduler::EventId eid)
@@ -62,12 +71,28 @@
   }
 
 public:
-  uint64_t faceId;
-  ndn::nfd::RouteOrigin origin;
-  uint64_t cost;
-  std::underlying_type<ndn::nfd::RouteFlags>::type flags;
+  uint64_t faceId = 0;
+  ndn::nfd::RouteOrigin origin = ndn::nfd::ROUTE_ORIGIN_APP;
+  uint64_t cost = 0;
+  std::underlying_type<ndn::nfd::RouteFlags>::type flags = ndn::nfd::ROUTE_FLAGS_NONE;
   optional<time::steady_clock::TimePoint> expires;
 
+  /** \brief The prefix announcement that caused the creation of this route.
+   *
+   *  This is nullopt if this route is not created by a prefix announcement.
+   */
+  optional<ndn::PrefixAnnouncement> announcement;
+
+  /** \brief Expiration time of the prefix announcement.
+   *
+   *  Valid only if announcement is not nullopt.
+   *
+   *  If this field is before or equal the current time, it indicates the prefix announcement is
+   *  not yet valid or has expired. In this case, the exact value of this field does not matter.
+   *  If this field is after the current time, it indicates when the prefix announcement expires.
+   */
+  time::steady_clock::TimePoint annExpires;
+
 private:
   scheduler::EventId m_expirationEvent;
 };
diff --git a/tests/rib/rib-entry.t.cpp b/tests/rib/rib-entry.t.cpp
index 65f73dc..a5c9f3c 100644
--- a/tests/rib/rib-entry.t.cpp
+++ b/tests/rib/rib-entry.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,9 @@
 namespace rib {
 namespace tests {
 
-BOOST_FIXTURE_TEST_SUITE(TestRibEntry, nfd::tests::BaseFixture)
+using namespace nfd::tests;
+
+BOOST_FIXTURE_TEST_SUITE(TestRibEntry, BaseFixture)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
@@ -72,6 +74,100 @@
   BOOST_CHECK(entry.findRoute(route2) != entry.getRoutes().end());
 }
 
+BOOST_FIXTURE_TEST_SUITE(GetAnnouncement, UnitTestTimeFixture)
+
+static Route
+makeSimpleRoute(uint64_t faceId)
+{
+  Route route;
+  route.faceId = faceId;
+  return route;
+}
+
+static Route
+makeSimpleRoute(uint64_t faceId, time::steady_clock::Duration expiration)
+{
+  Route route = makeSimpleRoute(faceId);
+  route.expires = time::steady_clock::now() + expiration;
+  return route;
+}
+
+BOOST_AUTO_TEST_CASE(Empty)
+{
+  RibEntry entry;
+  // entry has no Route
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 30_s);
+  BOOST_CHECK_GE(pa.getExpiration(), 15_s);
+  BOOST_CHECK_LE(pa.getExpiration(), 30_s);
+  // A RibEntry without Route does not have a defined expiration time,
+  // so this test only checks that there's no exception and the expiration period is clamped.
+}
+
+BOOST_AUTO_TEST_CASE(ReuseAnnouncement1)
+{
+  RibEntry entry;
+  entry.insertRoute(Route(makePrefixAnn("/A", 212_s), 5858));
+  entry.insertRoute(Route(makePrefixAnn("/A", 555_s), 2454));
+  entry.insertRoute(makeSimpleRoute(8282, 799_s));
+  entry.insertRoute(makeSimpleRoute(1141));
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 30_s);
+  BOOST_CHECK_EQUAL(pa.getExpiration(), 555_s); // not modified and not clamped
+}
+
+BOOST_AUTO_TEST_CASE(ReuseAnnouncement2)
+{
+  RibEntry entry;
+  entry.insertRoute(Route(makePrefixAnn("/A", 212_s), 7557)); // expires at +212s
+
+  advanceClocks(100_s);
+  entry.insertRoute(Route(makePrefixAnn("/A", 136_s), 1010)); // expires at +236s
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 30_s);
+  BOOST_CHECK_EQUAL(pa.getExpiration(), 136_s);
+  // Although face 7557's announcement has a longer expiration period,
+  // the route for face 1010 expires last and thus its announcement is chosen.
+}
+
+BOOST_AUTO_TEST_CASE(MakeAnnouncement)
+{
+  RibEntry entry;
+  entry.insertRoute(makeSimpleRoute(6398, 765_s));
+  entry.insertRoute(makeSimpleRoute(2954, 411_s));
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 999_s);
+  BOOST_CHECK_EQUAL(pa.getExpiration(), 764_s);
+}
+
+BOOST_AUTO_TEST_CASE(MakeAnnouncementInfinite)
+{
+  RibEntry entry;
+  entry.insertRoute(makeSimpleRoute(4877, 240_s));
+  entry.insertRoute(makeSimpleRoute(5053));
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 877_s);
+  BOOST_CHECK_EQUAL(pa.getExpiration(), 877_s); // clamped at maxExpiration
+}
+
+BOOST_AUTO_TEST_CASE(MakeAnnouncementShortExpiration)
+{
+  RibEntry entry;
+  entry.insertRoute(makeSimpleRoute(4877, 8_s));
+  entry.insertRoute(makeSimpleRoute(5053, 9_s));
+
+  advanceClocks(1_s);
+  auto pa = entry.getPrefixAnnouncement(15_s, 666_s);
+  BOOST_CHECK_EQUAL(pa.getExpiration(), 15_s); // clamped at minExpiration
+}
+
+BOOST_AUTO_TEST_SUITE_END() // GetAnnouncement
+
 BOOST_AUTO_TEST_SUITE_END() // TestRibEntry
 
 } // namespace tests
diff --git a/tests/rib/route.t.cpp b/tests/rib/route.t.cpp
index 4d66d0d..b1390b8 100644
--- a/tests/rib/route.t.cpp
+++ b/tests/rib/route.t.cpp
@@ -35,6 +35,59 @@
 
 BOOST_FIXTURE_TEST_SUITE(TestRoute, BaseFixture)
 
+BOOST_FIXTURE_TEST_SUITE(CreateFromAnnouncement, UnitTestTimeFixture)
+
+BOOST_AUTO_TEST_CASE(NoValidity)
+{
+  auto pa = makePrefixAnn("/A", 212_s);
+  Route route(pa, 1815);
+  BOOST_CHECK_EQUAL(route.faceId, 1815);
+  BOOST_CHECK_EQUAL(route.origin, ndn::nfd::ROUTE_ORIGIN_PREFIXANN);
+  BOOST_CHECK_EQUAL(route.cost, 2048);
+  BOOST_CHECK_EQUAL(route.flags, ndn::nfd::ROUTE_FLAG_CHILD_INHERIT);
+  BOOST_CHECK_EQUAL(route.annExpires, time::steady_clock::now() + 212_s);
+  BOOST_REQUIRE(route.expires);
+  BOOST_CHECK_EQUAL(*route.expires, route.annExpires);
+}
+
+BOOST_AUTO_TEST_CASE(BeforeNotBefore)
+{
+  auto pa = makePrefixAnn("/A", 212_s, {10_s, 80_s});
+  Route route(pa, 1053);
+  BOOST_CHECK_LE(route.annExpires, time::steady_clock::now());
+  BOOST_REQUIRE(route.expires);
+  BOOST_CHECK_LE(*route.expires, time::steady_clock::now());
+}
+
+BOOST_AUTO_TEST_CASE(AfterNotAfter)
+{
+  auto pa = makePrefixAnn("/A", 212_s, {-80_s, -10_s});
+  Route route(pa, 2972);
+  BOOST_CHECK_LE(route.annExpires, time::steady_clock::now());
+  BOOST_REQUIRE(route.expires);
+  BOOST_CHECK_LE(*route.expires, time::steady_clock::now());
+}
+
+BOOST_AUTO_TEST_CASE(ExpirationLtValidity)
+{
+  auto pa = makePrefixAnn("/A", 212_s, {-100_s, 300_s});
+  Route route(pa, 7804);
+  BOOST_CHECK_EQUAL(route.annExpires, time::steady_clock::now() + 212_s);
+  BOOST_REQUIRE(route.expires);
+  BOOST_CHECK_EQUAL(*route.expires, route.annExpires);
+}
+
+BOOST_AUTO_TEST_CASE(ValidityLtExpiration)
+{
+  auto pa = makePrefixAnn("/A", 212_s, {-100_s, 200_s});
+  Route route(pa, 7804);
+  BOOST_CHECK_EQUAL(route.annExpires, time::steady_clock::now() + 200_s);
+  BOOST_REQUIRE(route.expires);
+  BOOST_CHECK_EQUAL(*route.expires, route.annExpires);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // CreateFromAnnouncement
+
 BOOST_AUTO_TEST_CASE(Equality)
 {
   Route a;
@@ -45,7 +98,7 @@
   a.origin = b.origin = ndn::nfd::ROUTE_ORIGIN_NLSR;
   a.flags = b.flags = ndn::nfd::ROUTE_FLAG_CHILD_INHERIT;
   a.cost = b.cost = 28826;
-  a.expires = b.expires = time::steady_clock::now() + time::milliseconds(26782232);
+  a.expires = b.expires = time::steady_clock::now() + 26782232_ms;
   BOOST_CHECK_EQUAL(a, b);
 
   b.faceId = 18559;
@@ -71,6 +124,15 @@
   BOOST_CHECK_EQUAL(a, b);
 }
 
+BOOST_FIXTURE_TEST_CASE(EqualityAnn, UnitTestTimeFixture)
+{
+  auto ann1 = makePrefixAnn("/ann", 1_h);
+  auto ann2 = makePrefixAnn("/ann", 2_h);
+  BOOST_CHECK_EQUAL(Route(ann1, 7001), Route(ann1, 7001));
+  BOOST_CHECK_NE(Route(ann1, 7001), Route(ann1, 7002));
+  BOOST_CHECK_NE(Route(ann1, 7001), Route(ann2, 7001));
+}
+
 BOOST_FIXTURE_TEST_CASE(Output, UnitTestTimeFixture)
 {
   Route r;
@@ -81,13 +143,19 @@
   r.origin = ndn::nfd::ROUTE_ORIGIN_STATIC;
   r.flags = ndn::nfd::ROUTE_FLAG_CHILD_INHERIT;
   r.cost = 2312;
-  r.expires = time::steady_clock::now() + time::milliseconds(791214234);
+  r.expires = time::steady_clock::now() + 791214234_ms;
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
-                    "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, expires in: 791214234 milliseconds)");
+                    "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, expires in: "
+                    "791214234 milliseconds)");
 
   r.expires = nullopt;
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
                     "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, never expires)");
+
+  r = Route(makePrefixAnn("/ann", 1_h), 3247);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
+                    "Route(faceid: 3247, origin: prefixann, cost: 2048, flags: 0x1, expires in: "
+                    "3600000 milliseconds, announcement: (/ann expires=3600000 milliseconds))");
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestRoute
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index 21cb91a..62e728a 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -126,5 +126,33 @@
   return makeNack(std::move(interest), reason);
 }
 
+ndn::PrefixAnnouncement
+makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
+              optional<ndn::security::ValidityPeriod> validity)
+{
+  ndn::PrefixAnnouncement pa;
+  pa.setAnnouncedName(announcedName);
+  pa.setExpiration(expiration);
+  pa.setValidityPeriod(validity);
+  return pa;
+}
+
+ndn::PrefixAnnouncement
+makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
+              std::pair<time::seconds, time::seconds> validityFromNow)
+{
+  auto now = time::system_clock::now();
+  return makePrefixAnn(announcedName, expiration,
+    ndn::security::ValidityPeriod(now + validityFromNow.first, now + validityFromNow.second));
+}
+
+ndn::PrefixAnnouncement
+signPrefixAnn(ndn::PrefixAnnouncement&& pa, ndn::KeyChain& keyChain,
+              const ndn::security::SigningInfo& si, optional<uint64_t> version)
+{
+  pa.toData(keyChain, si, version);
+  return std::move(pa);
+}
+
 } // namespace tests
 } // namespace nfd
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 1a4a0d5..c01484c 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -30,6 +30,7 @@
 
 #include "core/global-io.hpp"
 
+#include <ndn-cxx/prefix-announcement.hpp>
 #include <ndn-cxx/util/time-unit-test-clock.hpp>
 
 #ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
@@ -175,6 +176,28 @@
   packet.setName(name);
 }
 
+/** \brief create a prefix announcement without signing
+ */
+ndn::PrefixAnnouncement
+makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
+              optional<ndn::security::ValidityPeriod> validity = nullopt);
+
+/** \brief create a prefix announcement without signing
+ *  \param announcedName announced name
+ *  \param expiration expiration period
+ *  \param validityFromNow validity period, relative from now
+ */
+ndn::PrefixAnnouncement
+makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
+              std::pair<time::seconds, time::seconds> validityFromNow);
+
+/** \brief sign a prefix announcement
+ */
+ndn::PrefixAnnouncement
+signPrefixAnn(ndn::PrefixAnnouncement&& pa, ndn::KeyChain& keyChain,
+              const ndn::security::SigningInfo& si = ndn::KeyChain::getDefaultSigningInfo(),
+              optional<uint64_t> version = nullopt);
+
 } // namespace tests
 } // namespace nfd
 
