Re: Why does a VLAN and Network have IP information?
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 写道: > > > 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 > > > 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 > >> 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 > >> > > > > > > >
Re: Why does a VLAN and Network have IP information?
On 06/12/2018 11:32 AM, Daan Hoogland 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). > It is only used in Basic Networking it seems. However, Advanced Networking with VLAN separation provides the same. So right now we can't remove it, but it should be doable if we think of a way to migrate from Basic to Advanced Networking with shared networks. Wido > On Tue, Jun 12, 2018 at 11:12 AM, Wido den Hollander 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> >> > > >
Re: Why does a VLAN and Network have IP information?
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 > 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 >> 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 >> > > >
Re: Why does a VLAN and Network have IP information?
On 06/12/2018 12:23 PM, Ivan Kudryavtsev wrote: > Hi, Devs, ipv6 in vlan table is used. Without the information in that > table, ipv6 wouldn't work with basic zone. > Yes, I'm aware of that. Would be a rather simple fix. Just a few lines of code. I know where to find it. Wido > вт, 12 июн. 2018 г., 13:11 Rafael Weingärtner : > >> 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. >> >> >> On Tue, Jun 12, 2018 at 11:32 AM, Daan Hoogland >> 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 >>> 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 >>> >> >> >> >> -- >> Rafael Weingärtner >> >
Re: Why does a VLAN and Network have IP information?
Hi! I just checked our own vlan table and noticed the (obviously dhcp?) range of the L3 subnet is only present in the `vlan`.`description` field. It looks like it's getting used if the corresponding `network`,`specify_ip_range` is 1. cheers, - Stephan Am Dienstag, den 12.06.2018, 12:11 +0200 schrieb Rafael Weingärtner: > 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. > > > On Tue, Jun 12, 2018 at 11:32 AM, Daan Hoogland > 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 > > 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 > > > > Mit freundlichen Grüßen, Stephan Seitz -- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin http://www.heinlein-support.de Tel: 030 / 405051-44 Fax: 030 / 405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin signature.asc Description: This is a digitally signed message part
Re: Why does a VLAN and Network have IP information?
Hi, Devs, ipv6 in vlan table is used. Without the information in that table, ipv6 wouldn't work with basic zone. вт, 12 июн. 2018 г., 13:11 Rafael Weingärtner : > 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. > > > On Tue, Jun 12, 2018 at 11:32 AM, Daan Hoogland > 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 > > 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 > > > > > > -- > Rafael Weingärtner >
Re: Why does a VLAN and Network have IP information?
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. On Tue, Jun 12, 2018 at 11:32 AM, Daan Hoogland 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 > 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 > -- Rafael Weingärtner
Re: Why does a VLAN and Network have IP information?
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 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