LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2016, 09:19 AM   #1
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Rep: Reputation: Disabled
Route bulk IPv4 to KVM VM


Hey folks,

I'm using SolusVM for creating and administrating VMs. Unfortunately there's no option to assign bulk IPs in one shot to VMs, whether OVZ or KVM platform. You literally have to add single IPs one at a time, from a drop down menu.
I searched around and apparently there's a possible way to add bulk IPs to a KVM VM, but not 100% sure how to go about this. I would appreciate a simplified explanation on how I can do this.

I tried one tutorial and have it somewhat halfway through.

Example, KVM Node: Assigned a single /24
5 KVM VMs created. I want to add a /26 in one shot to one of the VMs. How? I'm running Centos 6.8 64bit on the NODE.

/etc/sysconfig/network
Code:
NETWORKING=yes
HOSTNAME=server.domain.net
GATEWAY=br1
/etc/sysconfig/network-scripts/ifcfg-eth0
Code:
DEVICE=eth0
ONBOOT=yes
BRIDGE=br0
HWADDR=b8:ac:6f:65:31:e5
/etc/sysconfig/network-scripts/ifcfg-br0
Code:
DEVICE=br0 TYPE=Bridge
BOOTPROTO=static 
ONBOOT=yes 
IPADDR=xxx.xxx.22.70 
NETMASK=255.255.255.0 
DELAY=0
 
Old 10-05-2016, 11:15 AM   #2
jnihil
Member
 
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
You could use the virt-edit command at the hostOS to edit the IPADDR line for earch VM using bash/sed in a loop.
That's what I used to do before learning how to use Ansible.
 
Old 10-05-2016, 12:10 PM   #3
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Original Poster
Rep: Reputation: Disabled
Could you please explain? Commands to run?
 
Old 10-06-2016, 12:17 PM   #4
jnihil
Member
 
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
virt-edit command in a for loop does the trick.
 
Old 10-06-2016, 12:20 PM   #5
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Original Poster
Rep: Reputation: Disabled
Honestly, I have no idea what you're saying. I know CLI just fine, but you're not being clear on the actual command.
 
Old 10-10-2016, 07:48 AM   #6
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Original Poster
Rep: Reputation: Disabled
Would appreciate help on this.
 
Old 10-13-2016, 05:04 PM   #7
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Original Poster
Rep: Reputation: Disabled
Anyone please?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
network service restart disables ipv4 forwarding, using kvm procfs Linux - Newbie 1 06-03-2016 01:52 PM
In tspc ipv6 tunnelling, does tunnel broker required for ipv4 to ipv4 communication? nyk.mat Linux - Newbie 2 08-13-2013 10:48 PM
no route to host on certain ports, kvm bridged guest el_tedward Linux - Networking 4 05-21-2012 02:11 AM
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0 (CentOS 5.5) troiwulful Red Hat 3 11-22-2010 12:04 PM
SYSCTL errors on net.ipv4.route.flush with unknown error 1 Electro Linux - Networking 1 08-01-2005 01:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration