Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data: init #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

data: init #86

wants to merge 1 commit into from

Conversation

MarcelCoding
Copy link
Member

@MarcelCoding MarcelCoding commented Nov 23, 2024

I've separated IPs, so that these can be referenced better in other modules/VMs without having to evaluate all VMs.

@MarcelCoding MarcelCoding marked this pull request as ready for review November 23, 2024 21:11
@MarcelCoding
Copy link
Member Author

MarcelCoding commented Nov 23, 2024

$ nix eval .#nixosConfigurations.svc-cloud01.config.dd-ix.hosts:

{
  ixp-as11201 = {
    addr = "2a01:7700:80b0:4101::2";
    fqdn = "ixp-as11201.dd-ix.net";
    hostId = "2";
    mac = "62:7a:2e:2f:68:66";
    net = "ixp-mgmt";
  };
  svc-adm01 = {
    addr = "2a01:7700:80b0:7002::2";
    fqdn = "svc-adm01.dd-ix.net";
    hostId = "2";
    mac = "42:df:f0:70:02:02";
    net = "admin";
  };
  svc-auth01 = {
    addr = "2a01:7700:80b0:6001::4";
    fqdn = "svc-auth01.dd-ix.net";
    hostId = "4";
    mac = "72:05:50:30:38:6d";
    net = "services";
  };
  svc-bbe01 = {
    addr = "2a01:7700:80b0:6001::14";
    fqdn = "svc-bbe01.dd-ix.net";
    hostId = "14";
    mac = "42:f3:bc:bb:11:b6";
    net = "services";
  };
  svc-clab01 = {
    addr = "2a01:7700:80b0:7001::2";
    fqdn = "svc-clab01.dd-ix.net";
    hostId = "2";
    mac = "22:99:63:21:e4:62";
    net = "lab";
  };
  svc-cloud01 = {
    addr = "2a01:7700:80b0:6001::6";
    fqdn = "svc-cloud01.dd-ix.net";
    hostId = "6";
    mac = "e2:d0:2f:67:dd:ae";
    net = "services";
  };
  svc-crm01 = {
    addr = "2a01:7700:80b0:6001::15";
    fqdn = "svc-crm01.dd-ix.net";
    hostId = "15";
    mac = "e2:d0:2f:67:dd:1e";
    net = "services";
  };
  svc-dcim01 = {
    addr = "2a01:7700:80b0:6001::7";
    fqdn = "svc-dcim01.dd-ix.net";
    hostId = "7";
    mac = "02:1f:0a:4f:5a:26";
    net = "services";
  };
  svc-exp01 = {
    addr = "2a01:7700:80b0:4101::3";
    fqdn = "svc-exp01.dd-ix.net";
    hostId = "3";
    mac = "d2:7b:c0:b2:42:0f";
    net = "ixp-mgmt";
  };
  svc-fpx01 = {
    addr = "2a01:7700:80b0:6001::3";
    fqdn = "svc-fpx01.dd-ix.net";
    hostId = "3";
    mac = "d2:9e:36:14:00:ec";
    net = "services";
  };
  svc-hv01 = {
    addr = "2a01:7700:80b0:7000::2";
    fqdn = "svc-hv01.dd-ix.net";
    hostId = "2";
    mac = null;
    net = "management";
  };
  svc-lg01 = {
    addr = "2a01:7700:80b0:6001::10";
    fqdn = "svc-lg01.dd-ix.net";
    hostId = "10";
    mac = "82:cf:03:27:d8:8b";
    net = "services";
  };
  svc-lists01 = {
    addr = "2a01:7700:80b0:6001::8";
    fqdn = "svc-lists01.dd-ix.net";
    hostId = "8";
    mac = "e2:7a:81:44:91:a3";
    net = "services";
  };
  svc-mari01 = {
    addr = "2a01:7700:80b0:6001::12";
    fqdn = "svc-mari01.dd-ix.net";
    hostId = "12";
    mac = "e2:6c:c7:b6:fa:27";
    net = "services";
  };
  svc-mta01 = {
    addr = "2a01:7700:80b0:6000::25";
    fqdn = "svc-mta01.dd-ix.net";
    hostId = "25";
    mac = "a2:18:9f:dc:4d:17";
    net = "internet";
  };
  svc-nms01 = {
    addr = "2a01:7700:80b0:7002::7";
    fqdn = "svc-nms01.dd-ix.net";
    hostId = "7";
    mac = "22:0a:f1:39:17:69";
    net = "admin";
  };
  svc-node01 = {
    addr = "2a01:7700:80b0:7002::3";
    fqdn = "svc-node01.dd-ix.net";
    hostId = "3";
    mac = "42:df:f0:70:02:03";
    net = "admin";
  };
  svc-ns01 = {
    addr = "2a01:7700:80b0:6000::53";
    fqdn = "svc-ns01.dd-ix.net";
    hostId = "53";
    mac = "a2:18:9f:dc:4d:16";
    net = "internet";
  };
  svc-obs01 = {
    addr = "2a01:7700:80b0:6001::11";
    fqdn = "svc-obs01.dd-ix.net";
    hostId = "11";
    mac = "62:9d:0f:8e:29:3f";
    net = "services";
  };
  svc-pg01 = {
    addr = "2a01:7700:80b0:6001::5";
    fqdn = "svc-pg01.dd-ix.net";
    hostId = "5";
    mac = "f2:8b:16:7e:6c:6b";
    net = "services";
  };
  svc-portal01 = {
    addr = "2a01:7700:80b0:6001::2";
    fqdn = "svc-portal01.dd-ix.net";
    hostId = "2";
    mac = "e2:b4:cb:12:f4:c1";
    net = "services";
  };
  svc-prom01 = {
    addr = "2a01:7700:80b0:7002::4";
    fqdn = "svc-prom01.dd-ix.net";
    hostId = "4";
    mac = "42:b3:bc:bb:11:b6";
    net = "admin";
  };
  svc-prom02 = {
    addr = "2a01:7700:80b0:7002::5";
    fqdn = "svc-prom02.dd-ix.net";
    hostId = "5";
    mac = "42:f7:f7:72:24:0f";
    net = "admin";
  };
  svc-rpx01 = {
    addr = "2a01:7700:80b0:6000::443";
    fqdn = "svc-rpx01.dd-ix.net";
    hostId = "443";
    mac = "32:08:69:71:62:9b";
    net = "internet";
  };
  svc-tix01 = {
    addr = "2a01:7700:80b0:6001::16";
    fqdn = "svc-tix01.dd-ix.net";
    hostId = "16";
    mac = "02:1f:0a:4f:5a:27";
    net = "services";
  };
  svc-vault01 = {
    addr = "2a01:7700:80b0:6001::9";
    fqdn = "svc-vault01.dd-ix.net";
    hostId = "9";
    mac = "b2:a0:24:ba:e8:15";
    net = "services";
  };
  svc-web01 = {
    addr = "2a01:7700:80b0:6001::13";
    fqdn = "svc-web01.dd-ix.net";
    hostId = "13";
    mac = "82:5a:db:e0:53:63";
    net = "services";
  };
}

$ nix eval .#nixosConfigurations.svc-cloud01.config.dd-ix.nets:

{
  admin = {
    cidr = 64;
    netId = "2a01:7700:80b0:7002";
    prefix = "2a01:7700:80b0:7002::/64";
    vlan = 104;
  };
  internet = {
    cidr = 64;
    netId = "2a01:7700:80b0:6000";
    prefix = "2a01:7700:80b0:6000::/64";
    vlan = 100;
  };
  ixp-mgmt = {
    cidr = 64;
    netId = "2a01:7700:80b0:4101";
    prefix = "2a01:7700:80b0:4101::/64";
    vlan = 301;
  };
  lab = {
    cidr = 64;
    netId = "2a01:7700:80b0:7001";
    prefix = "2a01:7700:80b0:7001::/64";
    vlan = 103;
  };
  management = {
    cidr = 64;
    netId = "2a01:7700:80b0:7000";
    prefix = "2a01:7700:80b0:7000::/64";
    vlan = 102;
  };
  services = {
    cidr = 64;
    netId = "2a01:7700:80b0:6001";
    prefix = "2a01:7700:80b0:6001::/64";
    vlan = 101;
  };
}

@liske
Copy link
Member

liske commented Nov 24, 2024

The hostId is irritating, what is it about? Is this referring the interface identifier? In such case the ip address could by further abstracted. 🤔

I'm not happy using data for this, data could be just anything 😉

@MarcelCoding
Copy link
Member Author

MarcelCoding commented Nov 24, 2024

The hostId is referring to the part of the IP address of the host in the subnet.

NetId/Subnet fe80::/64
Addr fe80::1/64
HostId 1

@MarcelCoding
Copy link
Member Author

Any suggestions for "data"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants