Virtual Machine kvm Internet Connection on centOS server

Discussion in 'Linux Networking' started by tros, Jul 3, 2014.

  1. tros

    tros New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    We have the following scenario:

    - switch 48 ports (level 3) configured with two vlans
    - centOS server configured with 3 network cards, so we have 3 different interfaces.

    One of this interfaces (eth1) is directly connected to the router so we have internet connection. The other interface (eth0) is connected to a switch on one vlan. The last interface (eth2) is connected to the switch on the second vlan.

    Each interface has at least 2 virtual machines.
    We wanted internet connection on the virtual machines so we created a bridge between interfaces eth0 and eth2 to eth1 both (internet).

    All the connections are made property but just the virtual machine on eth2 doesn't have internet connection and I don't know why ...

    We supposed that the switch configuration is right. I think there is something missing on the centOS configuration, some file... but I can't see ...

    I show here the different configuration files:

    Interfaces:

    eth0

    DEVICE=eth0
    HWADDR=ff:ff:ff:ff:ff:ff
    ONBOOT=yes
    IPADDR="192.168.1.2"
    NETWORK="192.168.1.0"
    PREFIX=24
    NETMASK="255.255.255.0"
    BRIDGE=bred1
    NM_CONTROLLED=no


    eth2


    DEVICE=eth2
    HWADDR=ff:ff:ff:ff:ff:ff
    ONBOOT=yes
    IPADDR="192.168.2.2"
    NETWORK="192.168.2.0"
    PREFIX=24
    NETMASK="255.255.255.0"
    BRIDGE=bred2
    NM_CONTROLLED=no

    eth1

    DEVICE=eth1
    HWADDR=ff:ff:ff:ff:ff:ff
    BROADCAST=x.x.x.x
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=x.x.x.x
    NETMASK=255.255.255.0
    NETWORK=x.x.x.x
    GATEWAY=x.x.x.x
    DNS1=8.8.8.8
    DNS2=8.8.4.4
    TYPE=Ethernet
    DOMAIN="name.local"

    Bridges :
    Bred1:

    DEVICE=bred1
    TYPE=Bridge
    BOOTPROTO=static
    IPADDR="192.168.1.2"
    NETMASK="255.255.255.0"
    NETWORK="192.168.1.0"
    PREFIX=24
    ONBOOT=yes
    DELAY=0
    NM_CONTROLLED=no

    Bred2:

    DEVICE=bred2
    TYPE=Bridge
    BOOTPROTO=static
    IPADDR="192.168.2.2"
    NETMASK="255.255.255.0"
    NETWORK="192.168.2.0"
    PREFIX=24
    ONBOOT=yes
    DELAY=0
    NM_CONTROLLED=no


    Virtual Machines on eth0:
    allow-hotplug eth0
    interface eth inet static
    address: 192.168.1.3
    gw: 192.168.1.2
    netmask: 255.255.255.0
    network: 192.168.1.0
    broadcast: 192.168.1.255


    Virtual Machines on eth2:
    allow-hotplug eth0
    interface eth inet static
    address: 192.168.2.3
    gw: 192.168.2.2
    netmask: 255.255.255.0
    network: 192.168.2.0
    broadcast: 192.168.2.255


    Thanks a lot for your time. I appreciate it.

    T.
    Last edited: Jul 3, 2014

Share This Page