forked from uncloud/uncloud
60 lines
1.4 KiB
Text
60 lines
1.4 KiB
Text
The network base - experimental
|
|
|
|
|
|
We want to have 1 "main" network for convience.
|
|
|
|
We want to be able to create networks automatically, once a new
|
|
customer is created -> need hooks!
|
|
|
|
|
|
Mapping:
|
|
|
|
- each network is a "virtual" network. We use vxlan by default, but
|
|
could be any technology!
|
|
- we need a counter for vxlan mappings / network IDs -> cannot use
|
|
|
|
Model in etcd:
|
|
|
|
/v1/networks/
|
|
|
|
|
|
Tests
|
|
see
|
|
https://vincent.bernat.ch/en/blog/2017-vxlan-linux
|
|
|
|
|
|
# local 2001:db8:1::1 \
|
|
|
|
|
|
netid=100
|
|
dev=wlp2s0
|
|
dev=wlp0s20f3
|
|
ip -6 link add vxlan${netid} type vxlan \
|
|
id ${netid} \
|
|
dstport 4789 \
|
|
group ff05::${netid} \
|
|
dev ${dev} \
|
|
ttl 5
|
|
|
|
[root@diamond ~]# ip addr add 2a0a:e5c0:5::1/48 dev vxlan100
|
|
root@manager:~/.ssh# ip addr add 2a0a:e5c0:5::2/48 dev vxlan100
|
|
root@manager:~/.ssh# ping -c3 2a0a:e5c0:5::1
|
|
PING 2a0a:e5c0:5::1(2a0a:e5c0:5::1) 56 data bytes
|
|
64 bytes from 2a0a:e5c0:5::1: icmp_seq=1 ttl=64 time=15.6 ms
|
|
64 bytes from 2a0a:e5c0:5::1: icmp_seq=2 ttl=64 time=30.3 ms
|
|
64 bytes from 2a0a:e5c0:5::1: icmp_seq=3 ttl=64 time=84.4 ms
|
|
|
|
--- 2a0a:e5c0:5::1 ping statistics ---
|
|
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
|
|
rtt min/avg/max/mdev = 15.580/43.437/84.417/29.594 ms
|
|
|
|
--> work even via wifi
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
Creating a network:
|
|
|
|
1) part of the initialisation / demo data (?)
|
|
|
|
We should probably provide some demo sets that can easily be used.
|