git.net

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

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 <daan.hoogland@xxxxxxxxx>
> 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 <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>
> > > 
> > 
> > 
> > --
> > 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


Attachment: signature.asc
Description: This is a digitally signed message part