Skip navigation

Monthly Archives: July 2008

It is days like this that get on my nerves. Linux simply gives me issues –  ridiculous issues!!

1) A lock was created on a file which i wanted to get rid of. Empty trash in Ubuntu 8.04 simply gave up on me. Eventually i found the bash which did it right!   sudo rm -rf /home/kirk/.local/share/Trash/

2) Vmware console Add-on does not work with firefox 3 (damn it was automatically updated) I reinstalled firefox 2 and guess what…. plugin does not want to install anyway! For the time being i can forget using vmware console on my ubuntu! 😦

Ahhh… found the solution here:http://communities.vmware.com/thread/156067;jsessionid=BE54E753044C7DC49EFCB6ED49D8DA1F?tstart=0

” It looks like you’re running Linux on the client. I’ll assume that’s what your server is as well.

On the server-side, go to (adjust as necessary):
/usr/lib/vmware/webAccess/tomcat/apache-tomcat-xxxx/webapps/ui/plugin/

There, you’ll find several .xpi packages. Unzip the one you want to a temporary directory:

$ mkdir /tmp/xpi-out && cd /tmp/xpi-out
$ unzip /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x86.xpi

Edit the install.rdf file in the unzipped output, and change the compatibility (there’s a field that says 3.0.0., you should change that to 3.0. – or 3.0.1.*).

Then zip up the file again and replace the original (making a backup first):
$ cp /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x86.xpi \
/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x86.xpi.bak
$ zip -r /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/vmware-vmrc-linux-x86.xpi * ”
Problem solved once again!

This is something i added onto my VMware Server, but obviously it can be used for any Debian distribution. I was not the one which came up with bash scripts, so below you may find the source.

http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/

http://www.howtogeek.com/howto/ubuntu/share-ubuntu-home-directories-using-samba/

Since i  have no idea how to script, going along i still try to script something.,… most of the time being unsuccessfull! 😦  My attempts are usually in either in Bash or Perl. Please do not laugh at my scripting ignorance –  i am a noob in this area!

The first script i tried out what the below:

Reading the first line of remote server’s service.

_________________________________________________________________________________________________________

#!/usr/bin/perl

# file: lgetr.pl

use IO::Socket;
# Provides an object-oriented interface for network sockets operations

my $server = shift;
# shift – host and service name are moved off the command line and placed in a variable called “server”

my $fh = IO::Socket::INET->new($server);
# Opening a network socket

my $line = <$fh>;
# <> to read a line from a text from the socket into the variable $line which will be immediately printed.

open (SAVEOUT,”>&STDOUT”);
#open file handler and copy it as STDOUT
open (STDOUT,”>results.txt”) or die “Can’t open results.txt: $!”;
#place the file handle contents into reults.txt (where create txt file if does not exist)

#the file will contain the below
print $line;
print “Client date: “;
system “date”;

#recall file handler and close it.
#print the remaining at the default (command line) prompt

open (STDOUT,”>&SAVEOUT”);
print “Done!\n”;
________________________________________________________________________________________________________

Chmod 775

./ lgetr.pl <server-address:smtp>

Result.txt will contain:

220 wenzu64.kirkland.net Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at  Wed, 16 Jul 2008 21:42:25 +0200
Client date: Wed Jul 16 21:42:25 CEST 2008

Since i am a fan of Mikrotik devices and i can say that i have now setup quite a number of topologies, i decided to provide links to the most common configurations that i have setup.

WDS Bridging mode: http://wiki.mikrotik.com/wiki/Transparently_Bridge_two_Networks

Using netinstall: http://www.mikrotik.com/testdocs/ros/2.9/guide/netinstall.pdf

Interface bonding: http://www.mikrotik.com/testdocs/ros/2.9/guide/netinstall.pdf

VRRP: http://www.mikrotik.com/testdocs/ros/2.9/ip/vrrp.php

Firewall: http://wiki.mikrotik.com/wiki/Firewall

Supported Hardware: http://www.mikrotik.com/testdocs/ros/2.9/guide/driverlist.php

Personally i am running a 7 interface Mikrotik box (PCI Nics). It is running as a firewall/router. RouterOS version is currently the latest (3.11 at the time of this post). This Mikrotik is running on an AMD Athlon XP 2200 (1.8Ghz with 1Gigi Ram)

I have another Mikrotik router which is not active since i usually use it as a test machine.

The non active Mikrotik has 2 Realtek PCI NiCs and 1 PCI Wfi Card running on an old 128MB Ram Pentium Pro. The Wifi PCI card is 100% compatible with the Mikrotik Kernel and supports all features that run at 2.4Ghz.  – The card is a  Trendnet TEW-443PI (Atheros Chipset)

I have experimented OSPF and BGP but i can say that i never come accross a setup where i really required such protocols. Interface Bonding over multiple wireless links and static routing is still my favourite 🙂

Cisco Network Assistant is a great tool which can be easily utilised to manage Cisco switches. A large range of switches are supported. You may find a quick guide here:

http://www.cisco.com/en/US/prod/collateral/netmgtsw/ps6504/ps5931/prod_white_paper0900aecd802d1b95.html

In addition to the above link all that is required is to enable HTTP access on the devices.

Console into the switch and enter configuration mode, after which issue the below:

  1. aaa new-model
  2. aaa authentication login default local
  3. username ****** password  **************
  4. ip http server
  5. ip http authentication enable
  6. service password-encryption

That’s all folks.

Although not required for CNA, Ciscoworks requires SNMP to be set up and since I am in the network management theme I will post here the necessary configuration for snmp

  1. aaa new-model – Enables Authentication Authorisation and Accounting
  2. username ***** password  ***** – Creates login Authentication parameters
  3. aaa authentication login default local – Creates local authentication list
  4. snmp-server community ***** RO – Defines Read-Only Community String
  5. snmp-server community ***** RW – Defines Read-Write Community String
  6. snmp-server system-shutdown – Enables System shutdown using the reload function
  7. snmp-server enable traps – Enables sending traps and specifies the type of notifications to be sent. In this case since a specific traps were not required, traps were just enabled.

Since i was at it, i decided to finish off with ODS Pizza swtch SNMP configuration (now considered as a totally obsolete switch) I had used this switch for my dissertation so the below commands were useful to me.

ODS Xylan Pizza Switch (replace the “private” and “public” passwords with something decent obviously)

  1. Set Community Name   – private
  2. Get Community Name   – public
  3. Trap Community Name  – public
  4. Broadcast Traps      – enabled   UDP destination port 162
  5. Unicast Traps     – disabled

This post can be used in conjunction with the VMware Server post. I wanted my Linux host to have the clock synchronised with an NTP server so doing propagating it onto the VM Machines.

These are the steps required.

  1. run: sudo aptitude install ntpd
  2. run: vi /etc/ntp.conf (assuming you have vim tools installed)
  3. locate “server” and added the address of the NTP server instead of 127.0.0.1
  4. run: cp /usr/share/zoneinfo/Europe/Malta /etc/localtime (amend this according to your timezone)
  5. run: /etc/init.d/ntp restart (to restart the service)
  6. Next we have to check if the NTP server was picked up and the status of the synchronization, run: ntpq
  7. run: peers (see first screenshot)
  8. Check that the Peer Remote has been populated with the NTP server address inserted in the ntp.conf previously , ref id: is the high order stratum NTP server. What is most important here is the reach, since this increments accornding to how reliable the NTP (local) server is, and the poll, which will increase polling time if servers is reliable.
  9. run: association, and check the status. If you just restarted the NTP service, and the polling and reach values are low, than the condition would be rejected.
  10. After some time, when the reach values increase (meaning server is reliable and therefore also the poll interval increases) running once again the command association will return a different output. (see second screenshot). The condition will change to sys.peer
  11. Running peers once again will now output  reach 377 which means the data connection is good and an * which means preferred server. The Poll interval will also increase from 64 to any larger number over time.

Further details can be found here: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1339

“To watch the status of the ntpd process, run:

"ntpq -p"

Press Ctrl-c to stop watching the process.

Note the information in the following columns:

  • The character in the first column indicates the quality of the source.
  • The asterisk ( * ) indicates the source is the current reference.
  • remote lists the IP address or host name of the source.
  • when indicates how many seconds have passed since the source was polled.
  • poll indicates the polling interval. This value increases depending on the accuracy of the local clock.
  • reach is an octal number that indicates reachability of the source. A value of 377 indicates the source has answered the last eight consecutive polls.
  • offset is the time difference between the source and the local clock in milliseconds”

Lab in 2008

 

 

27U Cabinet - 2011

My Gear…

  • 1x Cisco 2610 (Nm-1e Module included)
  • 2x Cisco 4000
  • 1x Cisco Catalyst 5000
  • 1x Cisco 3600 (NM-FE & 4A/s Serial modules included)
  • 1x Cisco 2500 (4 sync/async serials)
  • 1x Cisco 2924-XL-EN
  • 1x Cisco 2924-XL-A
  • 1x Cisco 186 Analogue to Digital Phone converter
  • Mikrotik Router OS v3.11 x86 (7 Network Interfaces Included)
  • 1x AMD Quad Core 4 GB Ram, server (VMware Server)
  • 1x AMD Dual Core, 2 GB Ram raid 1, server (Windows Server 2003)
  • 2x Trendnet access points (b/g/n) repeater mode
  • 2x Trendnet Basic Switches
  • 1x ODS Pizza Switch
  • 2x Blazer 1000VA UPS
  • 2x Cisco PIX 501 Firewalls
  • 1x Cisco PIX 515SE Firewall
  • 27U Conteg cabinet

Software…

  • Mikrotik  –  The Dude (Network Monitoring System)
  • Windows XP
  • Windows Server 2003
  • Linux Ubuntu Server x64
  • Linux Ubuntu Desktop (on laptop)
  • Cisco Network Assistant
  • CiscoWorks (evaluation copy)
  • VMware Server 2.0 RC (linux version)
  • Dynamips (Cisco 7200 VXR, 2x bridged interfaces)
  • Acronis Data Backup

 

I had installed previous versions of VMware Server but version 2 is the best in my opinion.

  1. Install Ubuntu Server (i am using a 64bit so my ubuntu and my vmware installations are all 64bit versions)
  2. run: sudo apt-get dis-upgrade
  3. run: sudo aptitude install build-essential xinetd
  4. run: uname -r
  5. take note of the value of the “uname-r”
  6. run: apt-get install linux-headers-“uname-r”
  7. Download Vmware Sever from http://www.vmware.com   VMware-server-2.0.0-101586.x86_64.tar.gz VMware-vix-e.x.p-101586.x86_64.tar.gz
  8. Untar them with tar -zxvf <filename.tar.gz>
  9. run: cd vmware-server-distrib/
  10. run: ./vmware-install.pl  (this is will install the vmware core installation. It is pretty straight forward to follow)
  11. once done exit and move out of the folder, run: cd ..
  12. run: cd vmware-vix-distrib/
  13. run: ./vmware-install.pl (this will install the vmware GUI web management interface)
  14. once done, Vmware is installed, but obviously some tweaking is required. run: /usr/sbin/vmware-conf.pl to run again the configuration wizard.

I decided to use 3 network cards (Nic1 –  management web , Nic2 – DMZ, Nic3 – Local Lan)

It is required to map vmnet”x” to the physical interface eth “y”) for such a setup,  since i am using bridging not NAT.

Once done, you can log into the vmware console via https://<ip address>:8333 (if port was left default)

This is more or less it. I also installed and configured the below, but these are optional:

  • NTP client (via ntpq daemon)
  • Samba to share between MS Windows (to move distributions iso files easily via file sharing and no CDs required)
  • Added Datastores (via VM Management Interface)
  • Automatic restart of Virtual Clients once VM Server starts up.

I also installed: open-ssh, vim tools, htop on the host (linux) since they are handy tools.

Hello world,

This blog is an attempt at documenting the changes i perform on my home lab. I have been setting up my lab for the past 2 years and it went through a number of phases during the years.

Via this blog i will therefore achieve ..

1) Manage to remember the changes performed..

2) Put to good use the number of hours i spend on it by sharing what i learnt..

…. but i must say it is mostly the former … 😛

enjoy!

Kirk