We also use vlan for isolated networks,not only shared networks or directattached. For these vlans, they do not belong to any isolated/shared networks. The public ips in the vlan can be assigned to different isolated networks.
-Wei 2018年6月12日星期二,Wido den Hollander <w...@widodh.nl> 写道: > > > On 06/12/2018 12:11 PM, Rafael Weingärtner wrote: > > In theory, the object (either in Java or a DB table) that represents a > VLAN > > should not have IP information. However, it seems that someone “reused” > the > > object. We would need to check if the IP data stored there is not really > > used before removing it. > > > > Indeed. It seems redundant to me. We actually have a lot of redundant > database entries, but this one is rather obvious to me. > > Wido > > > > > On Tue, Jun 12, 2018 at 11:32 AM, Daan Hoogland <daan.hoogl...@gmail.com > > > > wrote: > > > >> Wido, I think we can remove ip data from the vlan table, though it is > going > >> to require some hacking. Removing the vlan table seems not prudent to > me, > >> especially since we now have l2 networks (without ip provisioned). > >> > >> On Tue, Jun 12, 2018 at 11:12 AM, Wido den Hollander <w...@widodh.nl> > >> wrote: > >> > >>> Hi, > >>> > >>> Looking at our design and tables in the database I'm wondering why both > >>> a VLAN and a Network has IP information. > >>> > >>> A VLAN is a Layer 2 domain and shouldn't have any IP(4/6) information > >>> and we also seem to store redundant information in there. > >>> > >>> Below is some information I have in a test database and I'm just trying > >>> to understand why both have IP information. > >>> > >>> Imho this information should not be stored in the VLAN table as it's > >>> redundant anyway. But still, why is it there? And why do we actually > use > >>> the VLAN table? Because even the VLAN tag is stored in the *networks* > >>> table. > >>> > >>> Wido > >>> > >>> mysql> select * from vlan limit 1 \G > >>> *************************** 1. row *************************** > >>> id: 1 > >>> uuid: d14f30ab-072e-41b7-bfcf-0aadd156e01d > >>> vlan_id: 0 > >>> vlan_gateway: 192.168.200.1 > >>> vlan_netmask: 255.255.255.0 > >>> description: 192.168.200.100-192.168.200.200 > >>> vlan_type: DirectAttached > >>> data_center_id: 1 > >>> network_id: 203 > >>> physical_network_id: 200 > >>> ip6_gateway: 2001:db8:100::1 > >>> ip6_cidr: 2001:db8:100::/64 > >>> ip6_range: NULL > >>> removed: NULL > >>> created: 2018-06-09 18:53:26 > >>> 1 row in set (0.00 sec) > >>> > >>> mysql> > >>> > >>> mysql> select * from networks where id = 203 \G > >>> *************************** 1. row *************************** > >>> id: 203 > >>> name: GuestNetwork1 > >>> uuid: f1f7281d-bedd-422c-bd44-eae9be172157 > >>> display_text: GuestNetwork1 > >>> traffic_type: Guest > >>> broadcast_domain_type: Vlan > >>> broadcast_uri: vlan://untagged > >>> gateway: 192.168.200.1 > >>> cidr: 192.168.200.0/24 > >>> mode: Dhcp > >>> network_offering_id: 6 > >>> physical_network_id: 200 > >>> data_center_id: 1 > >>> guru_name: DirectNetworkGuru > >>> state: Setup > >>> related: 203 > >>> domain_id: 1 > >>> account_id: 1 > >>> dns1: NULL > >>> dns2: NULL > >>> guru_data: NULL > >>> set_fields: 0 > >>> acl_type: Domain > >>> network_domain: cs1cloud.internal > >>> reservation_id: NULL > >>> guest_type: Shared > >>> restart_required: 0 > >>> created: 2018-06-09 18:53:26 > >>> removed: NULL > >>> specify_ip_ranges: 1 > >>> vpc_id: NULL > >>> ip6_gateway: NULL > >>> ip6_cidr: NULL > >>> network_cidr: NULL > >>> display_network: 1 > >>> network_acl_id: NULL > >>> streched_l2: 0 > >>> redundant: 0 > >>> external_id: NULL > >>> 1 row in set (0.01 sec) > >>> > >>> mysql> > >>> > >> > >> > >> > >> -- > >> Daan > >> > > > > > > >