diff --git a/bgp/api/pom.xml b/bgp/api/pom.xml
new file mode 100755
index 0000000..6fa1cc7
--- /dev/null
+++ b/bgp/api/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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-bgp</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-bgp-api</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS BGP controller subsystem API</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-bgpio</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-misc</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <artifactSet>
+                        <excludes>
+                            <exclude>io.netty:netty</exclude>
+                            <exclude>com.google.guava:guava</exclude>
+                            <exclude>org.slf4j:slfj-api</exclude>
+                            <exclude>ch.qos.logback:logback-core</exclude>
+                            <exclude>ch.qos.logback:logback-classic</exclude>
+                            <exclude>com.google.code.findbugs:annotations</exclude>
+                        </excludes>
+                    </artifactSet>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.onosproject.bgp.*,org.onosproject.bgpio.*,org.onosproject.bgp.controller
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPCfg.java b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPCfg.java
new file mode 100755
index 0000000..a8edf5e
--- /dev/null
+++ b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPCfg.java
@@ -0,0 +1,334 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.bgp.controller;
+
+import java.util.TreeMap;
+
+/**
+ * Abstraction of an BGP configuration. Manages the BGP configuration from CLI to the BGP controller.
+ */
+public interface BGPCfg {
+
+    enum State {
+        /**
+         * Signifies that its just created.
+         */
+        INIT,
+
+        /**
+         * Signifies that only IP Address is configured.
+         */
+        IP_CONFIGURED,
+
+        /**
+         * Signifies that only Autonomous System is configured.
+         */
+        AS_CONFIGURED,
+
+        /**
+         * Signifies that both IP and Autonomous System is configured.
+         */
+        IP_AS_CONFIGURED
+    }
+
+    /**
+     * Returns the status of the configuration based on this state certain operations like connection is handled.
+     *
+     * @return
+     *          State of the configuration
+     */
+    State getState();
+
+    /**
+     * To set the current state of the configuration.
+     *
+     * @param state
+     *          Configuration State enum
+     */
+    void setState(State state);
+
+    /**
+     * Get the status of the link state support for this BGP speaker.
+     *
+     * @return
+     *          true if the link state is supported else false
+     */
+    boolean getLsCapability();
+
+    /**
+     * Set the link state support to this BGP speaker.
+     *
+     * @param lscapability
+     *                  true value if link state is supported else false
+     */
+    void setLsCapability(boolean lscapability);
+
+    /**
+     * Get the status of the 32 bit AS support for this BGP speaker.
+     *
+     * @return
+     *          true if the 32 bit AS number is supported else false
+     */
+    boolean getLargeASCapability();
+
+    /**
+     * Set the 32 bit AS support capability to this BGP speaker.
+     *
+     * @param largeAs
+     *          true value if the 32 bit AS is supported else false
+     */
+    void setLargeASCapability(boolean largeAs);
+
+    /**
+     * Set the AS number to which this BGP speaker belongs.
+     *
+     * @param localAs
+     *          16 or 32 bit AS number, length is dependent on the capability
+     */
+    void setAsNumber(int localAs);
+
+    /**
+     * Get the AS number to which this BGP speaker belongs.
+     *
+     * @return
+     *          16 or 32 bit AS number, length is dependent on the capability
+     */
+    int getAsNumber();
+
+    /**
+     * Get the connection retry count number.
+     *
+     * @return
+     *          connection retry count if there is a connection error
+     */
+    int getMaxConnRetryCount();
+
+    /**
+     * Set the connection retry count.
+     *
+     * @param retryCount
+     *          number of times to try to connect if there is any error
+     */
+    void setMaxConnRetryCout(int retryCount);
+
+    /**
+     * Get the connection retry time in seconds.
+     *
+     * @return
+     *          connection retry time in seconds
+     */
+    int getMaxConnRetryTime();
+
+    /**
+     * Set the connection retry time in seconds.
+     *
+     * @param retryTime
+     *          connection retry times in seconds
+     */
+    void setMaxConnRetryTime(int retryTime);
+
+    /**
+     * Set the keep alive timer for the connection.
+     *
+     * @param holdTime
+     *          connection hold timer in seconds
+     */
+    void setHoldTime(short holdTime);
+
+    /**
+     * Returns the connection hold timer in seconds.
+     *
+     * @return
+     *          connection hold timer in seconds
+     */
+    short getHoldTime();
+
+    /**
+     * Returns the maximum number of session supported.
+     *
+     * @return
+     *          maximum number of session supported
+     */
+    int getMaxSession();
+
+    /**
+     * Set the maximum number of sessions to support.
+     *
+     * @param maxsession
+     *          maximum number of session
+     */
+    void setMaxSession(int maxsession);
+
+    /**
+     * Returns the Router ID of this BGP speaker.
+     *
+     * @return
+     *          IP address in string format
+     */
+    String getRouterId();
+
+    /**
+     * Set the Router ID of this BGP speaker.
+     *
+     * @param routerid
+     *          IP address in string format
+     */
+    void setRouterId(String routerid);
+
+    /**
+     * Add the BGP peer IP address and the AS number to which it belongs.
+     *
+     * @param routerid
+     *          IP address in string format
+     * @param remoteAs
+     *          AS number to which it belongs
+     * @return
+     *          true if added successfully else false
+     */
+    boolean addPeer(String routerid, int remoteAs);
+
+    /**
+     * Add the BGP peer IP address and the keep alive time.
+     *
+     * @param routerid
+     *          IP address in string format
+     * @param holdTime
+     *          keep alive time for the connection
+     * @return
+     *          true if added successfully else false
+     */
+    boolean addPeer(String routerid, short holdTime);
+
+    /**
+     * Add the BGP peer IP address, the AS number to which it belongs and keep alive time.
+     *
+     * @param routerid
+     *          IP address in string format
+     * @param remoteAs
+     *          AS number to which it belongs
+     * @param holdTime
+     *          keep alive time for the connection
+     * @return
+     *          true if added successfully else false
+     */
+    boolean addPeer(String routerid, int remoteAs, short holdTime);
+
+    /**
+     * Remove the BGP peer with this IP address.
+     *
+     * @param routerid
+     *          router IP address
+     * @return
+     *          true if removed successfully else false
+     */
+    boolean removePeer(String routerid);
+
+    /**
+     * Connect to BGP peer with this IP address.
+     *
+     * @param routerid
+     *          router IP address
+     * @return
+     *          true of the configuration is found and able to connect else false
+     */
+    boolean connectPeer(String routerid);
+
+    /**
+     * Disconnect this BGP peer with this IP address.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          true if the configuration is found and able to disconnect else false
+     */
+    boolean disconnectPeer(String routerid);
+
+    /**
+     * Returns the peer tree information.
+     *
+     * @return
+     *          return the tree map with IP as key and BGPPeerCfg as object
+     */
+    TreeMap<String, BGPPeerCfg> displayPeers();
+
+    /**
+     * Return the BGP Peer information with this matching IP.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          BGPPeerCfg object
+     */
+    BGPPeerCfg displayPeers(String routerid);
+
+    /**
+     * Check if this BGP peer is configured.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          true if configured exists else false
+     */
+    boolean isPeerConfigured(String routerid);
+
+    /**
+     * Check if this BGP speaker is having connection with the peer.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          true if the connection exists else false
+     */
+    boolean isPeerConnected(String routerid);
+
+    /**
+     * Return the peer tree map.
+     *
+     * @return
+     *          return the tree map with IP as key and BGPPeerCfg as object
+     */
+    TreeMap<String, BGPPeerCfg> getPeerTree();
+
+    /**
+     * Set the current connection state information.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @param state
+     *          state information
+     */
+    void setPeerConnState(String routerid, BGPPeerCfg.State state);
+
+    /**
+     * Check if the peer can be connected or not.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          true if the peer can be connected else false
+     */
+    boolean isPeerConnectable(String routerid);
+
+    /**
+     * Get the current peer connection state information.
+     *
+     * @param routerid
+     *          router IP address in string format
+     * @return
+     *          state information
+     */
+    BGPPeerCfg.State getPeerConnState(String routerid);
+}
diff --git a/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeerCfg.java b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeerCfg.java
new file mode 100755
index 0000000..87ec031
--- /dev/null
+++ b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeerCfg.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.bgp.controller;
+
+/**
+ * BGP Peer configuration information.
+ */
+public interface BGPPeerCfg {
+
+    enum State {
+
+        /**
+         * Signifies that peer connection is idle.
+         */
+        IDLE,
+
+        /**
+         * Signifies that connection is initiated.
+         */
+        CONNECT,
+
+        /**
+         * Signifies that state is active and connection can be established.
+         */
+        ACTIVE,
+
+        /**
+         * Signifies that open is sent and anticipating reply.
+         */
+        OPENSENT,
+
+        /**
+         * Signifies that peer sent the open message as reply.
+         */
+        OPENCONFIRM,
+
+        /**
+         * Signifies that all the negotiation is successful and ready to exchange other messages.
+         */
+        ESTABLISHED,
+
+        /**
+         * Signifies that invalid state.
+         */
+        INVALID
+    }
+
+    /**
+     * Returns the connection State information of the peer.
+     *
+     * @return
+     *          enum state is returned
+     */
+    State getState();
+
+    /**
+     * Set the connection state information of the peer.
+     *
+     * @param state
+     *          enum state
+     */
+    void setState(State state);
+
+    /**
+     * Returns the connection is initiated from us or not.
+     *
+     * @return
+     *          true if the connection is initiated by this peer, false if it has been received.
+     */
+    boolean getSelfInnitConnection();
+
+    /**
+     * Set the connection is initiated from us or not.
+     *
+     * @param selfInit
+     *          true if the connection is initiated by this peer, false if it has been received.
+     */
+    void setSelfInnitConnection(boolean selfInit);
+
+    /**
+     * Returns the AS number to which this peer belongs.
+     *
+     * @return
+     *          AS number
+     */
+    int getAsNumber();
+
+    /**
+     * Set the AS number to which this peer belongs.
+     *
+     * @param asNumber
+     *          AS number
+     */
+    void setAsNumber(int asNumber);
+
+    /**
+     * Get the keep alive timer value configured.
+     *
+     * @return
+     *          keep alive timer value in seconds
+     */
+    short getHoldtime();
+
+    /**
+     * Set the keep alive timer value.
+     *
+     * @param holdTime
+     *          keep alive timer value in seconds
+     */
+    void setHoldtime(short holdTime);
+
+    /**
+     * Return the connection type eBGP or iBGP.
+     *
+     * @return
+     *          true if iBGP, false if it is eBGP
+     */
+    boolean getIsIBgp();
+
+    /**
+     * Set the connection type eBGP or iBGP.
+     *
+     * @param isIBgp
+     *          true if iBGP, false if it is eBGP
+     */
+    void setIsIBgp(boolean isIBgp);
+
+    /**
+     * Return the peer router IP address.
+     *
+     * @return
+     *          IP address in string format
+     */
+    String getPeerRouterId();
+
+    /**
+     * Set the peer router IP address.
+     *
+     * @param peerId
+     *          IP address in string format
+     */
+    void setPeerRouterId(String peerId);
+
+    /**
+     * Set the peer router IP address and AS number.
+     *
+     * @param peerId
+     *          IP address in string format
+     * @param asNumber
+     *          AS number
+     */
+    void setPeerRouterId(String peerId, int asNumber);
+}
diff --git a/bgp/api/src/main/java/org/onosproject/bgp/controller/package-info.java b/bgp/api/src/main/java/org/onosproject/bgp/controller/package-info.java
new file mode 100755
index 0000000..4dd775b
--- /dev/null
+++ b/bgp/api/src/main/java/org/onosproject/bgp/controller/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BGP controller API.
+ */
+package org.onosproject.bgp.controller;
diff --git a/bgp/bgpio/pom.xml b/bgp/bgpio/pom.xml
new file mode 100755
index 0000000..5d67f18
--- /dev/null
+++ b/bgp/bgpio/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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-bgp</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-bgpio</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS BGPio Protocol subsystem</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/exceptions/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/exceptions/package-info.java
new file mode 100755
index 0000000..78b2807
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/exceptions/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BGP custom exceptions.
+ */
+package org.onosproject.bgpio.exceptions;
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/link_state/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/link_state/package-info.java
new file mode 100755
index 0000000..d2a2ccf
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/link_state/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BGP Protocol specific link state details.
+ */
+package org.onosproject.bgpio.protocol.link_state;
\ No newline at end of file
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/package-info.java
new file mode 100755
index 0000000..723b31b
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BGP Protocol specific components.
+ */
+package org.onosproject.bgpio.protocol;
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/package-info.java
new file mode 100755
index 0000000..fb8c67c
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BGP Protocol specific details of version 4.
+ */
+package org.onosproject.bgpio.protocol.ver4;
\ No newline at end of file
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/package-info.java
new file mode 100755
index 0000000..e2a74db
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of BGP Link state attribute Tlvs.
+ */
+package org.onosproject.bgpio.types.attr;
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/package-info.java
new file mode 100755
index 0000000..1f2ed95
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of Tlvs, Attributes and Descriptors.
+ */
+package org.onosproject.bgpio.types;
diff --git a/bgp/bgpio/src/main/java/org/onosproject/bgpio/util/package-info.java b/bgp/bgpio/src/main/java/org/onosproject/bgpio/util/package-info.java
new file mode 100755
index 0000000..3229d89
--- /dev/null
+++ b/bgp/bgpio/src/main/java/org/onosproject/bgpio/util/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of BGP utility functions.
+ */
+package org.onosproject.bgpio.util;
diff --git a/bgp/ctl/pom.xml b/bgp/ctl/pom.xml
new file mode 100755
index 0000000..5cefd73
--- /dev/null
+++ b/bgp/ctl/pom.xml
@@ -0,0 +1,65 @@
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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-bgp</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-bgp-ctl</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS BGP controller subsystem API</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-bgp-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-misc</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPConfig.java b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPConfig.java
new file mode 100755
index 0000000..56877a1
--- /dev/null
+++ b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPConfig.java
@@ -0,0 +1,344 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.bgp.controller.impl;
+
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.onlab.packet.Ip4Address;
+import org.onosproject.bgp.controller.BGPCfg;
+import org.onosproject.bgp.controller.BGPPeerCfg;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provides BGP configuration of this BGP speaker.
+ */
+public class BGPConfig implements BGPCfg {
+
+    protected static final Logger log = LoggerFactory.getLogger(BGPConfig.class);
+
+    private static final short DEFAULT_HOLD_TIMER = 120;
+    private static final short DEFAULT_CONN_RETRY_TIME = 120;
+    private static final short DEFAULT_CONN_RETRY_COUNT = 5;
+
+    private State state = State.INIT;
+    private int localAs;
+    private int maxSession;
+    private boolean lsCapability;
+    private short holdTime;
+    private boolean largeAs = false;
+    private int maxConnRetryTime;
+    private int maxConnRetryCount;
+
+    private Ip4Address routerId = null;
+    private TreeMap<String, BGPPeerCfg> bgpPeerTree = new TreeMap<>();
+
+    /**
+     * Constructor to initialize the values.
+     */
+    public BGPConfig() {
+
+        this.holdTime = DEFAULT_HOLD_TIMER;
+        this.maxConnRetryTime = DEFAULT_CONN_RETRY_TIME;
+        this.maxConnRetryCount = DEFAULT_CONN_RETRY_COUNT;
+    }
+
+    @Override
+    public State getState() {
+        return state;
+    }
+
+    @Override
+    public void setState(State state) {
+        this.state = state;
+    }
+
+    @Override
+    public int getAsNumber() {
+        return this.localAs;
+    }
+
+    @Override
+    public void setAsNumber(int localAs) {
+
+        State localState = getState();
+        this.localAs = localAs;
+
+        /* Set configuration state */
+        if (localState == State.IP_CONFIGURED) {
+            setState(State.IP_AS_CONFIGURED);
+        } else {
+            setState(State.AS_CONFIGURED);
+        }
+    }
+
+    @Override
+    public int getMaxSession() {
+        return this.maxSession;
+    }
+
+    @Override
+    public void setMaxSession(int maxSession) {
+        this.maxSession = maxSession;
+    }
+
+    @Override
+    public boolean getLsCapability() {
+        return this.lsCapability;
+    }
+
+    @Override
+    public void setLsCapability(boolean lsCapability) {
+        this.lsCapability = lsCapability;
+    }
+
+    @Override
+    public String getRouterId() {
+        if (this.routerId != null) {
+            return this.routerId.toString();
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public void setRouterId(String routerId) {
+        State localState = getState();
+        this.routerId = Ip4Address.valueOf(routerId);
+
+        /* Set configuration state */
+        if (localState == State.AS_CONFIGURED) {
+            setState(State.IP_AS_CONFIGURED);
+        } else {
+            setState(State.IP_CONFIGURED);
+        }
+    }
+
+    @Override
+    public boolean addPeer(String routerid, int remoteAs) {
+        return addPeer(routerid, remoteAs, DEFAULT_HOLD_TIMER);
+    }
+
+    @Override
+    public boolean addPeer(String routerid, short holdTime) {
+        return addPeer(routerid, this.getAsNumber(), holdTime);
+    }
+
+    @Override
+    public boolean addPeer(String routerid, int remoteAs, short holdTime) {
+        BGPPeerConfig lspeer = new BGPPeerConfig();
+        if (this.bgpPeerTree.get(routerid) == null) {
+
+            lspeer.setPeerRouterId(routerid);
+            lspeer.setAsNumber(remoteAs);
+            lspeer.setHoldtime(holdTime);
+            lspeer.setState(BGPPeerCfg.State.IDLE);
+            lspeer.setSelfInnitConnection(false);
+
+            if (this.getAsNumber() == remoteAs) {
+                lspeer.setIsIBgp(true);
+            } else {
+                lspeer.setIsIBgp(false);
+            }
+
+            this.bgpPeerTree.put(routerid, lspeer);
+            log.debug("added successfully");
+            return true;
+        } else {
+            log.debug("already exists");
+            return false;
+        }
+    }
+
+    @Override
+    public boolean connectPeer(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if (lspeer != null) {
+            lspeer.setSelfInnitConnection(true);
+            // TODO: initiate peer connection
+            return true;
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean removePeer(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if (lspeer != null) {
+
+            //TODO DISCONNECT PEER
+            disconnectPeer(routerid);
+            lspeer.setSelfInnitConnection(false);
+            lspeer = this.bgpPeerTree.remove(routerid);
+            log.debug("Deleted : " + routerid + " successfully");
+
+            return true;
+        } else {
+            log.debug("Did not find : " + routerid);
+            return false;
+        }
+    }
+
+    @Override
+    public boolean disconnectPeer(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if (lspeer != null) {
+
+            //TODO DISCONNECT PEER
+            lspeer.setState(BGPPeerCfg.State.IDLE);
+            lspeer.setSelfInnitConnection(false);
+            log.debug("Disconnected : " + routerid + " successfully");
+
+            return true;
+        } else {
+            log.debug("Did not find : " + routerid);
+            return false;
+        }
+    }
+
+    @Override
+    public void setPeerConnState(String routerid, BGPPeerCfg.State state) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if (lspeer != null) {
+            lspeer.setState(state);
+            log.debug("Peer : " + routerid + " is not available");
+
+            return;
+        } else {
+            log.debug("Did not find : " + routerid);
+            return;
+        }
+    }
+
+    @Override
+    public BGPPeerCfg.State getPeerConnState(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if (lspeer != null) {
+            return lspeer.getState();
+        } else {
+            return BGPPeerCfg.State.INVALID; //No instance
+        }
+    }
+
+    @Override
+    public boolean isPeerConnectable(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+
+        if ((lspeer != null) && lspeer.getState().equals(BGPPeerCfg.State.IDLE)) {
+            return true;
+        }
+
+        return false;
+    }
+
+    @Override
+    public TreeMap<String, BGPPeerCfg> getPeerTree() {
+        return this.bgpPeerTree;
+    }
+
+    @Override
+    public TreeMap<String, BGPPeerCfg> displayPeers() {
+        if (this.bgpPeerTree.isEmpty()) {
+            log.debug("There are no BGP peers");
+        } else {
+            Set<Entry<String, BGPPeerCfg>> set = this.bgpPeerTree.entrySet();
+            Iterator<Entry<String, BGPPeerCfg>> list = set.iterator();
+            BGPPeerCfg lspeer;
+
+            while (list.hasNext()) {
+                Entry<String, BGPPeerCfg> me = list.next();
+                lspeer = me.getValue();
+                log.debug("Peer neighbor IP :" + me.getKey());
+                log.debug(", AS Number : " + lspeer.getAsNumber());
+                log.debug(", Hold Timer : " + lspeer.getHoldtime());
+                log.debug(", Is iBGP : " + lspeer.getIsIBgp());
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public BGPPeerCfg displayPeers(String routerid) {
+
+        if (this.bgpPeerTree.isEmpty()) {
+            log.debug("There are no BGP peers");
+        } else {
+            return this.bgpPeerTree.get(routerid);
+        }
+        return null;
+    }
+
+    @Override
+    public void setHoldTime(short holdTime) {
+        this.holdTime = holdTime;
+    }
+
+    @Override
+    public short getHoldTime() {
+        return this.holdTime;
+    }
+
+    @Override
+    public boolean getLargeASCapability() {
+        return this.largeAs;
+    }
+
+    @Override
+    public void setLargeASCapability(boolean largeAs) {
+        this.largeAs = largeAs;
+    }
+
+    @Override
+    public boolean isPeerConfigured(String routerid) {
+        BGPPeerCfg lspeer = this.bgpPeerTree.get(routerid);
+        return (lspeer != null) ? true : false;
+    }
+
+    @Override
+    public boolean isPeerConnected(String routerid) {
+        // TODO: is peer connected
+        return true;
+    }
+
+    @Override
+    public int getMaxConnRetryCount() {
+        return this.maxConnRetryCount;
+    }
+
+    @Override
+    public void setMaxConnRetryCout(int retryCount) {
+        this.maxConnRetryCount = retryCount;
+    }
+
+    @Override
+    public int getMaxConnRetryTime() {
+        return this.maxConnRetryTime;
+    }
+
+    @Override
+    public void setMaxConnRetryTime(int retryTime) {
+        this.maxConnRetryTime = retryTime;
+    }
+}
diff --git a/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPPeerConfig.java b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPPeerConfig.java
new file mode 100755
index 0000000..51b95a4
--- /dev/null
+++ b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BGPPeerConfig.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.bgp.controller.impl;
+
+import org.onlab.packet.Ip4Address;
+import org.onosproject.bgp.controller.BGPPeerCfg;
+
+/**
+ * BGP Peer configuration information.
+ */
+public class BGPPeerConfig  implements BGPPeerCfg {
+    private int asNumber;
+    private short holdTime;
+    private boolean isIBgp;
+    private Ip4Address peerId = null;
+    private State state;
+    private boolean selfInitiated;
+
+    /**
+     * Constructor to initialize the values.
+     */
+    BGPPeerConfig() {
+        state = State.IDLE;
+        selfInitiated = false;
+    }
+
+    @Override
+    public int getAsNumber() {
+        return this.asNumber;
+    }
+
+    @Override
+    public void setAsNumber(int asNumber) {
+        this.asNumber = asNumber;
+    }
+
+    @Override
+    public short getHoldtime() {
+        return this.holdTime;
+    }
+
+    @Override
+    public void setHoldtime(short holdTime) {
+        this.holdTime = holdTime;
+    }
+
+    @Override
+    public boolean getIsIBgp() {
+        return this.isIBgp;
+    }
+
+    @Override
+    public void setIsIBgp(boolean isIBgp) {
+        this.isIBgp = isIBgp;
+    }
+
+    @Override
+    public String getPeerRouterId() {
+        if (this.peerId != null) {
+            return this.peerId.toString();
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public void setPeerRouterId(String peerId) {
+        this.peerId = Ip4Address.valueOf(peerId);
+    }
+
+    @Override
+    public void setPeerRouterId(String peerId, int asNumber) {
+        this.peerId = Ip4Address.valueOf(peerId);
+        this.asNumber = asNumber;
+    }
+
+    @Override
+    public State getState() {
+        return this.state;
+    }
+
+    @Override
+    public void setState(State state) {
+        this.state = state;
+    }
+
+    @Override
+    public boolean getSelfInnitConnection() {
+        return this.selfInitiated;
+    }
+
+    @Override
+    public void setSelfInnitConnection(boolean selfInit) {
+        this.selfInitiated = selfInit;
+    }
+}
diff --git a/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/package-info.java b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/package-info.java
new file mode 100755
index 0000000..fd4e950
--- /dev/null
+++ b/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of the BGP controller IO subsystem.
+ */
+package org.onosproject.bgp.controller.impl;
diff --git a/bgp/pom.xml b/bgp/pom.xml
new file mode 100755
index 0000000..941168b
--- /dev/null
+++ b/bgp/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-bgp</artifactId>
+    <packaging>pom</packaging>
+
+    <description>ONOS BGP Protocol subsystem</description>
+
+    <modules>
+        <module>api</module>
+        <module>ctl</module>
+        <module>bgpio</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-misc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/pom.xml b/pom.xml
index 6bbca51..93ef277 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2014 Open Networking Laboratory
+  ~ Copyright 2015 Open Networking Laboratory
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -57,6 +57,7 @@
 
         <module>tools/package/archetypes</module>
         <module>tools/package/branding</module>
+        <module>bgp</module>
     </modules>
 
     <url>http://onosproject.org/</url>
@@ -431,11 +432,27 @@
                 <scope>test</scope>
             </dependency>
             <dependency>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-bgpio</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>commons-pool</groupId>
                 <artifactId>commons-pool</artifactId>
                 <version>1.6</version>
             </dependency>
             <dependency>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-bgp-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-app-bgp-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>io.netty</groupId>
                 <artifactId>netty-common</artifactId>
                 <version>${netty4.version}</version>
