Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts

Tuesday, 16 February 2010

Bonding interfaces in Linux

Bonding interfaces provides lb/ft to a network connection. So, if you have a lot of nics and a managed switch (supporting trunking), bonding will be a very good option!

First, create a bond interface file:

# vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=x.x.x.x
NETWORK=x.x.x.x
NETMASK=x.x.x.x
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

Next, set the first interface in the bond:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Then, the second interface:
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Add the bonding module to the modules configuration:
# vi /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=0  miimon=100

Mode 0 for fault tolerance, mode 1 for load balance.

To see a full list of the bonding available modes, go to the official Red Hat KB article here.

Check the bonding module:
# modprobe bonding

Restart the network service:
# service network restart

Check the status of the bond:
# less /proc/net/bonding/bond0

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:c6:be:59

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:c6:be:63

Thats all... always remember to check /proc/net/bonding/bond0 for link failures.

Monday, 21 December 2009

Settings for nsclient (Nagios agent for Windows)

It's not a hard task, but sometimes i forget it...

1.-Install the nsclient agent as service:
unzip the agent in c:\nsclient. Don't use the msi installer!
edit nsc.ini and uncomment the following lines:

[modules]
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll

Don't uncomment the CheckWMI.dll

[settings]
allowed_hosts=
use_file=1

[NSClient]
port=12489

Save the nsc.ini file and open a command prompt. Go to c:\nsclient and execute

C:\nsclient>"NSClient++.exe" /install
Service NSClientpp installed...
l NSClient++.cpp(224) Service installed!

Next, install the System Tray icon:

C:\nsclient>"NSClient++.exe" SysTray -install

Now, go to Services and allow the nsclient service to interact with the desktop (to allow the system tray icon)

Start the service from the service manager.