Tuesday, 13 May 2014

NIC Bonding In Linux

Nic bonding is defined as bonding of two or more network cards on a server/pc to form a parallel single connection. This is a great way of achieving redundancy to a server if its having more number of network cards. Its having many names like.
1. Link aggregation
2. Channel Bonding
3. NIC Bonding
4. NIC teaming
5. Network card Bonding
6. Ethernet bonding
7. Trunking
8. Etherchannel
9. Multi-link truning(MLT)
10.Network bonding
11.Network Fault Tolerance(NFT)
12.Port channel
13.Smartgroup
14.EtherTrunk
Nic bonding is used to provide two benefits for us

1. High bandwidth
2. Redundancy/resilience
Before Clustering softwares come in to existing this technique is widely used to provide redundancy to a high end server. After cluster software introduced its used to enhance the cluster redundancy.
In this post we will see how can we achieve Nic bonding.
Nic bonding will work with the help of bonding driver in kernel.

Implementing NIC bonding : Participating interfaces.
eth0
eth1
bnd0

Step1 : Create bond interface file with following content in it
vi /etc/syconfig/network-scripts/ifcfg-bnd0

DEVICE=bnd0
IPADDR=192.168.0.234
NETWORK=192.168.0.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
GATEWAY=192.168.0.1
save and exit the file
Step2 : Now create a bnd0 virtual interface in modprobe.conf as shown below
alias bnd0 bonding
options bnd0 miimon=100 mode=6

Save and exit the file
Let me explain what actually the above two lines indicates

Line1 : (alias bnd0 bonding) to load the bonding module in to kernel
Line2 : Indicate the option for thie bond interface
miimon is nothing but to MONitor with MIItool to check the availability of other interfaces.
mode is to specify whether the bond is configured as load balancing or fail over. Here its load-balancing which means data transmission will be shared between two interfaces. To know more about modes click here
Step3 : Load the module in to kernel with modprob command to update this changes to kernel
#modprob bonding

Step4 : edit interface card details of both physical devices
For eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no

ONBOOT=yes
MASTER=bnd0
SLAVE=yes
BOOTPROTO=none

For eth1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bnd0
SLAVE=yes
BOOTPROTO=none

Save and exit the files
The above thing is self explanatory for many admins but let me explain to new people.
DEVICE Indicates what is the device name
USERCTL Indicates that can user control this device(here its no)

ONBOOT Indicates that at the boot time do this device should be up?

MASTER Is this device has master? Then what it is(here its bnd0)
SLAVE Is this device acting as slave?

BOOTPROTO What about getting ip add from what protocol?(its set to none which indicate its a static IP)

Step5 : Restart the network service and see the output of ifconfig for your self.
#service network restart
#ifconfig
Questions & Answers

1. How can we say my data is flowing in which path?

Ans : Link aggregation(bonding driver) will take care of sending all the frames of particular session in same path. This is called as ordering of frames.
2. Can we bond more than 2 NIC?

Ans : Yes we can, follow the same procedure. In fact there is no limit but linux server do have limit to have total number of NIC cards.
Tips on implementing NIC bonding
1. Enable spanning tree for switches, with out which network speed reduces.
2. Be careful if you’re doing this over a remote ssh.

Monday, 12 May 2014

Job Description

Job Description
 Minimum 3-7 years of working experience
Hands on experience in setup, configuration, upgrade, maintenance, performance monitoring and troubleshooting of servers running on different OS platforms like Linux (Various Flavors especially Redhat, Suse, Ubuntu and other unix flavours such as HPux and Solaris).
Experience in Linux system services such DNS, DHCP, NFS/AutoFS, NIS, Samba, NTP, Apache/Tomcat etc
Experience in LVM or veritas volume manager and Raid management
Knowledge on  RedHat Satellite Server and provisioning.
Knowledge on  package management via RPM, Yum and Tarball.
Apply patches to the OS / applications or upgrade the applications
knowledge in Unix kernel tuning and performance analysis
knowledge in OS recovery and disaster recovery procedures
Hand on experience in Administering High Availability Cluster, failover scenarios, load balanced environment knowledge (Redhat cluster/Veritas Cluster)
Should be having good knowledge of SAN topologies, Fibre Channel, Multipathing.
Configuration and management of multipath solution for SAN storage LUNs
Familiarity with shell scripting and automation.
Should have a knowledge such as Incident, Problem, Change Management as well as Capacity, Availability, Continuity Management and others
Good Level of Knowledge & experience in VMWARE/KVM/Xen server
Knowledge on monitoring Tools  Nagios/NRPE
Error analysis and solution development for Problems in the IT infrastructure
Creation and update of technology related documentation and instruction document
Excellent interpersonal and communication
Must  willing to work in 24/7 shifts

TCS

Hands on experience on LVM, SAN (lun configuration with the host), NIS, NFS, sendmail, apache, Server Build, kernel tuning.

Thursday, 8 May 2014

Install VirtualBox in RedHat

1.# cd /etc/yum.repos.d/

2. #wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

3.# yum update

4. Check that that you are running latest installed kernel version

#rpm -qa kernel |sort -V |tail -n 1

#uname -r

5.# reboot

6. Install dependency package

#rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

7. Install Virtualbox

#yum install VirtualBox-4.3

8. #service vboxdrv setup

9. Add VirtualBox User(s) to vboxusers Group

#usermod -a -G vboxusers user_name

10. Start VirtualBox

#VirtualBox 

Install Oracle VirtualBox in RHEL

1.Update the kernel yum and reboot the server
#yum install kernel
2. Inpm/rhel/virtualbox.repo

Install EPEL repo for install of dependencies
#wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6.8-noarch.rpm

#rpm -ivh epel-release-6.8-noarch.rpm
#cd /etc/yum.repo.d/

3.Now Install the dependcies using yum

#yum install binutils gcc patch libgomp glibc-header glibc-devel kernel-headers kernel-devel dkms
4.Go to /etc/yum.repo/d/ folder and download virtual box repo using wget command

#wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

5.Install the virtualbox-4.3 using yum command

# yum install virtualbox-4.3

6.Rebuild the kernel modules
#/etc/init.d/vboxdrv setup

7.Installation complete now you can run virtualbox using command line or you can use launcher from menu
#virtualbox

Tuesday, 6 May 2014

reference

http://rbsrhel.blogspot.in/2013/03/job-scheduling-cron-anacron-and-at-batch.html

RHEL 6 YUM Server and Client Configuration

RHEL 6 YUM Server and Client Configuration

Server configuration steps

Yum server IP = 192.168.1.100
Yum server hostname = server1.example.com



Should be flush the iptables and restart the network service

iptables -L
iptables -F
service iptables save
service iptables restart

service network restart

Step 1: Insert the RHEL 6 CD

[root@server Desktop]# cd /media/RHEL_6.1\ x86_64\ Disc\ 1/Packages/

Yum server required packages

[root@server Packages]# rpm -ivh vsftpd*
[root@server Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@server Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@server Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm

Step 2: Check the installed packages

[root@server1 Desktop]# rpm -qa vsftp*
vsftpd-2.2.2-6.el6_0.1.x86_64

[root@server1 Desktop]# rpm -qa deltarpm*
deltarpm-3.5-0.5.20090913git.el6.x86_64

[root@server1 Desktop]# rpm -qa python-deltarpm*
python-deltarpm-3.5-0.5.20090913git.el6.x86_64

[root@server1 Desktop]# rpm -qa createrepo*
createrepo-0.9.8-4.el6.noarch
Step 3 : FTP service start

[root@server Packages]# service vsftpd status

[root@server Packages]# service vsftpd start

[root@server Packages]# service vsftpd status

[root@server Packages]# chkconfig vsftpd on

Step 4: Copy the rhel6 dvd content

[root@server Packages]# cd

[root@server ~]# cp -rf /media/RHEL_6.1\ x86_64\ Disc\ 1/       /var/ftp/pub/

[root@server ~]# cd /var/ftp/pub/
[root@server pub]# ls
RHEL_6.1 x86_64 Disc 1

[root@server pub]# mv RHEL_6.1\ x86_64\ Disc\ 1/ rhel6.1

[root@server pub]# ls
rhel6.1

Step 5: Single mode installation createrepo

[root@server ~]# createrepo -v /var/ftp/pub/

[root@server ~]# cd /var/ftp/pub/

[root@server pub]# ls
repodata  rhel6.1

Step 6: Group installation createrepo

[root@server repodata]# cp –rf /var/ftp/pub/rhel6.1/repodata/5819e9580b5a81a9eec9e2c6e91fc9992a7ccadaa3bcd5ecb2e87a8669eefcec-comps-rhel6-Server.xml      /var/ftp/pub/repodata/

[root@server ~]# createrepo -g /var/ftp/pub/repodata/5819e9580b5a81a9eec9e2c6e91fc9992a7ccadaa3bcd5ecb2e87a8669eefcec-comps-rhel6-Server.xml /var/ftp/pub/

Step 7 : Create the repo file.

[root@server ~]# vim /etc/yum.repos.d/server.repo
[server]
name=rhel6.1 yum server 64bit
baseurl=file:///var/ftp/pub
enabled=1
gpgcheck=0
 
[root@server ~]# yum clean all
[root@server ~]# yum makecache
[root@server ~]# yum list all
[root@server ~]# yum grouplist

----------------------------------------------------------------------------------------------------------------------------

Yum client repo configuring

Yum client IP = 192.168.1.101
Yum client hostname = client1.example.com


[root@client~]# vim /etc/yum.repos.d/client.repo
[client]
name=rhel6.1 yum client 64bit
baseurl=ftp://192.168.1.100/pub
enabled=1
gpgcheck=0

[root@client~]# yum clean all
[root@server ~]# yum makecahe
[root@client~]# yum list all
[root@server ~]# yum grouplist