Monday, October 7, 2013

DRBD Setup

Hello! Here I am again, making the last blog for this subject! :) There are 3 parts in this blog. The first is the development of a simple website, and the second and third is about the DRBD setup.

First things first! Website Development :)
I used codeigniter for building the website. Below are screenshots of the installation of utilities used.
Figure 1: Installing Apache2

Figure 2: Installing MySQL Client and MySQL Server

Figure 3: Installing PHP 5


Figure 4: Installing PHP Modules

Figure 5: Installing Phpmyadmin

Figure 6: Moving Codeigniter folder to /var/www/

I also changed permissions using chmod. All file permissions are set to 755. This is my second time trying to make codeigniter work in ubuntu. I had difficulty changing the layout in the first trial and I don't know why. Maybe I had errors in my installation before.

In the second try, everything worked smoothly.

I used codeigniter basically and jquery. I tried to use ajax but that gives so many issues and it's not required so I dropped using ajax.

The series of pictures below will demonstrate the site I created.  The site has the login, add user, edit user, and delete user functionalities.

Figure 7: Login Page

Any registered user has access to the site. My username and password is 'sheena'.

Figure 8: Home Page
 Here you could see Add User Button, Logout Button and each user has its own Edit and Delete button. I used modal for the design of the alert boxes. Add, Edit, and Delete each have their own modals.

Figure 9: Add User

Figure 10: Edit User

Here you can see that the fields were correctly fiilled. All powered by JQuery. :D

Figure 11: Delete User

Figure 12: Home Page After Using the Functions

Based from Figure 8, you can see that dune was added, shanne was edited and panasonic was deleted. (It's not photoshopped! :)) )


I really made an effort to somehow make the layout a little bit decent because it's what I do. For me, It'll be a shame if I'll just make an ugly website.


Okaaaaay. Reality check: I wasn't able to accomplish the second and the third part. But hey, I swear to God with all my heart that I tried during the laboratory hours.

Okay before I tell you my hard encounters,  I'll summarize the goal of the exer.
Given two servers that actually sync data with each other, the client still can access the server even if the main server is down through the second server.

The second part is just creating a 2GB partition using gparted. From what I understood during the discussion servers mirror data accessed by the users.

In the third part, I have teamed up with Meeren Aguilar and Marian Bundalian. We never reached the point where our two computers successfully connect to each other using the wifi. I think it's unfair to use a preconfigured computer because it gives additional confusion into something that we don't fully understand yet. Having a guide is useless if the computers are not set up correctly.

For three hours, Meeren and I were trying to connect the computers but we failed. I think one major factor is that our foundation in host networking is still not good so we really had a hardtime implementing the more complex tasks.

But all in all, I enjoyed the first part of the exer. :)) Too bad I don't  have all the time in the world to explore on my own.

Thank you sir for your effort. Let me end this blog by saying that I really like the way you teach with all the visual aids (drawings). It's  from those that I actually understand what my imagination can not. Too bad I wasn't able to make this exer. God bless and more power!



















Friday, August 16, 2013

Server Cluster Configuration: The Most Challenging Exercise Yet


This exercise is the most interesting exercise for me yet. Maybe because I am into web development and I want to learn how servers are configured. But life has its own way of saying "You can't always get what you want!". Hehe. I tried to make this work for three times. The first trial was by using our family desktop computer and my laptop. I searched for tutorials online and tried to implement it on my own. The screen shots below show the steps I made in my first trial.

Installing Ubuntu

Two computers that will serve as servers

This exercise suggests to have at least three computers configured to share a network. But I only have two available computers at our home so I decided to just use our iPad if ever I had successfully configured the server.

(Screen shots below show installation of heartbeat and pacemaker.)


Figure 1: Heartbeat Installation

Figure 2: Pacemaker Installation


So in my first trial, I used the video that can be watched in youtube to setup DHCP Server. The goal of this exercise is easy to understand but the underlying concepts are hard to implement. Here is the link to video I have watched in youtube: http://www.youtube.com/watch?v=Aq-StF7ovKA

Figure 3: Install DHCP3 Server

Figure 4: Ifconfig Server 1

Figure 5: Ifconfig Server 2



Figure 6: Editing DHCP.conf

Figure 7: DHCP Restart in Server1

FIgure 7: Restarting DHCP Server in Server2

Figure 8: Configuration Failed

It was already 3 am in the morning last Monday when I decided to give up on this exercise. I have no time to do the task since I'm already working. I decided to just make the blog and share my experiences.

The first trial was not even close to the expected output. :)) But, I seriously tried. 


The second trial was during the lab. I teamed up with Noel Baylosis and Marian Bundalian. It was very frustrating because there are so many PC's in the lab but we were'nt able to configure it correctly because previous configuration of students got in the way.


(Screenshots below show the step by step configuration based from the handout.)

Figure 9: Server 2 Step 2

Figure 10: Server 2 Step 4.1

Figure 11: Server 2 Step 4.2

Figure 12: Server 2 Step 4.3


Figure 13: Server 2 Step 9
Figure 14: Our group's annoying problem

We were stuck because of the problem encountered in figure 14. We even changed role playing. We changed servers to configure but the result didn't change.


And for the third trial, the trial I did before I finished this blog was through the desktop and laptop once again. We have a router and many LAN cables so I didn't think that there will be a problem in connecting the computers. I have never been so wrong. Hehe. 

The first I did was to connect the computers using a LAN Cable. My plan is to connect the two computers using a LAN cable and through the router, I will fetch the website using the iPad. The idea is not complicated but the implementation is very difficult.

(Screenshots below show the manual configuration of server 1 for eth0.)


Figure 15: Server 1 - Manual Configuration of ipv4 in Network Connections

The same was done to server 2, only with different ip address of course.

Figure 16: Server 1 pings server 2

I stopped the configuration when I encountered again the error in the second trial. :)) And it's 3am again in the morning. I can only do this task late at night after my work :))


So after 3 attempts, the problems encountered are mainly  about configuration. Hehe. Of course. I just really hope that there are published books for ubuntu programming because books can be so reliable. And one thing is, there are a lot of versions of ubuntu and a lot of incompatibility issues so it is not safe to just choose a tutorial and expect it to be successful.

Well Ha-Hb is not user friendly. The idea of having multiple servers is good because there are things that are expected to be always up. But having multiple servers can dangerous or hard to maintain. Multiple servers increase the chance of having inconsistencies in the data. Some of the real world applications are social media sites and online gaming.


Allowing myself first to discover firsthand the configuration for HA-HB is not that bad but it is very difficult because my resources are limited. Hehe. I don't have three computers which is the desirable number of computers for the exercise.  And our desktop only supports wired connections so it is an additional hassle. Good thing we have a router though :))

 To wrap all things up, this has been the most challenging and the most exhausting exercise in this subject so far. Even though I was not able to configure the connections successfully, I am happy because I was able to learn by myself and my resourcefulness was also exercised too. :)

Tuesday, July 23, 2013

Linux Router and Protocol Analysis

Last week, when this exercise was given, I was not able to get a partner so I decided to do it on my own using my laptop and my sister's laptop. But before I can do the exercise, I still need to install Ubuntu on both laptops. After installing Ubuntu, I tried to do the exercise but I failed.

Today, we continued doing the exercise. I joined the pair of Meeren Aguilar and Marian Bundalian. We were struggling at the beginning and were not able to connect wirelessly. We tried entering the command line "rm /etc/udev/rules.d/70-persistent-net.rules" and then rebooting the PC's but still failed connecting the computers. Thirty minutes before 7:00P.M. we were able to connect the computers and my computer, computer B was able to connect to the internet through computer A, Meeren's computer.

Screenshots below show the step by step configuration of my computer, computer A.



Figure1: Checking the ip configuration first using ifconfig.
Figure 2: Step 1 - Assign the static IP address 192.168.x.1 to the interface connected to Computer B using ifconfig.
Figure 3: Step 2 - Set the IP address of Computer B as the default gateway.
Figure 4: Step 3 - Try to ping Computer B using other IP addresses (10.0.4.42 and 10.0.4.254)
The picture shows that 10.0.4.42 was pinged successfully while 10.0.4.254 was unreachable.


Figure 5: Step 4 - Copy the contents of /etc/resolv.conf of Computer B to the /etc/resolv.conf of Computer A
Figure 6: Visit your favorite web site using your favorite web browser.

The picture above is not my favorite web site but I thought of a site which has few items to load (I'm not a person with so much patience ;D). I swear with all my heart that this is not a faker. I was really able to connect to the Internet through Meeren's compter. :)

Sad to say, this is the farthest our group has finished. We ran out of time and began saving backups of screen shots to be used for our blogs few minutes before 7:00 P.M. This exercise is more fun and less frustrating than the exercise for DNS. Because in this exercise, there's improvement but in DNS, I can't even find the error in my code. (makapag rant lang :P )

Today's topic is pretty cool even if our group only managed to finish only the first part. The idea of connecting to the Internet through another computer is amazing. Though, I'm used to creating adhoc connection in Windows because we don't have a router in our apartment. But that's easy because Windows has a user friendly function for creating adhoc connections.

Though I enjoyed this topic, I'm not satisfied because I'm the type of programmer who wants to understand what's really happening in every command line that I enter. I like it when the prof explains what's happening and enlightening the confusions I have. I really appreciate it when my prof answers the questions instead of playing hard to get when I am really lost on what to do next. I  wish I can do better in the next exercise. :)





Tuesday, July 9, 2013

The Frustrating DNS

Why, hello there. Today is an unlucky day for me. I missed the quiz for the second time. Ugggh. Next meeting, I'll make sure I won't be late again. >_<

Today's topic is quite confusing and frustrating. I didn't absorb the topic that much because I was too busy thinking of my "banat" for the quiz. :)) But I was able to take down some of the important notes.

Here are some definition of terms:

  • DNS - Domain Name System
  • NIS - Network Internet System
  • WNIS - Windows Internet System
  • SOA - Start Of Authority
  • NS -  Name Server
  • A - Hostname Adress Map
  • PTR - Maps Address to Names
  • MX - Mail Exchanger
  • NAME - Canonical Name

The topic for today taught me a deeper idea of the Domain Name System. My knowledge in DNS is now deeper because of the hands on experience in setting up and configuring domain and subdomains. Before, I only know that domain names are just string of letters and numbers as substitutes for IP addresses. It's just a shame I wasn't able to configure the domain system in the exercise.

The screenshots below show the relevant files for configuring the domain system.
Figure 1: Source Code for name.conf.local


Figure 2: Source Code for db.cmscwantriseben.com


Figure 3: Source Code for db.192.168.3


Figure 4: Query "named-checkconf named.conf.local" Returns No Error


Figure 5: named-checkzone Query  Returns Weird Notifications

Figure 6: Source Code for resolv.conf


Figure 7: dig mra Query Return Wrong Output


Figure 8: Ping Fail


Today's topic may be hard but I know that UP does not settle for easy things and we should treat every failure a challenge. And we strive hard to make that failure a success. Even if I didn't fully grasp the topic for today, I'm now responsible to help myself learn about the topic on my own. Thank you for the effort, sir. Kahit na gustong gusto mo na kaming ifull spoon feed kanina. :))))


Another banat:
Alam mo tama lang na EX-er ang tawag sa task kanina. Kasi just like almost all of the EX-es, kahit paulit ulit mong isipin at intindihin, minsan, di mo pa rin malaman kung saan ka nagkamali kahit lahat ginawa mo na para maging okay lang ang lahat. :)))))))))))))))))

Wednesday, July 3, 2013

IP Routing


The topic for today is about IP Routing. But first of all, I just want to share the agony I felt when I missed the quiz which I was prepared for. sayang! :(


Hehe, moving on. Today's topic is very interesting and I can say that I was able to understand it even though I failed to make the tutorial work at the first try. I was able to correct the configuration because of the illustration drawn on the board. The illustration shows the connection and addresses of routers and hosts that made me understand the topic. 







Figure 1: The illustration copied from the board showing connections and stating addresses






The pictures below show the step by step process of configuring the network consisting of two routers and two computers. (Tutorial)
Figure 2: Setting Up Router 1







Figure 3: Setting Up Router 2







After the routers were configured, the connections were tested through pinging addresses used in the configuration. If no packets were lost from the sent packets, it means that the configuration was correct.



Figure 4: Host 1 Pings The 3 Given Addresses









Figure 5: Host 2 Pings The 3 Given Addresses





The Exercise
The goal of the exercise is to make a network that consists of three hosts, three routers and a switch. The network should be configured such that all three computers can communicate with each other.



Figure 6: A screenshot of the Setup of the Network I configured




The pictures below show the step by step process of setting up router 1, router 2, and router 3.


Figure 7: Setting up Router 1







Figure 8: Setting Up Router 2





Figure 9: Setting Up Router 3



After the 3 routers were configured, the connections were tested through pinging. Each host pinged its respective co-hosts.



Figure 10: Host 1 Pinged Host 2 and Host 3







Figure 11: Host 2 Pinged Host 1 and Host 3











Figure 12: Host 3 Pinged Host 1 and Host 2






To wrap it all up, yesterday's lab class is fun yet disappointing when the blackout occurred. Understanding how connections between routers and hosts work is very interesting. Making this blog is harder than the exercise itself. All the cropping and layouting in photoshop is not hard but requires a lot of hard work. >:))


To my instructor, thank you for enlightening me about the topic through yesterday's class. More power! :)