Craig Mattson (Personal Website)
Home - Blog, News, About MePrograms - C#.Net, Java, VB6MusicWebsites

Viewing News Article

Unix - The tool of the devil. (20/03/2007 03:33:19 AM)

I bet you guys are getting p!ssed off with all these posts about Linux and how it (as a server) tramps all over Microsoft Windows Server 2003. Well, here's another one to add to your emerging frustration with my Blog. Yesterday in Network Administration, I was appalled at the lack of logic that some people demonstrate. Since when is it so difficult to press the 'Next' button? Basically yesterdays task was to learn how to install a Linux distribution, namely Fedora Core on their PC's in front of them. The problems they had? Well, they didn't seem to realise pressing next actually did something, yet it's common in Windows to press 'next' to achieve something.

linuxFor the record, Fedora Core even from it's infant stages (version 1) had a GUI installer, which has always been quite easy to use, providing that you understand that to install the Operating System, you have to at some stage or another press the next button. Not a difficult task unless your keyboard and mouse have strangely not been detected by the kernel. For my group, I installed my other HDD and formatted it, letting them install openSuSE on it. They did that quite quickly (in fact beating the others by about 30 minutes). Whilst they were plugging the network in, I asked the tutors did they have a DHCP server set up, and they hadn't yet, so I said - ok I'd put up a basic one now in Linux. After hunting through repositories, I finally installed the dhcp3-server package, and had one written out.

To be honest, setting up a DHCP server under Linux is pretty darn easy providing you know the commands to initialise (which when you remember the commands, you then obtain an understanding of DHCP) as opposed to setting up on Windows whereby you have to use a wizard to do so creating weird-o scopes with no CLI configuration. To show you how simple it is to set up a simple DHCP server to work on one subnet, I have included it below.

default-lease-time 600;
max-lease-time 7200;

subnet 10.1.1.0 netmask 255.255.255.0
{
    range 10.1.1.10 10.1.1.100;
    range 10.1.1.150 10.1.1.200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 10.1.1.255;
    option routers 10.1.1.1; # I was sneaky here and hehe... controlled packets
    option domain-name-servers 10.1.1.1; # Got bored and had Bind9 aswell
    option domain-name "fit.lan";
}

So, I'm sure you are thinking now - that's difficult to memorise all of that. Quite the contrary actually, if you understand how DHCP works. Basically we have defined a default lease time for the IP address, the Maximum time to do so (before renewing), The range that we want (I have set up between 10-100, 150-200 to prove I could theoretically have servers on 2-9, 101-149, 200-254). The Subnet mask is necessary to determine the length of the IP Address, the broadcast address is the address to broadcast the DHCP address on, the Router (or default gateway on windows) is obviously there to route packets through a firewall (or to another WAN address or something) and Domain Name Servers. You don't need a DNS server, but who wants to remember a bunch of IP Addresses :P Unfortunately, I kinda got a bit frazzled myself when I couldn't get the DNS to operate for a while, and it just hit me straight in the face. Never bothered to check the IP of the current adapter now, did I? Basically it was an easy fix from the CLI. Basically what I entered below fixed it. I didn't necessarily need the first line, or the up on the second line. But this is how you change an IP address straight away. Much quicker than clicking Start, right clicking Network Places, clicking Properties, locating your LAC adapter and right clicking and going to properties, then locating TCP/IP and then clicking an option button... blah blah blah... Under Unix, it's done instantly using:

ifconfig eth0 0.0.0.0 down
ifconfig eth0 10.1.1.1 up

Well, I know there are going to be people out there who are used to Windows who will just say that it's easier to do this under windows because there is no CLI to worry about, and that helpful wizards are included. Of course it's easier for someone who doesn't know DHCP, but how many of these people have successfully set one up from first try letalone know exactly what their server is doing?

computer_problemsAs I have said countless times before, you know nothing about computing until you use Linux, and unfortunately there is a whole group of Windows users out there would debate the fact. But you ask them exactly what certain services do, and they have absolutely no idea. If they have absolutely no idea, how can they truly optimise their networks or PC's? <To see if anyone actually reads my blog, I have finally secured a job - $17 per hour, $19 and $26 per hour.> Efficiency is great too with Unix. VIM has become my favourite editor, more so than notepad after learning how to use it properly, as the features to find and replace everything takes no time at all. As I do change script variables regularly, I now have the knowledge to simply have VIM browse through my website directories, and by entering a command, I can replace EVERY INSTANCE OF A WORD, STRING or VARIABLE with whatever I want with no prompts. I can also define what sort of a pattern it must fulfil, like if there can be characters after it, or if it requires a number before... Directory listings is a good example. It is 33% more efficient to use ls rather than dir to locate your directories.

Whilst this is a Unix promotion post, I am not saying Windows is bad. Not everyone wants to learn or use CLI's. Hell, a lot of people hate working with Windows as is, and changing their OS on them will destroy them even more, simply because a process done one way on a machine is different from another. Windows XP isnt such a bad operating system either. Sure, I have more BSOD's in Windows a day than I've had on Linux since the start of this year.

Anyway, catch you around peoples 

[Print View]