LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Stuck! How do I route a 20 x /24 subnets in Ubuntu 14? (https://www.linuxquestions.org/questions/linux-networking-3/stuck-how-do-i-route-a-20-x-24-subnets-in-ubuntu-14-a-4175594102/)

Bashed 11-23-2016 06:40 AM

Stuck! How do I route a 20 x /24 subnets in Ubuntu 14?
 
Trying to bind 20 x /24 subnets in Ubuntu 14 Server (for proxy/VPN) but I'm stuck here. These are diversified /24 subnets.

I tried the below method via script called addips.sh

Code:

for i in $(seq 3 254); do echo "auto em1:$i
iface em1:$i inet static
address xxx.xxx.16.$i                                                                             
netmask 255.255.255.0                                                                     
" >> virthosts; done

But, I noticed that this happened now:

Each /24 subnet it outputted started off at #1 again instead of 255, 256, 257, etc all the way through consecutively for all 20 x /24 subnets

Code:

auto em1:1
auto em1:254

Then again...

auto em1:1
...

How can I properly change this so it does reset at #1? em1 is the NIC Ethernet port (primary) and only port used too.

I also want to make sure these are permanent, they stick after a server reboot.

Habitual 11-23-2016 07:36 AM

Is this not a dupe of https://www.linuxquestions.org/quest...-a-4175594033/ ?

C'mon


All times are GMT -5. The time now is 12:16 AM.