Merge "[ONOS-5514] add vlan interfaces in SDNIPClusterTest"
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
index 7f93976..0d6014f 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
@@ -23,17 +23,17 @@
     </DEPENDENCY>
 
     <config>
-        <peerNum> 3 </peerNum>
+        <peerNum> 7 </peerNum>
         <switchNum> 39 </switchNum>
-        <peer64514> 10.0.14.1</peer64514>
-        <peer64515> 10.0.15.1</peer64515>
-        <peer64516> 10.0.16.1</peer64516>
+        <p64514> 10.0.14.1</p64514>
+        <p64515> 10.0.15.1</p64515>
+        <p64516> 10.0.16.1</p64516>
     </config>
 
     <timers>
         <SdnIpSetup>10</SdnIpSetup>
-        <TopoDiscovery>10</TopoDiscovery>
-        <PingTestWithRoutes>20</PingTestWithRoutes>
+        <TopoDiscovery>15</TopoDiscovery>
+        <PingTestWithRoutes>30</PingTestWithRoutes>
         <PingTestWithoutRoutes>100</PingTestWithoutRoutes>
         <RouteDelivery>30</RouteDelivery>
         <PathAvailable>20</PathAvailable>
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 48909f2..68ed759 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -69,12 +69,12 @@
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
         ipList = [ ONOS1Ip, ONOS2Ip, ONOS3Ip ]
 
-        global peer64514
-        global peer64515
-        global peer64516
-        peer64514 = main.params['config']['peer64514']
-        peer64515 = main.params['config']['peer64515']
-        peer64516 = main.params['config']['peer64516']
+        global p64514
+        global p64515
+        global p64516
+        p64514 = main.params['config']['p64514']
+        p64515 = main.params['config']['p64515']
+        p64516 = main.params['config']['p64516']
 
         main.step( "Copying config files" )
         src = os.path.dirname( main.testFile ) + "/network-cfg.json"
@@ -262,12 +262,21 @@
         '''
 
         main.case( "Ping between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk3" ],
+                                          peers=[ "p64519", "p64520" ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk4" ],
+                                          peers=[ "p64517", "p64518" ],
+                                          expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
@@ -309,6 +318,10 @@
         allRoutesExpected.append( "4.0.0.0/24" + "/" + "10.0.4.1" )
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
+        allRoutesExpected.append( "7.0.0.0/24" + "/" + "10.0.7.1" )
+        allRoutesExpected.append( "8.0.0.0/24" + "/" + "10.0.8.1" )
+        allRoutesExpected.append( "9.0.0.0/24" + "/" + "10.0.9.1" )
+        allRoutesExpected.append( "20.0.0.0/24" + "/" + "10.0.20.1" )
 
         getRoutesResult = main.ONOScli1.routes( jsonFormat=True )
         allRoutesActual = \
@@ -335,7 +348,7 @@
         getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
-        routeIntentsExpectedNum = 3
+        routeIntentsExpectedNum = 7
         if routeIntentsActualNum != routeIntentsExpectedNum:
             time.sleep( int( main.params['timers']['RouteDelivery'] ) )
             getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
@@ -368,9 +381,14 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
-
+        main.Functions.pingHostToHost(main,
+                                      hosts=["h64517", "h64518"],
+                                      expectAllSuccess=True)
+        main.Functions.pingHostToHost(main,
+                                      hosts=["h64519", "h64520"],
+                                      expectAllSuccess=True)
 
     def CASE5( self, main ):
         '''
@@ -378,8 +396,8 @@
         '''
         import time
         main.case( "Bring down links and check routes/intents" )
-        main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring down the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult1,
@@ -388,15 +406,15 @@
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring down the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult2,
@@ -404,15 +422,15 @@
                                  onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 )
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring down the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult3,
@@ -420,8 +438,8 @@
                                  onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 0 )
-            main.Functions.checkM2SintentNum( main, 0 )
+            main.Functions.checkRouteNum( main, 4 )
+            main.Functions.checkM2SintentNum( main, 4 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
@@ -438,11 +456,11 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=False )
 
     def CASE6( self, main ):
@@ -451,8 +469,8 @@
         '''
         import time
         main.case( "Bring up links and check routes/intents" )
-        main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring up the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult1,
@@ -460,15 +478,15 @@
                                  onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 )
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring up the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult2,
@@ -476,15 +494,15 @@
                                  onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring up the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult3,
@@ -492,8 +510,8 @@
                                  onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
@@ -510,11 +528,11 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
     def CASE7( self, main ):
@@ -531,18 +549,18 @@
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
-            main.Functions.checkP2PintentNum( main, 12 * 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
+            main.Functions.checkP2PintentNum( main, 48 ) #14 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
-        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
-        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
+        result1 = main.Mininet.pingHost( src="h64514", target="h64515" )
+        result2 = main.Mininet.pingHost( src="h64515", target="h64516" )
+        result3 = main.Mininet.pingHost( src="h64514", target="h64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                       and ( result3 == main.FALSE )
@@ -554,10 +572,10 @@
             main.cleanup()
             main.exit()
 
-        main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
-        result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
-        result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
+        main.step( "Check ping between BGP peers and spk1" )
+        result4 = main.Mininet.pingHost( src="spk1", target="p64514" )
+        result5 = main.Mininet.pingHost( src="spk1", target="p64515" )
+        result6 = main.Mininet.pingHost( src="spk1", target="p64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
@@ -569,11 +587,11 @@
             main.cleanup()
             main.exit()
 
-        main.step( "Check ping between BGP peers and speaker2" )
+        main.step( "Check ping between BGP peers and spk2" )
         # TODO
-        result7 = main.Mininet.pingHost( src="speaker2", target=peer64514 )
-        result8 = main.Mininet.pingHost( src="speaker2", target=peer64515 )
-        result9 = main.Mininet.pingHost( src="speaker2", target=peer64516 )
+        result7 = main.Mininet.pingHost( src="spk2", target=p64514 )
+        result8 = main.Mininet.pingHost( src="spk2", target=p64515 )
+        result9 = main.Mininet.pingHost( src="spk2", target=p64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
@@ -617,9 +635,9 @@
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 ) # 18*2
         else:
             main.log.error( "Starting switch failed!" )
             main.cleanup()
@@ -636,15 +654,17 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=["p64514", "p64515", "p64516"],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
+
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
     def CASE9( self, main ):
         '''
@@ -655,9 +675,9 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow number correctness before stopping sw11" )
-        main.Functions.checkFlowNum( main, "sw11", 19 )
-        main.Functions.checkFlowNum( main, "sw1", 3 )
-        main.Functions.checkFlowNum( main, "sw7", 3 )
+        main.Functions.checkFlowNum( main, "sw11", 49 )
+        main.Functions.checkFlowNum( main, "sw1", 7 )
+        main.Functions.checkFlowNum( main, "sw7", 34 )
         main.log.info( main.Mininet.checkFlows( "sw11" ) )
         main.log.info( main.Mininet.checkFlows( "sw1" ) )
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
@@ -670,9 +690,9 @@
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 ) #18 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
@@ -688,14 +708,14 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -708,8 +728,8 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow status before starting sw11" )
-        main.Functions.checkFlowNum( main, "sw1", 17 )
-        main.Functions.checkFlowNum( main, "sw7", 5 )
+        main.Functions.checkFlowNum( main, "sw1", 36 )
+        main.Functions.checkFlowNum( main, "sw7", 30 )
         main.log.info( main.Mininet.checkFlows( "sw1" ) )
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
@@ -724,9 +744,9 @@
                                  onfail="Connect switch to ONOS failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 )
 
             main.log.debug( main.Mininet.checkFlows( "sw11" ) )
             main.log.debug( main.Mininet.checkFlows( "sw1" ) )
@@ -746,25 +766,25 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
     def CASE11(self, main):
         import time
-        main.case( "Kill speaker1, check:\
+        main.case( "Kill spk1, check:\
         route number, P2P intent number, M2S intent number, ping test" )
-        main.log.info( "Check network status before killing speaker1" )
-        main.Functions.checkRouteNum( main, 3 )
-        main.Functions.checkM2SintentNum( main, 3 )
-        main.Functions.checkP2PintentNum( main, 18 * 2 )
+        main.log.info( "Check network status before killing spk1" )
+        main.Functions.checkRouteNum( main, 7 )
+        main.Functions.checkM2SintentNum( main, 7 )
+        main.Functions.checkP2PintentNum( main, 30 * 2 )
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
                                      main.FALSE,
@@ -775,25 +795,25 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
-        main.step( "Kill speaker1" )
+        main.step( "Kill spk1" )
         command1 = "ps -e | grep bgp -c"
         result1 = main.Mininet.node( "root", command1 )
 
         # The total BGP daemon number in this test environment is 5.
         if "5" in result1:
-            main.log.debug( "Before kill speaker1, 5 BGP daemons - correct" )
+            main.log.debug( "Before kill spk1, 5 BGP daemons - correct" )
         else:
-            main.log.warn( "Before kill speaker1, number of BGP daemons is wrong" )
+            main.log.warn( "Before kill spk1, number of BGP daemons is wrong" )
             main.log.info( result1 )
 
         command2 = "sudo kill -9 `ps -ef | grep quagga-sdn.conf | grep -v grep | awk '{print $2}'`"
@@ -803,17 +823,17 @@
 
         utilities.assert_equals( expect=True,
                                  actual=( "4" in result3 ),
-                                 onpass="Kill speaker1 succeeded",
-                                 onfail="Kill speaker1 failed" )
+                                 onpass="Kill spk1 succeeded",
+                                 onfail="Kill spk1 failed" )
         if ( "4" not in result3 ) :
             main.log.info( result3 )
             main.cleanup()
             main.exit()
 
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-        main.Functions.checkRouteNum( main, 3 )
-        main.Functions.checkM2SintentNum( main, 3 )
-        main.Functions.checkP2PintentNum( main, 18 * 2 )
+        main.Functions.checkRouteNum( main, 7 )
+        main.Functions.checkM2SintentNum( main, 7 )
+        main.Functions.checkP2PintentNum( main, 30 * 2 )
 
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -826,15 +846,15 @@
                                  onfail="Flow status is wrong!" )
 
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=False )
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -871,9 +891,9 @@
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
         if leaderIP == ONOS1Ip:
-            main.Functions.checkRouteNum( main, 3, ONOScli="ONOScli2" )
-            main.Functions.checkM2SintentNum( main, 3, ONOScli="ONOScli2" )
-            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli="ONOScli2" )
+            main.Functions.checkRouteNum( main, 7, ONOScli="ONOScli2" )
+            main.Functions.checkM2SintentNum( main, 7, ONOScli="ONOScli2" )
+            main.Functions.checkP2PintentNum( main, 30 * 2, ONOScli="ONOScli2" )
 
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -885,9 +905,9 @@
                                      onpass="Flow status is correct!",
                                      onfail="Flow status is wrong!" )
         else:
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 )
 
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -899,12 +919,12 @@
                                      onpass="Flow status is correct!",
                                      onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
index 5f78896..f2c0714 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
@@ -91,8 +91,8 @@
         onfail = "Flow number in " + switch + " is wrong!" )
 
 
-def pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+def pingSpeakerToPeer( main, speakers = ["spk1"],
+                       peers = ["p64514", "p64515", "p64516"],
                        expectAllSuccess = True ):
     """
     Carry out ping test between each BGP speaker and peer pair
@@ -138,7 +138,7 @@
         main.exit()
 
 
-def pingHostToHost( main, hosts = ["host64514", "host64515", "host64516"],
+def pingHostToHost( main, hosts = ["h64514", "h64515", "h64516"],
                 expectAllSuccess = True ):
     """
     Carry out ping test between each BGP host pair
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
index 264746c..9b192e2 100755
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
@@ -15,6 +15,7 @@
 from mininet.node import Controller, RemoteController
 from mininet.log import setLogLevel, info
 from mininet.cli import CLI
+from mininet.node import Host, RemoteController
 from mininet.topo import Topo
 from mininet.util import quietRun
 from mininet.moduledeps import pathCheck
@@ -29,6 +30,18 @@
 numSw = 39
 
 # net = Mininet( controller = RemoteController )
+class VLANHost( Host ):
+    def config( self, vlan=100, intfName=None, **params ):
+        r = super( Host, self ).config( **params )
+        intf = self.intf( intfName )
+        self.cmd( 'ifconfig %s inet 0' % intf )
+        self.cmd( 'vconfig add %s %d' % ( intf, vlan ) )
+        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params['ip'] ) )
+        newName = '%s.%d' % ( intf, vlan )
+        intf.name = newName
+        self.nameToIntf[ newName ] = intf
+        return r
+
 
 class SDNTopo( Topo ):
     "SDN Topology"
@@ -38,9 +51,14 @@
         Topo.__init__( self, *args, **kwargs )
 
         # BGP peer hosts
-        peer64514 = self.addHost( 'peer64514' )
-        peer64515 = self.addHost( 'peer64515' )
-        peer64516 = self.addHost( 'peer64516' )
+        p64514 = self.addHost( 'p64514' )
+        p64515 = self.addHost( 'p64515' )
+        p64516 = self.addHost( 'p64516' )
+
+        p64517 = self.addHost( 'p64517', cls=VLANHost, vlan=20 )
+        p64518 = self.addHost( 'p64518', cls=VLANHost, vlan=20 )
+        p64519 = self.addHost( 'p64519', cls=VLANHost, vlan=10 )
+        p64520 = self.addHost( 'p64520', cls=VLANHost, vlan=10 )
 
         '''
         sw1 = self.addSwitch( 'SEAT', dpid = '00000000000000a1' )
@@ -131,18 +149,27 @@
 
 
         # BGP speaker hosts
-        speaker1 = self.addHost( 'speaker1' )
-        speaker2 = self.addHost( 'speaker2' )
-
+        spk1 = self.addHost( 'spk1' )
+        spk2 = self.addHost( 'spk2' )
+        spk3 = self.addHost( 'spk3', cls=VLANHost, vlan=10 )
+        spk4 = self.addHost( 'spk4', cls=VLANHost, vlan=20 )
         root = self.addHost( 'root', inNamespace = False , ip = '0' )
 
         # hosts behind each AS
-        host64514 = self.addHost( 'host64514' )
-        host64515 = self.addHost( 'host64515' )
-        host64516 = self.addHost( 'host64516' )
+        h64514 = self.addHost( 'h64514' )
+        h64515 = self.addHost( 'h64515' )
+        h64516 = self.addHost( 'h64516' )
 
-        self.addLink( 'speaker1', sw24 )
-        self.addLink( 'speaker2', sw24 )
+        # VLAN hosts behind each AS
+        h64517 = self.addHost( 'h64517', cls=VLANHost, vlan=20 )
+        h64518 = self.addHost( 'h64518', cls=VLANHost, vlan=20 )
+        h64519 = self.addHost( 'h64519', cls=VLANHost, vlan=10 )
+        h64520 = self.addHost( 'h64520', cls=VLANHost, vlan=10 )
+
+        self.addLink( 'spk1', sw24 )
+        self.addLink( 'spk2', sw24 )
+        self.addLink( 'spk3', sw24 )
+        self.addLink( 'spk4', sw24 )
 
         # connect all switches
         self.addLink( sw1, sw2 )
@@ -197,25 +224,45 @@
         self.addLink( sw38, sw39 )
 
         # connection between switches and peers
-        self.addLink( peer64514, sw32 )
-        self.addLink( peer64515, sw8 )
-        self.addLink( peer64516, sw28 )
+        self.addLink( p64514, sw32 )
+        self.addLink( p64515, sw8 )
+        self.addLink( p64516, sw28 )
+
+        self.addLink( p64517, sw7 )
+        self.addLink( p64518, sw9 )
+        self.addLink( p64519, sw5 )
+        self.addLink( p64520, sw5 )
 
         # connection between BGP peer and hosts behind the BGP peer
-        self.addLink( peer64514, host64514 )
-        self.addLink( peer64515, host64515 )
-        self.addLink( peer64516, host64516 )
+        self.addLink( p64514, h64514 )
+        self.addLink( p64515, h64515 )
+        self.addLink( p64516, h64516 )
+
+        self.addLink( p64517, h64517 )
+        self.addLink( p64518, h64518 )
+        self.addLink( p64519, h64519 )
+        self.addLink( p64520, h64520 )
 
         # Internal Connection To Hosts
-        self.addLink( swCtl100, peer64514 )
-        self.addLink( swCtl100, peer64515 )
-        self.addLink( swCtl100, peer64516 )
-        self.addLink( swCtl100, speaker1 )
-        self.addLink( swCtl100, speaker2 )
+        self.addLink( swCtl100, p64514 )
+        self.addLink( swCtl100, p64515 )
+        self.addLink( swCtl100, p64516 )
 
+        self.addLink( swCtl100, p64517 )
+        self.addLink( swCtl100, p64518 )
+        self.addLink( swCtl100, p64519 )
+        self.addLink( swCtl100, p64520 )
 
-        # add host64514 to control plane for ping test
-        self.addLink( swCtl100, host64514 )
+        self.addLink( swCtl100, spk1 )
+        self.addLink( swCtl100, spk2 )
+        self.addLink( swCtl100, spk3 )
+        self.addLink( swCtl100, spk4 )
+
+        # add h64514 to control plane for ping test
+        self.addLink( swCtl100, h64514 )
+        self.addLink( swCtl100, h64517 )
+        self.addLink( swCtl100, h64519 )
+
         self.addLink( swCtl100, root )
         self.addLink( swCtl100, root )
         self.addLink( swCtl100, root )
@@ -286,70 +333,129 @@
     net = Mininet( topo = topo, controller = RemoteController )
 
 
-    speaker1, speaker2, peer64514, peer64515, peer64516 = \
-    net.get( 'speaker1', 'speaker2' ,
-             'peer64514', 'peer64515', 'peer64516' )
+    spk1, spk2, spk3, spk4, p64514, p64515, p64516, p64517, p64518, p64519, p64520 = \
+    net.get( 'spk1', 'spk2', 'spk3', 'spk4',
+             'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
 
     # Adding addresses to speakers' interface connected to sw24
     # for BGP peering
-    speaker1.setMAC( '00:00:00:00:00:01', 'speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.4.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.5.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.6.101/24 dev speaker1-eth0' )
+    spk1.setMAC( '00:00:00:00:00:01', 'spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.4.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.5.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.6.101/24 dev spk1-eth0' )
 
-    speaker1.defaultIntf().setIP( '10.0.4.101/24' )
-    speaker1.defaultIntf().setMAC( '00:00:00:00:00:01' )
+    spk1.defaultIntf().setIP( '10.0.4.101/24' )
+    spk1.defaultIntf().setMAC( '00:00:00:00:00:01' )
 
-    speaker2.setMAC( '00:00:00:00:00:02', 'speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.14.101/24 dev speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.15.101/24 dev speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.16.101/24 dev speaker2-eth0' )
+    spk2.setMAC( '00:00:00:00:00:02', 'spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.14.101/24 dev spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.15.101/24 dev spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.16.101/24 dev spk2-eth0' )
 
-    speaker2.defaultIntf().setIP( '10.0.14.101/24' )
-    speaker2.defaultIntf().setMAC( '00:00:00:00:00:02' )
+    spk2.defaultIntf().setIP( '10.0.14.101/24' )
+    spk2.defaultIntf().setMAC( '00:00:00:00:00:02' )
+
+    spk3.setMAC( '00:00:00:00:00:03', 'spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.9.101/24 dev spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.20.101/24 dev spk3-eth0.10' )
+    spk3.defaultIntf().setIP( '10.1.9.101/24' )
+    spk3.defaultIntf().setMAC( '00:00:00:00:00:03' )
+
+    spk4.setMAC( '00:00:00:00:00:04', 'spk4-eth0.20' )
+    spk4.cmd( 'ip addr add 10.0.7.101/24 dev spk4-eth0.20' )
+    spk4.cmd( 'ip addr add 10.0.8.101/24 dev spk4-eth0.20' )
+    spk4.defaultIntf().setIP( '10.1.7.101/24' )
+    spk4.defaultIntf().setMAC( '00:00:00:00:00:04' )
+
+    p64517.config( vlan=20, intfName="p64517-eth1", ip="7.0.0.254" )
+    p64518.config( vlan=20, intfName="p64518-eth1", ip="8.0.0.254" )
+    p64519.config( vlan=10, intfName="p64519-eth1", ip="9.0.0.254" )
+    p64520.config( vlan=10, intfName="p64520-eth1", ip="20.0.0.254" )
 
     # Net has to be start after adding the above link
     net.start()
 
     # setup configuration on the interface connected to switch
-    peer64514.cmd( "ifconfig  peer64514-eth0 10.0.4.1 up" )
-    peer64514.cmd( "ip addr add 10.0.14.1/24 dev peer64514-eth0" )
-    peer64514.setMAC( '00:00:00:00:00:04', 'peer64514-eth0' )
-    peer64515.cmd( "ifconfig  peer64515-eth0 10.0.5.1 up" )
-    peer64515.cmd( "ip addr add 10.0.15.1/24 dev peer64515-eth0" )
-    peer64515.setMAC( '00:00:00:00:00:05', 'peer64515-eth0' )
-    peer64516.cmd( "ifconfig  peer64516-eth0 10.0.6.1 up" )
-    peer64516.cmd( "ip addr add 10.0.16.1/24 dev peer64516-eth0" )
-    peer64516.setMAC( '00:00:00:00:00:06', 'peer64516-eth0' )
+    p64514.cmd( "ifconfig p64514-eth0 10.0.4.1 up" )
+    p64514.cmd( "ip addr add 10.0.14.1/24 dev p64514-eth0" )
+    p64514.setMAC( '00:00:00:00:00:14', 'p64514-eth0' ) # do not repeat spk4's MAC addr
+    p64515.cmd( "ifconfig p64515-eth0 10.0.5.1 up" )
+    p64515.cmd( "ip addr add 10.0.15.1/24 dev p64515-eth0" )
+    p64515.setMAC( '00:00:00:00:00:05', 'p64515-eth0' )
+    p64516.cmd( "ifconfig p64516-eth0 10.0.6.1 up" )
+    p64516.cmd( "ip addr add 10.0.16.1/24 dev p64516-eth0" )
+    p64516.setMAC( '00:00:00:00:00:06', 'p64516-eth0' )
+
+    p64517.cmd( "ifconfig p64517-eth0.20 10.0.7.1 up" )
+    p64517.setMAC( '00:00:00:00:00:07', 'p64517-eth0.20' )
+    p64518.cmd( "ifconfig p64518-eth0.20 10.0.8.1 up" )
+    p64518.setMAC( '00:00:00:00:00:08', 'p64518-eth0.20' )
+
+    p64519.cmd( "ifconfig p64519-eth0.10 10.0.9.1 up" )
+    p64519.setMAC( '00:00:00:00:00:09', 'p64519-eth0.10' )
+    p64520.cmd( "ifconfig p64520-eth0.10 10.0.20.1 up" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth0.10' )
 
     # setup configuration on the interface connected to hosts
-    peer64514.setIP( "4.0.0.254", 8, "peer64514-eth1" )
-    peer64514.setMAC( '00:00:00:00:00:44', 'peer64514-eth1' )
-    peer64515.setIP( "5.0.0.254", 8, "peer64515-eth1" )
-    peer64515.setMAC( '00:00:00:00:00:55', 'peer64515-eth1' )
-    peer64516.setIP( "6.0.0.254", 8, "peer64516-eth1" )
-    peer64516.setMAC( '00:00:00:00:00:66', 'peer64516-eth1' )
+    p64514.setIP( "4.0.0.254", 8, "p64514-eth1" )
+    p64514.setMAC( '00:00:00:00:00:44', 'p64514-eth1' )
+    p64515.setIP( "5.0.0.254", 8, "p64515-eth1" )
+    p64515.setMAC( '00:00:00:00:00:55', 'p64515-eth1' )
+    p64516.setIP( "6.0.0.254", 8, "p64516-eth1" )
+    p64516.setMAC( '00:00:00:00:00:66', 'p64516-eth1' )
+
+    p64517.setIP( "7.0.0.254", 8, "p64517-eth1.20" )
+    p64517.setMAC( '00:00:00:00:00:77', 'p64517-eth1.20' )
+    p64518.setIP( "8.0.0.254", 8, "p64518-eth1.20" )
+    p64518.setMAC( '00:00:00:00:00:88', 'p64518-eth1.20' )
+
+    p64519.setIP( "9.0.0.254", 8, "p64519-eth1.10" )
+    p64519.setMAC( '00:00:00:00:00:99', 'p64519-eth1.10' )
+    p64520.setIP( "20.0.0.254", 8, "p64520-eth1.10" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth1.10' )
 
     # enable forwarding on BGP peer hosts
-    peer64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+
+    p64517.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64518.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64519.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64520.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
 
     # config interface for control plane connectivity
-    peer64514.setIP( "192.168.0.4", 24, "peer64514-eth2" )
-    peer64515.setIP( "192.168.0.5", 24, "peer64515-eth2" )
-    peer64516.setIP( "192.168.0.6", 24, "peer64516-eth2" )
+    p64514.setIP( "192.168.0.4", 24, "p64514-eth2" )
+    p64515.setIP( "192.168.0.5", 24, "p64515-eth2" )
+    p64516.setIP( "192.168.0.6", 24, "p64516-eth2" )
+
+    p64517.setIP( "192.168.0.7", 24, "p64517-eth2" )
+    p64518.setIP( "192.168.0.8", 24, "p64518-eth2" )
+    p64519.setIP( "192.168.0.9", 24, "p64519-eth2" )
+    p64520.setIP( "192.168.0.20", 24, "p64520-eth2" )
 
     # Setup hosts in each non-SDN AS
-    host64514, host64515, host64516 = \
-    net.get( 'host64514', 'host64515', 'host64516' )
-    host64514.cmd( 'ifconfig host64514-eth0 4.0.0.1 up' )
-    host64514.cmd( 'ip route add default via 4.0.0.254' )
-    host64514.setIP( '192.168.0.44', 24, 'host64514-eth1' )  # for control plane
-    host64515.cmd( 'ifconfig host64515-eth0 5.0.0.1 up' )
-    host64515.cmd( 'ip route add default via 5.0.0.254' )
-    host64516.cmd( 'ifconfig host64516-eth0 6.0.0.1 up' )
-    host64516.cmd( 'ip route add default via 6.0.0.254' )
+    h64514, h64515, h64516, h64517, h64518, h64519, h64520 = \
+    net.get( 'h64514', 'h64515', 'h64516', 'h64517', 'h64518', 'h64519', 'h64520' )
+    h64514.cmd( 'ifconfig h64514-eth0 4.0.0.1 up' )
+    h64514.cmd( 'ip route add default via 4.0.0.254' )
+    h64514.setIP( '192.168.0.44', 24, 'h64514-eth1' )  # for control plane
+    h64515.cmd( 'ifconfig h64515-eth0 5.0.0.1 up' )
+    h64515.cmd( 'ip route add default via 5.0.0.254' )
+    h64516.cmd( 'ifconfig h64516-eth0 6.0.0.1 up' )
+    h64516.cmd( 'ip route add default via 6.0.0.254' )
+
+    h64517.cmd( 'ifconfig h64517-eth0.20 7.0.0.1 up' )
+    h64517.cmd( 'ip route add default via 7.0.0.254' )
+    h64517.setIP( '192.168.0.77', 24, 'h64517-eth1' )  # for control plane
+    h64518.cmd( 'ifconfig h64518-eth0.20 8.0.0.1 up' )
+    h64518.cmd( 'ip route add default via 8.0.0.254' )
+
+    h64519.cmd( 'ifconfig h64519-eth0.10 9.0.0.1 up' )
+    h64519.cmd( 'ip route add default via 9.0.0.254' )
+    h64519.setIP( '192.168.0.99', 24, 'h64519-eth1' )  # for control plane
+    h64520.cmd( 'ifconfig h64520-eth0.10 20.0.0.1 up' )
+    h64520.cmd( 'ip route add default via 20.0.0.254' )
 
 
     # set up swCtl100 as a learning
@@ -368,14 +474,20 @@
     '''
 
     # Start Quagga on border routers
-    startquagga( peer64514, 64514, 'quagga64514.conf' )
-    startquagga( peer64515, 64515, 'quagga64515.conf' )
-    startquagga( peer64516, 64516, 'quagga64516.conf' )
+    startquagga( p64514, 64514, 'quagga64514.conf' )
+    startquagga( p64515, 64515, 'quagga64515.conf' )
+    startquagga( p64516, 64516, 'quagga64516.conf' )
+
+    startquagga( p64517, 64517, 'quagga64517.conf' )
+    startquagga( p64518, 64518, 'quagga64518.conf' )
+    startquagga( p64519, 64519, 'quagga64519.conf' )
+    startquagga( p64520, 64520, 'quagga64520.conf' )
 
     # start Quagga in SDN network
-    startquagga( speaker1, 64513, 'quagga-sdn.conf' )
-    startquagga( speaker2, 64512, 'quagga-sdn-speaker2.conf' )
-
+    startquagga( spk1, 64513, 'quagga-sdn.conf' )
+    startquagga( spk2, 64512, 'quagga-sdn-speaker2.conf' )
+    startquagga( spk3, 64511, 'quagga-sdn3.conf' )
+    startquagga( spk4, 64510, 'quagga-sdn4.conf' )
 
     root = net.get( 'root' )
     root.intf( 'root-eth0' ).setIP( '1.1.1.2/24' )
@@ -387,13 +499,16 @@
     root.intf( 'root-eth2' ).setIP( '1.1.1.6/24' )
     root.cmd( 'ip addr add 192.168.0.102/24 dev root-eth2' )
 
-    speaker1.intf( 'speaker1-eth1' ).setIP( '1.1.1.1/24' )
-    speaker2.intf( 'speaker2-eth1' ).setIP( '1.1.1.3/24' )
+    spk1.intf( 'spk1-eth1' ).setIP( '1.1.1.1/24' )
+    spk2.intf( 'spk2-eth1' ).setIP( '1.1.1.3/24' )
+    spk3.intf( 'spk3-eth1' ).setIP( '1.1.1.5/24' )
+    spk4.intf( 'spk4-eth1' ).setIP( '1.1.1.7/24' )
 
 
     stopsshd()
 
-    hosts = [ peer64514, peer64515, peer64516, host64514];
+    hosts = [ p64514, p64515, p64516, p64517, p64518, p64519, p64520,
+              h64514, h64517, h64519 ];
     startsshds( hosts )
 
 
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf
new file mode 100644
index 0000000..7e78260
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf
@@ -0,0 +1,45 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.9.101
+  timers bgp 1 2
+  neighbor 10.0.9.1 remote-as 64519
+  neighbor 10.0.9.1 ebgp-multihop
+  neighbor 10.0.9.1 timers connect 5
+  neighbor 10.0.20.1 remote-as 64520
+  neighbor 10.0.20.1 ebgp-multihop
+  neighbor 10.0.20.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+  neighbor 1.1.1.4 remote-as 64513
+  neighbor 1.1.1.4 port 2000
+  neighbor 1.1.1.4 timers connect 5
+
+  neighbor 1.1.1.6 remote-as 64513
+  neighbor 1.1.1.6 port 2000
+  neighbor 1.1.1.6 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf
new file mode 100644
index 0000000..7454ab3
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf
@@ -0,0 +1,45 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.7.101
+  timers bgp 1 2
+  neighbor 10.0.7.1 remote-as 64517
+  neighbor 10.0.7.1 ebgp-multihop
+  neighbor 10.0.7.1 timers connect 5
+  neighbor 10.0.8.1 remote-as 64518
+  neighbor 10.0.8.1 ebgp-multihop
+  neighbor 10.0.8.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+  neighbor 1.1.1.4 remote-as 64513
+  neighbor 1.1.1.4 port 2000
+  neighbor 1.1.1.4 timers connect 5
+
+  neighbor 1.1.1.6 remote-as 64513
+  neighbor 1.1.1.6 port 2000
+  neighbor 1.1.1.6 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf
new file mode 100644
index 0000000..00e4cf8
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64517
+  bgp router-id 10.0.7.1
+!  timers bgp 1 3
+ neighbor 10.0.7.101 remote-as 64513
+ network 7.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf
new file mode 100644
index 0000000..c156102
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64518
+  bgp router-id 10.0.8.1
+!  timers bgp 1 3
+ neighbor 10.0.8.101 remote-as 64513
+ network 8.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf
new file mode 100644
index 0000000..11f1801
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64519
+  bgp router-id 10.0.9.1
+!  timers bgp 1 3
+ neighbor 10.0.9.101 remote-as 64513
+ network 9.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf
new file mode 100644
index 0000000..5fa469d
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64520
+  bgp router-id 10.0.20.1
+!  timers bgp 1 3
+ neighbor 10.0.20.101 remote-as 64513
+ network 20.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
index 602a72f..5efd5a7 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
@@ -3,10 +3,12 @@
         "of:00000000000000a8/5" : {
             "interfaces" : [
                 {
+                    "name": "sw8-5-1",
                     "ips"  : [ "10.0.5.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw8-5-2",
                     "ips"  : [ "10.0.15.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
@@ -15,10 +17,12 @@
         "of:0000000000000a32/4" : {
             "interfaces" : [
                 {
+                    "name": "sw32-4-1",
                     "ips"  : [ "10.0.4.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw32-4-2",
                     "ips"  : [ "10.0.14.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
@@ -27,14 +31,56 @@
         "of:0000000000000a28/3" : {
             "interfaces" : [
                 {
+                    "name": "sw28-3-1",
                     "ips"  : [ "10.0.6.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw28-3-2",
                     "ips"  : [ "10.0.16.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
             ]
+        },
+        "of:00000000000000a5/5" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw5-5",
+                      "ips"  : [ "10.0.20.101/24" ],
+                      "mac"  : "00:00:00:00:00:03",
+                      "vlan" : "10"
+                  }
+              ]
+        },
+        "of:00000000000000a5/4" : {
+            "interfaces" : [
+                {
+                    "name" : "sw5-4",
+                    "ips"  : [ "10.0.9.101/24" ],
+                    "mac"  : "00:00:00:00:00:03",
+                    "vlan" : "10"
+                }
+            ]
+        },
+        "of:00000000000000a7/3" : {
+            "interfaces" : [
+                {
+                    "name" : "sw7-3",
+                    "ips"  : [ "10.0.7.101/24" ],
+                    "mac"  : "00:00:00:00:00:04",
+                    "vlan" : "20"
+                }
+            ]
+        },
+        "of:00000000000000a9/3" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw9-3",
+                      "ips"  : [ "10.0.8.101/24" ],
+                      "mac"  : "00:00:00:00:00:04",
+                      "vlan" : "20"
+                  }
+              ]
         }
     },
     "apps" : {
@@ -42,7 +88,7 @@
             "bgp" : {
                 "bgpSpeakers" : [
                     {
-                        "name" : "speaker1",
+                        "name" : "bgpSpeaker1",
                         "connectPoint" : "of:0000000000000a24/1",
                         "peers" : [
                             "10.0.4.1",
@@ -51,13 +97,31 @@
                         ]
                     },
                     {
-                        "name" : "speaker2",
+                        "name" : "bgpSpeaker2",
                         "connectPoint" : "of:0000000000000a24/2",
                         "peers" : [
                             "10.0.14.1",
                             "10.0.15.1",
                             "10.0.16.1"
                         ]
+                    },
+                    {
+                          "name": "bgpSpeaker3",
+                          "vlan": "10",
+                          "connectPoint" : "of:0000000000000a24/3",
+                          "peers" : [
+                              "10.0.9.1",
+                              "10.0.20.1"
+                          ]
+                    },
+                    {
+                        "name": "bgpSpeaker4",
+                        "vlan": "20",
+                        "connectPoint" : "of:0000000000000a24/4",
+                        "peers" : [
+                            "10.0.7.1",
+                            "10.0.8.1"
+                        ]
                     }
                 ]
             }