LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 06-22-2013, 03:09 PM   #1
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Rep: Reputation: Disabled
Lightbulb Fedora KVM Guest IPV6 / Ideas


Hello everyone,

I just want to have your suggestions between kvm host and guest connections. First of all I want to explain what I need to do;

I have Fedora 18 running on my server. I use static IPV4 and IPV6 addreses for my host. I will setup 4 virtual guest to run few roles and I want to set static (specific) IPV6 addresses for my guest systems. I need to reach these guests from outside of my network using IPV6 addreses only. I've read too many things about NAT and bridge network but I'm really confused now. I used to have Virtualbox and Vmware on my personal machine and it was really easy to connect them to my pyhsical network. That's what I need to do now with KVM.

1.What kind of networking would you use if you need to have a setup like that?

2.Can I use bridge even if I have just 1 network card on my host for all my guest systems?

Regards..
 
Old 06-22-2013, 04:41 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,956

Rep: Reputation: Disabled
This sounds like a perfect candidate for bridging.

Even though you only have 1 physical NIC, each VM will have a virtual NIC. By creating a bridge and connecting the physical NIC and the virtual NICs to that bridge, the VMs will all be connected to the same physical network as the hypervisor.

VirtualBox/VMware/Hyper-V would also use bridging in a setup like this, btw.
 
1 members found this post helpful.
Old 06-22-2013, 11:14 PM   #3
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
This sounds like a perfect candidate for bridging.

Even though you only have 1 physical NIC, each VM will have a virtual NIC. By creating a bridge and connecting the physical NIC and the virtual NICs to that bridge, the VMs will all be connected to the same physical network as the hypervisor.

VirtualBox/VMware/Hyper-V would also use bridging in a setup like this, btw.
Thank you Ser Olmy,

I've created bridges before but not in Fedora.
One question; each VM will have a virtual NIC ok but how will I assign them my IPV6 static addreses?
 
Old 06-22-2013, 11:32 PM   #4
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
Basically I have this setup below for a regular bridge;

Quote:
DEVICE=br0
TYPE=Bridge
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
DELAY=0
Quote:
DEVICE=eth0
TYPE=Ethernet
HWADDR=AA:BB:CC: DD:EE:FF
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=br0
I will replace the IPs with IPV6 and then I think it should be working.
What about if I want to create 2 or more bridges? I don't know how to configure that.
Should I just add lines like BRIDGE=br1 , BRIDGE=br2 for the eth0 device config?

Last edited by deepsecurity; 06-22-2013 at 11:54 PM.
 
Old 06-23-2013, 05:25 AM   #5
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,956

Rep: Reputation: Disabled
Quote:
Originally Posted by deepsecurity View Post
One question; each VM will have a virtual NIC ok but how will I assign them my IPV6 static addreses?
You simply configure the virtual NIC using the OS running in the VM.

Quote:
Originally Posted by deepsecurity View Post
What about if I want to create 2 or more bridges? I don't know how to configure that.
Should I just add lines like BRIDGE=br1 , BRIDGE=br2 for the eth0 device config?
You can create as many bridge interfaces as you like, but in this setup only one is needed. Any number of VMs can have their virtual NICs bridged to the same bridge interface.
 
1 members found this post helpful.
Old 06-23-2013, 06:45 AM   #6
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
The only thing I don't understand is that if I create one bridge and set a static IPV6 address to it, can I still assign another static IPV6 addresses to the VMs?
So let say that I use 2a01:2e7:100:1082::2 for the bridge and 2a01:2e7:100:1082::3, ::4, ::5 for the VMs. Is it possible to do this with a setup like you wrote me before?
Is it that simple?

I really appreciate your helps.

Regards.
 
Old 06-23-2013, 07:11 AM   #7
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,956

Rep: Reputation: Disabled
Quote:
Originally Posted by deepsecurity View Post
The only thing I don't understand is that if I create one bridge and set a static IPV6 address to it, can I still assign another static IPV6 addresses to the VMs?
So let say that I use 2a01:2e7:100:1082::2 for the bridge and 2a01:2e7:100:1082::3, ::4, ::5 for the VMs. Is it possible to do this with a setup like you wrote me before?
Is it that simple?
Yes, it is actually that simple.

An IPv4/IPv6 address assigned to the bridge interface replaces the address normally assigned to the physical NIC. It's more or less standard practice to leave the physical NIC (say, eth0) unconfigured and assign any addresses to the bridge interface instead, but you could actually do it the other way around as well.
 
1 members found this post helpful.
Old 06-26-2013, 01:08 PM   #8
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
I got it now thanks a lot

There is one last thing; you wrote me that I can leave eth0 unconfigured and give IPs to the VMs.
How will I reach my host in this case? What will happen if one of my VMs goes down?
Will I need another physical NIC in this case to configure my host's IP? Because my host will be in another country, I need to reach it somehow in case of anything goes wrong. What is the best practice for this situation?
 
Old 06-26-2013, 03:04 PM   #9
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 836

Rep: Reputation: 91
On the host you set the IP on the bridge, not the underlying eth. Or have a separate, unbridged NIC for management.
 
Old 06-26-2013, 11:48 PM   #10
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
Of course, it's clear thanks
I will try this today and post the results.
 
Old 06-28-2013, 08:29 AM   #11
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hello,

I've tried bridge networking last night and everything worked fine. But the problem is my Guest (VM) cannot access to internet.
I can ping to my guest using IPV6 addresses from host. I can also ping my host using IPV6 from outside.

Here is my configuration below;

My Host:
Quote:
DEVICE=br0
TYPE=Bridge
IPADDR=182.40.35.190
NETMASK=255.255.255.0
GATEWAY=182.40.35.182
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
DELAY=0
IPV6INIT=yes
IPV6ADDR=2a11:5a4:120:1148::2
Quote:
DEVICE=eth0
TYPE=Ethernet
HWADDR=AA:BB:CC: DD:EE:FF
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=br0
My Guest:
Quote:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPV6INIT=yes
IPV6ADDR=2a11:5a4:120:1148::10
IPV6_DEFAULTGW=2a11:5a4:120:1148::2
NM_CONTROLLED=no
DELAY=0
What did I miss?
 
Old 06-28-2013, 12:08 PM   #12
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 836

Rep: Reputation: 91
IPV6_DEFAULTGW=2a11:5a4:120:1148::2


this is not the gateway, it's just the host. What does the rest of the network use for the gateway?
 
Old 06-28-2013, 12:17 PM   #13
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
I have this setup under /etc/sysconfig/network on the host.

Quote:
NETWORKING=yes
GATEWAY=182.40.35.182
NETWORKING_IPV6=yes
IPV6_DEFAULTGW=fe80::1
IPV6_DEFAULTDEV=br0
Actually I've tried 2a11:5a4:120:1148::1 as the gateway first but didn't work.
 
Old 06-28-2013, 12:28 PM   #14
deepsecurity
LQ Newbie
 
Registered: Jun 2013
Distribution: RHEL, Fedora
Posts: 13

Original Poster
Rep: Reputation: Disabled
I believe that I have problem here:
when I type virsh net-edit default
here is the output:

Quote:
<network>
<name>default</name>
<uuid>a6d16b7d-1b81-4fa9-a996-59b73b1516d7</uuid>
<forward mode='nat'/>
<bridge name='br0' stp='on' delay='0' />
<mac address='52:54:00:B0:50:F4'/>
<ip address='192.168.122.1' netmask='255.255.255.0'></ip>
</network>
This is the default config. I've remove the ip and tried to change forward mode to bridge or routed but no luck.
What is the correct config in this file?
 
Old 06-29-2013, 12:18 AM   #15
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 836

Rep: Reputation: 91
if you are using a bridge, the default NAT network is irrelevant
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] qemu kvm fedora guest installation problems Grub3r Linux - Virtualization and Cloud 1 01-25-2013 04:45 PM
fedora 16 error setting up centos kvm guest bluerfoot Linux - Virtualization and Cloud 1 01-28-2012 10:45 PM
LXer: Set up Spicevmc Channel on Ubuntu 11.04 as KVM Server and spice-vdagent as a KVM guest LXer Syndicated Linux News 0 06-15-2011 07:10 PM
KVM with Ubuntu guest - guest crashes when some apps are 'full screened' TonyRogers Linux - Virtualization and Cloud 0 05-15-2011 12:18 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM


All times are GMT -5. The time now is 08:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration