diff --git a/apps/mcast/BUCK b/apps/mcast/BUCK
new file mode 100644
index 0000000..58f3dd7
--- /dev/null
+++ b/apps/mcast/BUCK
@@ -0,0 +1,15 @@
+BUNDLES = [
+    '//apps/mcast/cli:onos-apps-mcast-cli',
+    '//apps/mcast/impl:onos-apps-mcast-impl',
+    '//apps/mcast/web:onos-apps-mcast-web',
+    '//apps/mcast/api:onos-apps-mcast-api',
+]
+
+onos_app(
+    title = 'Multicast traffic control',
+    origin = 'ONF',
+    description = 'Provides handling of multicast traffic.',
+    category = 'Traffic Engineering',
+    url = 'https://wiki.onosproject.org/',
+    included_bundles = BUNDLES,
+)
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;
diff --git a/apps/mcast/app/app.xml b/apps/mcast/app/app.xml
new file mode 100644
index 0000000..fabf8e2
--- /dev/null
+++ b/apps/mcast/app/app.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<app name="org.onosproject.mcast" origin="ONF" version="${project.version}"
+     category="Traffic Engineering" url="" title="Multicast App"
+     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
+     features="${project.artifactId}">
+    <description>${project.description}</description>
+    <artifact>mvn:${project.groupId}/onos-app-mcast-api/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/onos-app-mcast-impl/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/onos-app-mcast-web/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/onos-app-mcast-cli/${project.version}</artifact>
+</app>
diff --git a/apps/mcast/app/features.xml b/apps/mcast/app/features.xml
new file mode 100644
index 0000000..2e850ee
--- /dev/null
+++ b/apps/mcast/app/features.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  ~ 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.
+  -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+    <feature name="${project.artifactId}" version="${project.version}"
+             description="${project.description}">
+        <feature>onos-api</feature>
+        <feature>onos-drivers-default</feature>
+        <bundle>mvn:${project.groupId}/onos-app-mcast-api/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/onos-app-mcast-impl/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/onos-app-mcast-web/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/onos-app-mcast-cli/${project.version}</bundle>
+    </feature>
+</features>
diff --git a/apps/mcast/app/pom.xml b/apps/mcast/app/pom.xml
new file mode 100644
index 0000000..48addc6
--- /dev/null
+++ b/apps/mcast/app/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <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-pkg</artifactId>
+    <packaging>pom</packaging>
+
+    <description>ONOS Multicast handling application</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-impl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-web</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-cli</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/apps/mcast/cli/BUCK b/apps/mcast/cli/BUCK
new file mode 100644
index 0000000..df9991a
--- /dev/null
+++ b/apps/mcast/cli/BUCK
@@ -0,0 +1,16 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+    '//utils/rest:onlab-rest',
+    '//lib:javax.ws.rs-api',
+    '//utils/osgi:onlab-osgi',
+    '//core/store/serializers:onos-core-serializers',
+    '//apps/mcast/api:onos-apps-mcast-api'
+]
+
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    import_packages = '*,org.onosproject.cli.net',
+)
diff --git a/apps/mcast/cli/pom.xml b/apps/mcast/cli/pom.xml
new file mode 100644
index 0000000..7af05c6
--- /dev/null
+++ b/apps/mcast/cli/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ 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-cli</artifactId>
+    <packaging>bundle</packaging>
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-mcast-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-cli</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
new file mode 100644
index 0000000..6d872e8
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2016-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.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Deletes a multicast route.
+ */
+@Command(scope = "onos", name = "mcast-host-delete",
+        description = "Delete a multicast route flow")
+public class McastHostDeleteCommand extends AbstractShellCommand {
+
+    // Delete format for group line
+    private static final String D_FORMAT_MAPPING = "Deleted the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    // Update format for group line
+    private static final String U_FORMAT_MAPPING = "Updated the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-h", aliases = "--host",
+            description = "Host sink format: MAC/VLAN",
+            valueToShowInHelp = "00:00:00:00:00:00/None")
+    String host = null;
+
+    @Option(name = "-cps", aliases = "--connectPoint",
+            description = "Egress port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] egressList = null;
+
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        if ("*".equals(sAddr) && "*".equals(gAddr)) {
+            // Clear all routes
+            mcastRouteManager.getRoutes().forEach(mcastRouteManager::remove);
+            return;
+        }
+        if (host != null && host.isEmpty()) {
+            print("Please provide a non-empty host Id");
+            return;
+        }
+        print("%s", host);
+        HostId hostId = HostId.hostId(host);
+        McastRoute mRoute = new McastRoute(IpAddress.valueOf(sAddr),
+                IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        if (!mcastRouteManager.getRoutes().contains(mRoute)) {
+            print("Route is not present, store it first");
+            print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+        if (host != null && egressList != null) {
+            Set<ConnectPoint> sinksSet = Arrays.stream(egressList)
+                    .map(ConnectPoint::deviceConnectPoint)
+                    .collect(Collectors.toSet());
+            mcastRouteManager.removeSinks(mRoute, hostId, sinksSet);
+        } else if (host != null) {
+            mcastRouteManager.removeSink(mRoute, hostId);
+        }
+        print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+        print("%s", mcastRouteManager.routeData(mRoute));
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java
new file mode 100644
index 0000000..1391822
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostJoinCommand.java
@@ -0,0 +1,107 @@
+/*
+ * 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.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.McastRouteData;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Installs a source, multicast group flow.
+ */
+@Command(scope = "onos", name = "mcast-host-join",
+        description = "Installs a source, multicast group flow")
+public class McastHostJoinCommand extends AbstractShellCommand {
+
+    // Format for group line
+    private static final String FORMAT_MAPPING = "Added the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-srcs", aliases = "--sources",
+            description = "Ingress port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] sources = null;
+
+    @Option(name = "-sinks",
+            aliases = "--hostsinks",
+            description = "Host sink format: MAC/VLAN",
+            valueToShowInHelp = "00:00:00:00:00:00/None",
+            multiValued = true)
+    String[] hosts = null;
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        IpAddress sAddrIp = null;
+        //If the source Ip is * we want ASM so we leave it as null and the route will have it as an optional.empty()
+        if (!sAddr.equals("*")) {
+            sAddrIp = IpAddress.valueOf(sAddr);
+        }
+
+        McastRoute mRoute = new McastRoute(sAddrIp, IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        log.info("Route {}", mRoute);
+        mcastRouteManager.add(mRoute);
+
+        if (sources != null) {
+            Set<ConnectPoint> sourcesSet = Arrays.stream(sources)
+                    .map(ConnectPoint::deviceConnectPoint)
+                    .collect(Collectors.toSet());
+            log.info("{}", sourcesSet);
+            mcastRouteManager.addSources(mRoute, sourcesSet);
+        }
+
+        if (hosts != null) {
+            for (String hostId : hosts) {
+                mcastRouteManager.addSink(mRoute, HostId.hostId(hostId));
+
+            }
+        }
+        printMcastRoute(mRoute);
+        printMcastRouteData(mcastRouteManager.routeData(mRoute));
+    }
+
+    private void printMcastRoute(McastRoute mcastRoute) {
+        print(FORMAT_MAPPING, mcastRoute.type(), mcastRoute.group(), mcastRoute.source());
+    }
+
+    private void printMcastRouteData(McastRouteData mcastRouteData) {
+        print("%s", mcastRouteData);
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java
new file mode 100644
index 0000000..562afad
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastShowHostCommand.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2016-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.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+
+import java.util.Comparator;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+
+/**
+ * Displays the source, multicast group flows entries.
+ */
+@Command(scope = "onos", name = "mcast-host-show", description = "Displays the source, multicast group flows")
+public class McastShowHostCommand extends AbstractShellCommand {
+
+    // Format for group line
+    private static final String FORMAT_MAPPING = "origin=%s, group=%s, source=%s, sinks=%s";
+
+    @Argument(index = 0, name = "mcastIp", description = "mcast Ip",
+            required = false, multiValued = false)
+    String mcastIp;
+
+    @Override
+    protected void execute() {
+        // Get the service
+        MulticastRouteService mcastService = get(MulticastRouteService.class);
+        // Get the routes
+        Set<McastRoute> routes = mcastService.getRoutes();
+        // Verify mcast group
+        if (!isNullOrEmpty(mcastIp)) {
+            // Let's find the group
+            IpAddress mcastGroup = IpAddress.valueOf(mcastIp);
+            McastRoute mcastRoute = routes.stream()
+                    .filter(route -> route.group().equals(mcastGroup))
+                    .findAny().orElse(null);
+            // If it exists
+            if (mcastRoute != null) {
+                // Get the sinks and print info
+                Set<ConnectPoint> sinks = mcastService.sinks(mcastRoute);
+                Set<ConnectPoint> sources = mcastService.sources(mcastRoute);
+                print(FORMAT_MAPPING, mcastRoute.type(), mcastRoute.group(),
+                        sources, sinks);
+            }
+            return;
+        }
+        // Filter ipv4
+        Set<McastRoute> ipv4Routes = routes.stream()
+                .filter(mcastRoute -> mcastRoute.group().isIp4())
+                .collect(Collectors.toSet());
+        // Print ipv4 first
+        ipv4Routes.stream()
+                .sorted(Comparator.comparing(McastRoute::group))
+                .forEach(route -> {
+                    // Get sinks
+                    Set<ConnectPoint> sinks = mcastService.sinks(route);
+                    Set<ConnectPoint> sources = mcastService.sources(route);
+                    print(FORMAT_MAPPING, route.type(), route.group(),
+                            sources, sinks);
+                });
+        // Filter ipv6
+        Set<McastRoute> ipv6Routes = routes.stream()
+                .filter(mcastRoute -> mcastRoute.group().isIp6())
+                .collect(Collectors.toSet());
+        // Then print ipv6
+        ipv6Routes.stream()
+                .sorted(Comparator.comparing(McastRoute::group))
+                .forEach(route -> {
+                    // Get sinks
+                    Set<ConnectPoint> sinks = mcastService.sinks(route);
+                    Set<ConnectPoint> sources = mcastService.sources(route);
+                    print(FORMAT_MAPPING, route.type(), route.group(),
+                            sources, sinks);
+                });
+    }
+
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java
new file mode 100644
index 0000000..d85e155
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastSourceDeleteCommand.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2016-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.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.IpAddress;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Deletes a multicast route.
+ */
+@Command(scope = "onos", name = "mcast-source-delete",
+        description = "Delete a multicast route flow")
+public class McastSourceDeleteCommand extends AbstractShellCommand {
+
+    // Delete format for group line
+    private static final String D_FORMAT_MAPPING = "Deleted the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    // Update format for group line
+    private static final String U_FORMAT_MAPPING = "Updated the mcast route: " +
+            "origin=%s, group=%s, source=%s";
+
+    @Option(name = "-sAddr", aliases = "--sourceAddress",
+            description = "IP Address of the multicast source. '*' can be used for any source (*, G) entry",
+            valueToShowInHelp = "1.1.1.1",
+            required = true, multiValued = false)
+    String sAddr = null;
+
+    @Option(name = "-gAddr", aliases = "--groupAddress",
+            description = "IP Address of the multicast group",
+            valueToShowInHelp = "224.0.0.0",
+            required = true, multiValued = false)
+    String gAddr = null;
+
+    @Option(name = "-src", aliases = "--connectPoint",
+            description = "Source port of:XXXXXXXXXX/XX",
+            valueToShowInHelp = "of:0000000000000001/1",
+            multiValued = true)
+    String[] sourceList = null;
+
+
+    @Override
+    protected void execute() {
+        MulticastRouteService mcastRouteManager = get(MulticastRouteService.class);
+
+        if ("*".equals(sAddr) && "*".equals(gAddr)) {
+            // Clear all routes
+            mcastRouteManager.getRoutes().forEach(mcastRouteManager::remove);
+            return;
+        }
+
+        McastRoute mRoute = new McastRoute(IpAddress.valueOf(sAddr),
+                IpAddress.valueOf(gAddr), McastRoute.Type.STATIC);
+        if (!mcastRouteManager.getRoutes().contains(mRoute)) {
+            print("Route is not present, store it first");
+            print("origin=%s, group=%s, source=%s", mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+        if (sourceList == null) {
+            mcastRouteManager.remove(mRoute);
+            print(D_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+            return;
+        }
+
+        Set<ConnectPoint> sourcesSet = Arrays.stream(sourceList)
+                .map(ConnectPoint::deviceConnectPoint)
+                .collect(Collectors.toSet());
+        mcastRouteManager.removeSources(mRoute, sourcesSet);
+        print(U_FORMAT_MAPPING, mRoute.type(), mRoute.group(), mRoute.source());
+        print("%s", mcastRouteManager.routeData(mRoute));
+    }
+}
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/package-info.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/package-info.java
new file mode 100644
index 0000000..7cedb77
--- /dev/null
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/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.
+ */
+
+/**
+ * CLI implementation for mcast.
+ */
+package org.onosproject.mcast.cli;
diff --git a/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
new file mode 100644
index 0000000..7ab4273
--- /dev/null
+++ b/apps/mcast/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -0,0 +1,49 @@
+<!--
+~ 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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+
+        <command>
+            <action class="org.onosproject.mcast.cli.McastHostJoinCommand"/>
+            <optional-completers>
+                <entry key="-srcs" value-ref="deviceIdCompleter"/>
+                <entry key="-sinks" value-ref="hostIdCompleter"/>
+            </optional-completers>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastShowHostCommand"/>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastHostDeleteCommand"/>
+            <optional-completers>
+                <entry key="-cps" value-ref="deviceIdCompleter"/>
+                <entry key="-h" value-ref="hostIdCompleter"/>
+            </optional-completers>
+        </command>
+        <command>
+            <action class="org.onosproject.mcast.cli.McastSourceDeleteCommand"/>
+            <optional-completers>
+                <entry key="-src" value-ref="deviceIdCompleter"/>
+            </optional-completers>
+        </command>
+
+    </command-bundle>
+
+    <bean id="hostIdCompleter" class="org.onosproject.cli.net.HostIdCompleter"/>
+    <bean id="deviceIdCompleter" class="org.onosproject.cli.net.DeviceIdCompleter"/>
+
+</blueprint>
diff --git a/apps/mcast/impl/BUCK b/apps/mcast/impl/BUCK
new file mode 100644
index 0000000..c3d67ff
--- /dev/null
+++ b/apps/mcast/impl/BUCK
@@ -0,0 +1,16 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:KRYO',
+    '//core/store/serializers:onos-core-serializers',
+    '//apps/mcast/api:onos-apps-mcast-api'
+]
+
+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/impl/pom.xml b/apps/mcast/impl/pom.xml
new file mode 100644
index 0000000..4fe6094
--- /dev/null
+++ b/apps/mcast/impl/pom.xml
@@ -0,0 +1,77 @@
+<?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-impl</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>onos-app-mcast-api</artifactId>
+            <version>${project.version}</version>
+        </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/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java
new file mode 100644
index 0000000..8bdf42e
--- /dev/null
+++ b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java
@@ -0,0 +1,283 @@
+/*
+ * Copyright 2015-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.impl;
+
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+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.apache.felix.scr.annotations.Service;
+import org.onlab.util.KryoNamespace;
+import org.onosproject.mcast.api.McastEvent;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.McastRouteData;
+import org.onosproject.mcast.api.McastStore;
+import org.onosproject.mcast.api.McastStoreDelegate;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.HostId;
+import org.onosproject.store.AbstractStore;
+import org.onosproject.store.serializers.KryoNamespaces;
+import org.onosproject.store.service.ConsistentMap;
+import org.onosproject.store.service.MapEvent;
+import org.onosproject.store.service.MapEventListener;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.StorageService;
+import org.onosproject.store.service.Versioned;
+import org.slf4j.Logger;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.onosproject.mcast.api.McastRouteUpdate.mcastRouteUpdate;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * New distributed mcast route store implementation. Routes are stored consistently
+ * across the cluster.
+ */
+@Component(immediate = true)
+@Service
+public class DistributedMcastRoutesStore
+        extends AbstractStore<McastEvent, McastStoreDelegate>
+        implements McastStore {
+
+    private static final String MCASTRIB = "onos-mcast-route-table";
+    private Logger log = getLogger(getClass());
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected StorageService storageService;
+
+    private Map<McastRoute, McastRouteData> mcastRoutes;
+    private ConsistentMap<McastRoute, McastRouteData> mcastRib;
+    private MapEventListener<McastRoute, McastRouteData> mcastRouteListener =
+            new McastRouteListener();
+
+    private ScheduledExecutorService executor;
+
+
+    @Activate
+    public void activate() {
+        mcastRib = storageService.<McastRoute, McastRouteData>consistentMapBuilder()
+                .withName(MCASTRIB)
+                .withSerializer(Serializer.using(KryoNamespace.newBuilder()
+                        .register(KryoNamespaces.API)
+                        .register(
+                                McastRoute.class,
+                                AtomicReference.class,
+                                McastRouteData.class,
+                                McastRoute.Type.class
+                        ).build()))
+                .build();
+
+        mcastRoutes = mcastRib.asJavaMap();
+        mcastRib.addListener(mcastRouteListener);
+
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        mcastRib.removeListener(mcastRouteListener);
+        mcastRib.destroy();
+        log.info("Stopped");
+    }
+
+    @Override
+    public void storeRoute(McastRoute route) {
+        mcastRoutes.put(route, McastRouteData.empty());
+    }
+
+    @Override
+    public void removeRoute(McastRoute route) {
+        mcastRoutes.remove(route);
+    }
+
+    @Override
+    public void storeSources(McastRoute route, Set<ConnectPoint> sources) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.addSources(sources);
+            return v;
+        });
+    }
+
+    @Override
+    public void removeSources(McastRoute route) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSources();
+            return v;
+        });
+    }
+
+    @Override
+    public void removeSources(McastRoute route, Set<ConnectPoint> sources) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSources(sources);
+            return v;
+        });
+
+    }
+
+    @Override
+    public void addSink(McastRoute route, HostId hostId, Set<ConnectPoint> sinks) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.addSinks(hostId, sinks);
+            return v;
+        });
+    }
+
+    @Override
+    public void addSinks(McastRoute route, Set<ConnectPoint> sinks) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.addSinks(HostId.NONE, sinks);
+            return v;
+        });
+    }
+
+
+    @Override
+    public void removeSinks(McastRoute route) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSinks();
+            return v;
+        });
+    }
+
+    @Override
+    public void removeSink(McastRoute route, HostId hostId) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSinks(hostId);
+            return v;
+        });
+    }
+
+    @Override
+    public void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> sinks) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSinks(hostId, sinks);
+            return v;
+        });
+    }
+
+    @Override
+    public void removeSinks(McastRoute route, Set<ConnectPoint> sinks) {
+        McastRouteData data = mcastRoutes.compute(route, (k, v) -> {
+            v.removeSinks(HostId.NONE, sinks);
+            return v;
+        });
+    }
+
+    @Override
+    public Set<ConnectPoint> sourcesFor(McastRoute route) {
+        McastRouteData data = mcastRoutes.getOrDefault(route, null);
+        return data == null ? ImmutableSet.of() : ImmutableSet.copyOf(data.sources());
+    }
+
+    @Override
+    public Set<ConnectPoint> sinksFor(McastRoute route) {
+        McastRouteData data = mcastRoutes.getOrDefault(route, null);
+        return data == null ? ImmutableSet.of() : ImmutableSet.copyOf(data.sinks().values().stream()
+                .flatMap(Collection::stream).collect(Collectors.toSet()));
+    }
+
+    @Override
+    public Set<ConnectPoint> sinksFor(McastRoute route, HostId hostId) {
+        McastRouteData data = mcastRoutes.getOrDefault(route, null);
+        return data == null ? ImmutableSet.of() : ImmutableSet.copyOf(data.sinks(hostId));
+    }
+
+    @Override
+    public Set<McastRoute> getRoutes() {
+        return ImmutableSet.copyOf(mcastRoutes.keySet());
+    }
+
+    @Override
+    public McastRouteData getRouteData(McastRoute route) {
+        return mcastRoutes.get(route);
+    }
+
+    private class McastRouteListener implements MapEventListener<McastRoute, McastRouteData> {
+        @Override
+        public void event(MapEvent<McastRoute, McastRouteData> event) {
+            final McastRoute route = event.key();
+            final McastRouteData newData =
+                    Optional.ofNullable(event.newValue()).map(Versioned::value).orElse(null);
+            final McastRouteData oldData =
+                    Optional.ofNullable(event.oldValue()).map(Versioned::value).orElse(null);
+
+            switch (event.type()) {
+                case INSERT:
+                    checkNotNull(newData);
+                    McastEvent.Type type;
+                    if (!newData.sources().isEmpty() || !newData.sinks().isEmpty()) {
+                        type = McastEvent.Type.SOURCES_ADDED;
+                    } else if (!newData.sinks().isEmpty()) {
+                        type = McastEvent.Type.SINKS_ADDED;
+                    } else {
+                        type = McastEvent.Type.ROUTE_ADDED;
+                    }
+                    notifyDelegate(new McastEvent(type, null,
+                            mcastRouteUpdate(route, newData.sources(), newData.sinks())));
+                    break;
+                case UPDATE:
+                    checkNotNull(newData);
+                    checkNotNull(oldData);
+
+                    if (!Sets.difference(newData.sources(), oldData.sources()).isEmpty()) {
+                        notifyDelegate(new McastEvent(McastEvent.Type.SOURCES_ADDED,
+                                mcastRouteUpdate(route, oldData.sources(), oldData.sinks()),
+                                mcastRouteUpdate(route, newData.sources(), newData.sinks())));
+                    }
+                    if (!Sets.difference(oldData.sources(), newData.sources()).isEmpty()) {
+                        notifyDelegate(new McastEvent(McastEvent.Type.SOURCES_REMOVED,
+                                mcastRouteUpdate(route, oldData.sources(), oldData.sinks()),
+                                mcastRouteUpdate(route, newData.sources(), newData.sinks())));
+                    }
+                    if (newData.allSinks().size() > oldData.allSinks().size()) {
+                        notifyDelegate(new McastEvent(McastEvent.Type.SINKS_ADDED,
+                                mcastRouteUpdate(route, oldData.sources(), oldData.sinks()),
+                                mcastRouteUpdate(route, newData.sources(), newData.sinks())));
+                    } else if (newData.allSinks().size() < oldData.allSinks().size()) {
+                        log.info("Removed");
+                        notifyDelegate(new McastEvent(McastEvent.Type.SINKS_REMOVED,
+                                mcastRouteUpdate(route, oldData.sources(), oldData.sinks()),
+                                mcastRouteUpdate(route, newData.sources(), newData.sinks())));
+                    }
+                    break;
+                case REMOVE:
+                    // Verify old data is not null
+                    checkNotNull(oldData);
+                    // Create a route removed event with just the route
+                    // and the source connect point
+                    notifyDelegate(new McastEvent(McastEvent.Type.ROUTE_REMOVED,
+                            mcastRouteUpdate(route, oldData.sources(), oldData.sinks()),
+                            null));
+                    break;
+                default:
+                    log.warn("Unknown mcast operation type: {}", event.type());
+            }
+        }
+    }
+}
diff --git a/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/MulticastRouteManager.java b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/MulticastRouteManager.java
new file mode 100644
index 0000000..6ed8b4b
--- /dev/null
+++ b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/MulticastRouteManager.java
@@ -0,0 +1,284 @@
+/*
+ * Copyright 2015-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.impl;
+
+import com.google.common.collect.ImmutableSet;
+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.apache.felix.scr.annotations.Service;
+import org.onlab.packet.IpAddress;
+import org.onosproject.event.AbstractListenerManager;
+import org.onosproject.mcast.api.McastEvent;
+import org.onosproject.mcast.api.McastListener;
+import org.onosproject.mcast.api.McastRoute;
+import org.onosproject.mcast.api.McastRouteData;
+import org.onosproject.mcast.api.McastStore;
+import org.onosproject.mcast.api.McastStoreDelegate;
+import org.onosproject.mcast.api.MulticastRouteService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.Host;
+import org.onosproject.net.HostId;
+import org.onosproject.net.host.HostEvent;
+import org.onosproject.net.host.HostListener;
+import org.onosproject.net.host.HostService;
+import org.slf4j.Logger;
+
+import java.util.HashSet;
+import java.util.Optional;
+import java.util.Set;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * An implementation of a multicast route table.
+ */
+@Component(immediate = true)
+@Service
+public class MulticastRouteManager
+        extends AbstractListenerManager<McastEvent, McastListener>
+        implements MulticastRouteService {
+    //TODO: add MulticastRouteAdminService
+
+    private Logger log = getLogger(getClass());
+
+    private final McastStoreDelegate delegate = new InternalMcastStoreDelegate();
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected McastStore store;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected HostService hostService;
+
+    private HostListener hostListener = new InternalHostListener();
+
+    @Activate
+    public void activate() {
+        hostService.addListener(hostListener);
+        eventDispatcher.addSink(McastEvent.class, listenerRegistry);
+        store.setDelegate(delegate);
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        hostService.removeListener(hostListener);
+        store.unsetDelegate(delegate);
+        eventDispatcher.removeSink(McastEvent.class);
+        log.info("Stopped");
+    }
+
+    @Override
+    public void add(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        store.storeRoute(route);
+    }
+
+    @Override
+    public void remove(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        if (checkRoute(route)) {
+            store.removeRoute(route);
+        }
+    }
+
+    @Override
+    public Set<McastRoute> getRoutes() {
+        return store.getRoutes();
+    }
+
+    @Override
+    public Optional<McastRoute> getRoute(IpAddress groupIp, IpAddress sourceIp) {
+        return store.getRoutes().stream().filter(route ->
+                route.group().equals(groupIp) &&
+                        route.source().isPresent() &&
+                        route.source().get().equals(sourceIp)).findAny();
+    }
+
+    @Override
+    public void addSources(McastRoute route, Set<ConnectPoint> connectPoints) {
+        checkNotNull(route, "Route cannot be null");
+        checkNotNull(connectPoints, "Source cannot be null");
+        if (checkRoute(route)) {
+            store.storeSources(route, connectPoints);
+        }
+    }
+
+    @Override
+    public void removeSources(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        if (checkRoute(route)) {
+            store.removeSources(route);
+        }
+    }
+
+    @Override
+    public void removeSources(McastRoute route, Set<ConnectPoint> sources) {
+        checkNotNull(route, "Route cannot be null");
+        checkNotNull(sources, "Source cannot be null");
+        if (checkRoute(route)) {
+            store.removeSources(route, sources);
+        }
+    }
+
+    @Override
+    public void addSink(McastRoute route, HostId hostId) {
+        if (checkRoute(route)) {
+            Set<ConnectPoint> sinks = new HashSet<>();
+            Host host = hostService.getHost(hostId);
+            if (host != null) {
+                host.locations().forEach(hostLocation -> sinks.add(
+                        ConnectPoint.deviceConnectPoint(hostLocation.deviceId() + "/" + hostLocation.port())));
+            }
+            store.addSink(route, hostId, sinks);
+        }
+
+    }
+
+    @Override
+    public void addSink(McastRoute route, Set<ConnectPoint> sinks) {
+        checkNotNull(route, "Route cannot be null");
+        checkNotNull(sinks, "Sinks cannot be null");
+        if (checkRoute(route)) {
+            store.addSinks(route, sinks);
+        }
+    }
+
+    @Override
+    public void removeSinks(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        if (checkRoute(route)) {
+            store.removeSinks(route);
+        }
+    }
+
+    @Override
+    public void removeSink(McastRoute route, HostId hostId) {
+        checkNotNull(route, "Route cannot be null");
+        checkNotNull(hostId, "Host cannot be null");
+        if (checkRoute(route)) {
+            store.removeSink(route, hostId);
+        }
+    }
+
+    @Override
+    public void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints) {
+        checkNotNull(route, "Route cannot be null");
+        if (checkRoute(route)) {
+            store.removeSinks(route, hostId, connectPoints);
+        }
+
+    }
+
+    @Override
+    public void removeSinks(McastRoute route, Set<ConnectPoint> connectPoints) {
+        checkNotNull(route, "Route cannot be null");
+        if (checkRoute(route)) {
+            store.removeSinks(route, HostId.NONE, connectPoints);
+        }
+    }
+
+    @Override
+    public McastRouteData routeData(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        return checkRoute(route) ? store.getRouteData(route) : null;
+    }
+
+    @Override
+    public Set<ConnectPoint> sources(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        return checkRoute(route) ? store.sourcesFor(route) : ImmutableSet.of();
+    }
+
+    @Override
+    public Set<ConnectPoint> sinks(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        return checkRoute(route) ? store.sinksFor(route) : ImmutableSet.of();
+    }
+
+    @Override
+    public Set<ConnectPoint> sinks(McastRoute route, HostId hostId) {
+        checkNotNull(route, "Route cannot be null");
+        return checkRoute(route) ? store.sinksFor(route, hostId) : ImmutableSet.of();
+    }
+
+    @Override
+    public Set<ConnectPoint> nonHostSinks(McastRoute route) {
+        checkNotNull(route, "Route cannot be null");
+        return checkRoute(route) ? store.sinksFor(route, HostId.NONE) : ImmutableSet.of();
+    }
+
+    private class InternalMcastStoreDelegate implements McastStoreDelegate {
+        @Override
+        public void notify(McastEvent event) {
+            log.debug("Event: {}", event);
+            post(event);
+        }
+    }
+
+    private boolean checkRoute(McastRoute route) {
+        if (store.getRoutes().contains(route)) {
+            return true;
+        } else {
+            log.warn("Route {} is not present in the store, please add it", route);
+        }
+        return false;
+    }
+
+    private class InternalHostListener implements HostListener {
+
+        @Override
+        public void event(HostEvent event) {
+            HostId hostId = event.subject().id();
+            Set<ConnectPoint> sinks = new HashSet<>();
+            log.debug("{} event", event);
+            //FIXME ther must be a better way
+            event.subject().locations().forEach(hostLocation -> sinks.add(
+                    ConnectPoint.deviceConnectPoint(hostLocation.deviceId() + "/" + hostLocation.port())));
+            switch (event.type()) {
+                case HOST_ADDED:
+                case HOST_UPDATED:
+                case HOST_MOVED:
+                    if ((event.prevSubject() == null && event.subject() != null)
+                            || (event.prevSubject().locations().size() > event.subject().locations().size())) {
+                        store.getRoutes().stream().filter(mcastRoute -> {
+                            return store.getRouteData(mcastRoute).sinks().get(hostId) != null;
+                        }).forEach(route -> {
+                            store.removeSinks(route, hostId, sinks);
+                        });
+                    } else if (event.prevSubject().locations().size() < event.subject().locations().size()) {
+                        store.getRoutes().stream().filter(mcastRoute -> {
+                            return store.getRouteData(mcastRoute).sinks().get(hostId) != null;
+                        }).forEach(route -> {
+                            store.addSink(route, hostId, sinks);
+                        });
+                    }
+                    break;
+                case HOST_REMOVED:
+                    store.getRoutes().stream().filter(mcastRoute -> {
+                        return store.getRouteData(mcastRoute).sinks().get(hostId) != null;
+                    }).forEach(route -> {
+                        store.removeSink(route, hostId);
+                    });
+                default:
+                    log.debug("Host event {} not supported", event.type());
+            }
+        }
+    }
+}
diff --git a/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/package-info.java b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/package-info.java
new file mode 100644
index 0000000..7b18561
--- /dev/null
+++ b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/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 implementation &amp; related services implementation.
+ */
+package org.onosproject.mcast.impl;
diff --git a/apps/mcast/pom.xml b/apps/mcast/pom.xml
new file mode 100644
index 0000000..d80bdec
--- /dev/null
+++ b/apps/mcast/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ 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 xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-apps</artifactId>
+        <version>1.12.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>onos-app-mcast</artifactId>
+    <packaging>pom</packaging>
+
+    <description>ONOS multicast applications</description>
+
+    <modules>
+        <module>impl</module>
+        <module>web</module>
+        <module>cli</module>
+        <module>api</module>
+        <module>app</module>
+    </modules>
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava-testlib</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/apps/mcast/web/BUCK b/apps/mcast/web/BUCK
new file mode 100644
index 0000000..c036dc0
--- /dev/null
+++ b/apps/mcast/web/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:JACKSON',
+    '//utils/rest:onlab-rest',
+    '//lib:javax.ws.rs-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST_ADAPTERS',
+    '//lib:jersey-test-framework-core',
+    '//lib:jersey-test-framework-jetty',
+    '//utils/osgi:onlab-osgi-tests',
+    '//web/api:onos-rest-tests',
+]
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    test_deps = TEST_DEPS,
+)
diff --git a/apps/mcast/web/pom.xml b/apps/mcast/web/pom.xml
new file mode 100644
index 0000000..27eb9d8
--- /dev/null
+++ b/apps/mcast/web/pom.xml
@@ -0,0 +1,118 @@
+<?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-web</artifactId>
+    <packaging>bundle</packaging>
+    <properties>
+        <web.context>/onos/v1/mcast</web.context>
+        <api.version>1.0.0</api.version>
+        <api.title>ONOS Multicast Application REST API</api.title>
+        <api.description>
+            APIs for interacting with the Multicast application.
+        </api.description>
+        <api.package>org.onosproject.mcast.web</api.package>
+    </properties>
+
+    <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-incubator-api</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-client</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-common</artifactId>
+            <scope>test</scope>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>jar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.test-framework</groupId>
+            <artifactId>jersey-test-framework-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <_wab>src/main/webapp/</_wab>
+                        <Include-Resource>
+                            WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
+                            {maven-resources}
+                        </Include-Resource>
+                        <Bundle-SymbolicName>
+                            ${project.groupId}.${project.artifactId}
+                        </Bundle-SymbolicName>
+                        <Import-Package>
+                            *,org.glassfish.jersey.servlet
+                        </Import-Package>
+                        <Web-ContextPath>${web.context}</Web-ContextPath>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/apps/mcast/web/src/main/java/org/onosproject/mcast/web/McastRouteWebResource.java b/apps/mcast/web/src/main/java/org/onosproject/mcast/web/McastRouteWebResource.java
new file mode 100644
index 0000000..c198a66
--- /dev/null
+++ b/apps/mcast/web/src/main/java/org/onosproject/mcast/web/McastRouteWebResource.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2017-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.web;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.rest.AbstractWebResource;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+/**
+ * Manage the multicast routing information.
+ */
+@Beta
+@Path("mcast")
+public class McastRouteWebResource extends AbstractWebResource {
+
+    /**
+     * Get all multicast routes.
+     * Returns array of all known multicast routes.
+     *
+     * @return 200 OK with array of all known multicast routes
+     */
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response getRoutes() {
+        return Response.noContent().build();
+    }
+
+}
diff --git a/apps/mcast/web/src/main/java/org/onosproject/mcast/web/package-info.java b/apps/mcast/web/src/main/java/org/onosproject/mcast/web/package-info.java
new file mode 100644
index 0000000..6b4bfa1
--- /dev/null
+++ b/apps/mcast/web/src/main/java/org/onosproject/mcast/web/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 web support.
+ */
+package org.onosproject.mcast.web;
diff --git a/apps/mcast/web/src/main/webapp/WEB-INF/web.xml b/apps/mcast/web/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..27b89ec
--- /dev/null
+++ b/apps/mcast/web/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ Copyright 2017-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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="ONOS" version="2.5">
+    <display-name>Mcast REST API v1.0</display-name>
+
+    <servlet>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>jersey.config.server.provider.classnames</param-name>
+            <param-value>
+                org.onosproject.mcast.web.McastRouteWebResource</param-value>
+        </init-param>
+        <load-on-startup>10</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>
diff --git a/apps/pom.xml b/apps/pom.xml
index 1212a5a..fe5661a 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -100,6 +100,7 @@
         <module>cfm</module>
         <module>routeradvertisement</module>
         <module>simplefabric</module>
+        <module>mcast</module>
     </modules>
 
     <properties>
diff --git a/modules.defs b/modules.defs
index e023139..1cb57f4 100644
--- a/modules.defs
+++ b/modules.defs
@@ -231,6 +231,7 @@
     '//apps/powermanagement:onos-apps-powermanagement-oar',
     '//apps/t3:onos-apps-t3-oar',
     '//apps/simplefabric:onos-apps-simplefabric-oar',
+    '//apps/mcast:onos-apps-mcast-oar',
 ]
 
 PROTOCOL_APPS = [
