Bridge network creation in XEN

Bridging is a technique used for connecting different network segments. Bridged networks used to  connects all the virtual machines to the outside world through virtual network interfaces connected to the bridges created by Xen.

When using bridged networking, Xen creates a network bridge and then connects the actual physical network interface to this bridge

These are the lines needed for bridged networking.

1    (network-script network-bridge)
2    (vif-script vif-bridge)
3    # (network-script network-route)
4    # (vif-script vif-route)
5    # (network-script network-nat)
6    # (vif-script vif-nat)


Note : Network script network-bridge is in the directory /etc/xen/scripts

Steps to create network-bridge in XEN :

1. Execute the /etc/xen/scripts/network-bridge script in /etc/xen/xend-config.sxp

2. This will create a new network bridge called xenbr0.

3. Copy the MAC address and IP address from the physical network
interface eth0.

4. Stop the physical network interface eth0.

5. Create a new pair of connected virtual ethernet interfaces—veth0 and vif0.0.

6. Assign the previously copied MAC address and IP address to the virtual  interface   veth0.

7. Rename the physical network interface to peth0 from eth0.

8. Rename the virtual network interface veth0 to eth0.

9. Attach peth0 and vif0.0 to the bridge xenbr0.

10. Bring up the bridge xenbr0, and the network interfaces peth0, eth0, and vif0.0.



0 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks