As much as I curse RHEL and CentOS shit, there are some things that are invented quite competently. For example, adding a large number of additional IPs is quite a pleasant task. In general, if I have to add a large number of addresses, I would write a bash script in which to perform the operation in question in a loop that it does not work by hand. При Centos/RHEL хората са го измислили доста приятно range файл. В общи линии създаваме файл /etc/sysconfig/network-scripts/ifcfg-eth0-range0. Here we replace eth0 with the name network adapter if it is not eth0. Then we add the following content

IPADDR_START=192.168.0.129
IPADDR_END=192.168.0.254
NETMASK=255.255.255.128
CLONENUM_START=0

as the arguments are

  • IPADDR_START – home IP address
  • IPADDR_END – final address
  • NETMASK – net mask
  • CLONENUM_START – numbering from which to start the network adapter eth0:0 in our case

 

Pffff I had never played with such big numbers for subnetting. I will not explain the process itself, there is enough written on the net, how the net mask calculates in which position they move 1 and 0 and from there it is already clear where the network part ends and the host part begins. I had a very interesting teasing task 2 /16-that (that is 255.255.0.0) or for the utterly unenlightened 2 x 65534 host address to split them into 2 region with several networks – единия с изисквания за 32к хоста, 16k host and 8k hosts which in turn had to be divided into more- 4 equals subnets. The second region had a requirement for 4k hosts, 2k host and 1k host, and again like the previous zone each network of 4 equal subnets 😆 In general I'm pretty good at subnetting but I've never played with networks on such a scale. There was a beautiful big calculation, but at least I gained experience with much larger sizes than dividing / 24-ki, which is done calmly in mind. Now all that is left is to scatter the networks on the devices to make the routations and networks to work 😀 hahaha. The diagram with my devices numbered above 30 as I stopped fighting them – beauty 😎