[hack] phase in networking

This commit is contained in:
Nico Schottelius 2020-01-15 12:40:37 +01:00
parent bd03f95e99
commit 8a451ff4ff

21
uncloud/hack/net.py Normal file
View file

@ -0,0 +1,21 @@
import subprocess
class VXLANBridge(object):
def __init__(self, bridgedev=None, uplinkdev=None):
self.management_vni = 1
cmd_create_vxlan = "ip -6 link add {vxlandev} type vxlan id {netid} dstport 4789 group ff05::{netid} dev {uplinkdev} ttl 5"
cmd_up_dev = "ip link set {dev} up"
cmd_create_bridge="ip link add {bridgedev} type bridge"
cmd_add_to_bridge="ip link set {vxlandev} master {bridgedev} up"
cmd_add_addr="ip addr add {ip} dev {bridgedev}"
def setup_networking(dev=wlan0, v6net):
ip=2a0a:e5c1:111:888::48/64
vxlandev=vxlan${netid}
bridgedev=br${netid}
class DNSRA(object):
def __init__(self):
pass