giovedì 4 aprile 2013

Oracle Linux: NIC bonding

NIC bonding allow the use of multiple NICs for increased network performance or availability. Multiple NICs are combined into a single "network entity" called bond in which NICs can be added or removed.

So, let's start:

Create the bond alias. This alias will point to a network configuration file where we will define the properties of our bond like the IP address and bonding options.

[root@oracle ~]# nano /etc/modprobe.conf

add the following line into modprobe.conf

alias bond0 bonding

Now create the configuration file for interface bond0:

[root@oracle ~]# cd /etc/sysconfig/network-scripts/

[root@oracle network-scripts]# touch ifcfg-bond0

[root@oracle network-scripts]# nano ifcfg-bond0

Insert this in ifcfg-bond0 file:

BONDING_OPTS="mode=1 miimon=100"


NETWORK= is the network class we are using.
IPADDR= is the IP address of this machine
BONDING_OPTS="mode=1 miimon=100" are the bonding options.

mode=1 is used for active backup policy which means that only one network adapter is active and the remaining are waiting for main NIC to fail in order to replace it.
Common values for "mode" are: 0 round robin and 1 active backup
miimon=100 is the frequency in milliseconds of MII link monitoring. 100ms is a suggested value.

bond0 configuration file is completed, now we need to edit configuration files for all NICs participating into this bond. For this guide I'm using only two NICs in bond0 so I have to edit only ifcfg-eth0 and ifcfg-eth1

[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0


[root@oracle ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth1


As you can see we configure all interfaces of the bond to be slaves using bond0 as master.

Restart network to apply changes:

[root@oracle ~]# service network restart
As for last step we need to add a default gateway for our machine:

[root@oracle ~]# /sbin/route add -net default gw
Try to ping an internet address, if ping echo reply returns correctly make permament this route adding previous command to rc.local file.

[root@oracle ~]# nano /etc/rc.local


/sbin/route add -net default gw

rc.local will be called each time the machine will startup.

That's all!!

martedì 2 aprile 2013

VMware: How to install Cisco Nexus 1000v - Part1

In this topic I briefly explain how to install Cisco Nexus 1000v virtual switch in VMware vSphere 5.1

Prerequisites for this installation are:

  • file which contains Cisco software. You can download it from this page.
  • Three VM Networks:
    1. Management Network (VM Kernel)
    2. Control Network (VM PortGroup)
    3. Port Network (VM PortGroup)

These networks should be separated usingh VLANs as stated in Cisco Nexus 1000V Getting Started Guide.

First we need to install Nexus 1000V Virtual Supervisor Module(VSM).
Unzip, the OVA file that will be deployed is located in "Nexus1000v.4.2.1.SV2.1.1a\VSM\Install" folder.

Open VMware vSphere Client, click File > Deploy OVF Template, choose nexus-1000v.4.2.1.SV2.1.1a.ova and follow the installation as stated in screenshots below.

Insert the Nexus 1000v administrator password and the management IP Address of the switch:

Once VSM is installed, we need to use Cisco installer to finalize the installation of the switch providing vCenter credentials.
Go to "Nexus1000v.4.2.1.SV2.1.1a\VSM\Installer_App" folder and run Nexus1000V-install_CNX.jar (Java must be installed in your machine in order to run this).
Select vCenter Server Connection and provide vCenter credentials as in the following images:

Once installation is finished click Close and in vSphere Client under Inventory > Networking you will see the Cisco 1000v Virtual Distributed Switch.

In a following post I will explain how to simple configure it creating port groups.

That's all!!