Changeset 10642 in genesis
- Timestamp:
- May 1, 2012, 8:55:33 PM (13 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
dns/staticDNS.yaml
r10577 r10642 1 Various: 2 RV : CNodeRV 3 RijnVliet : CNodeRV 4 RijnenVliet : CNodeRV 5 rustenborg : CNodeRustenborch 6 strkvrw : CNodeLMStruykVerwo1 7 roomburgh : CNodeRoomburgh1 1 --- # Static DNS Entries 2 # Various 3 - RV : CNodeRV 4 - RijnVliet : CNodeRV 5 - RijnenVliet : CNodeRV 6 - rustenborg : CNodeRustenborch 7 - strkvrw : CNodeLMStruykVerwo1 8 - roomburgh : CNodeRoomburgh1 8 9 9 vosko: 10 11 10 # vosko 11 - apkerk1.CNodeVosko : 172.17.176.8 12 - apkerk2.CNodeVosko : 172.17.176.9 12 13 13 lijtweg: 14 15 16 14 # lijtweg 15 - bbLijtweg1 : CNodeLijtweg1 16 - bbLijtweg2 : CNodeLijtweg2 17 - lijtweg : CNodeLijtweg1 17 18 18 cetim:19 20 21 22 23 24 25 26 19 # cetim: 20 - apkerk.CNodeCeTIM : 172.17.143.9 21 - hk : CNodeCeTIM1 22 - hk1 : CNodeCeTIM1 23 - hk2 : CNodeCeTIM2 24 - hlk : CNodeCeTIM1 25 - hlk1 : CNodeCeTIM1 26 - hlk2 : CNodeCeTIM2 27 - cetim : CNodeCeTIM1 27 28 28 proxy servers:29 30 31 32 33 34 35 36 37 29 # proxy servers: 30 - proxy : 172.31.255.1 31 - welcome : 172.31.255.1 32 - proxy.CNodeCeTIM : 172.17.143.254 33 - proxy1 : 172.17.8.68 34 - proxy2 : 172.17.143.4 35 - proxy3 : 172.20.128.98 36 - proxy4 : 172.16.2.254 37 - proxy5 : 172.19.168.66 38 - proxy40 : 172.20.136.19 38 39 39 40 40 Diensten op het netwerk gehost op prive servers:41 42 43 44 45 41 # Diensten op het netwerk gehost op prive servers: 42 - forum : 172.20.128.18 43 - zeehos1.CNodeMeca : 172.26.0.8 44 - zeehos1 : zeehos1.CNodeMeca 45 - zeehos2.CNodeMeca : 172.26.0.9 46 - zeehos2 : zeehos2.CNodeMeca 46 47 47 dirkx:48 49 50 48 # dirkx: 49 - boem.CNodeRund : 172.17.160.3 50 - foem.CNodeRund : 172.17.160.2 51 - gw.CNodeRund : 172.17.160.6 51 52 52 lvp:53 lvp : 172.17.136.254 audiobro : 172.19.136.253 # lvp: 54 - lvp : 172.17.136.2 55 - audiobro : 172.19.136.2 55 56 56 rudi/xlexit:57 58 59 60 57 # rudi/xlexit: 58 - rudi-gw.CNodeRudi : 172.23.0.70 59 - xlexit-gw.CNodeRudi : 172.23.0.69 60 - xlexit : xlexit-gw.CNodeRudi 61 - xlexit2.CNodeRudi : 172.23.0.66 61 62 62 63 63 jasper:64 65 66 64 # jasper: 65 - smc.CNodeJasper : 172.18.8.67 66 - tango.CNodeJasper : 172.18.8.66 67 - tango : tango.CNodeJasper 67 68 68 cope:69 70 69 # cope: 70 - server.CNodeCope : 172.17.8.67 71 - vpn-cope : server.CNodeCope 71 72 73 # vpn servers: 74 - vpn.CNodeLvLn : 172.17.144.66 75 - vpn.CNodeLvLz : 172.17.40.66 76 - vpn.CNodeOBLc : 172.17.152.67 72 77 73 vpn servers: 74 vpn.CNodeLvLn : 172.17.144.66 75 vpn.CNodeLvLz : 172.17.40.66 76 vpn.CNodeOBLc : 172.17.152.67 78 # DHCP static addressen + vrijwilligers verwijzingen: 79 - kovijn : 172.17.8.5 80 - Johan : Johan.CNodeGandalf 81 - Johan.CNodeGandalf : 172.25.128.2 82 - eddy : 172.16.2.114 83 - hiephoi1.CNodeAJSoft : 172.20.136.7 84 - hiephoi1 : hiephoi1.CNodeAJSoft 85 - hiephoi2.CNodeAJSoft : 172.20.136.8 86 - hiephoi2 : hiephoi2.CNodeAJSoft 87 - hiephoi3.CNodeAJSoft : 172.20.136.9 88 - hiephoi3 : hiephoi3.CNodeAJSoft 89 - jeroen.CNodeVeldbies : 172.25.0.18 90 - jeroen : jeroen.CNodeVeldbies 91 - kok.CNodeCope : 172.17.8.6 92 - kok : kok.CNodeCope 93 - lodewijk : 172.17.136.9 94 - marcel.CNodeROCl : 172.21.0.5 95 - marcel : marcel.CNodeROCl 96 - mostaza.CNodeROCl : 172.21.0.6 97 - mostaza : mostaza.CNodeROCl 98 - timbolino.CNodeAZC : 172.19.144.5 99 - timbolino : timbolino.CNodeAZC 100 - trracer.CNodeJorg : 172.20.0.67 101 - trracer : trracer.CNodeJorg 102 - buffy: 172.17.143.6 103 - factory : 172.19.128.69 104 - www2 : 172.16.4.46 77 105 78 DHCP static addressen + vrijwilligers verwijzingen: 79 kovijn : 172.17.8.5 106 # Prive Servers: 107 - buzz.CNodeZwet: 172.27.129.66 108 - buzz: buzz.CNodeZwet 109 - smarthost: buzz 80 110 81 Johan : Johan.CNodeGandalf 82 Johan.CNodeGandalf : 172.25.128.2 83 eddy : 172.16.2.114 84 hiephoi1.CNodeAJSoft : 172.20.136.7 85 hiephoi1 : hiephoi1.CNodeAJSoft 86 hiephoi2.CNodeAJSoft : 172.20.136.8 87 hiephoi2 : hiephoi2.CNodeAJSoft 88 hiephoi3.CNodeAJSoft : 172.20.136.9 89 hiephoi3 : hiephoi3.CNodeAJSoft 90 jeroen.CNodeVeldbies : 172.25.0.18 91 jeroen : jeroen.CNodeVeldbies 92 kok.CNodeCope : 172.17.8.6 93 kok : kok.CNodeCope 94 lodewijk : 172.17.136.9 95 marcel.CNodeROCl : 172.21.0.5 96 marcel : marcel.CNodeROCl 97 mostaza.CNodeROCl : 172.21.0.6 98 mostaza : mostaza.CNodeROCl 99 timbolino.CNodeAZC : 172.19.144.5 100 timbolino : timbolino.CNodeAZC 101 trracer.CNodeJorg : 172.20.0.67 102 trracer : trracer.CNodeJorg 103 buffy: 172.17.143.6 104 factory : 172.19.128.69 105 www2 : 172.16.4.46 111 # WL Servers: 112 - sunfire: 172.19.128.68 113 - sunny : 172.16.4.46 114 - dyndns : 172.16.4.46 115 - wlconfig : sunny 116 - loghost : 172.16.4.46 106 117 107 Prive Servers: 108 buzz.CNodeZwet: 172.27.129.66 109 buzz: buzz.CNodeZwet 110 smarthost: buzz 111 118 # Overige: 119 - aa-design : aa-design.CNodeCope 120 - aa-design.CNodeCope : 172.17.8.7 121 - binnen.CNodeBurcht : 172.17.184.129 122 - dorsthorst.CNodeVeldbies : 172.25.0.66 123 - www.CNodeOBLc : 172.17.152.66 124 - bibliotheek : www.CNodeOBLc 125 - bieb : www.CNodeOBLc 126 - www.jvc : 172.18.32.5 127 - eduroam : 172.17.169.67 128 - pentaho : 172.17.0.21 112 129 113 WL Servers: 114 sunfire: 172.19.128.68 115 sunny : 172.16.4.46 116 dyndns : 172.16.4.46 117 wlconfig : sunny 118 loghost : 172.16.4.46 130 # Timelord pool: 131 - timelord : 0.pool.ntp 132 - 0.timelord : 0.pool.ntp 133 - 1.timelord : 1.pool.ntp 134 - 2.timelord : 2.pool.ntp 135 - 3.timelord : 3.pool.ntp 136 - ntp : 0.pool.ntp 137 - pool.ntp : 0.pool.ntp 138 - 0.pool.ntp : [172.19.128.68, 172.17.16.1, 172.20.145.1, 172.16.18.38, 172.17.0.36] 139 - 1.pool.ntp : [172.19.128.68, 172.17.16.1, 172.20.145.1, 172.16.18.38, 172.17.0.36] 140 - 2.pool.ntp : [172.19.128.68, 172.17.16.1, 172.20.145.1, 172.16.18.38, 172.17.0.36] 141 - 3.pool.ntp : [172.19.128.68, 172.17.16.1, 172.20.145.1, 172.16.18.38, 172.17.0.36] 119 142 120 Overige: 121 aa-design : aa-design.CNodeCope 122 aa-design.CNodeCope : 172.17.8.7 123 binnen.CNodeBurcht : 172.17.184.129 124 dorsthorst.CNodeVeldbies : 172.25.0.66 125 www.CNodeOBLc : 172.17.152.66 126 bibliotheek : www.CNodeOBLc 127 bieb : www.CNodeOBLc 128 www.jvc : 172.18.32.5 129 eduroam : 172.17.169.67 130 pentaho : 172.17.0.21 131 132 Timelord pool: 133 0.timelord : 172.19.137.66 134 0.timelord : 172.27.129.66 135 1.timelord : 172.17.8.68 136 1.timelord : 172.19.168.66 137 2.timelord : 172.17.143.4 138 3.timelord : 172.20.128.98 139 140 raw: 141 dyndns: 'IN NS sunny.wleiden.net.' 142 localhost: 'IN A 127.0.0.1' 143 # Raw: 144 - dyndns: 'IN NS sunny.wleiden.net.' 145 - localhost: 'IN A 127.0.0.1' -
tools/gformat.py
r10627 r10642 929 929 930 930 # hostname is key, IP is value 931 wleiden_zone = d ict()931 wleiden_zone = defaultdict(list) 932 932 wleiden_cname = dict() 933 933 … … 941 941 wleiden_cname[datadump['nodename']] = fqdn 942 942 943 wleiden_zone[fqdn] = datadump['masterip']943 wleiden_zone[fqdn].append(datadump['masterip']) 944 944 945 945 # Hacking to get proper DHCP IPs and hostnames … … 952 952 dhcp_part = ".".join(ip.split('.')[0:3]) 953 953 if ip != datadump['masterip']: 954 wleiden_zone["dhcp-gateway-%s.%s" % (iface_name, fqdn)] = ip954 wleiden_zone["dhcp-gateway-%s.%s" % (iface_name, fqdn)].append(ip) 955 955 for i in range(int(dhcp_start), int(dhcp_stop) + 1): 956 wleiden_zone["dhcp-%s-%s.%s" % (i, iface_name, fqdn)] = "%s.%s" % (dhcp_part, i)956 wleiden_zone["dhcp-%s-%s.%s" % (i, iface_name, fqdn)].append("%s.%s" % (dhcp_part, i)) 957 957 except (AttributeError, ValueError): 958 958 # First push it into a pool, to indentify the counter-part later on … … 994 994 if len(value) == 1: 995 995 (iface_name, fqdn, ip) = value[0] 996 wleiden_zone["2unused-%s.%s" % (iface_name, fqdn)] = ip996 wleiden_zone["2unused-%s.%s" % (iface_name, fqdn)].append(ip) 997 997 998 998 # Device DNS names 999 999 if 'cnode' in fqdn.lower(): 1000 wleiden_zone["d-at-%s.%s" % (iface_name, fqdn)] = showaddr(parseaddr(ip) + 1)1000 wleiden_zone["d-at-%s.%s" % (iface_name, fqdn)].append(showaddr(parseaddr(ip) + 1)) 1001 1001 wleiden_cname["d-at-%s.%s" % (iface_name,sn(fqdn))] = "d-at-%s.%s" % (iface_name, fqdn) 1002 1002 … … 1004 1004 (a_iface_name, a_fqdn, a_ip) = value[0] 1005 1005 (b_iface_name, b_fqdn, b_ip) = value[1] 1006 wleiden_zone["2%s.%s" % (b_fqdn,a_fqdn)] = a_ip1007 wleiden_zone["2%s.%s" % (a_fqdn,b_fqdn)] = b_ip1006 wleiden_zone["2%s.%s" % (b_fqdn,a_fqdn)].append(a_ip) 1007 wleiden_zone["2%s.%s" % (a_fqdn,b_fqdn)].append(b_ip) 1008 1008 1009 1009 # Device DNS names 1010 1010 if 'cnode' in a_fqdn.lower() and 'cnode' in b_fqdn.lower(): 1011 wleiden_zone["d-at-%s.%s" % (a_iface_name, a_fqdn)] = showaddr(parseaddr(a_ip) + 1)1012 wleiden_zone["d-at-%s.%s" % (b_iface_name, b_fqdn)] = showaddr(parseaddr(b_ip) - 1)1011 wleiden_zone["d-at-%s.%s" % (a_iface_name, a_fqdn)].append(showaddr(parseaddr(a_ip) + 1)) 1012 wleiden_zone["d-at-%s.%s" % (b_iface_name, b_fqdn)].append(showaddr(parseaddr(b_ip) - 1)) 1013 1013 wleiden_cname["d-at-%s.%s" % (a_iface_name,sn(a_fqdn))] = "d-at-%s.%s" % (a_iface_name, a_fqdn) 1014 1014 wleiden_cname["d-at-%s.%s" % (b_iface_name,sn(b_fqdn))] = "d-at-%s.%s" % (b_iface_name, b_fqdn) … … 1021 1021 (iface_name, fqdn, ip) = item 1022 1022 pool_name = "2pool-" + showaddr(key).replace('.','-') + "-" + pool_to_name(fqdn,pool_members) 1023 wleiden_zone["%s.%s" % (pool_name, fqdn)] = ip1023 wleiden_zone["%s.%s" % (pool_name, fqdn)].append(ip) 1024 1024 1025 1025 # Include static DNS entries … … 1030 1030 ## roomburgh=CNodeRoomburgh1 1031 1031 ## apkerk1.CNodeVosko=172.17.176.8 ;this as well 1032 dns = yaml.load(open(os.path.join(NODE_DIR,'../dns/staticDNS.yaml'),'r'))1032 dns_list = yaml.load(open(os.path.join(NODE_DIR,'../dns/staticDNS.yaml'),'r')) 1033 1033 1034 1034 # Hack to allow special entries, for development 1035 wleiden_raw = dns['raw'] 1036 del dns['raw'] 1037 1038 for comment, block in dns.iteritems(): 1039 for k,v in block.iteritems(): 1040 if valid_addr(v): 1041 wleiden_zone[k] = v 1035 wleiden_raw = {} 1036 1037 for line in dns_list: 1038 k, items = line.items()[0] 1039 items = [items] if type(items) == str else items 1040 for item in items: 1041 if item.startswith('IN '): 1042 wleiden_raw[k] = item 1043 elif valid_addr(item): 1044 wleiden_zone[k].append(item) 1042 1045 else: 1043 wleiden_cname[k] = v1046 wleiden_cname[k] = item 1044 1047 1045 1048 details = dict() … … 1070 1073 f.write(dns_header % details) 1071 1074 1072 for host,ip in wleiden_zone.iteritems(): 1073 if valid_addr(ip): 1074 f.write("%s.wleiden.net. IN A %s \n" % (host.lower(), ip)) 1075 for host,ips in wleiden_zone.iteritems(): 1076 for ip in ips: 1077 if valid_addr(ip): 1078 f.write("%s.wleiden.net. IN A %s \n" % (host.lower(), ip)) 1075 1079 for source,dest in wleiden_cname.iteritems(): 1076 1080 f.write("%s.wleiden.net. IN CNAME %s.wleiden.net.\n" % (source.lower(), dest.lower())) … … 1087 1091 #XXX: Not effient, fix to proper data structure and do checks at other 1088 1092 # stages 1089 for host,ip in wleiden_zone.iteritems(): 1090 if valid_addr(ip): 1091 if int(ip.split('.')[1]) == s: 1092 rev_ip = '.'.join(reversed(ip.split('.'))) 1093 f.write("%s.in-addr.arpa. IN PTR %s.wleiden.net.\n" % (rev_ip.lower(), host.lower())) 1093 for host,ips in wleiden_zone.iteritems(): 1094 for ip in ips: 1095 if valid_addr(ip): 1096 if int(ip.split('.')[1]) == s: 1097 rev_ip = '.'.join(reversed(ip.split('.'))) 1098 f.write("%s.in-addr.arpa. IN PTR %s.wleiden.net.\n" % (rev_ip.lower(), host.lower())) 1094 1099 f.close() 1095 1100
Note:
See TracChangeset
for help on using the changeset viewer.