5.3. Bridge the physical network
The procedure below enables you to bridge your virtual network to the physical network to enable connectivity to and from virtual instances. In this procedure, the example physical
eth0 interface is mapped to the br-ex bridge; the virtual bridge acts as the intermediary between the physical network and any virtual networks. As a result, all traffic traversing eth0 uses the configured Open vSwitch to reach instances.
- Map a physical NIC to the virtual Open vSwitch bridge:
#vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0 TYPE=OVSPort DEVICETYPE=ovs OVS_BRIDGE=br-ex ONBOOT=yes - Configure the virtual bridge with the IP address details that were previously allocated to eth0:
#vi /etc/sysconfig/network-scripts/ifcfg-br-exDEVICE=br-ex DEVICETYPE=ovs TYPE=OVSBridge BOOTPROTO=static IPADDR=192.168.120.10 NETMASK=255.255.255.0 GATEWAY=192.168.120.1 DNS1=192.168.120.1 ONBOOT=yesWhereIPADDR,NETMASKGATEWAY, andDNS1(name server) must be updated to match your network.
You can now assign floating IP addresses to instances and make them available to the physical network.