Re: Centos 6.2 / KVM troubles with network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dnia 2012-01-14, sob o godzinie 15:08 +0100, Dennis Jacobfeuerborn pisze:
On 01/14/2012 02:59 PM, Radek Bursztynowski wrote:
> Hi,
>
> I have installed CentOS 6.2 x86_64 and KVM/Qemu and I have some troubles
> with network.
>
> The first case:
> -----------------
>
> The configuration is:
> - CentOS 6.2 (hardware machine) has one Ethernet interface with static IP
> address (eth0).
> - Virtual machine has bridge network interface with eth0 interface on
> CentOS 6.2. This bridge is created using wizard integrated with virt-manager.
> - Bridge interface on virtual machine receives IP addres from DHCP server.
> IP address is received well.
> - All firewalls and SELinux are closed.
>
> Virtual machine has no any connection with CentOS 6.2 hardware machine, and
> CentOS 6.2 has no any connection with virtual machine. But every others
> machines have all connection with both virtual and CentOS 6.2 machine.
>
> The question: Why?
>
> The second case:
> ----------------------
>
> The configuration is:
> - On CentOS 6.2 (hardware machine) I created bridhe (br0) with eth0
> hardware interface. Two situations:
> + I force two different IP addresses for eth0 and br0 interfaces - there no
> any connection with this server. So I don't test this case.
> + I forced one IP addres for both eth0 and br0 interfaces. ifconfig shows
> that eth0 has no IP address, br0 has IP address. So, I test this case.
> - I use Red Hat documentation:
> http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/Virtualization/index.html#sect-Virtualization-Network_Configuration-Bridged_networking_with_libvirt)
> - On virtual machine I created bridge connection with br0 interface on
> CentOS 6.2.
> - All machines have all connections.
> - All firewalls and SELinux are closed.
>
> NFS server on CentOS 6.2 (hardware machine) doesn't serve exported file system.
>
> The questions:
> 1. Is it proper that eth0 has no IP addres and bridge (br0) interface has?
> 2. What about my NFS? NFS server worked well before starting virtualization.
>
> Who can me help with my troubles?

You say you create bridge interfaces in your virtual machines. Why? Usually 
you don't do that you create a bridge only on the host.

You also say you "forced" one IP address for both eth0 and br0. There is no 
need to force anything. eth0 shouldn't have an IP but br0 should have this 
IP instead.

Regards,
   Dennis
_______________________________________________
Dennis,

Thanks for interesting. Few words explanation.
I have one network segment, and I try to joint virtual machines to this segment. So my hardvare machine has 192.168.0.1 address, gateway is 192.168.0.254, netmask = 255.255.255.0.

Regarding bridge on my virtual machine. When I started virtualization I had NAT only in another network segment. So, I look for solution adding virtual machines to my base network segment. Previously I used VMware Server, and it was proper solution.

Regarding my force one IP addres for both interface. I used this solution because eth0 has no any IP addres and I couldn't find CentOS 6.2 server in the network. Using exactly Red Hat configuration I have:

# more ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.0.1
NETMASK=255.255.255.0
PREFIX=24
GATEWAY=192.168.0.254
DNS1=192.168.0.199
DNS2=194.204.159.1
DNS3=194.204.152.34
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
_ONBOOT_=yes
BRIDGE=br0
MTU=9000
DOMAIN=bursztynowski.waw.pl
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03

# more ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
#IPADDR=192.168.0.1
#NETMASK=255.255.255.0
#PREFIX=24
#GATEWAY=192.168.0.254
#DNS1=192.168.0.199
#DNS2=194.204.159.1
#DNS3=194.204.152.34
_ONBOOT_=yes
DELAY=0

(previous configuration br0 was:
BOOTPRO=static
and with no '#' characters. Then all worked excluding NFS.


# ifconfig                           
br0       Link encap:Ethernet  HWaddr 00:50:8D:94:2F:B7           
          inet addr:192.168.0.92  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::250:8dff:fe94:2fb7/64 Scope:Link            
          UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1            
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0           
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0         
          collisions:0 txqueuelen:0                                     
          RX bytes:3034 (2.9 KiB)  TX bytes:4313 (4.2 KiB)              

eth0      Link encap:Ethernet  HWaddr 00:50:8D:94:2F:B7 
          inet6 addr: fe80::250:8dff:fe94:2fb7/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:9000  Metric:1
          RX packets:57255 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21481457 (20.4 MiB)  TX bytes:15768417 (15.0 MiB)
          Interrupt:23 Base address:0x8000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:30723 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30723 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:92725098 (88.4 MiB)  TX bytes:92725098 (88.4 MiB)

Should I replace static and dhcp addresses between eth0 and br0 interface?

Regards,
Radek






_______________________________________________
CentOS-virt mailing list
CentOS-virt@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos-virt

[Index of Archives]     [CentOS Users]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Linux USB]

  Powered by Linux