summaryrefslogtreecommitdiff
path: root/IP migration API.md
blob: c6bd91b9fc248f269b56c6b4b2988d5bd3b23433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
tags:
  - work
---
# Previous IP migration API
Stateful: sqlite db:
- subnet state (mode: `migrating`)
- ip state: active location (`CPH|AMS`)

config:
- LR map file
- db config
- tls
- ip announcement file
- hosts
- key
- user
IP announcement file.

Flow:
- Prepare subnet (out-of-band)
	- Creates a record for the subnet, and puts it in "migrating" mode.
- Call migrate IP (ip, dest)
	- Fails if subnet not prepared prior.
	- Fails if destination not exists.
	- Fails if invalid ip address


# New IP migration API

What is a "link scope"?

API:
- Prepare subnet : cidr
- Migrate IP
	- os set allowed address pair
	- tun src: add /32 
- Migrate gateway

Kevin meet:
tunnel-dst vm in openstack
tunnel-src hardware ding
puppet op tunnels

stap 1 paars = api doet: op os router route voor elk ip in subnet aanmaken en proxy arp shit per subnet. AllowedAddrPair op port tunnel-dst. In eerste instantie gewoon alle IPs uit het subnet toevoegen.

Beide IPv4 en IPv6 (6 kan iets later)

Alle stappen moeten reversable zijn.

stap 2 roze: test vm, routes op os verwijderen, op src net toevoegen
stap 3 geel: switch network naar openstack, switch gateway ip


**How ARP works**
Host A thinks it has direct conn to Host B, thus sends ARP request to learn its MAC.