I am having issues configuring three blocks on my system. I used to add the addresses of each block manually, but I discovered that I can add the entire block using the command "ip route add local". When I tried this, it initially worked, but when I attempted to configure the last block, it stopped working. Now, when I try to restart the service, the interface fails to start and the block does not respond to pings or allow connections when using the interface, even after rebooting.
Solutions attempted:
ip addr flush enp1s0f0
- This disconnects my SSH connection.ip addr flush enp1s0f0 && ifup enp1s0f0; echo done && sleep 20 && reboot
- This just cuts my connection and reboots the system, indicating that the "ifup" command still did not work.
Interfaces file:
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp1s0f0
auto enp1s0f0
iface enp1s0f0 inet static
address 84.x.x.74/29
gateway 84.x.x.73
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
auto enp1s0f0:0
iface enp1s0f0:0 inet static
address 45.x.x.2/22
gateway 45.x.x.1
auto enp1s0f0:1
iface enp1s0f0:1 inet static
address 196.x.x.2/24
gateway 196.x.x.1
auto enp1s0f0:2
iface enp1s0f0:2 inet static
address 196.x.x.2/24
gateway 196.x.x.1
The interfaces ":1" and ":2" refer to two different IP blocks, such as "196.12.12.1" and "196.13.13.1". Can you please provide guidance on how to address the issue with configuring these blocks?
gateway
line ? also apparently/etc/network/interfaces.d/*
does not support multiple gateways