Merge "[ONOS-7468] Fix the case descriptions issue for the SRBridging test"
diff --git a/TestON/JenkinsFile/FUNCJenkinsFile b/TestON/JenkinsFile/FUNCJenkinsFile
index 1201c92..4a820eb 100644
--- a/TestON/JenkinsFile/FUNCJenkinsFile
+++ b/TestON/JenkinsFile/FUNCJenkinsFile
@@ -1,5 +1,5 @@
 #!groovy
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 funcs.initialize( "FUNC" );
 // This is a Jenkinsfile for a scripted pipeline for the FUNC tests
 def prop = null
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index b856536..ea06e6a 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -1,5 +1,5 @@
 #!groovy
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 funcs.initialize( "HA" );
 // This is a Jenkinsfile for a scripted pipeline for the HA tests
 def prop = null
diff --git a/TestON/JenkinsFile/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
index ea0ee12..5925a6f 100644
--- a/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/JenkinsCommonFuncs.groovy
@@ -1,6 +1,6 @@
 #!groovy
 import groovy.time.*
-generalFuncs = evaluate readTrusted( 'GeneralFuncs.groovy' )
+generalFuncs = evaluate readTrusted( 'TestON/JenkinsFile/GeneralFuncs.groovy' )
 def initializeTrend( machine ){
   table_name = "executed_test_tests"
   result_name = "executed_test_results"
diff --git a/TestON/JenkinsFile/JenkinsfileTrigger b/TestON/JenkinsFile/JenkinsfileTrigger
index fb35bbd..6106351 100644
--- a/TestON/JenkinsFile/JenkinsfileTrigger
+++ b/TestON/JenkinsFile/JenkinsfileTrigger
@@ -1,6 +1,6 @@
 #!groovy
 
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 funcs.initializeTrend( "VM" );
 previous_version = "1.12"
 before_previous_version = "1.11"
diff --git a/TestON/JenkinsFile/PerformanceFuncs.groovy b/TestON/JenkinsFile/PerformanceFuncs.groovy
index 458a389..5761497 100644
--- a/TestON/JenkinsFile/PerformanceFuncs.groovy
+++ b/TestON/JenkinsFile/PerformanceFuncs.groovy
@@ -1,5 +1,5 @@
 #!groovy
-//generalFuncs = evaluate readTrusted( 'GeneralFuncs.groovy' )
+//generalFuncs = evaluate readTrusted( 'TestON/JenkinsFile/GeneralFuncs.groovy' )
 def init(){
     none = [ "" ]
     batches = [ 1, 100, 1000 ]
diff --git a/TestON/JenkinsFile/SCPFJenkinsFile b/TestON/JenkinsFile/SCPFJenkinsFile
index dc4f802..03913b6 100644
--- a/TestON/JenkinsFile/SCPFJenkinsFile
+++ b/TestON/JenkinsFile/SCPFJenkinsFile
@@ -1,7 +1,7 @@
 #!groovy
-SCPFfuncs = evaluate readTrusted( 'PerformanceFuncs.groovy' )
+SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/PerformanceFuncs.groovy' )
 SCPFfuncs.init()
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 funcs.initialize( "SCPF", SCPFfuncs );
 // This is a Jenkinsfile for a scripted pipeline for the SCPF tests
 def prop = null
diff --git a/TestON/JenkinsFile/SCPF_Graph_Generator b/TestON/JenkinsFile/SCPF_Graph_Generator
index 435283c..b6aabc8 100644
--- a/TestON/JenkinsFile/SCPF_Graph_Generator
+++ b/TestON/JenkinsFile/SCPF_Graph_Generator
@@ -1,5 +1,5 @@
 #!groovy
-SCPFfuncs = evaluate readTrusted( 'PerformanceFuncs.groovy' )
+SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/PerformanceFuncs.groovy' )
 SCPFfuncs.init()
 funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
 funcs.initialize( "SCPF", SCPFfuncs );
diff --git a/TestON/JenkinsFile/Trend_Graph_Generator b/TestON/JenkinsFile/Trend_Graph_Generator
index 58e600b..a9795f8 100644
--- a/TestON/JenkinsFile/Trend_Graph_Generator
+++ b/TestON/JenkinsFile/Trend_Graph_Generator
@@ -1,6 +1,5 @@
 #!groovy
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
-//generalFuncs = evaluate readTrusted( 'GeneralFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 nodeCluster = params.NodeCluster
 
 graph_generator_file = "~/OnosSystemTest/TestON/JenkinsFile/scripts/testCaseGraphGenerator.R"
diff --git a/TestON/JenkinsFile/USECASEJenkinsFile b/TestON/JenkinsFile/USECASEJenkinsFile
index ae23cd5..3806fc3 100644
--- a/TestON/JenkinsFile/USECASEJenkinsFile
+++ b/TestON/JenkinsFile/USECASEJenkinsFile
@@ -1,5 +1,5 @@
 #!groovy
-funcs = evaluate readTrusted( 'JenkinsCommonFuncs.groovy' )
+funcs = evaluate readTrusted( 'TestON/JenkinsFile/JenkinsCommonFuncs.groovy' )
 funcs.initialize( "USECASE" );
 // This is a Jenkinsfile for a scripted pipeline for the USECASE tests
 def prop = null
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
index ad8377e..6ce7f81 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1</testcases>
+    <testcases>1, 2</testcases>
 
     <GRAPH>
         <nodeCluster>VM</nodeCluster>
@@ -13,12 +13,12 @@
 
     <DEPENDENCY>
         <topology>comcast_fabric.py</topology>
-        <lib>routinglib.py,trellislib.py,trellis_fabric.py</lib>
+        <lib>routinglib.py,trellislib.py,trellis_fabric.py, dhcpd.conf</lib>
     </DEPENDENCY>
 
     <ENV>
         <cellName>productionCell</cellName>
-        <cellApps>drivers,segmentrouting,openflow,fpmi</cellApps>
+        <cellApps>drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement</cellApps>
     </ENV>
 
     <GIT>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index e452901..b3d61f3 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -17,6 +17,22 @@
                                 routers=0,
                                 ipv4=1,
                                 ipv6=0,
-                                description = "Ping between all ipv4 hosts in
-                              the topology")
+                                description = "Ping between all ipv4 hosts in the topology")
+
+    def CASE2( self, main ):
+        """
+        Ping between all ipv6 hosts in the topology.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                                test_idx = 2,
+                                onosNodes = 3,
+                                dhcp=0,
+                                routers=0,
+                                ipv4=0,
+                                ipv6=1,
+                                description = "Ping between all ipv6 hosts in the topology")
+
 
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index c79a446..0f0caac 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -20,6 +20,7 @@
 """
 
 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
+import time
 
 class SRRoutingTest ():
 
@@ -53,6 +54,9 @@
         run.installOnos(main, skipPackage=skipPackage, cliSleep=5,
                         parallel=False)
 
+        # wait some
+        time.sleep(5)
+
         if hasattr(main, 'Mininet1'):
             # Run the test with Mininet
             mininet_args = ' --dhcp=%s --routers=%s --ipv6=%s --ipv4=%s' % (dhcp, routers, ipv6, ipv4)
@@ -62,8 +66,11 @@
             # TODO: connect TestON to the physical network
             pass
 
+        # wait some time for onos to install the rules!
+        time.sleep(15)
+
         # ping hosts
-        main.Network.pingAll()
+        run.pingAllBasedOnIp( main, 'CASE%02d' % test_idx )
 
         if hasattr(main, 'Mininet1'):
             run.cleanup(main)
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.chart
new file mode 100644
index 0000000..e77d1c5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.chart
@@ -0,0 +1,4 @@
+{
+  "ipv6": {"expect": "True",
+   "hosts":["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"]}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json
new file mode 100644
index 0000000..da381ab
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=0_routers=0.json
@@ -0,0 +1,321 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1000::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1001::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1002::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1003::3ff/120" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000002/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1004::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000003/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1005::3ff/120" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+	"of:0000000000000003/9" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1006::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1003::3ff/120" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1004::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        }, 
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1007::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1008::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000004/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1009::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1010::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1008::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1009::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        } 
+    },
+    "hosts" : { 
+ 	"00:aa:00:00:00:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/3"],
+			"ips": ["1000::3fe"]
+		     }
+	    },
+	"00:aa:00:00:01:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/4"],
+			"ips": ["1001::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:02/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/6"],
+			"ips": ["1002::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:03/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
+			"ips": ["1003::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:04/30" : {
+		"basic": {
+			"locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+			"ips": ["1004::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:05/20" : {
+		"basic": {
+			"locations": ["of:0000000000000003/8"],
+			"ips": ["1005::3fe"]
+		     }
+	    },
+	"00:aa:00:00:01:05/40" : {
+		"basic": {
+			"locations": ["of:0000000000000003/9"],
+			"ips": ["1006::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:06/30" : {
+		"basic": {
+			"locations": ["of:0000000000000004/6"],
+			"ips": ["1007::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:07/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+			"ips": ["1008::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:08/40" : {
+		"basic": {
+			"locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+			"ips": ["1009::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:0A/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/8"],
+			"ips": ["1010::3fe"]
+		     }
+	    }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "name" : "s001",
+                "ipv4NodeSid" : 1,
+		"ipv6NodeSid" : 101,
+		"ipv6Loopback" : "2000::c0a8:0001",
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-105
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "name" : "s002",
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+		"ipv6NodeSid" : 102,
+		"ipv6Loopback" : "2000::c0a8:0002",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000003",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-95
+            }
+        },
+        "of:0000000000000003" : {
+            "segmentrouting" : {
+                "name" : "s003",
+                "ipv4NodeSid" : 3,
+                "ipv4Loopback" : "192.168.0.3",
+        	"ipv6NodeSid" : 103,
+		"ipv6Loopback" : "2000::c0a8:0003",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000002",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-90
+            }
+        },
+        "of:0000000000000004" : {
+            "segmentrouting" : {
+                "name" : "s004",
+                "ipv4NodeSid" : 4,
+                "ipv4Loopback" : "192.168.0.4",
+		"ipv6NodeSid" : 104,
+		"ipv6Loopback" : "2000::c0a8:0004",        
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000005",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-85
+            }
+        },
+        "of:0000000000000005" : {
+            "segmentrouting" : {
+                "name" : "s005",
+                "ipv4NodeSid" : 5,
+                "ipv4Loopback" : "192.168.0.5",
+		"ipv6NodeSid" : 105,
+		"ipv6Loopback" : "2000::c0a8:0005", 
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000004",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-80
+            }
+        },
+        "of:0000000000000101" : {
+            "segmentrouting" : {
+                "name" : "s101",
+                "ipv4NodeSid" : 101,
+                "ipv4Loopback" : "192.168.0.101",
+		"ipv6NodeSid" : 201,
+		"ipv6Loopback" : "2000::c0a8:0101", 
+                "routerMac" : "00:00:00:00:01:01",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":42,
+                "longitude":-100
+            }
+        },
+        "of:0000000000000102" : {
+            "segmentrouting" : {
+                "name" : "s102",
+                "ipv4NodeSid" : 102,
+                "ipv4Loopback" : "192.168.0.102",
+		"ipv6NodeSid" : 202,
+		"ipv6Loopback" : "2000::c0a8:0202",
+                "routerMac" : "00:00:00:00:01:02",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                 "driver" : "ofdpa-ovs",
+		 "latitude":42,
+		 "longitude":-95
+            }
+        }   
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json
new file mode 100644
index 0000000..d4f36ea
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=0.json
@@ -0,0 +1,332 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1000::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1001::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1002::3ff/120" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1003::3ff/120" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000002/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1004::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000003/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1005::3ff/120" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+	"of:0000000000000003/9" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1006::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1003::3ff/120" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1004::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        }, 
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1007::3ff/120" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1008::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000004/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1009::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1010::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1008::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "1009::3ff/120" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        } 
+    },
+    "hosts" : { 
+ 	"00:aa:00:00:00:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/3"],
+			"ips": ["1000::3fe"]
+		     }
+	    },
+	"00:aa:00:00:01:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/4"],
+			"ips": ["1001::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:02/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/6"],
+			"ips": ["1002::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:03/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
+			"ips": ["1003::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:04/30" : {
+		"basic": {
+			"locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+			"ips": ["1004::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:05/20" : {
+		"basic": {
+			"locations": ["of:0000000000000003/8"],
+			"ips": ["1005::3fe"]
+		     }
+	    },
+	"00:aa:00:00:01:05/40" : {
+		"basic": {
+			"locations": ["of:0000000000000003/9"],
+			"ips": ["1006::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:06/30" : {
+		"basic": {
+			"locations": ["of:0000000000000004/6"],
+			"ips": ["1007::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:07/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+			"ips": ["1008::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:08/40" : {
+		"basic": {
+			"locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+			"ips": ["1009::3fe"]
+		     }
+	    },
+	"00:aa:00:00:00:0A/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/8"],
+			"ips": ["1010::3fe"]
+		     }
+	    }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "name" : "s001",
+                "ipv4NodeSid" : 1,
+		"ipv6NodeSid" : 101,
+		"ipv6Loopback" : "2000::c0a8:0001",
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-105
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "name" : "s002",
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+		"ipv6NodeSid" : 102,
+		"ipv6Loopback" : "2000::c0a8:0002",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000003",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-95
+            }
+        },
+        "of:0000000000000003" : {
+            "segmentrouting" : {
+                "name" : "s003",
+                "ipv4NodeSid" : 3,
+                "ipv4Loopback" : "192.168.0.3",
+        	"ipv6NodeSid" : 103,
+		"ipv6Loopback" : "2000::c0a8:0003",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000002",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-90
+            }
+        },
+        "of:0000000000000004" : {
+            "segmentrouting" : {
+                "name" : "s004",
+                "ipv4NodeSid" : 4,
+                "ipv4Loopback" : "192.168.0.4",
+		"ipv6NodeSid" : 104,
+		"ipv6Loopback" : "2000::c0a8:0004",        
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000005",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-85
+            }
+        },
+        "of:0000000000000005" : {
+            "segmentrouting" : {
+                "name" : "s005",
+                "ipv4NodeSid" : 5,
+                "ipv4Loopback" : "192.168.0.5",
+		"ipv6NodeSid" : 105,
+		"ipv6Loopback" : "2000::c0a8:0005", 
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000004",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-80
+            }
+        },
+        "of:0000000000000101" : {
+            "segmentrouting" : {
+                "name" : "s101",
+                "ipv4NodeSid" : 101,
+                "ipv4Loopback" : "192.168.0.101",
+		"ipv6NodeSid" : 201,
+		"ipv6Loopback" : "2000::c0a8:0101", 
+                "routerMac" : "00:00:00:00:01:01",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":42,
+                "longitude":-100
+            }
+        },
+        "of:0000000000000102" : {
+            "segmentrouting" : {
+                "name" : "s102",
+                "ipv4NodeSid" : 102,
+                "ipv4Loopback" : "192.168.0.102",
+		"ipv6NodeSid" : 202,
+		"ipv6Loopback" : "2000::c0a8:0202",
+                "routerMac" : "00:00:00:00:01:02",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                 "driver" : "ofdpa-ovs",
+		 "latitude":42,
+		 "longitude":-95
+            }
+        }   
+    },
+    "apps" : {
+	"org.onosproject.dhcprelay" : {
+		"default" : [ 
+			{
+				 "dhcpServerConnectPoint": "of:0000000000000102/7",
+				 "serverIps": ["10.0.3.253", "2000::3fd"]
+			}
+		]
+	}
+    }
+
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=0_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=0_routers=0.json
index b4cf1dd..85e920f 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=0_routers=0.json
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=0_routers=0.json
@@ -227,7 +227,7 @@
                 "name" : "s003",
                 "ipv4NodeSid" : 3,
                 "ipv4Loopback" : "192.168.0.3",
-                "routerMac" : "00:00:00:00:00:03",
+                "routerMac" : "00:00:00:00:00:02",
                 "isEdgeRouter" : true,
                 "pairLocalPort" : 5,
                 "pairDeviceId": "of:0000000000000002",
@@ -261,7 +261,7 @@
                 "name" : "s005",
                 "ipv4NodeSid" : 5,
                 "ipv4Loopback" : "192.168.0.5",
-                "routerMac" : "00:00:00:00:00:05",
+                "routerMac" : "00:00:00:00:00:04",
                 "isEdgeRouter" : true,
                 "pairLocalPort" : 5,
                 "pairDeviceId": "of:0000000000000004",
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json
new file mode 100644
index 0000000..f943f35
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=0.json
@@ -0,0 +1,318 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.1.0.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.1.10.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.0.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.30.254/24" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000002/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.20.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000003/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.10.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+	"of:0000000000000003/9" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.40.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.30.254/24" ],
+                    "vlan-untagged": 15
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.2.20.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        }, 
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.0.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.10.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000004/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.30.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/8" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.20.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.10.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000005/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.3.30.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        } 
+    },
+    "hosts" : { 
+ 	"00:aa:00:00:00:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/3"],
+			"ips": ["10.1.0.1"]
+		     }
+	    },
+	"00:aa:00:00:01:01/None" : {
+		"basic": {
+			"locations": ["of:0000000000000001/4"],
+			"ips": ["10.1.10.1"]
+		     }
+	    },
+	"00:aa:00:00:00:02/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/6"],
+			"ips": ["10.2.0.1"]
+		     }
+	    },
+	"00:aa:00:00:00:03/None" : {
+		"basic": {
+			"locations": ["of:0000000000000002/7", "of:0000000000000003/6"],
+			"ips": ["10.2.30.1"]
+		     }
+	    },
+	"00:aa:00:00:00:04/30" : {
+		"basic": {
+			"locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+			"ips": ["10.2.20.1"]
+		     }
+	    },
+	"00:aa:00:00:00:05/20" : {
+		"basic": {
+			"locations": ["of:0000000000000003/8"],
+			"ips": ["10.2.10.1"]
+		     }
+	    },
+	"00:aa:00:00:01:05/40" : {
+		"basic": {
+			"locations": ["of:0000000000000003/9"],
+			"ips": ["10.2.40.1"]
+		     }
+	    },
+	"00:aa:00:00:00:06/30" : {
+		"basic": {
+			"locations": ["of:0000000000000004/6"],
+			"ips": ["10.3.0.1"]
+		     }
+	    },
+	"00:aa:00:00:00:07/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+			"ips": ["10.3.10.1"]
+		     }
+	    },
+	"00:aa:00:00:00:08/40" : {
+		"basic": {
+			"locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+			"ips": ["10.3.30.1"]
+		     }
+	    },
+	"00:aa:00:00:00:0A/40" : {
+		"basic": {
+			"locations": ["of:0000000000000005/8"],
+			"ips": ["10.3.20.1"]
+		     }
+	    }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "name" : "s001",
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-105
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "name" : "s002",
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000003",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-95
+            }
+        },
+        "of:0000000000000003" : {
+            "segmentrouting" : {
+                "name" : "s003",
+                "ipv4NodeSid" : 3,
+                "ipv4Loopback" : "192.168.0.3",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000002",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-90
+            }
+        },
+        "of:0000000000000004" : {
+            "segmentrouting" : {
+                "name" : "s004",
+                "ipv4NodeSid" : 4,
+                "ipv4Loopback" : "192.168.0.4",
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000005",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-85
+            }
+        },
+        "of:0000000000000005" : {
+            "segmentrouting" : {
+                "name" : "s005",
+                "ipv4NodeSid" : 5,
+                "ipv4Loopback" : "192.168.0.5",
+                "routerMac" : "00:00:00:00:00:04",
+                "isEdgeRouter" : true,
+                "pairLocalPort" : 5,
+                "pairDeviceId": "of:0000000000000004",
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":34,	
+		"longitude":-80
+            }
+        },
+        "of:0000000000000101" : {
+            "segmentrouting" : {
+                "name" : "s101",
+                "ipv4NodeSid" : 101,
+                "ipv4Loopback" : "192.168.0.101",
+                "routerMac" : "00:00:00:00:01:01",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs",
+		"latitude":42,
+                "longitude":-100
+            }
+        },
+        "of:0000000000000102" : {
+            "segmentrouting" : {
+                "name" : "s102",
+                "ipv4NodeSid" : 102,
+                "ipv4Loopback" : "192.168.0.102",
+                "routerMac" : "00:00:00:00:01:02",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                 "driver" : "ofdpa-ovs",
+		 "latitude":42,
+		 "longitude":-95
+            }
+        }   
+    },
+    "apps" : {
+	"org.onosproject.dhcprelay" : {
+		"default" : [ 
+			{
+				 "dhcpServerConnectPoint": "of:0000000000000102/10",
+				 "serverIps": ["10.0.3.253"]
+			}
+		]
+	}
+    }
+
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=0_routers=0.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=0_routers=0.chart
new file mode 100644
index 0000000..e23a8b4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=0_routers=0.chart
@@ -0,0 +1,6 @@
+{
+  "ipv4": {"expect": "True",
+    "hosts":["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"]}
+  "ipv6": {"expect": "True",
+    "hosts":["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"]}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index f3350aa..c912ea2 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -254,6 +254,42 @@
                 onfail="Flow count looks wrong: " + count )
 
     @staticmethod
+    def pingAllBasedOnIp( main, tag="", dumpflows=True ):
+        main.log.report( "Check full connectivity" )
+        print main.pingChart
+        if tag == "":
+            tag = 'CASE%d' % main.CurrentTestCaseNumber
+        for entry in main.pingChart.itervalues():
+            print entry
+            hosts, expect = entry[ 'hosts' ], entry[ 'expect' ]
+            try:
+                expect = main.TRUE if str(expect).lower() == 'true' else main.FALSE
+            except:
+                expect = main.FALSE
+            main.step( "Connectivity for %s %s" % ( str( hosts ), tag ) )
+
+            if ("v4" in hosts[0]):
+                pa = main.Network.pingallHosts( hosts )
+                utilities.assert_equals( expect=expect, actual=pa,
+                                         onpass="IPv4 connectivity successfully tested",
+                                         onfail="IPv4 connectivity failed" )
+            if ("v6" in hosts[0]):
+                pa = main.Network.pingIpv6Hosts( hosts )
+                utilities.assert_equals( expect=expect, actual=pa,
+                                         onpass="IPv6 connectivity successfully tested",
+                                         onfail="IPv6 connectivity failed" )
+
+        if dumpflows:
+            main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
+                                        "flows",
+                                        main.logdir,
+                                        tag + "_FlowsOn" )
+            main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,
+                                        "groups",
+                                        main.logdir,
+                                        tag + "_GroupsOn" )
+
+    @staticmethod
     def pingAll( main, tag="", dumpflows=True ):
         main.log.report( "Check full connectivity" )
         print main.pingChart
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
index 7b4c19e..e08e5a6 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/comcast_fabric.py
@@ -12,7 +12,7 @@
 from mininet.cli import CLI
 
 from routinglib import BgpRouter, RoutedHost
-from trellislib import DhcpServer, TaggedRoutedHost, DualHomedRoutedHost, DualHomedTaggedRoutedHost, DhcpClient, Dhcp6Client, DhcpServer, Dhcp6Server
+from trellislib import DhcpServer, TaggedRoutedHost, DualHomedRoutedHost, DualHomedTaggedRoutedHost, DhcpClient, Dhcp6Client, DhcpServer, Dhcp6Server, TrellisHost
 
 # Parse command line options and dump results
 def parseOptions():
@@ -34,138 +34,6 @@
 
 opts, args = parseOptions()
 
-class DualHomedTaggedHostWithIpv4(Host):
-
-    def __init__(self, name, ip, gateway, dhcp, vlan, *args, **kwargs):
-        super(DualHomedTaggedHostWithIpv4, self).__init__(name, **kwargs)
-        self.vlanBond0 = None
-        self.bond0 = None
-        self.ip = ip
-        self.gateway = gateway
-        self.dhcp = dhcp
-        self.vlan = vlan
-
-    def config(self, **kwargs):
-        super(DualHomedTaggedHostWithIpv4, self).config(**kwargs)
-        intf0 = self.intfs[0].name
-        intf1 = self.intfs[1].name
-
-        self.bond0 = "%s-bond0" % self.name
-        self.vlanBondIntf = "%s.%s" % (self.bond0, self.vlan)
-
-        self.cmd('modprobe bonding')
-        self.cmd('ip link add %s type bond' % self.bond0)
-        self.cmd('ip link set %s down' % intf0)
-        self.cmd('ip link set %s down' % intf1)
-        self.cmd('ip link set %s master %s' % (intf0, self.bond0))
-        self.cmd('ip link set %s master %s' % (intf1, self.bond0))
-        self.cmd('ip addr flush dev %s' % intf0)
-        self.cmd('ip addr flush dev %s' % intf1)
-        self.cmd('ip link set %s up' % self.bond0)
-
-        self.cmd('ip link add link %s name %s type vlan id %s' % (self.bond0,
-                                                                  self.vlanBondIntf, self.vlan))
-
-        self.cmd('ip link set up %s' % self.vlanBondIntf)
-        self.cmd('ip addr add %s/24 dev %s' % (self.ip, self.vlanBondIntf))
-        self.cmd('ip route add default via %s' % self.gateway)
-
-        default_intf = self.defaultIntf()
-        default_intf.name = self.vlanBondIntf
-        self.nameToIntf[self.vlanBond0] = default_intf
-
-    def terminate(self, **kwargs):
-        self.cmd('ip link set %s down' % self.bond0)
-        self.cmd('ip link delete %s' % self.bond0)
-        super(DualHomedTaggedHostWithIpv4, self).terminate()
-
-class DualHomedUntaggedHostWithIpv4(Host):
-
-    def __init__(self, name, ip, gateway, dhcp, *args, **kwargs):
-        super(DualHomedUntaggedHostWithIpv4, self).__init__(name, **kwargs)
-        self.bond0 = None
-        self.ip = ip
-        self.gateway = gateway
-        self.dhcp = dhcp
-
-    def config(self, **kwargs):
-        super(DualHomedUntaggedHostWithIpv4, self).config(**kwargs)
-        intf0 = self.intfs[0].name
-        intf1 = self.intfs[1].name
-
-        self.bond0 = "%s-bond0" % self.name
-        self.cmd('modprobe bonding')
-        self.cmd('ip link add %s type bond' % self.bond0)
-        self.cmd('ip link set %s down' % intf0)
-        self.cmd('ip link set %s down' % intf1)
-        self.cmd('ip link set %s master %s' % (intf0, self.bond0))
-        self.cmd('ip link set %s master %s' % (intf1, self.bond0))
-        self.cmd('ip addr flush dev %s' % intf0)
-        self.cmd('ip addr flush dev %s' % intf1)
-        self.cmd('ip link set %s up' % self.bond0)
-        self.cmd('ip addr add %s/24 dev %s' % (self.ip, self.bond0))
-        self.cmd('ip route add default via %s' % self.gateway)
-
-        default_intf = self.defaultIntf()
-        default_intf.name = self.bond0
-        self.nameToIntf[self.bond0] = default_intf
-
-    def terminate(self, **kwargs):
-        self.cmd('ip link set %s down' % self.bond0)
-        self.cmd('ip link delete %s' % self.bond0)
-        super(DualHomedUntaggedHostWithIpv4, self).terminate()
-
-class TaggedHostWithIpv4(Host):
-    '''
-        Tagged host configured with a static ip address.
-    '''
-    def __init__(self, name, ip, gateway, dhcp, vlan, *args, **kwargs):
-        super(TaggedHostWithIpv4, self).__init__(name, *args, **kwargs)
-        self.ip = ip
-        self.gateway = gateway
-        self.vlan = vlan
-        self.vlanIntf = None
-        self.dhcp = dhcp
-
-    def config(self, **kwargs):
-        Host.config(self, **kwargs)
-
-        intf = self.defaultIntf()
-        self.vlanIntf = "%s.%s" % (intf, self.vlan)
-        self.cmd('ip -4 addr flush dev %s' % intf)
-        self.cmd('ip link add link %s name %s type vlan id %s' % (intf, self.vlanIntf, self.vlan))
-        self.cmd('ip link set up %s' % self.vlanIntf)
-        self.cmd('ip addr add %s/24 dev %s' % (self.ip, self.vlanIntf))
-        self.cmd('ip route add default via %s' % self.gateway)
-        intf.name = self.vlanIntf
-        self.nameToIntf[self.vlanIntf] = intf
-
-    def terminate(self, **kwargs):
-        self.cmd('ip link remove link %s' % self.vlanIntf)
-        super(TaggedHostWithIpv4, self).terminate()
-
-
-class UnTaggedHostWithIpv4(Host):
-    '''
-        Untagged host configured with a static ip address.
-    '''
-    def __init__(self, name, ip, gateway, dhcp, *args, **kwargs):
-        super(UnTaggedHostWithIpv4, self).__init__(name, *args, **kwargs)
-        self.ip = ip
-        self.gateway = gateway
-        self.dhcp = dhcp
-
-    def config(self, **kwargs):
-        Host.config(self, **kwargs)
-
-        intf = self.defaultIntf()
-        self.cmd('ip -4 addr flush dev %s' % intf)
-        self.cmd('ip addr add %s/24 dev %s' % (self.ip, intf))
-        self.cmd('ip route add default via %s' % self.gateway)
-
-    def terminate(self, **kwargs):
-        super(UnTaggedHostWithIpv4, self).terminate()
-
 class ComcastLeafSpineFabric(Topo):
 
     spines = dict()
@@ -174,80 +42,158 @@
 
     def createIpv4Hosts(self, dhcp):
 
-        h1 = self.addHost('h1v4', cls=UnTaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:01', ip='10.1.0.1',
-                          gateway='10.1.0.254', dhcp=dhcp)
+        h1 = self.addHost('h1v4', cls=TrellisHost,
+                           mac='00:aa:00:00:00:01', ips=['10.1.0.1/24'],
+                           gateway='10.1.0.254', dhcpClient=dhcp)
         self.addLink(h1, self.leafs[0])
         self.hosts_dict['h1v4'] = h1
 
-        h2 = self.addHost('h2v4', cls=UnTaggedHostWithIpv4,
-                          mac='00:aa:00:00:01:01', ip='10.1.10.1',
-                          gateway='10.1.10.254', dhcp=dhcp)
+        h2 = self.addHost('h2v4', cls=TrellisHost,
+                          mac='00:aa:00:00:01:01', ips=['10.1.10.1/24'],
+                          gateway='10.1.10.254', dhcpClient=dhcp)
         self.addLink(h2, self.leafs[0])
         self.hosts_dict['h2v4'] = h2
 
-        h3 = self.addHost('h3v4', cls=UnTaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:02', ip='10.2.0.1',
-                          gateway='10.2.0.254', dhcp=dhcp)
+        h3 = self.addHost('h3v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:02', ips=['10.2.0.1/24'],
+                          gateway='10.2.0.254', dhcpClient=dhcp)
         self.addLink(h3, self.leafs[1])
         self.hosts_dict['h3v4'] = h3
 
-        h4 = self.addHost('h4v4', cls=DualHomedUntaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:03', ip='10.2.30.1',
-                          gateway='10.2.30.254', dhcp=dhcp)
+        h4 = self.addHost('h4v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:03', ips=['10.2.30.1/24'],
+                          gateway='10.2.30.254', dhcpClient=dhcp,
+                          dualHomed=True)
         self.addLink(h4, self.leafs[1])
         self.addLink(h4, self.leafs[2])
         self.hosts_dict['h4v4'] = h4
 
-        h5 = self.addHost('h5v4', cls=DualHomedTaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:04', ip='10.2.20.1',
-                          gateway='10.2.20.254', dhcp=dhcp, vlan=30)
+        h5 = self.addHost('h5v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:04', ips=['10.2.20.1/24'],
+                          gateway='10.2.20.254', dhcpClient=dhcp, vlan=30,
+                          dualHomed=True)
         self.addLink(h5, self.leafs[1])
         self.addLink(h5, self.leafs[2])
         self.hosts_dict['h5v4'] = h5
 
-        h6 = self.addHost('h6v4', cls=TaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:05', ip='10.2.10.1',
-                          gateway='10.2.10.254', dhcp=dhcp, vlan=20)
+        h6 = self.addHost('h6v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:05', ips=['10.2.10.1/24'],
+                          gateway='10.2.10.254', dhcpClient=dhcp, vlan=20)
         self.addLink(h6, self.leafs[2])
         self.hosts_dict['h6v4'] = h6
 
-        h7 = self.addHost('h7v4', cls=TaggedHostWithIpv4,
-                          mac='00:aa:00:00:01:05', ip='10.2.40.1',
-                          gateway='10.2.40.254', dhcp=dhcp, vlan=40)
+        h7 = self.addHost('h7v4', cls=TrellisHost,
+                          mac='00:aa:00:00:01:05', ips=['10.2.40.1/24'],
+                          gateway='10.2.40.254', dhcpClient=dhcp, vlan=40)
         self.addLink(h7, self.leafs[2])
         self.hosts_dict['h7v4'] = h7
 
-        h8 = self.addHost('h8v4', cls=TaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:06', ip='10.3.0.1',
-                          gateway='10.3.0.254', dhcp=dhcp, vlan=30)
+        h8 = self.addHost('h8v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:06', ips=['10.3.0.1/24'],
+                          gateway='10.3.0.254', dhcpClient=dhcp, vlan=30)
         self.addLink(h8, self.leafs[3])
         self.hosts_dict['h8v4'] = h8
 
-        h9 = self.addHost('h9v4', cls=DualHomedTaggedHostWithIpv4,
-                          mac='00:aa:00:00:00:07', ip='10.3.10.1',
-                          gateway='10.3.10.254', dhcp=dhcp, vlan=40)
+        h9 = self.addHost('h9v4', cls=TrellisHost,
+                          mac='00:aa:00:00:00:07', ips=['10.3.10.1/24'],
+                          gateway='10.3.10.254', dhcpClient=dhcp, vlan=40,
+                          dualHomed=True)
         self.addLink(h9, self.leafs[3])
         self.addLink(h9, self.leafs[4])
         self.hosts_dict['h9v4'] = h9
 
-        h10 = self.addHost('h10v4', cls=DualHomedTaggedHostWithIpv4,
-                           mac='00:aa:00:00:00:08', ip='10.3.30.1',
-                           gateway='10.3.30.254', dhcp=dhcp, vlan=40)
+        h10 = self.addHost('h10v4', cls=TrellisHost,
+                           mac='00:aa:00:00:00:08', ips=['10.3.30.1/24'],
+                           gateway='10.3.30.254', dhcpClient=dhcp, vlan=40,
+                           dualHomed=True)
         self.addLink(h10, self.leafs[3])
         self.addLink(h10, self.leafs[4])
         self.hosts_dict['h10v4'] = h10
 
-        h11 = self.addHost('h11v4', cls=TaggedHostWithIpv4,
-                           mac='00:aa:00:00:00:0a', ip='10.3.20.1',
-                           gateway='10.3.20.254', dhcp=dhcp, vlan=40)
+        h11 = self.addHost('h11v4', cls=TrellisHost,
+                           mac='00:aa:00:00:00:0a', ips=['10.3.20.1/24'],
+                           gateway='10.3.20.254', dhcpClient=dhcp, vlan=40)
         self.addLink(h11, self.leafs[4])
         self.hosts_dict['h11v4'] = h11
 
         return
 
     def createIpv6Hosts(self, dhcp):
-        print("NYI")
+
+        h1 = self.addHost('h1v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:01', ips=["1000::3fe/120"],
+                          gateway='1000::3ff', dhcpClient=dhcp)
+        self.addLink(h1, self.leafs[0])
+        self.hosts_dict['h1v6'] = h1
+
+        h2 = self.addHost('h2v6', cls=TrellisHost,
+                          mac='00:aa:00:00:01:01', ips=['1001::3fe/120'],
+                          gateway='1001::3ff', dhcpClient=dhcp)
+        self.addLink(h2, self.leafs[0])
+        self.hosts_dict['h2v6'] = h2
+
+        h3 = self.addHost('h3v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:02', ips=['1002::3fe/120'],
+                          gateway='1002::3ff', dhcpClient=dhcp)
+        self.addLink(h3, self.leafs[1])
+        self.hosts_dict['h3v6'] = h3
+
+        h4 = self.addHost('h4v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:03', ips=['1003::3fe/120'],
+                          gateway='1003::3ff', dhcpClient=dhcp,
+                          dualHomed=True)
+        self.addLink(h4, self.leafs[1])
+        self.addLink(h4, self.leafs[2])
+        self.hosts_dict['h4v6'] = h4
+
+        h5 = self.addHost('h5v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:04', ips=['1004::3fe/120'],
+                          gateway='1004::3ff', dhcpClient=dhcp, vlan=30,
+                          dualHomed=True)
+        self.addLink(h5, self.leafs[1])
+        self.addLink(h5, self.leafs[2])
+        self.hosts_dict['h5v6'] = h5
+
+        h6 = self.addHost('h6v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:05', ips=['1005::3fe/120'],
+                          gateway='1005::3ff', dhcpClient=dhcp, vlan=20)
+        self.addLink(h6, self.leafs[2])
+        self.hosts_dict['h6v6'] = h6
+
+        h7 = self.addHost('h7v6', cls=TrellisHost,
+                          mac='00:aa:00:00:01:05', ips=['1006::3fe/120'],
+                          gateway='1006::3ff', dhcpClient=dhcp, vlan=40)
+        self.addLink(h7, self.leafs[2])
+        self.hosts_dict['h7v6'] = h7
+
+        h8 = self.addHost('h8v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:06', ips=['1007::3fe/120'],
+                          gateway='1007::3ff', dhcpClient=dhcp, vlan=30)
+        self.addLink(h8, self.leafs[3])
+        self.hosts_dict['h8v6'] = h8
+
+        h9 = self.addHost('h9v6', cls=TrellisHost,
+                          mac='00:aa:00:00:00:07', ips=['1008::3fe/120'],
+                          gateway='1008::3ff', dhcpClient=dhcp, vlan=40,
+                          dualHomed=True)
+        self.addLink(h9, self.leafs[3])
+        self.addLink(h9, self.leafs[4])
+        self.hosts_dict['h9v6'] = h9
+
+        h10 = self.addHost('h10v6', cls=TrellisHost,
+                           mac='00:aa:00:00:00:08', ips=['1009::3fe/120'],
+                           gateway='1009::3ff', dhcpClient=dhcp, vlan=40,
+                           dualHomed=True)
+        self.addLink(h10, self.leafs[3])
+        self.addLink(h10, self.leafs[4])
+        self.hosts_dict['h10v6'] = h10
+
+        h11 = self.addHost('h11v6', cls=TrellisHost,
+                           mac='00:aa:00:00:00:0a', ips=['1010::3fe/120'],
+                           gateway='1010::3ff', dhcpClient=dhcp, vlan=40)
+        self.addLink(h11, self.leafs[4])
+        self.hosts_dict['h11v6'] = h11
+
         return
 
     '''
@@ -295,6 +241,22 @@
         self.addLink(self.leafs[1], self.leafs[2], **linkopts)
         self.addLink(self.leafs[3], self.leafs[4], **linkopts)
 
+        # create dhcp servers
+        if dhcp:
+            if ipv4:
+                dhcp4 = self.addHost( 'dhcp', cls=TrellisHost,
+                                      mac="00:bb:00:00:00:01", ips=["10.0.3.253/24"],
+                                      gateway="10.0.3.254", dhcpServer=True)
+                self.addLink(self.spines[1], dhcp4, **linkopts)
+            if ipv6:
+                dhcp6 = self.addHost( 'dhcp', cls=TrellisHost,
+                                      mac="00:bb:00:00:00:02", ips=["2000::3fd/120"],
+                                      gateway="2000::3ff")
+                self.addLink(self.spines[1], dhcp4, **linkopts)
+        # creatte quagga routers
+        if routers:
+            print("NYI (quagga)!")
+
         # create hosts
         if ipv6:
             self.createIpv6Hosts(dhcp)
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
index a39ed13..b0b26a1 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
@@ -12,8 +12,8 @@
 from mininet.nodelib import NAT
 from mininet.cli import CLI
 
-from routinglib import BgpRouter, RoutedHost
-from trellislib import DhcpServer, TaggedRoutedHost, DualHomedRoutedHost, DualHomedTaggedRoutedHost
+from routinglib import BgpRouter
+from trellislib import TrellisHost
 
 # Parse command line options and dump results
 def parseOptions():
@@ -124,19 +124,21 @@
                 if vlan_id[ dual_ls * fanout + f] != 0:
                     host = self.addHost(
                         name='h%s' % ( dual_ls * fanout + f + 1),
-                        cls=DualHomedTaggedRoutedHost,
+                        cls=TrellisHost,
                         ips=['10.0.%d.%d/%d' % ( dual_ls + 2, f + 1, IP4_SUBNET_CLASS)],
                         gateway='10.0.%d.254' % ( dual_ls + 2),
                         mac='00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1),
-                        vlan=vlan_id[ dual_ls*fanout + f ]
+                        vlan=vlan_id[ dual_ls*fanout + f ],
+                        dualHomed=True
                     )
                 else:
                     host = self.addHost(
                         name='h%s' % (dual_ls * fanout + f + 1),
-                        cls= DualHomedRoutedHost,
+                        cls=TrellisHost,
                         ips=['10.0.%d.%d/%d' % (dual_ls+2, f+1, IP4_SUBNET_CLASS)],
                         gateway='10.0.%d.254' % (dual_ls+2),
-                        mac='00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1)
+                        mac='00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1),
+                        dualHomed=True
                     )
                 self.addLink(host, leafs[ls], **linkopts)
                 self.addLink(host, leafs[ls-1], **linkopts)
@@ -145,8 +147,8 @@
         last_paired_ls = leafs[leaf-1]
         # Create common components
         # DHCP server
-        dhcp = self.addHost('dhcp', cls=DhcpServer, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
-                            gateway='10.0.3.254')
+        dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
+                            gateway='10.0.3.254', dhcpServer=True)
 
         # Control plane switch (for DHCP servers)
         cs1 = self.addSwitch('cs1', cls=OVSBridge)
@@ -194,7 +196,7 @@
         self.addLink(r1, last_paired_ls)
 
         # External IPv4 Host behind r1
-        rh1 = self.addHost('rh1', cls=RoutedHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
+        rh1 = self.addHost('rh1', cls=TrellisHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
         self.addLink(r1, rh1)
 
         # External Quagga r2
@@ -208,7 +210,7 @@
         self.addLink(r2, last_paired_ls)
 
         # External IPv4 Host behind r2
-        rh2 = self.addHost('rh2', cls=RoutedHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
+        rh2 = self.addHost('rh2', cls=TrellisHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
         self.addLink(r2, rh2)
 
 class LeafSpineFabric (Topo) :
@@ -241,7 +243,7 @@
                 if vlan_id[ls * fanout + f] != 0:
                     host = self.addHost(
                         name='h%s' % (ls * fanout + f + 1),
-                        cls=TaggedRoutedHost,
+                        cls=TrellisHost,
                         ips=['10.0.%d.%d/%d' % (ls+2, f+1, IP4_SUBNET_CLASS)],
                         gateway='10.0.%d.254' % (ls+2),
                         mac='00:aa:00:00:00:%02x' % (ls * fanout + f + 1),
@@ -250,7 +252,7 @@
                 else:
                     host = self.addHost(
                         name='h%s' % (ls * fanout + f + 1),
-                        cls= RoutedHost,
+                        cls=TrellisHost,
                         ips=['10.0.%d.%d/%d' % (ls+2, f+1, IP4_SUBNET_CLASS)],
                         gateway='10.0.%d.254' % (ls+2),
                         mac='00:aa:00:00:00:%02x' % (ls * fanout + f + 1)
@@ -260,8 +262,8 @@
         last_ls = leafs[leaf-1]
         # Create common components
         # DHCP server
-        dhcp = self.addHost('dhcp', cls=DhcpServer, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
-                            gateway='10.0.3.254')
+        dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
+                            gateway='10.0.3.254', dhcpServer=True)
 
         # Control plane switch (for DHCP servers)
         cs1 = self.addSwitch('cs1', cls=OVSBridge)
@@ -297,7 +299,7 @@
         self.addLink(r1, last_ls)
 
         # External IPv4 Host behind r1
-        rh1 = self.addHost('rh1', cls=RoutedHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
+        rh1 = self.addHost('rh1', cls=TrellisHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
         self.addLink(r1, rh1)
 
 def config( opts ):
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
index 08dcf2f..4c827f0 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellislib.py
@@ -252,6 +252,93 @@
         self.cmd('rm -rf %s' % self.pidFile)
         super(DualHomedDhcpClient, self).terminate()
 
+class TrellisHost(Host):
+    def __init__(self, name, ips=[], gateway="", dualHomed=False, vlan=None, dhcpClient=False, dhcpServer=False, ipv6=False, *args, **kwargs):
+        super(TrellisHost, self).__init__(name, *args, **kwargs)
+        self.dualHomed = dualHomed
+        self.bond0 = None
+        self.vlan = vlan
+        self.vlanIntf = None
+        self.dhcpClient = dhcpClient
+        self.dhcpServer = dhcpServer
+        if dhcpClient:
+            self.pidFile = '/run/dhclient-%s.pid' % self.name
+            self.leaseFile = '/var/lib/dhcp/dhcpclient%s-%s.lease' % ("6" if ipv6 else "", self.name)
+        else:
+            self.ips = ips
+            self.gateway = gateway
+            if dhcpServer:
+                self.binFile = '/usr/sbin/dhcpd'
+                self.pidFile = '/run/dhcp-server-dhcpd%s.pid' % ("6" if ipv6 else "")
+                self.configFile = './dhcpd%s.conf' % ("6" if ipv6 else "")
+                self.leasesFile = '/var/lib/dhcp/dhcpd%s.leases' % ("6" if ipv6 else "")
+        self.ipv6 = ipv6
+
+    def config(self, **kwargs):
+        super(TrellisHost, self).config(**kwargs)
+
+        if self.dualHomed:
+            # Setup bond0 interface
+            intf0 = self.intfs[0].name
+            intf1 = self.intfs[1].name
+            self.bond0 = "%s-bond0" % self.name
+            self.cmd('modprobe bonding')
+            self.cmd('ip link add %s type bond' % self.bond0)
+            self.cmd('ip link set %s down' % intf0)
+            self.cmd('ip link set %s down' % intf1)
+            self.cmd('ip link set %s master %s' % (intf0, self.bond0))
+            self.cmd('ip link set %s master %s' % (intf1, self.bond0))
+            self.cmd('ip addr flush dev %s' % intf0)
+            self.cmd('ip addr flush dev %s' % intf1)
+            self.cmd('ip link set %s up' % self.bond0)
+            defaultIntf = self.defaultIntf()
+            defaultIntf.name = self.bond0
+            self.nameToIntf[self.bond0] = defaultIntf
+
+        self.cmd('ip %s addr flush dev %s' % ("-4" if self.ipv6 else "", self.defaultIntf()))
+
+        if self.vlan:
+            # Setup vlan interface
+            defaultIntf = self.defaultIntf()
+            self.vlanIntf = "%s.%s" % (defaultIntf, self.vlan)
+            self.cmd('ip link add link %s name %s type vlan id %s' % (defaultIntf, self.vlanIntf, self.vlan))
+            self.cmd('ip link set up %s' % self.vlanIntf)
+            defaultIntf.name = self.vlanIntf
+            self.nameToIntf[self.vlanIntf] = defaultIntf
+
+        if self.dhcpClient:
+            if self.vlan or self.dualHomed:
+                # Why leaseFile is not required here?
+                self.cmd('dhclient -q -%s -nw -pf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.defaultIntf()))
+            else:
+                self.cmd('dhclient -q -%s -nw -pf %s -lf %s %s' % (6 if self.ipv6 else 4, self.pidFile, self.leaseFile, self.defaultIntf()))
+        else:
+            # Setup IP addresses
+            for ip in self.ips:
+                self.cmd('ip addr add %s dev %s' % (ip, self.defaultIntf()))
+            self.cmd('ip route add default via %s' % self.gateway)
+
+            if self.dhcpServer:
+                if self.ipv6:
+                    linkLocalAddr = mac_to_ipv6_linklocal(kwargs['mac'])
+                    self.cmd('ip -6 addr add dev %s scope link %s' % (self.defaultIntf(), linkLocalAddr))
+                self.cmd('touch %s' % self.leasesFile)
+                self.cmd('%s -q -%s -pf %s -cf %s %s' % (self.binFile, 6 if self.ipv6 else 4, self.pidFile, self.configFile, self.defaultIntf()))
+
+    def terminate(self, **kwargs):
+        if self.vlan:
+            self.cmd('ip link remove link %s' % self.vlanIntf)
+        if self.dualHomed:
+            self.cmd('ip link set %s down' % self.bond0)
+            self.cmd('ip link delete %s' % self.bond0)
+        if self.dhcpClient:
+            self.cmd('kill -9 `cat %s`' % self.pidFile)
+            self.cmd('rm -rf %s' % self.pidFile)
+        if self.dhcpServer:
+            self.cmd('kill -9 `cat %s`' % self.pidFile)
+            self.cmd('rm -rf %s' % self.pidFile)
+        super(TrellisHost, self).terminate()
+
 # Utility for IPv6
 def mac_to_ipv6_linklocal(mac):
     '''