diff --git a/xos/synchronizer/steps/sync_controller_networks.py b/xos/synchronizer/steps/sync_controller_networks.py
index dd7d722..04f5acf 100644
--- a/xos/synchronizer/steps/sync_controller_networks.py
+++ b/xos/synchronizer/steps/sync_controller_networks.py
@@ -48,6 +48,28 @@
         ip = ip & netmask | 1
         return socket.inet_ntoa(struct.pack("!L", ip))
 
+    def get_driver(self, controller_network):
+        # A bunch of stuff to compensate for OpenStackDriver.client_driver()
+        # not being in working condition.
+        from synchronizers.openstack.client import OpenStackClient
+        from synchronizers.openstack.driver import OpenStackDriver
+        caller = controller_network.network.owner.creator
+        auth = {'username': caller.email,
+                'password': caller.remote_password,
+                'tenant': controller_network.network.owner.name}
+        client = OpenStackClient(controller=controller_network.controller, **auth)
+        driver = OpenStackDriver(client=client)
+
+        return driver
+
+    def get_segmentation_id(self, controller_network):
+        driver = self.get_driver(controller_network)
+        neutron_network = driver.shell.neutron.list_networks(controller_network.network_id)["networks"][0]
+        if "provider:segmentation_id" in neutron_network:
+            return neutron_network["provider:segmentation_id"]
+        else:
+            return None
+
     def save_controller_network(self, controller_network):
         network_name = controller_network.network.name
         subnet_name = '%s-%d'%(network_name,controller_network.pk)
@@ -73,6 +95,8 @@
         self.cidr=cidr
         slice = controller_network.network.owner
 
+        controller_network.gateway = self.alloc_gateway(cidr)
+
         network_fields = {'endpoint':controller_network.controller.auth_url,
                     'endpoint_v3': controller_network.controller.auth_url_v3,
                     'admin_user':slice.creator.email,
@@ -83,7 +107,7 @@
                     'subnet_name':subnet_name,
                     'ansible_tag':'%s-%s@%s'%(network_name,slice.slicename,controller_network.controller.name),
                     'cidr':cidr,
-                    'gateway':self.alloc_gateway(cidr),
+                    'gateway': controller_network.gateway,
                     'start_ip':start_ip,
                     'end_ip':end_ip,
                     'use_vtn':getattr(Config(), "networking_use_vtn", False),
@@ -98,6 +122,8 @@
         controller_network.subnet = self.cidr
         controller_network.subnet_id = subnet_id
 	controller_network.backend_status = '1 - OK'
+        if not controller_network.segmentation_id:
+            controller_network.segmentation_id = self.get_segmentation_id(controller_network)
         controller_network.save()
 
 
