diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java
index 99dbc57..a607ca7 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.incubator.net.routing;
 
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.collect.ImmutableSet;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.IpPrefix;
@@ -28,7 +29,6 @@
  * Route configuration object for Route Service.
  */
 public class RouteConfig extends Config<ApplicationId> {
-    private static final String ROUTES = "routes";
     private static final String PREFIX = "prefix";
     private static final String NEXTHOP = "nextHop";
 
@@ -50,4 +50,17 @@
         });
         return routes.build();
     }
+
+    @Override
+    public boolean isValid() {
+        array.forEach(routeNode -> {
+            if (!routeNode.isObject()) {
+                throw new IllegalArgumentException("Not object node");
+            }
+            ObjectNode route = (ObjectNode) routeNode;
+            isIpPrefix(route, PREFIX, FieldPresence.MANDATORY);
+            isIpAddress(route, NEXTHOP, FieldPresence.MANDATORY);
+        });
+        return true;
+    }
 }
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java
new file mode 100644
index 0000000..6537bae
--- /dev/null
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.incubator.net.routing.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.incubator.net.routing.Route;
+import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.incubator.net.routing.RouteConfig;
+import org.onosproject.net.config.ConfigFactory;
+import org.onosproject.net.config.NetworkConfigEvent;
+import org.onosproject.net.config.NetworkConfigListener;
+import org.onosproject.net.config.NetworkConfigRegistry;
+import org.onosproject.net.config.basics.SubjectFactories;
+
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Route source that installs static routes configured in the network configuration.
+ */
+@Component(immediate = true)
+public class ConfigurationRouteSource {
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected NetworkConfigRegistry netcfgRegistry;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected RouteAdminService routeService;
+
+    private final ConfigFactory<ApplicationId, RouteConfig> routeConfigFactory =
+            new ConfigFactory<ApplicationId, RouteConfig>(
+                    SubjectFactories.APP_SUBJECT_FACTORY,
+                    RouteConfig.class, "routes", true) {
+                @Override
+                public RouteConfig createConfig() {
+                    return new RouteConfig();
+                }
+            };
+    private final InternalNetworkConfigListener netcfgListener =
+            new InternalNetworkConfigListener();
+
+    @Activate
+    protected void activate() {
+        netcfgRegistry.addListener(netcfgListener);
+        netcfgRegistry.registerConfigFactory(routeConfigFactory);
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        netcfgRegistry.removeListener(netcfgListener);
+        netcfgRegistry.unregisterConfigFactory(routeConfigFactory);
+    }
+
+    private void processRouteConfigAdded(NetworkConfigEvent event) {
+        Set<Route> routes = ((RouteConfig) event.config().get()).getRoutes();
+        routeService.update(routes);
+    }
+
+    private void processRouteConfigUpdated(NetworkConfigEvent event) {
+        Set<Route> routes = ((RouteConfig) event.config().get()).getRoutes();
+        Set<Route> prevRoutes = ((RouteConfig) event.prevConfig().get()).getRoutes();
+        Set<Route> pendingRemove = prevRoutes.stream()
+                .filter(prevRoute -> routes.stream()
+                        .noneMatch(route -> route.prefix().equals(prevRoute.prefix())))
+                .collect(Collectors.toSet());
+        Set<Route> pendingUpdate = routes.stream()
+                .filter(route -> !pendingRemove.contains(route)).collect(Collectors.toSet());
+        routeService.update(pendingUpdate);
+        routeService.withdraw(pendingRemove);
+    }
+
+    private void processRouteConfigRemoved(NetworkConfigEvent event) {
+        Set<Route> prevRoutes = ((RouteConfig) event.prevConfig().get()).getRoutes();
+        routeService.withdraw(prevRoutes);
+    }
+
+    private class InternalNetworkConfigListener implements
+            NetworkConfigListener {
+        @Override
+        public void event(NetworkConfigEvent event) {
+            if (event.configClass().equals(RouteConfig.class)) {
+                switch (event.type()) {
+                case CONFIG_ADDED:
+                    processRouteConfigAdded(event);
+                    break;
+                case CONFIG_UPDATED:
+                    processRouteConfigUpdated(event);
+                    break;
+                case CONFIG_REMOVED:
+                    processRouteConfigRemoved(event);
+                    break;
+                default:
+                    break;
+                }
+            }
+        }
+    }
+}
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
index 5f3640b..368d65e 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
@@ -23,14 +23,12 @@
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.Service;
 import org.onlab.packet.IpAddress;
-import org.onosproject.core.ApplicationId;
 import org.onosproject.event.ListenerService;
-import org.onosproject.incubator.net.routing.NextHopData;
 import org.onosproject.incubator.net.routing.NextHop;
+import org.onosproject.incubator.net.routing.NextHopData;
 import org.onosproject.incubator.net.routing.ResolvedRoute;
 import org.onosproject.incubator.net.routing.Route;
 import org.onosproject.incubator.net.routing.RouteAdminService;
-import org.onosproject.incubator.net.routing.RouteConfig;
 import org.onosproject.incubator.net.routing.RouteEvent;
 import org.onosproject.incubator.net.routing.RouteListener;
 import org.onosproject.incubator.net.routing.RouteService;
@@ -38,11 +36,6 @@
 import org.onosproject.incubator.net.routing.RouteStoreDelegate;
 import org.onosproject.incubator.net.routing.RouteTableId;
 import org.onosproject.net.Host;
-import org.onosproject.net.config.ConfigFactory;
-import org.onosproject.net.config.NetworkConfigEvent;
-import org.onosproject.net.config.NetworkConfigListener;
-import org.onosproject.net.config.NetworkConfigRegistry;
-import org.onosproject.net.config.basics.SubjectFactories;
 import org.onosproject.net.host.HostEvent;
 import org.onosproject.net.host.HostListener;
 import org.onosproject.net.host.HostService;
@@ -85,34 +78,17 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected HostService hostService;
 
-    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected NetworkConfigRegistry netcfgRegistry;
-
     @GuardedBy(value = "this")
     private Map<RouteListener, ListenerQueue> listeners = new HashMap<>();
 
     private ThreadFactory threadFactory;
 
-    private final ConfigFactory<ApplicationId, RouteConfig> routeConfigFactory =
-            new ConfigFactory<ApplicationId, RouteConfig>(
-                    SubjectFactories.APP_SUBJECT_FACTORY,
-                    RouteConfig.class, "routes", true) {
-                @Override
-                public RouteConfig createConfig() {
-                    return new RouteConfig();
-                }
-            };
-    private final InternalNetworkConfigListener netcfgListener =
-            new InternalNetworkConfigListener();
-
     @Activate
     protected void activate() {
         threadFactory = groupedThreads("onos/route", "listener-%d", log);
 
         routeStore.setDelegate(delegate);
         hostService.addListener(hostListener);
-        netcfgRegistry.addListener(netcfgListener);
-        netcfgRegistry.registerConfigFactory(routeConfigFactory);
     }
 
     @Deactivate
@@ -121,8 +97,6 @@
 
         routeStore.unsetDelegate(delegate);
         hostService.removeListener(hostListener);
-        netcfgRegistry.removeListener(netcfgListener);
-        netcfgRegistry.unregisterConfigFactory(routeConfigFactory);
     }
 
     /**
@@ -355,50 +329,4 @@
         }
     }
 
-    private class InternalNetworkConfigListener implements NetworkConfigListener {
-        @Override
-        public void event(NetworkConfigEvent event) {
-            if (event.configClass().equals(RouteConfig.class)) {
-                switch (event.type()) {
-                    case CONFIG_ADDED:
-                        processRouteConfigAdded(event);
-                        break;
-                    case CONFIG_UPDATED:
-                        processRouteConfigUpdated(event);
-                        break;
-                    case CONFIG_REMOVED:
-                        processRouteConfigRemoved(event);
-                        break;
-                    default:
-                        break;
-                }
-            }
-        }
-
-        private void processRouteConfigAdded(NetworkConfigEvent event) {
-            log.info("processRouteConfigAdded {}", event);
-            Set<Route> routes = ((RouteConfig) event.config().get()).getRoutes();
-            update(routes);
-        }
-
-        private void processRouteConfigUpdated(NetworkConfigEvent event) {
-            log.info("processRouteConfigUpdated {}", event);
-            Set<Route> routes = ((RouteConfig) event.config().get()).getRoutes();
-            Set<Route> prevRoutes = ((RouteConfig) event.prevConfig().get()).getRoutes();
-            Set<Route> pendingRemove = prevRoutes.stream()
-                    .filter(prevRoute -> routes.stream()
-                            .noneMatch(route -> route.prefix().equals(prevRoute.prefix())))
-                    .collect(Collectors.toSet());
-            Set<Route> pendingUpdate = routes.stream()
-                    .filter(route -> !pendingRemove.contains(route)).collect(Collectors.toSet());
-            update(pendingUpdate);
-            withdraw(pendingRemove);
-        }
-
-        private void processRouteConfigRemoved(NetworkConfigEvent event) {
-            log.info("processRouteConfigRemoved {}", event);
-            Set<Route> prevRoutes = ((RouteConfig) event.prevConfig().get()).getRoutes();
-            withdraw(prevRoutes);
-        }
-    }
 }
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java
index e740f3f..ba73cde 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java
@@ -39,7 +39,6 @@
 import org.onosproject.net.HostId;
 import org.onosproject.net.HostLocation;
 import org.onosproject.net.PortNumber;
-import org.onosproject.net.config.NetworkConfigRegistry;
 import org.onosproject.net.host.HostEvent;
 import org.onosproject.net.host.HostListener;
 import org.onosproject.net.host.HostService;
@@ -94,7 +93,6 @@
 
         routeManager = new TestRouteManager();
         routeManager.hostService = hostService;
-        routeManager.netcfgRegistry = createMock(NetworkConfigRegistry.class);
 
         LocalRouteStore routeStore = new LocalRouteStore();
         routeStore.activate();
