git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 <wido@xxxxxxxxx> 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>
>>
> 
> 
>