diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 66dbd23..4571387 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1109,6 +1109,45 @@
             main.cleanup()
             main.exit()
 
+    def routes(self, json_format=False):
+        '''
+        Optional:
+            * json_format: enable output formatting in json
+        Description:
+            Obtain all routes in the system
+        '''
+        try:
+            if json_format:
+                self.handle.sendline("routes -j")
+                self.handle.expect("routes -j")
+                self.handle.expect("onos>")
+                handle_tmp = self.handle.before
+                
+                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
+                handle = ansi_escape.sub('', handle_tmp)
+
+            else:
+                self.handle.sendline("")
+                self.handle.expect("onos>")
+
+                self.handle.sendline("routes")
+                self.handle.expect("onos>")
+                handle = self.handle.before
+
+            return handle
+
+        except pexpect.EOF:
+            main.log.error(self.name + ": EOF exception found")
+            main.log.error(self.name + ":    " + self.handle.before)
+            main.cleanup()
+            main.exit()
+        except:
+            main.log.info(self.name + " ::::::")
+            main.log.error(traceback.print_exc())
+            main.log.info(self.name + " ::::::")
+            main.cleanup()
+            main.exit()
+
     def intents(self, json_format = False):
         '''
         Optional:
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py b/TestON/drivers/common/cli/quaggaclidriver.py
index 744d284..7851d13 100644
--- a/TestON/drivers/common/cli/quaggaclidriver.py
+++ b/TestON/drivers/common/cli/quaggaclidriver.py
@@ -14,12 +14,15 @@
     def __init__(self):
         super(CLI, self).__init__()
 
+    #TODO: simplify this method
     def connect(self, **connectargs):
         for key in connectargs:
             vars(self)[key] = connectargs[key]
         
         self.name = self.options['name']
-        self.handle = super(QuaggaCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+        #self.handle = super(QuaggaCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+        self.handle = super(QuaggaCliDriver, self).connect(user_name=self.user_name, ip_address="1.1.1.1", port=self.port, pwd=self.pwd)
+        main.log.info("connect parameters:" + str(self.user_name) + ";" + str(self.ip_address) + ";" + str(self.port) + ";" + str(self.pwd))
 
         if self.handle: 
             self.handle.expect("")
@@ -35,7 +38,33 @@
             main.log.info("NO HANDLE")
             return main.FALSE
 
+    def loginQuagga(self, ip_address):
+
+        self.name = self.options['name']
+        self.handle = super(QuaggaCliDriver, self).connect(
+            user_name=self.user_name, ip_address=ip_address,
+            port=self.port, pwd=self.pwd)
+        main.log.info("connect parameters:" + str(self.user_name) + ";"
+        + str(self.ip_address) + ";" + str(self.port) + ";" + str(self.pwd))
+
+        if self.handle:
+            self.handle.expect("")
+            self.handle.expect("\$")
+            self.handle.sendline("telnet localhost 2605")
+            self.handle.expect("Password:", timeout=5)
+            self.handle.sendline("hello")
+            self.handle.expect("bgpd", timeout=5)
+            self.handle.sendline("enable")
+            self.handle.expect("bgpd#", timeout=5)
+            main.log.info("I am inside BGP peer Quagga!")
+
+            return self.handle
+        else:
+            main.log.info("NO HANDLE")
+            return main.FALSE
+
     def enter_config(self, asn):
+        main.log.info("I am in enter_config method!")
         try:
             self.handle.sendline("")
             self.handle.expect("bgpd#")
@@ -52,6 +81,63 @@
             return main.TRUE
         except:
             return main.FALSE
+
+    def generate_routes(self, net, numRoutes):
+        main.log.info("I am in generate_routes method!")
+        
+        # a IP prefix will be composed by "net" + "." + m + "." + n + "." + x 
+        # the length of each IP prefix is 24
+        routes = []
+        routes_gen = 0
+        m = numRoutes / 256
+        n = numRoutes % 256
+
+        for i in range(0, m):
+            for j in range(0, 256):
+                network = str(net) + "." + str(i) + "." + str(j) + ".0/24"
+                routes.append(network)
+                routes_gen = routes_gen + 1
+
+        for j in range(0, n):
+            network = str(net) + "." + str(m) + "." + str(j) + ".0/24"
+            routes.append(network)
+            routes_gen = routes_gen + 1
+
+        if routes_gen == numRoutes:
+            main.log.info("Successfully generated " + str(numRoutes)
+            + " routes!")
+            return routes
+        return main.FALSE
+    
+    def add_routes(self, routes, routeRate):
+        main.log.info("I am in add_routes method!")
+        
+        routes_added = 0
+        try:
+            self.handle.sendline("")
+            #self.handle.expect("config-router")
+            self.handle.expect("config-router", timeout=5)
+        except:
+            main.log.warn("Probably not in config-router mode!")
+            self.disconnect()
+        main.log.info("Start to add routes")
+
+        for i in range(0, len(routes)):
+            routeCmd = "network " + routes[i]
+            try:
+                self.handle.sendline(routeCmd)
+                self.handle.expect("bgpd", timeout=5)
+            except:
+                main.log.warn("Failed to add route")
+                self.disconnect()
+            waitTimer = 1.00 / routeRate
+            time.sleep(waitTimer)
+        if routes_added == len(routes):
+            main.log.info("Finished adding routes")
+            return main.TRUE
+        return main.FALSE
+    
+    # please use the generate_routes plus add_routes instead of this one
     def add_route(self, net, numRoutes, routeRate):
         try:
             self.handle.sendline("")
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.params b/TestON/tests/SdnIpTest/SdnIpTest.params
new file mode 100755
index 0000000..9d3627a
--- /dev/null
+++ b/TestON/tests/SdnIpTest/SdnIpTest.params
@@ -0,0 +1,25 @@
+<PARAMS>
+    
+    <testcases>1</testcases>
+
+    #Environment variables
+    <ENV>
+        <cellName>driver_test</cellName>
+    </ENV>
+
+    <CTRL>
+        <ip1>127.0.0.1</ip1>
+        <port1>6633</port1>
+    </CTRL>
+
+    <GIT>
+        <autoPull>off</autoPull>
+        <checkout>master</checkout>
+    </GIT>
+
+    <JSON>
+        <prefix>prefix</prefix>
+        <nextHop>nextHop</nextHop>
+    </JSON>
+
+</PARAMS>
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.py b/TestON/tests/SdnIpTest/SdnIpTest.py
new file mode 100755
index 0000000..369f2cd
--- /dev/null
+++ b/TestON/tests/SdnIpTest/SdnIpTest.py
@@ -0,0 +1,92 @@
+
+#Testing the basic functionality of SDN-IP
+
+class SdnIpTest:
+    def __init__(self):
+        self.default = ''
+
+    def CASE1(self, main):
+
+        '''
+        Test the SDN-IP functionality
+        '''
+        import time
+        import json
+        from operator import eq
+        
+        # all generated routes for all BGP peers
+        allRoutes = []
+
+        main.step("Start to generate routes for BGP peer on host1")
+        routes = main.Quaggacli.generate_routes(1, 3)
+        main.log.info(routes)
+        
+        for route in routes:
+            allRoutes.append(route + "/" + "1.1.1.1")
+
+        # start to insert routes into the bgp peer
+        main.step("Start Quagga-cli on host1")
+        main.Quaggacli.loginQuagga("1.1.1.1")
+
+        main.step("Start to configure Quagga on host1")
+        main.Quaggacli.enter_config(64513)
+    
+        main.step("Start to generate and add routes for BGP peer on host1")    
+        routes = main.Quaggacli.generate_routes(8, 3)
+        main.Quaggacli.add_routes(routes, 1)
+             
+        # add generates routes to allRoutes
+        for route in routes:
+            allRoutes.append(route + "/" + "1.1.1.1")
+
+        cell_name = main.params['ENV']['cellName']
+        ONOS1_ip = main.params['CTRL']['ip1']
+
+        main.step("Starting ONOS service")
+        # TODO: start ONOS from Mininet Script
+        # start_result = main.ONOSbench.onos_start("127.0.0.1")
+
+        main.step("Set cell for ONOS-cli environment")
+        main.ONOScli.set_cell(cell_name)
+   
+        main.step("Start ONOS-cli")
+        # TODO: change the hardcode in start_onos_cli method in ONOS CLI driver
+        time.sleep(5)
+        main.ONOScli.start_onos_cli(ONOS1_ip)    
+
+        main.step("Get devices in the network")
+        list_result = main.ONOScli.devices(json_format=False)
+        main.log.info(list_result)
+
+        #get all routes inside SDN-IP
+        get_routes_result = main.ONOScli.routes(json_format=True)  
+                     
+        # parse routes from ONOS CLI
+        routes_list = []
+        routes_json_obj = json.loads(get_routes_result)   
+        for route in routes_json_obj:
+            if route['prefix'] == '172.16.10.0/24':
+                continue
+            routes_list.append(route['prefix'] + "/" + route['nextHop'])
+      
+        main.log.info("Start to checking routes")
+        main.log.info("Routes inserted into the system:")
+        main.log.info(sorted(allRoutes))
+        main.log.info("Routes get from ONOS CLI:")
+        main.log.info(sorted(routes_list))
+
+        if eq(sorted(allRoutes), sorted(routes_list)): 
+            main.log.report("***Routes in SDN-IP are correct!***")
+        else:
+            main.log.report("***Routes in SDN-IP are wrong!***")
+        
+        time.sleep(2)
+        main.step("Get intents installed on ONOS")
+        get_intents_result = main.ONOScli.intents(json_format=True)
+        main.log.info(get_intents_result)
+
+
+        #main.step("Test whether Mininet is started")
+        #main.Mininet2.handle.sendline("xterm host1")
+        #main.Mininet2.handle.expect("mininet>")
+
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.topo b/TestON/tests/SdnIpTest/SdnIpTest.topo
new file mode 100755
index 0000000..a906c0e
--- /dev/null
+++ b/TestON/tests/SdnIpTest/SdnIpTest.topo
@@ -0,0 +1,41 @@
+<TOPOLOGY>
+    <COMPONENT>
+
+        <ONOSbench>
+            <host>127.0.0.1</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOSbench>
+
+        <ONOScli>
+            <host>127.0.0.1</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOScli>
+
+        <ONOS1>
+            <host>127.0.0.1</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1>
+
+      	<Quaggacli>
+            <host>127.0.0.1</host>
+            <user>linpp</user>
+            <password>666666</password>
+            <type>QuaggaCliDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </Quaggacli>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/SdnIpTest/__init__.py b/TestON/tests/SdnIpTest/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/SdnIpTest/__init__.py
