diff --git a/apps/mcast/api/BUCK b/apps/mcast/api/BUCK
new file mode 100644
index 0000000..db499cc
--- /dev/null
+++ b/apps/mcast/api/BUCK
@@ -0,0 +1,15 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:KRYO',
+    '//core/store/serializers:onos-core-serializers',
+]
+
+TEST_DEPS = [
+    '//lib:TEST_ADAPTERS',
+    '//utils/osgi:onlab-osgi-tests',
+]
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    test_deps = TEST_DEPS,
+)
diff --git a/apps/mcast/api/pom.xml b/apps/mcast/api/pom.xml
new file mode 100644
index 0000000..370d992
--- /dev/null
+++ b/apps/mcast/api/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+  ~ Copyright 2018-present Open Networking Foundation
+  ~
+  ~ 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.
+  -->
+<project
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+        xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-app-mcast</artifactId>
+        <version>1.12.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>onos-app-mcast-api</artifactId>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-serializers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-common</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastEvent.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastEvent.java
new file mode 100644
index 0000000..9230736
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastEvent.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.event.AbstractEvent;
+
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+/**
+ * An entity representing a multicast event. Event either add or remove
+ * sinks or sources.
+ */
+@Beta
+public class McastEvent extends AbstractEvent<McastEvent.Type, McastRouteUpdate> {
+
+    /**
+     * Mcast Event type enum.
+     */
+    public enum Type {
+        /**
+         * A new mcast route has been added.
+         */
+        ROUTE_ADDED,
+
+        /**
+         * A mcast route has been removed.
+         */
+        ROUTE_REMOVED,
+
+        /**
+         * A set of sources for a mcast route (ie. the subject) has been added.
+         */
+        SOURCES_ADDED,
+
+        /**
+         * A set of sources for a mcast route has been removed.
+         */
+        SOURCES_REMOVED,
+
+        /**
+         * A set of sinks for a mcast route (ie. the subject) has been added.
+         */
+        SINKS_ADDED,
+
+        /**
+         * A set of sinks for a mcast route (ie. the subject) has been removed.
+         */
+        SINKS_REMOVED
+    }
+
+    private McastRouteUpdate prevSubject;
+
+    /**
+     * Creates a McastEvent of a given type using the subject.
+     *
+     * @param type        the event type
+     * @param prevSubject the previous mcast information
+     * @param subject     the current mcast information
+     */
+    public McastEvent(McastEvent.Type type, McastRouteUpdate prevSubject, McastRouteUpdate subject) {
+        super(type, subject);
+        this.prevSubject = prevSubject;
+    }
+
+    /**
+     * Gets the previous subject in this Mcast event.
+     *
+     * @return the previous subject, or null if previous subject is not
+     * specified.
+     */
+    public McastRouteUpdate prevSubject() {
+        return this.prevSubject;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(type(), subject(), prevSubject());
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+
+        if (!(other instanceof McastEvent)) {
+            return false;
+        }
+
+        McastEvent that = (McastEvent) other;
+
+        return Objects.equals(this.subject(), that.subject()) &&
+                Objects.equals(this.type(), that.type()) &&
+                Objects.equals(this.prevSubject(), that.prevSubject());
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("type", type())
+                .add("prevSubject", prevSubject())
+                .add("subject", subject())
+                .toString();
+    }
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastListener.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastListener.java
new file mode 100644
index 0000000..980e23c
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastListener.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import org.onosproject.event.EventListener;
+
+/**
+ * A listener interface for multicast events.
+ */
+public interface McastListener extends EventListener<McastEvent> {
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRoute.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRoute.java
new file mode 100644
index 0000000..9d5afeb
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRoute.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import com.google.common.base.Objects;
+import org.onlab.packet.IpAddress;
+
+import java.util.Optional;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * An entity representing a multicast route consisting of a source ip
+ * and a multicast group address.
+ */
+@Beta
+public class McastRoute {
+
+    /**
+     * Possible route types.
+     */
+    public enum Type {
+        /**
+         * Route originates from PIM.
+         */
+        PIM,
+
+        /**
+         * Route originates from IGMP.
+         */
+        IGMP,
+
+        /**
+         * Route originates from other config (ie. REST, CLI).
+         */
+        STATIC
+    }
+
+    private final IpAddress source;
+    private final IpAddress group;
+    private final Type type;
+
+    /**
+     * Creates the McastRoute object. The source Ip can be null if this route is intent for ASM.
+     * @param source source Ip. Null if ASM route. Will translate in Optional.empty.
+     * @param group the multicast group
+     * @param type the route type.
+     */
+    public McastRoute(IpAddress source, IpAddress group, Type type) {
+        checkNotNull(group, "Multicast route must specify a group address");
+        this.source = source;
+        this.group = group;
+        this.type = type;
+    }
+
+    /**
+     * Fetches the source address of this route.
+     *
+     * @return an optional ip address.
+     */
+    public Optional<IpAddress> source() {
+        return Optional.ofNullable(source);
+    }
+
+    /**
+     * Fetches the group address of this route.
+     *
+     * @return an ip address
+     */
+    public IpAddress group() {
+        return group;
+    }
+
+
+    /**
+     * Type of this route.
+     *
+     * @return type
+     */
+    public Type type() {
+        return type;
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("source", source)
+                .add("group", group)
+                .add("type", type())
+                .toString();
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        McastRoute that = (McastRoute) o;
+        return Objects.equal(source, that.source) &&
+                Objects.equal(group, that.group) &&
+                Objects.equal(type, that.type());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(source, group, type);
+    }
+
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteData.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteData.java
new file mode 100644
index 0000000..9965818
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteData.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Data regarding a multicast route, comprised of a type, multiple sources and multiple sinks.
+ */
+@Beta
+public final class McastRouteData {
+
+    private final ConcurrentHashMap<ConnectPoint, Boolean> sources = new ConcurrentHashMap<>();
+    private final ConcurrentHashMap<HostId, Set<ConnectPoint>> sinks = new ConcurrentHashMap<>();
+
+    private McastRouteData() {
+    }
+
+    /**
+     * Sources contained in the associated route.
+     *
+     * @return set of sources
+     */
+    public Set<ConnectPoint> sources() {
+        return ImmutableSet.copyOf(sources.keySet());
+    }
+
+    /**
+     * Sources contained in the associated route.
+     *
+     * @return map of hostIds and associated sinks
+     */
+    public Map<HostId, Set<ConnectPoint>> sinks() {
+        return ImmutableMap.copyOf(sinks);
+    }
+
+    /**
+     * Sources contained in the associated route.
+     *
+     * @return map of hostIds and associated sinks
+     */
+    public Set<ConnectPoint> allSinks() {
+        return sinks.values().stream().flatMap(Collection::stream).collect(Collectors.toSet());
+    }
+
+    /**
+     * Sinks contained in the associated route for the given host.
+     *
+     * @param hostId the host
+     * @return set of sinks
+     */
+    public Set<ConnectPoint> sinks(HostId hostId) {
+        return sinks.get(hostId);
+    }
+
+    /**
+     * Sinks contained in the associated route that are not bound to any host.
+     *
+     * @return set of sinks
+     */
+    public Set<ConnectPoint> nonHostSinks() {
+        return sinks.get(HostId.NONE);
+    }
+
+    /**
+     * Add the sources for the associated route.
+     *
+     * @param sources set of sources
+     */
+    public void addSources(Set<ConnectPoint> sources) {
+        checkArgument(!sources.contains(null));
+        sources.forEach(source -> {
+            this.sources.put(source, true);
+        });
+    }
+
+    /**
+     * Removes all the sources contained in the associated route.
+     */
+    public void removeSources() {
+        sources.clear();
+    }
+
+    /**
+     * Removes the given sources contained in the associated route.
+     *
+     * @param sources the sources to remove
+     */
+    public void removeSources(Set<ConnectPoint> sources) {
+        checkArgument(!sources.contains(null));
+        sources.forEach(this.sources::remove);
+    }
+
+    /**
+     * Adds sinks for a given host Id. If the Host Id is {@link HostId#NONE} the sinks are intended to be
+     * used at all times independently of the attached host.
+     *
+     * @param hostId the host
+     * @param sinks  the sinks
+     */
+    public void addSinks(HostId hostId, Set<ConnectPoint> sinks) {
+        checkNotNull(hostId);
+        checkArgument(!sinks.contains(null));
+        this.sinks.put(hostId, sinks);
+    }
+
+    /**
+     * Adds sink for this route that are not associated directly with a given host.
+     *
+     * @param sinks the sinks
+     */
+    public void addNonHostSinks(Set<ConnectPoint> sinks) {
+        checkArgument(!sinks.contains(null));
+        this.sinks.put(HostId.NONE, sinks);
+    }
+
+    /**
+     * Removes all the sinks for this route.
+     */
+    public void removeSinks() {
+        sinks.clear();
+    }
+
+    /**
+     * Removes all the sinks for the given host for this route.
+     *
+     * @param hostId the host
+     */
+    public void removeSinks(HostId hostId) {
+        checkNotNull(hostId);
+        this.sinks.remove(hostId);
+    }
+
+    /**
+     * Removes all the given sinks for the given host for this route.
+     *
+     * @param hostId the host
+     * @param sinks  the sinks to remove
+     */
+    public void removeSinks(HostId hostId, Set<ConnectPoint> sinks) {
+        checkNotNull(hostId);
+        checkArgument(!sinks.contains(null));
+        this.sinks.get(hostId).removeAll(sinks);
+    }
+
+    /**
+     * Returns if the route has no sinks.
+     *
+     * @return true if no sinks
+     */
+    public boolean isEmpty() {
+        return sinks.isEmpty();
+    }
+
+    /**
+     * Creates an empty route object.
+     *
+     * @return an empty muticast rout data object.
+     */
+    public static McastRouteData empty() {
+        return new McastRouteData();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), sources, sinks);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof McastRouteData)) {
+            return false;
+        }
+        final McastRouteData other = (McastRouteData) obj;
+
+        return super.equals(obj) &&
+                Objects.equals(sources(), other.sources()) &&
+                Objects.equals(sinks(), other.sinks());
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("sources", sources())
+                .add("sinks", sinks())
+                .toString();
+    }
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteUpdate.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteUpdate.java
new file mode 100644
index 0000000..4333465
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastRouteUpdate.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Utility class to propagate updates to multicast route information stored in the store.
+ */
+@Beta
+public final class McastRouteUpdate {
+
+    private static final String ROUTE_NOT_NULL = "Route cannot be null";
+    private static final String SOURCE_NOT_NULL = "Source cannot be null";
+    private static final String SINK_NOT_NULL = "Sink cannot be null";
+
+    private final McastRoute route;
+    private final Set<ConnectPoint> sources;
+    private final Map<HostId, Set<ConnectPoint>> sinks;
+
+    private McastRouteUpdate(McastRoute route, Set<ConnectPoint> source, Map<HostId, Set<ConnectPoint>> sinks) {
+        this.route = checkNotNull(route, ROUTE_NOT_NULL);
+        this.sources = checkNotNull(source, SOURCE_NOT_NULL);
+        this.sinks = checkNotNull(sinks, SINK_NOT_NULL);
+    }
+
+    /**
+     * Static method to create an McastRoutUpdate object.
+     *
+     * @param route   the route updated
+     * @param sources the different sources
+     * @param sinks   the different sinks
+     * @return the McastRouteUpdate object.
+     */
+    public static McastRouteUpdate mcastRouteUpdate(McastRoute route,
+                                                    Set<ConnectPoint> sources,
+                                                    Map<HostId, Set<ConnectPoint>> sinks) {
+        return new McastRouteUpdate(route, sources, sinks);
+    }
+
+    /**
+     * The route associated with this multicast information.
+     *
+     * @return a mulicast route
+     */
+    public McastRoute route() {
+        return route;
+    }
+
+    /**
+     * The sources.
+     *
+     * @return an optional connect point
+     */
+    public Set<ConnectPoint> sources() {
+        return sources;
+    }
+
+    /**
+     * The sinks.
+     *
+     * @return a set of connect points
+     */
+    public Map<HostId, Set<ConnectPoint>> sinks() {
+        return sinks;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        McastRouteUpdate that = (McastRouteUpdate) o;
+        return Objects.equals(route, that.route) &&
+                Objects.equals(sources, that.sources) &&
+                Objects.equals(sinks, that.sinks);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(route, sources, sinks);
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("route", route())
+                .add("sources", sources)
+                .add("sinks", sinks)
+                .toString();
+    }
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStore.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStore.java
new file mode 100644
index 0000000..53d444b
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStore.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+import org.onosproject.store.Store;
+
+import java.util.Set;
+
+/**
+ * Entity responsible for storing multicast state information.
+ */
+@Beta
+public interface McastStore extends Store<McastEvent, McastStoreDelegate> {
+
+    /**
+     * Updates the store with the route information.
+     *
+     * @param route a multicast route
+     */
+    void storeRoute(McastRoute route);
+
+    /**
+     * Updates the store with the route information.
+     *
+     * @param route a multicast route
+     */
+    void removeRoute(McastRoute route);
+
+    /**
+     * Add to the store with source information for the given route.
+     *
+     * @param route   a multicast route
+     * @param sources a set of sources
+     */
+    void storeSources(McastRoute route, Set<ConnectPoint> sources);
+
+    /**
+     * Removes from the store all the sources information for a given route.
+     *
+     * @param route a multicast route
+     */
+    void removeSources(McastRoute route);
+
+    /**
+     * Removes from the store the source information for the given route.
+     * value.
+     *
+     * @param route   a multicast route
+     * @param sources a set of sources
+     */
+    void removeSources(McastRoute route, Set<ConnectPoint> sources);
+
+    /**
+     * Updates the store with a host based sink information for a given route. There may be
+     * multiple sink connect points for the given host.
+     *
+     * @param route  a multicast route
+     * @param hostId the host sink
+     * @param sinks  the sinks
+     */
+    void addSink(McastRoute route, HostId hostId, Set<ConnectPoint> sinks);
+
+    /**
+     * Updates the store with sinks information for a given route.
+     * The sinks stored with this method are not tied with any host.
+     * Traffic will be sent to all of them.
+     *
+     * @param route a multicast route
+     * @param sinks set of specific connect points
+     */
+    void addSinks(McastRoute route, Set<ConnectPoint> sinks);
+
+    /**
+     * Removes from the store all the sink information for a given route.
+     *
+     * @param route a multicast route
+     */
+    void removeSinks(McastRoute route);
+
+    /**
+     * Removes from the store the complete set of sink information for a given host for a given route.
+     *
+     * @param route  a multicast route
+     * @param hostId a specific host
+     */
+    void removeSink(McastRoute route, HostId hostId);
+
+    /**
+     * Removes from the store the given set of sink information for a given host for a given route.
+     *
+     * @param route  a multicast route
+     * @param hostId the host
+     * @param sinks  a set of multicast sink connect points
+     */
+    void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> sinks);
+
+    /**
+     * Removes from the store the set of non host bind sink information for a given route.
+     *
+     * @param route a multicast route
+     * @param sinks a set of multicast sinks
+     */
+    void removeSinks(McastRoute route, Set<ConnectPoint> sinks);
+
+    /**
+     * Obtains the sources for a multicast route.
+     *
+     * @param route a multicast route
+     * @return a connect point
+     */
+    Set<ConnectPoint> sourcesFor(McastRoute route);
+
+    /**
+     * Obtains the sinks for a multicast route.
+     *
+     * @param route a multicast route
+     * @return a set of sinks
+     */
+    Set<ConnectPoint> sinksFor(McastRoute route);
+
+    /**
+     * Obtains the sinks for a given host for a given multicast route.
+     *
+     * @param route  a multicast route
+     * @param hostId the host
+     * @return a set of sinks
+     */
+    Set<ConnectPoint> sinksFor(McastRoute route, HostId hostId);
+
+
+    /**
+     * Gets the set of all known multicast routes.
+     *
+     * @return set of multicast routes.
+     */
+    Set<McastRoute> getRoutes();
+
+    /**
+     * Gets the multicast data for a given route.
+     *
+     * @param route the route
+     * @return set of multicast routes.
+     */
+    McastRouteData getRouteData(McastRoute route);
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStoreDelegate.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStoreDelegate.java
new file mode 100644
index 0000000..49e894d
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStoreDelegate.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+
+import org.onosproject.store.StoreDelegate;
+
+/**
+ * Mcast store delegate abstraction.
+ */
+public interface McastStoreDelegate extends StoreDelegate<McastEvent> {
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/MulticastRouteService.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/MulticastRouteService.java
new file mode 100644
index 0000000..d9b1721
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/MulticastRouteService.java
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.mcast.api;
+
+import com.google.common.annotations.Beta;
+import org.onlab.packet.IpAddress;
+import org.onosproject.event.ListenerService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Optional;
+import java.util.Set;
+
+/**
+ * A service interface for maintaining multicast information.
+ */
+@Beta
+public interface MulticastRouteService
+        extends ListenerService<McastEvent, McastListener> {
+
+    /**
+     * Adds an empty route to the information base for the given group IP.
+     *
+     * @param route a multicast route
+     */
+    void add(McastRoute route);
+
+    /**
+     * Removes a route from the information base.
+     *
+     * @param route a multicast route
+     */
+    void remove(McastRoute route);
+
+    /**
+     * Gets all multicast routes in the system.
+     *
+     * @return set of multicast routes
+     */
+    Set<McastRoute> getRoutes();
+
+    /**
+     * Gets a multicast route in the system.
+     *
+     * @param groupIp multicast group IP address
+     * @param sourceIp multicasto source Ip address
+     * @return set of multicast routes
+     */
+    Optional<McastRoute> getRoute(IpAddress groupIp, IpAddress sourceIp);
+
+    /**
+     * Adds a set of source to the route from where the
+     * data stream is originating.
+     *
+     * @param route   the multicast route
+     * @param sources a set of sources
+     */
+    void addSources(McastRoute route, Set<ConnectPoint> sources);
+
+    /**
+     * Removes all the sources from the route.
+     *
+     * @param route the multicast route
+     */
+    void removeSources(McastRoute route);
+
+    /**
+     * Removes a set of sources from the route.
+     *
+     * @param route   the multicast route
+     * @param sources a set of sources
+     */
+    void removeSources(McastRoute route, Set<ConnectPoint> sources);
+
+    /**
+     * Adds a set of sink to the route to which a data stream should be
+     * sent to.
+     *
+     * @param route  a multicast route
+     * @param hostId a sink host
+     */
+    void addSink(McastRoute route, HostId hostId);
+
+    /**
+     * Adds a set of sink to the route to which a data stream should be
+     * sent to. If this method is used this the connect points will all
+     * be used a sink for that Mcast Tree. For dual-homed sinks please use
+     * {@link #addSink(McastRoute route, HostId hostId) addSink}.
+     *
+     * @param route a multicast route
+     * @param sinks a set of sink connect point
+     */
+    void addSink(McastRoute route, Set<ConnectPoint> sinks);
+
+    /**
+     * Removes all the sinks from the route.
+     *
+     * @param route the multicast route
+     */
+    void removeSinks(McastRoute route);
+
+    /**
+     * Removes a sink host from the route.
+     *
+     * @param route  the multicast route
+     * @param hostId a sink host
+     */
+    void removeSink(McastRoute route, HostId hostId);
+
+    /**
+     * Removes a set of sink connect points for a given host the route.
+     *
+     * @param route         the multicast route
+     * @param hostId        a sink host
+     * @param connectPoints a given set of connect points to remove
+     */
+    void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);
+
+    /**
+     * Removes a set of sinks to the route to which a data stream should be
+     * sent to. If this method is used the mcast tree does not work
+     * for any other sink until it's added. For dual-homed sinks please use
+     * {@link #removeSink(McastRoute route, HostId hostId) removeSink}.
+     *
+     * @param route a multicast route
+     * @param sink  a sink connect point
+     */
+    void removeSinks(McastRoute route, Set<ConnectPoint> sink);
+
+    /**
+     * Return the Data for this route.
+     *
+     * @param route route
+     * @return the mcast route data
+     */
+    McastRouteData routeData(McastRoute route);
+
+    /**
+     * Find the data source association for this multicast route.
+     *
+     * @param route a multicast route
+     * @return a connect point
+     */
+    Set<ConnectPoint> sources(McastRoute route);
+
+    /**
+     * Find the list of sinks for this route.
+     *
+     * @param route a multicast route
+     * @return a list of connect points
+     */
+    Set<ConnectPoint> sinks(McastRoute route);
+
+    /**
+     * Find the list of sinks for a given host for this route.
+     *
+     * @param route  a multicast route
+     * @param hostId the host
+     * @return a list of connect points
+     */
+    Set<ConnectPoint> sinks(McastRoute route, HostId hostId);
+
+    /**
+     * Obtains all the non host specific sinks for a multicast route.
+     *
+     * @param route a multicast route
+     * @return a set of sinks
+     */
+    Set<ConnectPoint> nonHostSinks(McastRoute route);
+}
diff --git a/apps/mcast/api/src/main/java/org/onosproject/mcast/api/package-info.java b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/package-info.java
new file mode 100644
index 0000000..bf4a398
--- /dev/null
+++ b/apps/mcast/api/src/main/java/org/onosproject/mcast/api/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Multicast routes store and manager &amp; related services API definitions.
+ */
+package org.onosproject.mcast.api;
