From: root Date: Tue, 3 Apr 2007 12:43:47 +0000 (+0200) Subject: Fixed the IP plan, and added a honeypot net. X-Git-Url: https://git.sesse.net/?p=nms;a=commitdiff_plain;h=239e8a23652352dde5521f12b5c0a43841e9994f Fixed the IP plan, and added a honeypot net. --- diff --git a/planning/planning.cpp b/planning/planning.cpp index 1126890..0917a4e 100755 --- a/planning/planning.cpp +++ b/planning/planning.cpp @@ -334,8 +334,33 @@ int main(int argc, char **argv) fprintf(patchlist, "e%u-%u %s\n", last_row * 2 - 1, last_num + 1, port_name(v.distro, ++num_ports_used[v.distro]).c_str()); - fprintf(switchlist, "87.76.%u.%u 26 e%u-%u\n", - i / 4, (i % 4) * 64, last_row * 2 - 1, last_num + 1); + + switch (last_num + 1) { + case 1: + fprintf(switchlist, "87.76.%u.0 26 e%u-%u\n", + last_row * 2 - 1, last_row * 2 - 1, last_num + 1); + break; + case 2: + fprintf(switchlist, "87.76.%u.64 26 e%u-%u\n", + last_row * 2 - 1, last_row * 2 - 1, last_num + 1); + break; + case 3: + fprintf(switchlist, "87.76.%u.128 26 e%u-%u\n", + last_row * 2 - 1, last_row * 2 - 1, last_num + 1); + break; + case 4: + fprintf(switchlist, "87.76.%u.0 26 e%u-%u\n", + last_row * 2, last_row * 2 - 1, last_num + 1); + break; + case 5: + fprintf(switchlist, "87.76.%u.64 26 e%u-%u\n", + last_row * 2, last_row * 2 - 1, last_num + 1); + break; + case 6: + fprintf(switchlist, "87.76.%u.128 26 e%u-%u\n", + last_row * 2, last_row * 2 - 1, last_num + 1); + break; + } } printf("\n"); diff --git a/static-switches.txt b/static-switches.txt index 5fdf245..2619cd7 100644 --- a/static-switches.txt +++ b/static-switches.txt @@ -1,3 +1,4 @@ +87.76.32.0 26 e31-4 87.76.119.0 24 hoa-gutta 87.76.120.0 24 crew 87.76.130.0 24 noc-wlan