diff --git a/extras/vpp_config/setup.py b/extras/vpp_config/setup.py
index 99d0ee2..b3a049c 100644
--- a/extras/vpp_config/setup.py
+++ b/extras/vpp_config/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup
 
 setup(name="vpp_config",
-      version="18.01.11",
+      version="18.10.3",
       author="John DeNisco",
       author_email="jdenisco@cisco.com",
       description="VPP Configuration Utility",
@@ -9,7 +9,7 @@
       keywords="vppconfig",
       url = 'https://wiki.fd.io/view/VPP',
       py_modules=['vpp_config'],
-      install_requires=['pyyaml','netaddr'],
+      install_requires=['pyyaml','netaddr', 'requests'],
       packages=['vpplib'],
       scripts=['scripts/vpp-config'],
       data_files=[('vpp/vpp-config/scripts', ['scripts/dpdk-devbind.py']),
diff --git a/extras/vpp_config/vpp_config.py b/extras/vpp_config/vpp_config.py
index 1182b24..75423b8 100755
--- a/extras/vpp_config/vpp_config.py
+++ b/extras/vpp_config/vpp_config.py
@@ -549,7 +549,7 @@
 
     main_menu_text = '\nWhat would you like to do?\n\n\
 1) Show basic system information\n\
-2) Dry Run (Will save the configuration files in {}/vpp/vpp-config/dryrun for inspection)\n\
+2) Dry Run (Saves the configuration files in {}/vpp/vpp-config/dryrun.\n\
 3) Full configuration (WARNING: This will change the system configuration)\n\
 4) List/Install/Uninstall VPP.\n\
 q) Quit'.format(rootdir, rootdir)
diff --git a/extras/vpp_config/vpplib/AutoConfig.py b/extras/vpp_config/vpplib/AutoConfig.py
index c36cdd5..2664a6a 100644
--- a/extras/vpp_config/vpplib/AutoConfig.py
+++ b/extras/vpp_config/vpplib/AutoConfig.py
@@ -1048,10 +1048,11 @@
                     if answer == 'y':
                         if 'unused' in device and len(device['unused']) != 0 and device['unused'][0] != '':
                             driver = device['unused'][0]
-                            VppPCIUtil.bind_vpp_device(node, driver, dvid)
-                        else:
-                            logging.debug('Could not bind device {}'.format(dvid))
-                        vppd[dvid] = device
+                            ret = VppPCIUtil.bind_vpp_device(node, driver, dvid)
+                            if ret:
+                                logging.debug('Could not bind device {}'.format(dvid))
+                            else:
+                                vppd[dvid] = device
                 for dit in vppd.items():
                     dvid = dit[0]
                     device = dit[1]
@@ -1081,11 +1082,12 @@
                     if 'unused' in device and len(device['unused']) != 0 and device['unused'][0] != '':
                         driver = device['unused'][0]
                         logging.debug('Binding device {} to driver {}'.format(dvid, driver))
-                        VppPCIUtil.bind_vpp_device(node, driver, dvid)
-                    else:
-                        logging.debug('Could not bind device {}'.format(dvid))
-                    dpdk_devices[dvid] = device
-                    del other_devices[dvid]
+                        ret = VppPCIUtil.bind_vpp_device(node, driver, dvid)
+                        if ret:
+                            logging.debug('Could not bind device {}'.format(dvid))
+                        else:
+                            dpdk_devices[dvid] = device
+                            del other_devices[dvid]
 
     def update_interfaces_config(self):
         """
@@ -1162,11 +1164,12 @@
                         if 'unused' in device and len(device['unused']) != 0 and device['unused'][0] != '':
                             driver = device['unused'][0]
                             logging.debug('Binding device {} to driver {}'.format(dvid, driver))
-                            VppPCIUtil.bind_vpp_device(node, driver, dvid)
-                        else:
-                            logging.debug('Could not bind device {}'.format(dvid))
-                        dpdk_devices[dvid] = device
-                        del kernel_devices[dvid]
+                            ret = VppPCIUtil.bind_vpp_device(node, driver, dvid)
+                            if ret:
+                                logging.debug('Could not bind device {}'.format(dvid))
+                            else:
+                                dpdk_devices[dvid] = device
+                                del kernel_devices[dvid]
 
             dlen = len(dpdk_devices)
             if dlen > 0:
@@ -1191,11 +1194,12 @@
                         if 'unused' in device and len(device['unused']) != 0 and device['unused'][0] != '':
                             driver = device['unused'][0]
                             logging.debug('Binding device {} to driver {}'.format(dvid, driver))
-                            VppPCIUtil.bind_vpp_device(node, driver, dvid)
-                        else:
-                            logging.debug('Could not bind device {}'.format(dvid))
-                        kernel_devices[dvid] = device
-                        del dpdk_devices[dvid]
+                            ret = VppPCIUtil.bind_vpp_device(node, driver, dvid)
+                            if ret:
+                                logging.debug('Could not bind device {}'.format(dvid))
+                            else:
+                                kernel_devices[dvid] = device
+                                del dpdk_devices[dvid]
 
             interfaces = {}
             for dit in dpdk_devices.items():
@@ -1386,6 +1390,14 @@
         else:
             print ("\nNo devices bound to DPDK drivers")
 
+        other_devs = vpp.get_other_devices()
+        if len(other_devs):
+            print ("\nDevices not bound to Kernel or DPDK drivers:")
+            vpp.show_vpp_devices(other_devs, show_interfaces=True,
+                                 show_header=False)
+        else:
+            print ("\nNo devices not bound to Kernel or DPDK drivers")
+
         vpputl = VPPUtil()
         interfaces = vpputl.get_hardware(node)
         if interfaces == {}:
@@ -1397,17 +1409,17 @@
             print ("None")
             return
 
-        print "{:30} {:6} {:4} {:7} {:4} {:7}". \
-            format('Name', 'Socket', 'RXQs',
+        print "{:30} {:4} {:4} {:7} {:4} {:7}". \
+            format('Name', 'Numa', 'RXQs',
                    'RXDescs', 'TXQs', 'TXDescs')
         for intf in sorted(interfaces.items()):
             name = intf[0]
             value = intf[1]
             if name == 'local0':
                 continue
-            socket = rx_qs = rx_ds = tx_qs = tx_ds = ''
-            if 'cpu socket' in value:
-                socket = int(value['cpu socket'])
+            numa = rx_qs = rx_ds = tx_qs = tx_ds = ''
+            if 'numa' in value:
+                numa = int(value['numa'])
             if 'rx queues' in value:
                 rx_qs = int(value['rx queues'])
             if 'rx descs' in value:
@@ -1417,8 +1429,8 @@
             if 'tx descs' in value:
                 tx_ds = int(value['tx descs'])
 
-            print ("{:30} {:>6} {:>4} {:>7} {:>4} {:>7}".
-                   format(name, socket, rx_qs, rx_ds, tx_qs, tx_ds))
+            print ("{:30} {:>4} {:>4} {:>7} {:>4} {:>7}".
+                   format(name, numa, rx_qs, rx_ds, tx_qs, tx_ds))
 
     @staticmethod
     def hugepage_info(node):
diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py
index 336097d..89e2d74 100644
--- a/extras/vpp_config/vpplib/VPPUtil.py
+++ b/extras/vpp_config/vpplib/VPPUtil.py
@@ -138,7 +138,9 @@
         # When using release
         reps += 'release/ubuntu {} main ./\n'.format(ubuntu_version)
         # When using master
-        # reps += 'master/ubuntu {} main/ ./\n'.format(ubuntu_version)
+        # reps += 'master/ubuntu {} main ./\n'.format(ubuntu_version)
+        # When using 1807
+        # reps += '1807/ubuntu {} main ./\n'.format(ubuntu_version)
 
         with open(sfile, 'w') as sfd:
             sfd.write(reps)
@@ -146,8 +148,8 @@
 
         # Add the key
         key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('release'))
-        # cmd = 'curl -L https://packagecloud.io/fdio/{}/gpgkey | apt-key add -'.format(fdio_release)
-        # cmd = 'curl -L https://packagecloud.io/fdio/{}/gpgkey | apt-key add -'.format('mastert')
+        # key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('master'))
+        # key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('1807'))
         cmd = 'echo "{}" | apt-key add -'.format(key.content)
         (ret, stdout, stderr) = self.exec_command(cmd)
         if ret != 0:
@@ -541,19 +543,25 @@
                 interfaces[name]['carrier'] = spl[1]
 
             # Socket
-            rfall = re.findall(r'cpu socket', line)
+            rfall = re.findall(r'numa \d+', line)
             if rfall:
-                spl = line.split('cpu socket ')
-                interfaces[name]['cpu socket'] = spl[1]
+                spl = rfall[0].split()
+                interfaces[name]['numa'] = rfall[0].split()[1]
 
             # Queues and Descriptors
-            rfall = re.findall(r'rx queues', line)
+            rfall = re.findall(r'rx\: queues \d+', line)
             if rfall:
-                spl = line.split(',')
-                interfaces[name]['rx queues'] = spl[0].lstrip(' ').split(' ')[2]
-                interfaces[name]['rx descs'] = spl[1].split(' ')[3]
-                interfaces[name]['tx queues'] = spl[2].split(' ')[3]
-                interfaces[name]['tx descs'] = spl[3].split(' ')[3]
+                interfaces[name]['rx queues'] = rfall[0].split()[2]
+                rdesc = re.findall(r'desc \d+', line)
+                if rdesc:
+                    interfaces[name]['rx descs'] = rdesc[0].split()[1]
+
+            rfall = re.findall(r'tx\: queues \d+', line)
+            if rfall:
+                interfaces[name]['tx queues'] = rfall[0].split()[2]
+                rdesc = re.findall(r'desc \d+', line)
+                if rdesc:
+                    interfaces[name]['tx descs'] = rdesc[0].split()[1]
 
         return interfaces
 
diff --git a/extras/vpp_config/vpplib/VppPCIUtil.py b/extras/vpp_config/vpplib/VppPCIUtil.py
index 591dfab..fe64c9d 100644
--- a/extras/vpp_config/vpplib/VppPCIUtil.py
+++ b/extras/vpp_config/vpplib/VppPCIUtil.py
@@ -14,6 +14,7 @@
 """VPP PCI Utility libraries"""
 
 import re
+import logging
 
 from vpplib.VPPUtil import VPPUtil
 
@@ -318,6 +319,7 @@
         :type node: dict
         :type driver: string
         :type device_id: string
+        :returns ret: Command return code
         """
 
         rootdir = node['rootdir']
@@ -325,5 +327,9 @@
         cmd = dpdk_script + ' -b ' + driver + ' ' + device_id
         (ret, stdout, stderr) = VPPUtil.exec_command(cmd)
         if ret != 0:
-            raise RuntimeError('{} failed on node {} {} {}'.format(
+            logging.error('{} failed on node {}'.format(
                 cmd, node['host'], stdout, stderr))
+            logging.error('{} {}'.format(
+                stdout, stderr))
+
+        return ret
