diff options
Diffstat (limited to '7/hosts.pl')
-rw-r--r-- | 7/hosts.pl | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/7/hosts.pl b/7/hosts.pl new file mode 100644 index 0000000..6ec9d97 --- /dev/null +++ b/7/hosts.pl @@ -0,0 +1,53 @@ +% vim set ft=prolog + +:- module(hosts, [ + host/1, + host_config/2, + attached_network/2, + router_link/3]). + +:- use_module(utils). + +host(conflatorio). +host(hash). +host(knot). +host(kv24ix). +host(lhn2ix). + +host_config(knot, Config) :- utils:to_assoc({ + ip: "fdf3:aad9:a885:0b3a::1" + }, Config). + +host_config(hash, Config) :- utils:to_assoc({ + ip: "fdf3:aad9:a885:0b3a::13" + }, Config). + +host_config(lhn2ix, Config) :- utils:to_assoc({ + ip: "fdf3:aad9:a885:0b3a::15" + }, Config). + +host_config(kv24ix, Config) :- utils:to_assoc({ + ip: "fdf3:aad9:a885:0b3a::16" + }, Config). + +% (router, remote, router_ip) +router_link(knot, hash, "0::1"). +router_link(knot, lhn2ix, "0::8"). +router_link(knot, kv24ix, "0::7"). +router_link(hash, knot, "0::2"). +router_link(hash, kv24ix, "0::10"). +router_link(hash, lhn2ix, "0::3"). +router_link(kv24ix, knot, "0::6"). +router_link(kv24ix, hash, "0::5"). +router_link(lhn2ix, hash, "0::9"). +router_link(lhn2ix, knot, "0::4"). +router_link(conflatorio, lhn2ix, "0::11"). +% router_link(lhn2ix, conflatorio,"0::12"). + +% network(R, address, range) +attached_network(conflatorio, ipv6_net("1:78e1::", 64)). +attached_network(hash, ipv6_net("1:e5b0::", 64)). +attached_network(knot, ipv6_net("1:f11b::", 64)). +attached_network(lhn2ix, ipv6_net("1:dbe1::", 64)). +attached_network(lhn2ix, ipv6_net("1:ab69::", 64)). +attached_network(kv42ix, ipv6_net("1:cd02::", 64)). |