New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Configure IP Range Ubuntu Server
agoldenberg
Member, Host Rep
in Help
Is there a way to configure an IP range of aliases similar to Centos ifcfg-eth0-range0 type model?
Is there any way to accomplish this without having to manually input each ip into interfaces?
Comments
As far as I know you have to manually input each IP in the interfaces file however this approach may be slightly faster:
@agoldenberg Or if You need to initiate the interfaces only for the current session via ifconfig, a bit bogus example:
Edit: Whoops sorry didn't read the whole thing, about the manual part, so my post is pretty much pointless, okay anyhow... as @fizzyjoe908 said.
PS: You could put the ifconfig in /etc/rc.local, and achieve the same thing.
Yeah I guess I'm just going to configure them 1 by 1. It's too bad ubuntu doesn't have a way of configuring a range simply.
I think that you should write script for this.
It's not "manual", but it is just as bad.
Ip addr add dev eth0 1.2.3.0/24
You realize with the ip command, /24 refers to the appropriate netmask, not the range of address's to add, right?
Works for us, note the .0 part