return subprocess.call(cmd, shell=True);
+"""
+Subnet used for virtual interfaces by setup-egre-link script
+"""
+def iias_network():
+ return "192.168.0.0 255.255.0.0"
+
+
"""
Check for existence of interface d<key>x<nodeid>
"""
return
+"""
+IP address of the NAT interface created inside the slice by the
+setup-nat script.
+"""
+def nat_inner_ip(key):
+ return "10.0.%s.2" % key
+
+
"""
Check for existence of interface natx<key>
"""
"""
-Network used by OpenVPN on this node
+IP address of NAT gateway to outside world
"""
-def openvpn_net(myid):
- return "10.%s.0.0/16" % myid
-
+def nat_gw(key):
+ return "10.0.%s.1" % key
"""
-IP address of NAT gateway to outside world
+IP address of the NAT interface inside the slice
"""
-def nat_gw(key, myid):
- return "10.%s.%s.1" % (key, myid)
+def nat_inner(key):
+ return "10.0.%s.2" % key
"""
""" % name)
f.write ("""!
-ip route %s %s
-!
access-list vty permit 127.0.0.1/32
!
line vty
!
-""" % (openvpn_net(myid), nat_gw(key, myid)))
+""")
f.close()
return
net = ifaces[name]['network']
f.write (" network %s area 0\n" % net)
- f.write(""" redistribute static
+ f.write(""" redistribute kernel
!
access-list vty permit 127.0.0.1/32
!