diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index 0d26630..e2ab5f5 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -241,7 +241,7 @@
     host_guest_map = ( (host_quagga_config, guest_quagga_config), )
     
     def __init__(self, name = 'cord-quagga', image = 'cord-test/quagga', tag = 'latest', 
-                 boot_delay = 30, restart = False, config_file = quagga_config_file):
+                 boot_delay = 15, restart = False, config_file = quagga_config_file):
         super(Quagga, self).__init__(name, image, tag = tag, quagga_config = self.quagga_config)
         if not self.img_exists():
             self.build_image(image)
diff --git a/src/test/utils/CordTestServer.py b/src/test/utils/CordTestServer.py
index 806b36b..ca19950 100644
--- a/src/test/utils/CordTestServer.py
+++ b/src/test/utils/CordTestServer.py
@@ -12,16 +12,20 @@
 
 class CordTestServer(socketserver.BaseRequestHandler):
 
-    def restart_onos(self, args):
+    def restart_onos(self, *args):
         print('Restarting ONOS')
         onos = Onos(restart = True)
         self.request.sendall('DONE')
 
-    def restart_quagga(self, args):
-        if args is None:
-            args = Quagga.quagga_config_file
-        print('Restarting QUAGGA with config file %s'%args)
-        quagga = Quagga(restart = True, config_file = args)
+    def restart_quagga(self, *args):
+        config_file = Quagga.quagga_config_file
+        boot_delay = 15
+        if args:
+            config_file = args[0]
+            if len(args) > 1:
+                boot_delay = int(args[1])
+        print('Restarting QUAGGA with config file %s, delay %d secs'%(config_file, boot_delay))
+        quagga = Quagga(restart = True, config_file = config_file, boot_delay = boot_delay)
         self.request.sendall('DONE')
 
     callback_table = { 'RESTART_ONOS' : restart_onos,
@@ -32,12 +36,13 @@
         data = self.request.recv(1024).strip()
         cmd = data.split()[0]
         try:
-            args = ' '.join(data.split()[1:])
+            #args = ' '.join(data.split()[1:])
+            args = data.split()[1:]
         except:
             args = None
 
         if self.callback_table.has_key(cmd):
-            self.callback_table[cmd](self, args)
+            self.callback_table[cmd](self, *args)
 
 class ThreadedTestServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
     allow_reuse_address = True
@@ -69,13 +74,13 @@
     return False
 
 @nottest
-def cord_test_quagga_restart(config_file = None):
+def cord_test_quagga_restart(config_file = None, boot_delay = 30):
     '''Send QUAGGA restart to server'''
     if config_file is None:
         config_file = Quagga.quagga_config_file
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     s.connect( (CORD_TEST_HOST, CORD_TEST_PORT) )
-    s.sendall('RESTART_QUAGGA {}\n'.format(config_file))
+    s.sendall('RESTART_QUAGGA {0} {1}\n'.format(config_file, boot_delay))
     data = s.recv(1024).strip()
     s.close()
     if data == 'DONE':
diff --git a/src/test/vrouter/vrouterTest.py b/src/test/vrouter/vrouterTest.py
index 723e256..a4712ea 100644
--- a/src/test/vrouter/vrouterTest.py
+++ b/src/test/vrouter/vrouterTest.py
@@ -38,9 +38,9 @@
 log stdout
 service advanced-vty
 !
-debug zebra rib
-debug zebra kernel
-debug zebra fpm
+!debug zebra rib
+!debug zebra kernel
+!debug zebra fpm
 !
 !interface eth1
 ! ip address 10.10.0.3/16
@@ -147,7 +147,11 @@
         guest_config_file = os.path.join(Quagga.guest_quagga_config, 'testrib_gen.conf')
         with open(host_config_file, 'w') as f:
             f.write(config)
-        cord_test_quagga_restart(config_file = guest_config_file)
+        if networks <= 10000:
+            boot_delay = 25
+        else:
+            boot_delay = 75
+        cord_test_quagga_restart(config_file = guest_config_file, boot_delay = boot_delay)
 
     @classmethod
     def zgenerate_vrouter_conf(cls, networks = 4):
