Every SolusVM node need to be configured with bridging, both external and internal interfaces. Here we have explained the steps to setup a dedicated network bridge for Linux virtualization.

Note:
The external network interface is eth0.
The external bridge will be "br0". 
The internal network interface is eth1.
The internal bridge will be" intbr0".

1. Make sure both interfaces are in working order before proceeding.

 - Ping any external host
# ping google.com
- Ping any internal host
# ping 10.0.28.15









2. Bridging requires the bridge-utils package to be installed on the server. To check whether it's installed, do the following :

 # rpm -q bridge-utils




If it's installed, you get an output. 
If it's not installed, you have to install it as :-

# yum install bridge-utils




3. Before setting up your bridge, backup all /etc/sysconfig/network-scripts/ifcfg-* files :-

# cd /etc/sysconfig/network-scripts
# cp -avi ifcfg-* /root/




4. Let's start with the external interface. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and modify the lines marked as :-

DEVICE=eth0
TYPE=Ethernet
UUID=e38b3e76-2900-4d57-ba6e-e758264685f3
ONBOOT=yes
NM_CONTROLLED=yes [change to No]
BOOTPROTO=static 
IPADDR=42.0.29.8     [remove]
NETMASK=255.255.255.0      [remove]
NETWORK=42.0.29.0      [remove]
BROADCAST=42.0.29.255       [remove]
GATEWAY=42.0.29.1      [remove]
HWADDR=00:E0:81:4F:7F:C0
DEFROUTE=yes        [remove]
PEERDNS=yes        [remove]
PEERROUTES=yes         [remove]
IPV4_FAILURE_FATAL=yes        [remove]
IPV6INIT=no         [remove]
NAME="System eth0"
BRIDGE=br0           [ Add "bro"]



























- The ifcfg-eth0 should look like this:- 

DEVICE=eth0
TYPE=Ethernet
UUID=e38b3e76-2900-4d57-ba6e-e758264685f3
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
HWADDR=00:E0:81:4F:7F:C0
NAME="System eth0"
BRIDGE=br0














5. Copy the external interface backup config to the new bridge config :-

# cd /etc/sysconfig/network-scripts
# cp -avi /root/ifcfg-eth0 ifcfg-br0
# vim ifcfg-br0






- Make the following changes :

DEVICE=eth0      [Change to br0]
TYPE=Ethernet        [Change to Bridge]
UUID=e38b3e76-2900-4d57-ba6e-e758264685f3         [Remove]
ONBOOT=yes
NM_CONTROLLED=yes       [Change to No]
BOOTPROTO=static
IPADDR=42.0.29.88
NETMASK=255.255.255.0
NETWORK=42.0.29.0
BROADCAST=42.0.29.255
GATEWAY=42.0.29.1
HWADDR=00:E0:81:4F:7F:C0         [Remove]
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"        [Change to "System br0"]

























- The ifcfg-br0 should look like this :-

DEVICE=br0
TYPE=Bridge
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=42.0.29.8
NETMASK=255.255.255.0
NETWORK=42.0.29.0
BROADCAST=42.0.29.255
GATEWAY=42.0.29.1
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System br0" 























6. Congratulations, your external bridge is now setup,  make sure the changes are correct and restart the networking for external interface.(If anything went wrong you can still SSH to the internal interface via some other internal node/server IP).

# screen
# /etc/init.d/network restart





- Wait for the network to come back up, and once it does, verify the external bridge is up and running :

# ifconfig -a | more



br0 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C0 
inet addr:42.0.29.8 Bcast:42.0.29.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:81ff:fe4f:7fc0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76570 errors:0 dropped:0 overruns:0 frame:0
TX packets:36461 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:4660724 (4.4 MiB) TX bytes:37458561 (35.7 MiB) 

eth0 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C0 
inet6 addr: fe80::2e0:81ff:fe4f:7fc0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159379 errors:0 dropped:0 overruns:0 frame:0
TX packets:100253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:119970302 (114.4 MiB) TX bytes:42329680 (40.3 MiB)
Interrupt:18 Memory:df200000-df220000
.....

- Do simple ping tests to confirm external bridge interface works OK.

# ping google.com




7. Next configure the internal interface. Edit /etc/sysconfig/network-scripts/ifcfg-eth1 and modify the lines marked as :- 

DEVICE=eth1
TYPE=Ethernet
UUID=c87b908f-33cc-4889-8a00-18f9ffe71db6
ONBOOT=yes
NM_CONTROLLED=yes     [Change to No]
BOOTPROTO=static
IPADDR=10.0.29.88           [Remove]
NETMASK=255.255.252.0           [Remove]
NETWORK=10.0.28.0            [Remove]
BROADCAST=10.0.31.255           [Remove]
HWADDR=00:E0:81:4F:7F:C1
DEFROUTE=yes           [Remove]
PEERDNS=yes           [Remove]
PEERROUTES=yes            [Remove]
IPV4_FAILURE_FATAL=yes            [Remove]
IPV6INIT=no
NAME="System eth1"
BRIDGE=intbr0          [Add]

























- In the end ifcfg-eth1 should look like this:-

 DEVICE=eth1
TYPE=Ethernet
UUID=c87b908f-33cc-4889-8a00-18f9ffe71db6
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
HWADDR=00:E0:81:4F:7F:C1
NAME="System eth1"
BRIDGE=intbr0














8. Copy the internal interface backup config to the new bridge config :-

# cd /etc/sysconfig/network-scripts
# cp -avi /root/ifcfg-eth1 ifcfg-intbr0
# vim ifcfg-intbr0







- Now make the following changes  :-

DEVICE=eth1       [Change to intbr0]
TYPE=Ethernet         [Change to Bridge]
UUID=c87b908f-33cc-4889-8a00-18f9ffe71db6           [Remove]
ONBOOT=yes
NM_CONTROLLED=yes        [Change to No]
BOOTPROTO=static
IPADDR=10.0.29.88
NETMASK=255.255.252.0
NETWORK=10.0.28.0
BROADCAST=10.0.31.255
HWADDR=00:E0:81:4F:7F:C1            [Remove]
DEFROUTE=yes            [Remove]
PEERDNS=yes           [Remove]
PEERROUTES=yes           [Remove]
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"      [Change to "System intbr0"]



























- Finally the ifcfg-intbr0 should look like this :-

DEVICE=intbr0
TYPE=Bridge
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.0.29.8
NETMASK=255.255.252.0
NETWORK=10.0.28.0
BROADCAST=10.0.31.255
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System intbr0"



















NOTE: Do NOT add any gateway / default router in internal interface/bridge config as this will confuse the OS and it won't route properly to the Internet.

9. Congratulations, your internal bridge is now setup, all that's left is to make sure the changes are correct and restart the networking again in a screen session.  

# screen
# /etc/init.d/network restart





- Let the network get restarted, and once it does, verify both external and internal bridges are up and running :

# ifconfig -a | more




br0 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C0 
inet addr:42.0.29.8 Bcast:42.0.29.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:81ff:fe4f:7fc0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76570 errors:0 dropped:0 overruns:0 frame:0
TX packets:36461 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:4660724 (4.4 MiB) TX bytes:37458561 (35.7 MiB) 

eth0 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C0 
inet6 addr: fe80::2e0:81ff:fe4f:7fc0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159379 errors:0 dropped:0 overruns:0 frame:0
TX packets:100253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:119970302 (114.4 MiB) TX bytes:42329680 (40.3 MiB)
Interrupt:18 Memory:df200000-df220000
.....

eth1 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C1 
inet6 addr: fe80::2e0:81ff:fe4f:7fc1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281858 errors:0 dropped:0 overruns:0 frame:0
TX packets:143664 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:403605525 (384.9 MiB) TX bytes:10431740 (9.9 MiB)
Interrupt:19 Memory:df220000-df240000

intbr0 Link encap:Ethernet HWaddr 00:E0:81:4F:7F:C1 
inet addr:10.0.29.8 Bcast:10.0.31.255 Mask:255.255.252.0
inet6 addr: fe80::2e0:81ff:fe4f:7fc1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281608 errors:0 dropped:0 overruns:0 frame:0
TX packets:143573 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:399564369 (381.0 MiB) TX bytes:10423726 (9.9 MiB)

- Do simple ping tests to confirm internal bridge interface works properly.

 # ping 10.0.28.15




10. Now, we need to add the bridge info into the SolusVM entry for this node.
- Log in to SolusVM.
- Go to Nodes, choose List Nodes.
- Look for the node entry row and click on the Edit icon to edit the node entry.
- Make sure the following fields are properly filled:-

IP Address: 42.0.29.8
Internal IP Address: 10.0.29.8
Network interface: eth0
KVM bridge: br0
Internal bridge check: checked










- Next, go back to Nodes, choose  List Nodes and click on the node entry.
- Click on "Internal Ipaddresses" menu item.
- Make sure the following fields are properly filled:-

(Under Network Settings)

Gateway: 42.0.29.1
Netmask: 255.255.252.0
Bridge: intbr0










IT'S DONE !!!

Was this answer helpful? 0 Users Found This Useful (9 Votes)