Thursday, October 10, 2013

DRBD

For this week, we just created a simple website with basic functions like login, add user and logout.
This will  be needed for our exercise next week which is all about drbd.









For the next week, our task was to configure DRBD on our computers.  We  did that by first,  creating a new partition:



Then we modified our IP address from dynamic to static. Next is we put the localhost, server 1 & 2, and cluster's ip addresses on the /etc/hosts file  and installed DRBD.
After that we loaded the kernel module and configured the /etc/drbd.conf  file.

We tried to load the DRBD afterwards but we kept on  encountering an error. We tried figuring out the problem but we were  not able  to do that. Because of this, we did not finish entirely  the lasat exer on drbd.




High Availability Server


To configure a high availability server, we need to have the following configured:

Hearbeat  -  is a tool which provides cluster infrastructure. It is used to determine if a peer process fails to communicate so that its work can be done by another process.

Pacemaker -  by detecting and recovering from node and service-level failures, it achieves maximum availability for your cluster services.

Apache- or Apache HTTP Server, is an open-source web server application which provides tools for web server development.  It is supported on Linux, Windows and Mac.

In this exercise, the end user should not notice any failure on a particular website even there is really a failure behind the scene. There  will  be  an active and passive server. If the active server fails, the passive server should do  the job instead so that the process will continue.

Here are the steps to solve the problem:

1. First, make sure that the 3 tools are already  installed on your machine. Three computers are required to perform the exercise. Two  computers will be the server and the other one is the client.

2. Edit the Configuration files:

   Suppose our network is 192.168.0.1

for the hosts file,
/etc/hosts   should be

     127.0.0.1 localhost
     192.168.0.5     server1
     192.168.0.6     server2
     192.1168.0.24  cluster

for the authentication keys, 
/etc/ha.d/authkeys     should be

     1 md5 'yourpassword'

other configurations
edit /etc/ha.d/ha.cf
    logfacility local0 
    keepalive 2        
    deadtime 5        
    ping ipaddress   
    udpport 694       
    bcast eth0         
     node server1     
    node server2      
    auto fail_back2  


change the haresources - what will  be accessed by the client ( ipaddress)
edit /etc/ha.d/haresources

       server1 iPaddr::192.168.0.24/24/eth0 apache2

3. Start heartbeat by running:
     /etc/init.d/heartbeat start  or services heartbeat start

Results:


In this exercise, I learned to configure a simple high availability server. I will now think differently everytime I access a website like Facebook. I learned how can server failures be solved using HA server.

Internet Protocol Routing



IP Routing is the set of protocols  which resolves the path of data from the source to its destination.
One  program to simulate IP routing is the Scalable Cisco IOS Simulator for Virtual Machine.


In  this exercise, we need to connect 3 nodes or computers and determine if they can communicate which each other. After the exercise, the computer should have the capability of communicating with each other using the command 'ping'.


Here are the steps for solving the problem:

 network 1 will be 192.168.0.1
 network 2 will be 192.168.1.1
 network 3 will be 192.168.2.1

1. Make sure that you have a Network  Simulator installed on your machine. Launch the simulator to start.
2. We need 3 nodes/ host so we are going to click the computer monitor icon and generate 3 hosts by clicking and dragging it to the workspace.
3. Each computer/host needs identity so that it can be identified by other hosts. To do this, we should configure the IP  address, subnet mask and gateway of each host.
4. Configuration can be:
      Host 1 : 192.168.0.101, 255.255.255.0, 192.168.0.1
      Host 2:  192.168.1.101, 255.255.255.0, 192.168.1.1
      Host 3:  192.168.2.101, 255.255.255.0, 192.168.2.1

5. Next, we should generate 3 routers for each network and connect each host to  their respective network through the network interface ( eth#).

6 For the networks to communicate with each other,we will generate a switch. Connect the routers to the switch.

7. To test the network, open the terminal of a host and ping another host.

In this exercise, I have learned that for computers to interact with each other, IP, subnet, gateway should be configured. I have also learned that networks can communicate by connecting them using a switch.