DHCP Windows 2008 R2 – providing IP, subnet mask, DNS, and Gateway

DHCP is extremely common and is used by nearly every company out there. Windows Server 2008 R2 is also a very popular server for this kind of operation. These two facts identify this topic as ‘old news’ and is therefore more just for my benefit than anyone else. As usual though, I would be all the more excited if it did turn out to be beneficial for someone else.

Intro: As the heading tells, the goal here is to install DHCP service on a server and push out an IP, subnet mask, DNS address, and a gateway all through DHCP.

Here we go then:

Continue reading


Active Directory-creating a domain with Windows 2012 and 2008 R2 Servers

As a future resource for myself and a resource for others, I thought it might be nice to write a blog post on this. There are a few tricks and features that I have discovered in my quest to create this domain. I hope you are able to benefit from them in some way.

To start, I will be referring to the Windows 2012 server as server 1 and the Windows 2008 R2 server as server 2.

The idea here is to create Windows server 2012 as the first domain controller and then add Windows 2008 R2 later. To start, there are a few things that you should keep in mind:

  • DNS – When you install the domain forest for the first time, you have the option of creating that domain controller as a DNS server as well. This is the option I will be using as it is the most simple and integrates well.
  • Functional Level – You ALWAYS want your functional level to be set the the OLDEST server you have as a domain controller (DC).  More on that later but for right now, just make sure you keep in mind which server is your oldest.
  • Computer Name – The computer name of domain controllers are, as far as I am aware, nearly impossible to change after it has been added to the domain. You should change this before walking through this if you so wish.
  • Options – There are many ways to go through this process. This walk-through will allow you to get a gist as to how this can be done. Weather you start with 2008 R2 or 20012.
  • Pro – I do not consider myself a pro at any level. In fact, I hope that if there are any improvements that can be made, I would expect and appreciate them to be placed in comments below. I believe it your duty (if you find errors) to report  them in the comments as my intentions are to help as yours should be.

So, lets start:

Continue reading

Beginning Fragments

I have recently been studying Android UI. In Android UI, I have been discovering ‘Fragments.’  I do not claim to know everything about Fragments but I do believe I understand the basics of them. My hope is simply to help others and maybe get some feedback on things that may be better or that might straighten out some of my ideas. Feel free to leave comments. I will probably be splitting this subject into two blog posts; one for the basic structure and idea of Activities and Fragments and another that I will like to at the bottom about how I had to implement Fragments in our app to get it to work. ENJOY!

Continue reading

Source Code in WordPress free hosting

When I started my blog here at WordPress, I immediatly noticed that I could not add my own plugins to insert cool tags for source code. This is only because I use them to host my blog. However, there is a cool feature that I found that I thought I would share because it took a while for me to find it. This works great! When you add code wrapped in the ‘sourcecode’ tags, it looks something like this:



( 'X'

, 'Y' );

With this, it has a ‘language’ attribute in which you can assign many different languages so that it will do automatic formating for you! Pretty nice feature to have since you can’t do your own! Enjoy!

Windows 8 ad hoc

In my initial stages of developing for android, I was told time and time again that using an emulator was no way to go about it. Due to my lack of understanding I decided I would use the emulator to start. Then I got tired of the slow Eclipse emulator and decided to hook up my Android phone and use it instead. I found, after watching a tutorial (The only thing that was missing in this tutorial was downloading the right sdk in the sdk manager so you may have to look that up yourself), that the phone was MUCH faster. The problem was, my app no longer would communicate to the server. This is obviously crucial to the development of the app so I did some research and found that its because of my network blocking the access to my server even while connected to the same wifi. I read that the best way to solve this problem is to create an ad hoc network. Here is where I ran into the issue that shocked me the most.

I have set up ad hoc networks time and time again in Windows 7. However, Windows 8 has taken away the easy way of setting it up (or at least the way I knew how). After a little bit of stumbling around on Windows 8, I couldn’t get past the window that said that I must be in ‘Private’ network mode in order to set up an ad hoc network. I read on some blog page that it based the selection on whether your have your file sharing or network discovery. However, no matter how much I altered the settings, I still had no success.

That is when I came across this site. While it is already on this site, I thought I would repost just in case it ever went away. There is a tool that has been implemented into windows for a while now call “Network Shell.” This tool allows you to do many things like run ad hoc, as long as your driver supports it. The down-side to this tool is that it is strictly command line based. you should have the command prompt opened as administrator before beginning (right click cmd and choose ‘as administrator’).

The first thing is to find whether your driver is capable of ad hoc. You do this through typing:

 netsh wlan show drivers 

At this point, its very helpful to have a picture to see just what I am referring too but it should have some text where somewhere it says ‘ hosted network supported : yes’.  This means that your laptop is capable of doing an ad hoc environment without making any driver changes. Otherwise, you may need to update your wireless drivers.

Next is setting up your ad hoc network. You set up this other network by typing these commands:

 netsh wlan set hostednetwork mode=allow ssid=<?>  key=<?>
netsh wlan start hostednetwork

Here you will notice the <?> in the first command. You replace these with the ssid of your choice as well as the password of your choice. Once these two commands have been run, you are ready to connect with, in my case, your android phone. By the way, all I had to do after that was change the ip address for the server and it worked great!

PS.. I also started to have problems with restarting this ad hoc network. For your information, you may have to go into your ‘device manager’ and go to your network adapters. When you get there, you expand that category and look for the virtual adapter for wifi. You right click and say ‘enable’. This at least solved my problem. The error I was getting looked like this:

The hosted network couldn’t be started. The group or resource is not in the correct state to perform the requested operation.

Hope this helps!

Ubuntu SSH and XUbuntu GUI

To try to figure out how to set up plex (refer here if you want to learn more about my plex server situation), I found people who refered me to ssh. I thought, well I dont know how that would help me but it wouldnt hurt to learn it! I started off with installing ssh with this command

 sudo apt-get install openssh-server

After waiting a bit, I then went about changing the port that ssh goes through. I did this by first making a copy of the original file to make sure I could revert changes. The command for this is

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original 

I then change the rights of the original file to ‘a-w’ with this command

sudo chmod a-w /etc/ssh/sshd_config.original 

This removes the right to write from all users. Now I went in and edited the port that ssh communicates on to a random number I wont mention :). I did this by editing the file.

 sudo nano /etc/ssh/sshd_config 

Now it is time to restart ssh to apply changes with:

 sudo /etc/init.d/ssh restart 

Now I was able to ssh into my machine locally! really really easy. My steps were based off of this simple guide.

Unfortunatly this did not solve my problem. (I figured it wouldn’t because it is the same thing as command line interface.) What I decided to do was install a GUI to finish off the plex server. I did this with a lightweight GUI with the command

 sudo apt-get install xubuntu-desktop 

This was not what I wanted to do originally but my classes don’t give me as much time as might be required to do this project the hard way.(http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html) After it downloaded for a while. I actually opened up firefox right away and started taking care of it until I tried to publish my server and my apt complex has blocked the port! Will it ever end? haha

My Plex Server

This past weekend, I decided to try my hand at creating a Plex server based on the Ubuntu Server version 12.04.1. I bought an old hp tower from the BYU-Idaho surplus for about $40. This tower has 3 GB of ram and an 80 GB hard drive. The processor hits about 3 GHz. It came with Windows xp but that didn’t really matter to me. The specs should be plenty for a little in house Plex server. I decided to use Ubuntu server without a GUI so that I could work a little more with the command line Linux commands and have more processing power for my movies.

I found this great tutorial to follow and will show the errors and problems that I ran into.


USB: I first attempted to install this server off a bootable jump drive. I downloaded the ISO from a friend and used ‘live-usb-install’ software to put it onto a jump drive. The install failed early on when trying to unpack all the neccessary files. I also tried ‘LiLi USB Creator’ and tried again but it failed. I decided it was time to use a DVD and using the same ISO everything went through just fine. The DVD seems to be a more full-proof approach.

Partitions: The next problem that I ran into was partitioning my system. I wanted to keep xp for simple home use if needed. When I got into the options for partitioning, I basically went through the basic ‘guided’ partitioning and everything went through fine until I went to install packages. I was given a ‘No space left on disk’ error. I presumed that this was from the inodes in the Linux OS. However, after typing

df -i

I discovered that I had about 50% left.

I ended up trying these commands anyway in attempt to fix the errors I was getting.

cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

Lo and behold, the problem remained. I decided that I probably partitioned things wrong from the beginning so I started over. This time I did manual partitioning and removed everything but the partition for my xp. After cleaning up these partition and reinstalling Ubuntu  server, I continued back through the tutorial. This time with success!

First thing I did was get on my nearest laptop and went to ‘http://server-ip-address:32400/manage/index.html&#8217;

The beautiful plex logo appeared and I created an account. What I have to figure out now is how to add my server to my plex account (the account is free and you add your devices and servers to that account).

Anyway, now I just have to rip my movies for the digital versions! 🙂