(20 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
! Segment !! Purpose | ! Segment !! Purpose | ||
|- | |- | ||
| 10.208.0.[1.. | | 10.208.0.[1..255] || network devices | ||
|- | |- | ||
| 10.208.1.[ | | 10.208.1.[0..255] || servers | ||
|- | |- | ||
| 10.208.[ | | 10.208.[23].[0..254] || clients / dhcp | ||
|} | |} | ||
Gateway: 10.208.0.1 | |||
DNS: 10.208.1.53 | |||
= Renumbering procedure = | = Renumbering procedure = | ||
This is only for servers; Everything in the dhcp range will be managed by changing the dhcp start/end addresses. Note that we will need to check if devices in the dhcp range are configured with a static ip and if so, we need to reconfigure them to dhcp and fix their ip address in dhcp. | This is only for servers; Everything in the dhcp range will be managed by changing the dhcp start/end addresses. Note that we will need to check if devices in the dhcp range are configured with a static ip and if so, we need to reconfigure them to dhcp and fix their ip address in dhcp. | ||
# Preparation | # Preparation | ||
## Make inventory of 10.208.10.0/24 | ## <s>Make inventory of 10.208.10.0/24</s> | ||
## Make inventory of 10.208.11.0/24 | ## <s>Make inventory of 10.208.11.0/24</s> | ||
## Make inventory of 10.208.20.0/24 | ## <s>Make inventory of 10.208.20.0/24</s> | ||
## Make inventory of 10.208.30.0/24 | ## <s>Make inventory of 10.208.30.0/24</s> | ||
## Add 10.208.0.1/22 as an ip address on the gateway | ## <s> Add 10.208.0.1/22 as an ip address on the gateway</s> | ||
# Execution (for each server host) | # Execution (for each server host) | ||
## Find new ip address in correct segment | ## Find new ip address in correct segment | ||
Line 39: | Line 43: | ||
## Reconfigure clients that have a static ip to receive that from the new dhcp range & reconfigure the devices for dhcp | ## Reconfigure clients that have a static ip to receive that from the new dhcp range & reconfigure the devices for dhcp | ||
## Set the dhcp range to 10.208.2.1 .. 10.208.3.254 | ## Set the dhcp range to 10.208.2.1 .. 10.208.3.254 | ||
# Finalize configuration | |||
## Cleanup all traces of 10.208.10.0/24 | |||
## Cleanup all traces of 10.208.11.0/24 | |||
## Cleanup all traces of 10.208.20.0/24 | |||
## Cleanup all traces of 10.208.30.0/24 | |||
= 10.208.10.0/24 = | |||
Range is empty, yay | |||
= 10.208.11.0/24 = | |||
{| | |||
! style="text-align:left;"| IP | |||
! style="text-align:left;"| Host | |||
! style="text-align:left;"| Device type | |||
! style="text-align:left;"| New IP | |||
! style="text-align:left;"| Reconfigured? | |||
! style="text-align:left;"| Notes | |||
|- | |||
|10.208.11.1 | |||
|gw.vm.nurd.space | |||
|network | |||
|10.208.0.1 | |||
| | |||
| | |||
|- | |||
|10.208.11.2 | |||
|wekan.vm.nurd.space | |||
|server | |||
|10.208.1.1 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.4 | |||
|auth.vm.nurd.space | |||
|server | |||
|10.208.1.2 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.6 | |||
|revproxy01.vm.nurd.space | |||
|server | |||
|10.208.1.3 | |||
|Yes | |||
|Old machine, take special care | |||
|- | |||
|10.208.11.7 | |||
|gitea.vm.nurd.space | |||
|server | |||
|10.208.1.4 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.8 | |||
|docker.vm.nurd.space | |||
|server | |||
|10.208.1.5 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.10 | |||
|parts.vm.nurd.space | |||
|server | |||
|10.208.1.6 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.11 | |||
|soundfx.vm.nurd.space | |||
|server | |||
|10.208.1.7 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.13 | |||
|asterisk.vm.nurd.space | |||
|server | |||
|10.208.1.8 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.26 | |||
|portal.vm.nurd.space | |||
|server | |||
|10.208.1.9 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.30 | |||
|jarvis2.vm.nurd.space | |||
|server | |||
|10.208.1.10 | |||
|TODO: weird ip config | |||
|Forgotten migration project? | |||
|- | |||
|10.208.11.31 | |||
|influx.vm.nurd.space | |||
|server | |||
|10.208.1.11 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.32 | |||
|jarvis.vm.nurd.space | |||
|server | |||
|10.208.1.12 | |||
|TODO: weird ip config | |||
| | |||
|- | |||
|10.208.11.42 | |||
|ipam.vm.nurd.space. | |||
|server | |||
|10.208.1.13 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.111 | |||
|ldap-dev.vm.nurd.space | |||
|server | |||
|10.208.1.14 | |||
|Yes | |||
|still used?? | |||
|- | |||
|10.208.11.210 | |||
|postgresql.vm.nurd.space | |||
|server | |||
|10.208.1.15 | |||
|Yes | |||
| | |||
|- | |||
|10.208.11.250 | |||
|egg.vm.nurd.space | |||
|server | |||
|10.208.1.16 | |||
|Yes | |||
|NAT rules on gateway | |||
|} | |||
= 10.208.20.0/24 = | |||
Range is empty, yay | |||
= 10.208.30.0/24 = | |||
{| | |||
! style="text-align:left;"| IP | |||
! style="text-align:left;"| Host | |||
! style="text-align:left;"| Device type | |||
! style="text-align:left;"| New IP | |||
! style="text-align:left;"| Reconfigured? | |||
! style="text-align:left;"| Notes | |||
|- | |||
|10.208.30.1 | |||
|gateway.lan.nurd.space | |||
|network | |||
|10.208.0.1 | |||
| | |||
| | |||
|- | |||
|10.208.30.2 | |||
|core-sw.lan.nurd.space | |||
|network | |||
|10.208.0.2 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.3 | |||
|zaal1-sw.lan.nurd.space | |||
|network | |||
|10.208.0.3 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.4 | |||
|slabpi.lan.nurd.space | |||
|server | |||
|10.208.1.17 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.6 | |||
|backup.vm.nurd.space | |||
|server | |||
|10.208.1.18 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.7 | |||
|sdr.vm.nurd.space | |||
|server | |||
|10.208.1.19 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.10 | |||
|ticktack.lan.nurd.space | |||
|server | |||
|10.208.1.20 | |||
| | |||
|- | |||
|10.208.30.11 | |||
|librenms.vm.nurd.space | |||
|server | |||
|10.208.1.21 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.18 | |||
|webmpd.vm.nurd.space | |||
|server | |||
| | |||
| | |||
|removed | |||
|- | |||
|10.208.30.19 | |||
|spacesound.vm.nurd.space | |||
|server | |||
|10.208.1.23 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.21 | |||
|zaal1-ap.lan.nurd.space | |||
|network | |||
|10.208.0.3 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.24 | |||
|gpu.vm.nurd.space | |||
|server | |||
|10.208.1.24 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.40 | |||
|mongodb.vm.nurd.space | |||
|server | |||
|10.208.1.25 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.60 | |||
|harmony.lan.nurd.space | |||
|server | |||
|10.208.1.26 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.66 | |||
|nurdwiki-migration.lan.nurd.space | |||
|server | |||
| | |||
|will not be migrated | |||
|- | |||
|10.208.30.67 | |||
|harkbot.vm.nurd.space | |||
|server | |||
|10.208.1.27 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.68 | |||
|ticker-proxy.vm.nurd.space | |||
|server | |||
|10.208.1.28 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.70 | |||
|erratic.lan.nurd.space | |||
|server | |||
|10.208.1.29 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.71 | |||
|erratic-bmc.lan.nurd.space | |||
|server | |||
|10.208.1.30 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.100 | |||
|xmpp.vm.nurd.space | |||
|server | |||
|10.208.1.31 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.101 | |||
|monitor.vm.nurd.space | |||
|server | |||
|10.208.1.32 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.110 | |||
|ipfixer.lan.nurd.space | |||
|server | |||
|10.208.1.33 | |||
| | |||
|- | |||
|10.208.30.111 | |||
|iptv-server.lan.nurd.space | |||
|server | |||
|10.208.1.34 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.150 | |||
|pdu01.lan.nurd.space | |||
|server | |||
|10.208.1.47 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.152 | |||
|epc2.lan.nurd.space | |||
|server | |||
|10.208.1.44 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.153 | |||
|epc3.lan.nurd.space | |||
|server | |||
|10.208.1.45 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.154 | |||
|epc4.lan.nurd.space | |||
|server | |||
|10.208.1.46 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.188 | |||
|minecraft.vm.nurd.space | |||
|server | |||
|10.208.1.39 | |||
|Yes | |||
| | |||
|- | |||
|10.208.30.222 | |||
|lora-gateway.lan.nurd.space | |||
|server | |||
|10.208.1.40 | |||
| | |||
|- | |||
|10.208.30.254 | |||
|nurdservices.lan.nurd.space | |||
|server | |||
|10.208.1.42, 10.208.1.53 | |||
|Yes | |||
|Maybe use this alias for DNS? | |||
|} | |||
= Reconfiguring a server = | |||
== Modify the network configuration == | |||
=== /etc/network/interfaces === | |||
vi /etc/network/interfaces | |||
Modify the contents to the following: | |||
address <new ip address>/22 | |||
gateway 10.208.0.1 | |||
post-up ip addr add <old ip address>/24 dev eth0 | |||
=== NetworkManager === | |||
nmcl connection edit <interface> | |||
set ipv4.addresses <new ip address>/22 | |||
set ipv4.gateway 10.208.0.1 | |||
save persistent | |||
=== Netplan === | |||
vi /etc/netplan/00-installer-config.yaml | |||
* Add new ip address under network.ethernets.<network card>.addresses | |||
* Change the default route to point to 10.208.0.1 | |||
== Apply the configuration without rebooting == | |||
Login to the server via gateway.lan.nurd.space (you need to be in a directly attached subnet for the server for this step) | |||
ip addr add <new ip address>/22 dev <network card> && ip route delete default && ip route add default via 10.208.0.1 |
Latest revision as of 15:51, 28 April 2023
Introduction
We need to renumber the network to reduce the latency spikes we see every now and then. The working theory is that, during network load, and because of the roundtrips on traffic between different subnets, and based on the drops in all gateway graphs in icinga, that the cpu of the edgerouter is occasionally at its limits, causing packetloss and high-latency.
To fix this, the network will be renumbered into a single subnet. This should be done in a least disruptive manner as possible
New numberplan
Subnet: 10.208.0.0/22 Netmask: 255.255.252.0
Segment | Purpose |
---|---|
10.208.0.[1..255] | network devices |
10.208.1.[0..255] | servers |
10.208.[23].[0..254] | clients / dhcp |
Gateway: 10.208.0.1
DNS: 10.208.1.53
Renumbering procedure
This is only for servers; Everything in the dhcp range will be managed by changing the dhcp start/end addresses. Note that we will need to check if devices in the dhcp range are configured with a static ip and if so, we need to reconfigure them to dhcp and fix their ip address in dhcp.
- Preparation
Make inventory of 10.208.10.0/24Make inventory of 10.208.11.0/24Make inventory of 10.208.20.0/24Make inventory of 10.208.30.0/24Add 10.208.0.1/22 as an ip address on the gateway
- Execution (for each server host)
- Find new ip address in correct segment
- Configure new ip address as a primary ip
- Configure the old ip as a secondary ip
- Reconfigure DNS
- Migration of servers (this is done on a host-by-host basis)
- Watch for incoming traffic on the old ip address
- Find out which device is connected to the source ip's
- Reconfigure these devices to connect to the new ip (preferrably via dns)
- Repeat until no traffic arrives on old ip address
- Remove old ip address from server
- Migration of clients
- Reconfigure clients that have a static ip to receive that from the new dhcp range & reconfigure the devices for dhcp
- Set the dhcp range to 10.208.2.1 .. 10.208.3.254
- Finalize configuration
- Cleanup all traces of 10.208.10.0/24
- Cleanup all traces of 10.208.11.0/24
- Cleanup all traces of 10.208.20.0/24
- Cleanup all traces of 10.208.30.0/24
10.208.10.0/24
Range is empty, yay
10.208.11.0/24
IP | Host | Device type | New IP | Reconfigured? | Notes |
---|---|---|---|---|---|
10.208.11.1 | gw.vm.nurd.space | network | 10.208.0.1 | ||
10.208.11.2 | wekan.vm.nurd.space | server | 10.208.1.1 | Yes | |
10.208.11.4 | auth.vm.nurd.space | server | 10.208.1.2 | Yes | |
10.208.11.6 | revproxy01.vm.nurd.space | server | 10.208.1.3 | Yes | Old machine, take special care |
10.208.11.7 | gitea.vm.nurd.space | server | 10.208.1.4 | Yes | |
10.208.11.8 | docker.vm.nurd.space | server | 10.208.1.5 | Yes | |
10.208.11.10 | parts.vm.nurd.space | server | 10.208.1.6 | Yes | |
10.208.11.11 | soundfx.vm.nurd.space | server | 10.208.1.7 | Yes | |
10.208.11.13 | asterisk.vm.nurd.space | server | 10.208.1.8 | Yes | |
10.208.11.26 | portal.vm.nurd.space | server | 10.208.1.9 | Yes | |
10.208.11.30 | jarvis2.vm.nurd.space | server | 10.208.1.10 | TODO: weird ip config | Forgotten migration project? |
10.208.11.31 | influx.vm.nurd.space | server | 10.208.1.11 | Yes | |
10.208.11.32 | jarvis.vm.nurd.space | server | 10.208.1.12 | TODO: weird ip config | |
10.208.11.42 | ipam.vm.nurd.space. | server | 10.208.1.13 | Yes | |
10.208.11.111 | ldap-dev.vm.nurd.space | server | 10.208.1.14 | Yes | still used?? |
10.208.11.210 | postgresql.vm.nurd.space | server | 10.208.1.15 | Yes | |
10.208.11.250 | egg.vm.nurd.space | server | 10.208.1.16 | Yes | NAT rules on gateway |
10.208.20.0/24
Range is empty, yay
10.208.30.0/24
IP | Host | Device type | New IP | Reconfigured? | Notes |
---|---|---|---|---|---|
10.208.30.1 | gateway.lan.nurd.space | network | 10.208.0.1 | ||
10.208.30.2 | core-sw.lan.nurd.space | network | 10.208.0.2 | Yes | |
10.208.30.3 | zaal1-sw.lan.nurd.space | network | 10.208.0.3 | Yes | |
10.208.30.4 | slabpi.lan.nurd.space | server | 10.208.1.17 | Yes | |
10.208.30.6 | backup.vm.nurd.space | server | 10.208.1.18 | Yes | |
10.208.30.7 | sdr.vm.nurd.space | server | 10.208.1.19 | Yes | |
10.208.30.10 | ticktack.lan.nurd.space | server | 10.208.1.20 | ||
10.208.30.11 | librenms.vm.nurd.space | server | 10.208.1.21 | Yes | |
10.208.30.18 | webmpd.vm.nurd.space | server | removed | ||
10.208.30.19 | spacesound.vm.nurd.space | server | 10.208.1.23 | Yes | |
10.208.30.21 | zaal1-ap.lan.nurd.space | network | 10.208.0.3 | Yes | |
10.208.30.24 | gpu.vm.nurd.space | server | 10.208.1.24 | Yes | |
10.208.30.40 | mongodb.vm.nurd.space | server | 10.208.1.25 | Yes | |
10.208.30.60 | harmony.lan.nurd.space | server | 10.208.1.26 | Yes | |
10.208.30.66 | nurdwiki-migration.lan.nurd.space | server | will not be migrated | ||
10.208.30.67 | harkbot.vm.nurd.space | server | 10.208.1.27 | Yes | |
10.208.30.68 | ticker-proxy.vm.nurd.space | server | 10.208.1.28 | Yes | |
10.208.30.70 | erratic.lan.nurd.space | server | 10.208.1.29 | Yes | |
10.208.30.71 | erratic-bmc.lan.nurd.space | server | 10.208.1.30 | Yes | |
10.208.30.100 | xmpp.vm.nurd.space | server | 10.208.1.31 | Yes | |
10.208.30.101 | monitor.vm.nurd.space | server | 10.208.1.32 | Yes | |
10.208.30.110 | ipfixer.lan.nurd.space | server | 10.208.1.33 | ||
10.208.30.111 | iptv-server.lan.nurd.space | server | 10.208.1.34 | Yes | |
10.208.30.150 | pdu01.lan.nurd.space | server | 10.208.1.47 | Yes | |
10.208.30.152 | epc2.lan.nurd.space | server | 10.208.1.44 | Yes | |
10.208.30.153 | epc3.lan.nurd.space | server | 10.208.1.45 | Yes | |
10.208.30.154 | epc4.lan.nurd.space | server | 10.208.1.46 | Yes | |
10.208.30.188 | minecraft.vm.nurd.space | server | 10.208.1.39 | Yes | |
10.208.30.222 | lora-gateway.lan.nurd.space | server | 10.208.1.40 | ||
10.208.30.254 | nurdservices.lan.nurd.space | server | 10.208.1.42, 10.208.1.53 | Yes | Maybe use this alias for DNS? |
Reconfiguring a server
Modify the network configuration
/etc/network/interfaces
vi /etc/network/interfaces
Modify the contents to the following:
address <new ip address>/22 gateway 10.208.0.1 post-up ip addr add <old ip address>/24 dev eth0
NetworkManager
nmcl connection edit <interface> set ipv4.addresses <new ip address>/22 set ipv4.gateway 10.208.0.1 save persistent
Netplan
vi /etc/netplan/00-installer-config.yaml
- Add new ip address under network.ethernets.<network card>.addresses
- Change the default route to point to 10.208.0.1
Apply the configuration without rebooting
Login to the server via gateway.lan.nurd.space (you need to be in a directly attached subnet for the server for this step)
ip addr add <new ip address>/22 dev <network card> && ip route delete default && ip route add default via 10.208.0.1