--- 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.