[ONOS-5514] add vlan interfaces to Sdn-ip tests
Change-Id: I9e873275907c8dbbac43c3c47868fb3702b8801a
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
index 3570fd0..104fe3f 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
@@ -4,6 +4,7 @@
#Environment variables
<ENV>
+ #Cells that you use
<cellName>sdnip_single</cellName>
<appString>drivers,openflow,proxyarp</appString>
</ENV>
@@ -21,14 +22,14 @@
</DEPENDENCY>
<config>
- <peerNum> 3 </peerNum>
+ <peerNum> 7 </peerNum>
<switchNum> 39 </switchNum>
</config>
<timers>
<SdnIpSetup>10</SdnIpSetup>
<TopoDiscovery>60</TopoDiscovery>
- <PingTestWithRoutes>20</PingTestWithRoutes>
+ <PingTestWithRoutes>30</PingTestWithRoutes>
<PingTestWithoutRoutes>100</PingTestWithoutRoutes>
<RouteDelivery>60</RouteDelivery>
<PathAvailable>20</PathAvailable>
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
index f1ace78..aa7f34a 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
@@ -10,7 +10,6 @@
Start mininet
"""
import os
- import imp
main.case( "Setup the Mininet testbed" )
main.dependencyPath = main.testDir + \
main.params[ 'DEPENDENCY' ][ 'path' ]
@@ -69,10 +68,8 @@
onos-install -f
onos-wait-for-start
"""
- import json
import time
import os
- from operator import eq
main.case( "Setting up ONOS environment" )
@@ -200,6 +197,9 @@
main.exit()
def CASE200( self, main ):
+ import json
+ import time
+
main.case( "Activate sdn-ip application" )
main.log.info( "waiting link discovery......" )
time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
@@ -242,6 +242,8 @@
'''
This test case is to load the methods from other Python files.
'''
+ import imp
+
main.case( "Loading methods from other Python file" )
# load the methods from other file
wrapperFile = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
@@ -253,20 +255,29 @@
def CASE1( self, main ):
'''
- ping test from 3 bgp peers to BGP speaker
+ ping test from 7 bgp peers to BGP speaker
'''
main.case( "Ping tests between BGP peers and speakers" )
- main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
- 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=[ "p64517", "p64518" ],
+ expectAllSuccess=True )
+
+ main.Functions.pingSpeakerToPeer( main, speakers=[ "spk3" ],
+ peers=[ "p64519", "p64520" ],
+ expectAllSuccess=True )
def CASE2( self, main ):
'''
point-to-point intents test for each BGP peer and BGP speaker pair
'''
import time
+ from operator import eq
+
main.case( "Check point-to-point intents" )
main.log.info( "There are %s BGP peers in total "
% main.params[ 'config' ][ 'peerNum' ] )
@@ -304,6 +315,11 @@
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.ONOScli.routes( jsonFormat=True )
allRoutesActual = \
main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
@@ -330,7 +346,7 @@
getIntentsResult = main.ONOScli.intents( jsonFormat=True )
routeIntentsActualNum = \
main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
- routeIntentsExpectedNum = 3
+ routeIntentsExpectedNum = 7
if routeIntentsActualNum != routeIntentsExpectedNum:
time.sleep( int( main.params['timers']['RouteDelivery'] ) )
getIntentsResult = main.ONOScli.intents( jsonFormat=True )
@@ -364,10 +380,19 @@
Ping test in data plane for each route
'''
main.case( "Ping test for each route, all hosts behind BGP peers" )
+ #No vlan
main.Functions.pingHostToHost( main,
- hosts=["host64514", "host64515", "host64516"],
- expectAllSuccess=True )
+ hosts=[ "h64514", "h64515", "h64516" ],
+ expectAllSuccess=True )
+ #vlan 10
+ main.Functions.pingHostToHost( main,
+ hosts=[ "h64519", "h64520" ],
+ expectAllSuccess=True )
+ # vlan 20
+ main.Functions.pingHostToHost( main,
+ hosts=[ "h64517", "h64518" ],
+ expectAllSuccess=True )
def CASE5( self, main ):
'''
@@ -375,8 +400,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.assertEquals( expect=main.TRUE,
actual=linkResult1,
@@ -385,15 +410,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 ) #We have 7 links between peers and sw. After one link down, 7-1=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.assertEquals( expect=main.TRUE,
actual=linkResult2,
@@ -401,15 +426,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 ) #2 links down, 7-2=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.assertEquals( expect=main.TRUE,
actual=linkResult3,
@@ -417,8 +442,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 ) #3 links downs 7-3=4
+ main.Functions.checkM2SintentNum( main, 4 )
else:
main.log.error( "Bring down link failed!" )
main.cleanup()
@@ -436,12 +461,13 @@
onfail="Flow status is wrong!" )
# Ping test
- main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
- peers=["peer64514", "peer64515", "peer64516"],
- expectAllSuccess=False )
+ main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+ peers=["p64514", "p64515", "p64516"],
+ expectAllSuccess=False )
+
main.Functions.pingHostToHost( main,
- hosts=["host64514", "host64515", "host64516"],
- expectAllSuccess=False )
+ hosts=["h64514", "h64515", "h64516"],
+ expectAllSuccess=False )
def CASE6( self, main ):
@@ -450,8 +476,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.assertEquals( expect=main.TRUE,
actual=linkResult1,
@@ -459,15 +485,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 ) #one links up, 4+1=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.assertEquals( expect=main.TRUE,
actual=linkResult2,
@@ -475,15 +501,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.assertEquals( expect=main.TRUE,
actual=linkResult3,
@@ -491,8 +517,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 +536,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 )
@@ -532,18 +558,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 )
+ main.Functions.checkRouteNum( main, 6 ) #stop one sw, which bring one link between peer and sw down.
+ main.Functions.checkM2SintentNum( main, 6 )
+ main.Functions.checkP2PintentNum( main, 36 ) #6 intents from sw to speakers x 6 intents to sw x 2 intents between them
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 )
@@ -556,9 +582,9 @@
main.exit()
main.step( "Check ping between BGP peers and speakers" )
- result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
- result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
- result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
+ 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 )
@@ -606,9 +632,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 )
+ main.Functions.checkRouteNum( main, 7 )
+ main.Functions.checkM2SintentNum( main, 7 )
+ main.Functions.checkP2PintentNum( main, 42 )
else:
main.log.error( "Starting switch failed!" )
main.cleanup()
@@ -626,11 +652,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 )
@@ -643,9 +669,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", 13 )
+ main.Functions.checkFlowNum( main, "sw11", 43 )
main.Functions.checkFlowNum( main, "sw1", 3 )
- main.Functions.checkFlowNum( main, "sw7", 3 )
+ main.Functions.checkFlowNum( main, "sw7", 34 )
main.log.debug( main.Mininet.checkFlows( "sw11" ) )
main.log.debug( main.Mininet.checkFlows( "sw1" ) )
main.log.debug( main.Mininet.checkFlows( "sw7" ) )
@@ -658,9 +684,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 )
+ main.Functions.checkRouteNum( main, 7 )
+ main.Functions.checkM2SintentNum( main, 7 )
+ main.Functions.checkP2PintentNum( main, 42 )
else:
main.log.error( "Stopping switch failed!" )
main.cleanup()
@@ -677,11 +703,11 @@
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.pingHostToHost( main,
- hosts=["host64514", "host64515", "host64516"],
+ hosts=["h64514", "h64515", "h64516"],
expectAllSuccess=True )
@@ -694,8 +720,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", 11 )
- main.Functions.checkFlowNum( main, "sw7", 5 )
+ main.Functions.checkFlowNum( main, "sw1", 33 )
+ main.Functions.checkFlowNum( main, "sw7", 28 )
main.log.debug( main.Mininet.checkFlows( "sw1" ) )
main.log.debug( main.Mininet.checkFlows( "sw7" ) )
@@ -710,9 +736,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 )
+ main.Functions.checkRouteNum( main, 7 )
+ main.Functions.checkM2SintentNum( main, 7 )
+ main.Functions.checkP2PintentNum( main, 42 )
main.log.debug( main.Mininet.checkFlows( "sw11" ) )
main.log.debug( main.Mininet.checkFlows( "sw1" ) )
@@ -733,9 +759,9 @@
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.pingHostToHost( main,
- hosts=["host64514", "host64515", "host64516"],
+ hosts=["h64514", "h64515", "h64516"],
expectAllSuccess=True )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
index 428cbce..e99f4f6 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
@@ -78,8 +78,8 @@
onfail = "Flow number in " + switch + " is wrong!" )
-def pingSpeakerToPeer( main, speakers = ["speaker1"],
- peers = ["peer64514", "peer64515", "peer64516"],
+def pingSpeakerToPeer( main, speakers = [ "spk1" ],
+ peers = [ "peer64514", "peer64515", "peer64516" ],
expectAllSuccess = True ):
"""
Carry out ping test between each BGP speaker and peer pair
@@ -125,7 +125,8 @@
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_SdnipFunction/dependencies/USECASE_SdnipI2MN.py b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
index 754c03c..71907ea 100755
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
@@ -12,16 +12,11 @@
"""
from mininet.net import Mininet
-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
-
-import os.path
-import time
-from subprocess import Popen, STDOUT, PIPE
QUAGGA_DIR = '/usr/lib/quagga'
QUAGGA_RUN_DIR = '/usr/local/var/run/quagga'
@@ -29,6 +24,18 @@
# onos1IP = '10.254.1.201'
numSw = 39
+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 +45,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 +143,26 @@
# BGP speaker hosts
- speaker1 = self.addHost( 'speaker1' )
- speaker2 = self.addHost( 'speaker2' )
+ spk1 = self.addHost( 'spk1' )
+ spk2 = self.addHost( 'spk2', cls=VLANHost, vlan=20 )
+ spk3 = self.addHost( 'spk3', cls=VLANHost, vlan=10 )
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 )
# connect all switches
self.addLink( sw1, sw2 )
@@ -197,26 +217,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 ) # should be 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 )
+
+ self.addLink( swCtl100, spk1 )
+ self.addLink( swCtl100, spk2 )
+ self.addLink( swCtl100, spk3 )
-
- # add host64514 to control plane for ping test
- self.addLink( swCtl100, host64514 )
+ # add h64514 to control plane for ping test
+ self.addLink( swCtl100, h64514 )
+ self.addLink( swCtl100, h64517 )
+ self.addLink( swCtl100, h64519 )
self.addLink( swCtl100, root )
@@ -265,7 +304,6 @@
host.cmd( zebra_cmd )
host.cmd( quagga_cmd )
-
def stopquagga():
quietRun( 'sudo pkill -9 -f bgpd' )
quietRun( 'sudo pkill -9 -f zebra' )
@@ -277,60 +315,118 @@
net = Mininet( topo = topo, controller = RemoteController )
- speaker1, speaker2, peer64514, peer64515, peer64516 = \
- net.get( 'speaker1', 'speaker2' ,
- 'peer64514', 'peer64515', 'peer64516' )
+ spk1, spk2, spk3, p64514, p64515, p64516, p64517, p64518, p64519, p64520 = \
+ net.get( 'spk1', 'spk2', 'spk3',
+ 'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
# Adding addresses to host64513_1 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' )
+ spk1.defaultIntf().setIP( '10.1.4.101/24' )
+ spk1.defaultIntf().setMAC( '00:00:00:00:00:01' )
- speaker1.defaultIntf().setIP( '10.1.4.101/24' )
- speaker1.defaultIntf().setMAC( '00:00:00:00:00:01' )
+ spk2.setMAC( '00:00:00:00:00:02', 'spk2-eth0.20' )
+ spk2.cmd( 'ip addr add 10.0.7.101/24 dev spk2-eth0.20' )
+ spk2.cmd( 'ip addr add 10.0.8.101/24 dev spk2-eth0.20' )
+ spk2.defaultIntf().setIP( '10.1.7.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' )
+
+ 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.setMAC( '00:00:00:00:00:04', 'peer64514-eth0' )
- peer64515.cmd( "ifconfig peer64515-eth0 10.0.5.1 up" )
- peer64515.setMAC( '00:00:00:00:00:05', 'peer64515-eth0' )
- peer64516.cmd( "ifconfig peer64516-eth0 10.0.6.1 up" )
- peer64516.setMAC( '00:00:00:00:00:06', 'peer64516-eth0' )
+ p64514.cmd( "ifconfig p64514-eth0 10.0.4.1 up" )
+ p64514.setMAC( '00:00:00:00:00:04', 'p64514-eth0' )
+ p64515.cmd( "ifconfig p64515-eth0 10.0.5.1 up" )
+ p64515.setMAC( '00:00:00:00:00:05', 'p64515-eth0' )
+ p64516.cmd( "ifconfig p64516-eth0 10.0.6.1 up" )
+ 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
swCtl100 = net.get( 'swCtl100' )
@@ -343,29 +439,38 @@
swX = net.get( 'sw%s' % ( i ) )
swX.cmd( 'ovs-vsctl set-controller sw%s tcp:%s:6653' % ( i, onos1IP ) )
'''
- # Start Quagga on border routers
+ # Start Quagga as the external BGP routers
'''
for i in range ( 64514, 64516 + 1 ):
startquagga( 'peer%s' % ( i ), i, 'quagga%s.conf' % ( i ) )
'''
- 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' )
- # start Quagga in SDN network
- startquagga( speaker1, 64513, 'quagga-sdn.conf' )
+ startquagga( p64517, 64517, 'quagga64517.conf' )
+ startquagga( p64518, 64518, 'quagga64518.conf' )
+ startquagga( p64519, 64519, 'quagga64519.conf' )
+ startquagga( p64520, 64520, 'quagga64520.conf' )
+ # start Quagga as the BGP speaker
+ startquagga( spk1, 64513, 'quagga-sdn.conf' )
+ startquagga( spk2, 64512, 'quagga-sdn2.conf' )
+ startquagga( spk3, 64511, 'quagga-sdn3.conf' )
root = net.get( 'root' )
+
root.intf( 'root-eth0' ).setIP( '1.1.1.2/24' )
root.cmd( 'ip addr add 192.168.0.100/24 dev root-eth0' )
- speaker1.intf( 'speaker1-eth1' ).setIP( '1.1.1.1/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' )
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_SdnipFunction/dependencies/quagga-sdn.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
index b5d8b12..558b2cd 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
@@ -14,7 +14,6 @@
router bgp 64513
bgp router-id 10.0.4.101
timers bgp 1 3
- !timers bgp 3 9
neighbor 10.0.4.1 remote-as 64514
neighbor 10.0.4.1 ebgp-multihop
neighbor 10.0.4.1 timers connect 5
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf
new file mode 100644
index 0000000..6eb45d7
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf
@@ -0,0 +1,37 @@
+! -*- 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
+
+!
+! 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_SdnipFunction/dependencies/quagga-sdn3.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn3.conf
new file mode 100644
index 0000000..9154424
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn3.conf
@@ -0,0 +1,37 @@
+! -*- 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
+
+!
+! 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_SdnipFunction/dependencies/quagga64517.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64517.conf
new file mode 100644
index 0000000..00e4cf8
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/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_SdnipFunction/dependencies/quagga64518.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64518.conf
new file mode 100644
index 0000000..c156102
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/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_SdnipFunction/dependencies/quagga64519.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64519.conf
new file mode 100644
index 0000000..11f1801
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/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_SdnipFunction/dependencies/quagga64520.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64520.conf
new file mode 100644
index 0000000..5fa469d
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/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_SdnipFunction/network-cfg.json b/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
index 303b1bd..bf6fa1a 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
@@ -3,6 +3,7 @@
"of:00000000000000a8/5" : {
"interfaces" : [
{
+ "name": "sw8-5",
"ips" : [ "10.0.5.101/24" ],
"mac" : "00:00:00:00:00:01"
}
@@ -11,6 +12,7 @@
"of:0000000000000a32/4" : {
"interfaces" : [
{
+ "name" : "sw32-4",
"ips" : [ "10.0.4.101/24" ],
"mac" : "00:00:00:00:00:01"
}
@@ -19,10 +21,51 @@
"of:0000000000000a28/3" : {
"interfaces" : [
{
+ "name" : "sw28-3",
"ips" : [ "10.0.6.101/24" ],
"mac" : "00:00:00:00:00:01"
}
]
+ },
+ "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:02",
+ "vlan" : "20"
+ }
+ ]
+ },
+ "of:00000000000000a9/3" : {
+ "interfaces" : [
+ {
+ "name" : "sw9-3",
+ "ips" : [ "10.0.8.101/24" ],
+ "mac" : "00:00:00:00:00:02",
+ "vlan" : "20"
+ }
+ ]
}
},
"apps" : {
@@ -30,13 +73,33 @@
"bgp" : {
"bgpSpeakers" : [
{
+ "name": "bgpSpeaker1",
"connectPoint" : "of:0000000000000a24/1",
"peers" : [
"10.0.4.1",
"10.0.5.1",
"10.0.6.1"
]
+ },
+ {
+ "name": "bgpSpeaker2",
+ "vlan": "20",
+ "connectPoint" : "of:0000000000000a24/2",
+ "peers" : [
+ "10.0.7.1",
+ "10.0.8.1"
+ ]
+ },
+ {
+ "name": "bgpSpeaker3",
+ "vlan": "10",
+ "connectPoint" : "of:0000000000000a24/3",
+ "peers" : [
+ "10.0.9.1",
+ "10.0.20.1"
+ ]
}
+
]
}
}